summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoyuan Zhang <[email protected]>2016-07-13 18:51:13 -0400
committerChristian König <[email protected]>2016-07-14 09:49:14 +0200
commit5490068fb146dc2d391cf7f7c4eb875ac6973e88 (patch)
tree48782a73925597d577bb6551d6fa08cbdc9aba5e
parentb86bf4b568634b4bf11c645c60025840a0dcab5c (diff)
st/omx: assign previous values to new structure
Assign previously hardcoded values for OMX to newly defined structure. As a result, OMX behaviour will not change at all. Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <[email protected]>
-rw-r--r--src/gallium/state_trackers/omx/vid_enc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index d70439a9ce7..bbc7941ffe0 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -1006,6 +1006,14 @@ static void enc_ScaleInput(omx_base_PortType *port, struct pipe_video_buffer **v
priv->current_scale_buffer %= OMX_VID_ENC_NUM_SCALING_BUFFERS;
}
+static void enc_GetPictureParamPreset(struct pipe_h264_enc_picture_desc *picture)
+{
+ picture->motion_est.enc_disable_sub_mode = 0x000000fe;
+ picture->motion_est.enc_ime2_search_range_x = 0x00000001;
+ picture->motion_est.enc_ime2_search_range_y = 0x00000001;
+ picture->pic_ctrl.enc_constraint_set_flags = 0x00000040;
+}
+
static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_picture_desc *picture)
{
OMX_COMPONENTTYPE* comp = port->standCompContainer;
@@ -1064,6 +1072,8 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic
picture->frame_num = priv->frame_num;
picture->ref_idx_l0 = priv->ref_idx_l0;
picture->ref_idx_l1 = priv->ref_idx_l1;
+ picture->enable_vui = (picture->rate_ctrl.frame_rate_num != 0);
+ enc_GetPictureParamPreset(picture);
}
static void enc_HandleTask(omx_base_PortType *port, struct encode_task *task,