fix[h264d_parser]: Fix pps parsing issue

Platform: General

Error case:
The source don't have the second_chroma_qp_index_offset

Solution:
The base line profile, Main profile, and Extended profile do not
support transform_8x8_mode_flag, pic_scaling_matrix_present_flag,
and second_chroma_qp_index_offset, so it is not parsed in these
cases.

From: redmine #516724

Source: bigbitrate.264

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Iab48d47b3031a478d1821a164274366e1249a73c
This commit is contained in:
Hongjin Li 2024-11-04 15:21:09 +08:00 committed by Herman Chen
parent aaa4c8e9a8
commit 1f8aafea1c

View file

@ -96,7 +96,10 @@ static MPP_RET parser_pps(BitReadCtx_t *p_bitctx, H264_SPS_t *cur_sps, H264_PPS_
READ_ONEBIT(p_bitctx, &cur_pps->redundant_pic_cnt_present_flag);
VAL_CHECK(ret , cur_pps->redundant_pic_cnt_present_flag == 0);
if (mpp_has_more_rbsp_data(p_bitctx)) {
if (mpp_has_more_rbsp_data(p_bitctx) &&
(cur_sps->profile_idc != 66) && /* base line profile */
(cur_sps->profile_idc != 77) && /* Main profile */
(cur_sps->profile_idc != 88)) { /* Extended profile */
READ_ONEBIT(p_bitctx, &cur_pps->transform_8x8_mode_flag);
READ_ONEBIT(p_bitctx, &cur_pps->pic_scaling_matrix_present_flag);
if (cur_pps->pic_scaling_matrix_present_flag) {