From 5b633ce8ddfaed685f019e343d5df7f5b1f80dfc Mon Sep 17 00:00:00 2001 From: Lin Kesheng Date: Wed, 18 Jan 2017 14:21:37 +0800 Subject: [PATCH] [hal_h264e]: always set sps.chroma_format_idc to yuv420 For rkv and vpu, the only format supported is YUV420, sequence in other formats will be converted to YUV420 by hardware. Change-Id: I9de1141df2f290af9df824ec0090b7fa050a455d Signed-off-by: Lin Kesheng --- mpp/hal/common/h264/hal_h264e_com.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mpp/hal/common/h264/hal_h264e_com.c b/mpp/hal/common/h264/hal_h264e_com.c index 784f9448..67cac519 100644 --- a/mpp/hal/common/h264/hal_h264e_com.c +++ b/mpp/hal/common/h264/hal_h264e_com.c @@ -521,17 +521,13 @@ MPP_RET hal_h264e_set_sps(h264e_hal_context *ctx, h264e_hal_sps *sps) sps->i_id = 0; sps->i_mb_width = ( prep->width + 15 ) / 16; sps->i_mb_height = ( prep->height + 15 ) / 16; - sps->i_chroma_format_idc = csp >= H264E_CSP2_I444 ? H264E_CHROMA_444 : - csp >= H264E_CSP2_I422 ? H264E_CHROMA_422 : H264E_CHROMA_420; + sps->i_chroma_format_idc = H264E_CHROMA_420; // for rkv and vpu, only support YUV420 sps->b_qpprime_y_zero_transform_bypass = 0; //param->rc.i_rc_method == X264_RC_CQP && param->rc.i_qp_constant == 0; sps->i_profile_idc = codec->profile; - sps->b_constraint_set0 = 0; //sps->i_profile_idc == H264_PROFILE_BASELINE; - /* x264 doesn't support the features that are in Baseline and not in Main, - * namely arbitrary_slice_order and slice_groups. */ - sps->b_constraint_set1 = 0; //sps->i_profile_idc <= H264_PROFILE_MAIN; - /* Never set constraint_set2, it is not necessary and not used in real world. */ + sps->b_constraint_set0 = 0; + sps->b_constraint_set1 = 0; sps->b_constraint_set2 = 0; sps->b_constraint_set3 = 0;