[h265d]: fix issue for pps header

slice_header_extension_present_flag has missing in parse.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I479b7f0b67eb998c2a33791828488b37384d446a
This commit is contained in:
Ding Wei 2020-05-29 10:43:40 +08:00
parent 24d215ecfc
commit a26d0fadd7
3 changed files with 9 additions and 0 deletions

View File

@ -329,6 +329,7 @@ typedef struct HEVCPPS {
RK_U8 slice_header_extension_present_flag;
RK_U8 pps_extension_flag;
RK_U8 pps_range_extensions_flag;
RK_U8 pps_extension_data_flag;
// Inferred parameters
RK_U32 *column_width; ///< ColumnWidth

View File

@ -158,6 +158,7 @@ static void fill_picture_parameters(const HEVCContext *h,
pp->pps_beta_offset_div2 = pps->beta_offset / 2;
pp->pps_tc_offset_div2 = pps->tc_offset / 2;
pp->log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2;
pp->slice_segment_header_extension_present_flag = pps->slice_header_extension_present_flag;
pp->CurrPicOrderCntVal = h->poc;
for (i = 0; i < 32; i++) {

View File

@ -2065,6 +2065,13 @@ int mpp_hevc_decode_nal_pps(HEVCContext *s)
ret = MPP_ERR_STREAM;
goto err;
}
READ_ONEBIT(gb, &pps->slice_header_extension_present_flag);
READ_ONEBIT(gb, &pps->pps_extension_flag);
h265d_dbg(H265D_DBG_PPS, "pps_extension_flag %d", pps->pps_extension_flag);
if (pps->pps_extension_flag) {
READ_ONEBIT(gb, &pps->pps_range_extensions_flag);
SKIP_BITS(gb, 7); // pps_extension_7bits
}
if (s->h265dctx->compare_info != NULL) {
CurrentFameInf_t *info = (CurrentFameInf_t *)s->h265dctx->compare_info;