[mpp_h265]: Fix hevc video flicker issue

For hevc field source without idr frame,
modify the number of dpb frame buffers
to fix the screen flickering

Change-Id: I65b471a563585a49f45de1e4388a8e22aabefee4
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
This commit is contained in:
Hongjin Li
2022-03-15 15:05:35 +08:00
committed by Herman Chen
parent d5618f3ccd
commit 3198035973

View File

@@ -1576,6 +1576,13 @@ RK_S32 mpp_hevc_decode_nal_sps(HEVCContext *s)
}
}
if ((s->picture_struct == MPP_PICTURE_STRUCTURE_TOP_FIELD) ||
(s->picture_struct == MPP_PICTURE_STRUCTURE_BOTTOM_FIELD)) {
for (i = 0; i < sps->max_sub_layers; i++) {
sps->temporal_layer[i].num_reorder_pics += 2;
}
}
h265d_dbg(H265D_DBG_SPS, "2 read bit left %d", gb->num_remaining_bits_in_curr_byte_ + gb->bytes_left_ * 8);
READ_UE(gb, &sps->log2_min_cb_size) ;
if (sps->log2_min_cb_size > (LOG2_MAX_CU_SIZE - 3)) {