[h264e]: transform_8x8_mode is not limitted for smaller resolution

Change-Id: I5ba70b325580c0936d72bc553a95f1c208533271
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
This commit is contained in:
Lin Kesheng
2017-02-23 10:12:07 +08:00
parent 63eb5bf3e6
commit c1665998c3
2 changed files with 5 additions and 1 deletions

View File

@@ -687,7 +687,7 @@ MPP_RET h264e_set_pps(H264eHalContext *ctx, H264ePps *pps, H264eSps *sps)
pps->i_pic_init_qp = 26;
pps->i_pic_init_qs = pps->i_pic_init_qp; // only for SP/SI slices
pps->b_transform_8x8_mode = prep->width <= 1920 ? 0 : codec->transform8x8_mode;
pps->b_transform_8x8_mode = codec->transform8x8_mode;
pps->i_chroma_qp_index_offset = codec->chroma_cb_qp_offset;
pps->i_second_chroma_qp_index_offset = codec->chroma_cr_qp_offset;
pps->b_deblocking_filter_control = Sw_deblock_filter_ctrl_present_flag;

View File

@@ -580,6 +580,7 @@ MPP_RET test_mpp_setup(MpiEncTestData *p)
case MPP_VIDEO_CodingAVC : {
codec_cfg->h264.change = MPP_ENC_H264_CFG_CHANGE_PROFILE |
MPP_ENC_H264_CFG_CHANGE_ENTROPY |
MPP_ENC_H264_CFG_CHANGE_TRANS_8x8 |
MPP_ENC_H264_CFG_CHANGE_QP_LIMIT;
/*
* H.264 profile_idc parameter
@@ -599,12 +600,14 @@ MPP_RET test_mpp_setup(MpiEncTestData *p)
codec_cfg->h264.level = 40;
codec_cfg->h264.entropy_coding_mode = 1;
codec_cfg->h264.cabac_init_idc = 0;
codec_cfg->h264.transform8x8_mode = 1;
if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_CBR) {
/* constant bitrate do not limit qp range */
p->qp_max = 48;
p->qp_min = 4;
p->qp_step = 16;
p->qp_init = 0;
} else if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_VBR) {
if (rc_cfg->quality == MPP_ENC_RC_QUALITY_CQP) {
/* constant QP mode qp is fixed */
@@ -616,6 +619,7 @@ MPP_RET test_mpp_setup(MpiEncTestData *p)
p->qp_max = 40;
p->qp_min = 12;
p->qp_step = 8;
p->qp_init = 0;
}
}