From c48894c134621bcb3c5e4f5aefaa9d7da5461492 Mon Sep 17 00:00:00 2001 From: Hongjin Li Date: Mon, 31 Mar 2025 10:32:51 +0800 Subject: [PATCH] Revert "fix[h264d_parser]: Fix pps parsing issue" This reverts commit 1f8aafea1cf980357c95f16c870f5313fcfd0f93. Platform: General Spec: h264 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. However, nonstandard sequences may incorrectly include certain fields and some extensions or custom implementations may violate the standard Therefore, the processing here is strictly carried out according to the sequence processing logic provided by the spec Consider #516724, it has been confirmed that it is caused by incomplete sequence reception. The revert patch here does not affect the correctness of mpp processing Reported-by: redmine #543598 Source: base_line.h264 atomos_mainprofile.h264 Change-Id: I130216a3d7c1651076c3e8037b5079ea5f54e62c Signed-off-by: Hongjin Li --- mpp/codec/dec/h264/h264d_pps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mpp/codec/dec/h264/h264d_pps.c b/mpp/codec/dec/h264/h264d_pps.c index 56ac3b2e..398ed3f5 100644 --- a/mpp/codec/dec/h264/h264d_pps.c +++ b/mpp/codec/dec/h264/h264d_pps.c @@ -96,10 +96,7 @@ 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) && - (cur_sps->profile_idc != 66) && /* base line profile */ - (cur_sps->profile_idc != 77) && /* Main profile */ - (cur_sps->profile_idc != 88)) { /* Extended profile */ + if (mpp_has_more_rbsp_data(p_bitctx)) { 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) {