diff options
author | Leo Liu <[email protected]> | 2015-03-30 13:25:15 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2015-03-31 12:31:58 -0400 |
commit | 8e3668a7c0c725285d1d23cf5f2bc32c69114650 (patch) | |
tree | fd2ee684dbb87fa1d8771c8e268ef95ecf66f844 | |
parent | 489866938f8bf85625f0f452006a3422a2585950 (diff) |
st/omx/enc: export framerate to vce driver
The framerate will be used for video usability info support by VCE driver
Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/omx/vid_enc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c index 83624c53145..ae1a98f5be3 100644 --- a/src/gallium/state_trackers/omx/vid_enc.c +++ b/src/gallium/state_trackers/omx/vid_enc.c @@ -1015,6 +1015,9 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic break; } + rate_ctrl->frame_rate_den = OMX_VID_ENC_CONTROL_FRAME_RATE_DEN_DEFAULT; + rate_ctrl->frame_rate_num = ((priv->frame_rate) >> 16) * rate_ctrl->frame_rate_den; + if (rate_ctrl->rate_ctrl_method != PIPE_H264_ENC_RATE_CONTROL_METHOD_DISABLE) { if (priv->bitrate.nTargetBitrate < OMX_VID_ENC_BITRATE_MIN) rate_ctrl->target_bitrate = OMX_VID_ENC_BITRATE_MIN; @@ -1023,8 +1026,6 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic else rate_ctrl->target_bitrate = OMX_VID_ENC_BITRATE_MAX; rate_ctrl->peak_bitrate = rate_ctrl->target_bitrate; - rate_ctrl->frame_rate_den = OMX_VID_ENC_CONTROL_FRAME_RATE_DEN_DEFAULT; - rate_ctrl->frame_rate_num = ((priv->frame_rate) >> 16) * rate_ctrl->frame_rate_den; if (rate_ctrl->target_bitrate < OMX_VID_ENC_BITRATE_MEDIAN) rate_ctrl->vbv_buffer_size = MIN2((rate_ctrl->target_bitrate * 2.75), OMX_VID_ENC_BITRATE_MEDIAN); else @@ -1039,8 +1040,7 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic } rate_ctrl->peak_bits_picture_integer = rate_ctrl->target_bits_picture; rate_ctrl->peak_bits_picture_fraction = 0; - } else - memset(rate_ctrl, 0, sizeof(struct pipe_h264_enc_rate_control)); + } picture->quant_i_frames = priv->quant.nQpI; picture->quant_p_frames = priv->quant.nQpP; |