fix[h265d]: fix output err causeby refs cleard

fix issue cause by the following commit:
233940: fix[h265d]: fix infochange loss when two sps continuous

Change-Id: Ie0047cbb7f02ef78e46f6980acfb20532af12dee
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
Yandong Lin
2024-09-06 15:25:54 +08:00
parent f358f6c24e
commit e9d95ce4a5
3 changed files with 4 additions and 2 deletions

View File

@@ -750,11 +750,12 @@ static RK_S32 hls_slice_header(HEVCContext *s)
}
s->pps = (HEVCPPS*)s->pps_list[sh->pps_id];
if (s->ps_need_upate || s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]) {
if (s->sps_need_upate || s->sps != (HEVCSPS*)s->sps_list[s->pps->sps_id]) {
s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id];
mpp_hevc_clear_refs(s);
s->ps_need_upate = 1;
s->sps_need_upate = 0;
ret = set_sps(s, s->sps);
if (ret < 0)
return ret;

View File

@@ -645,6 +645,7 @@ typedef struct HEVCContext {
RK_U8 miss_ref_flag;
RK_U8 pre_pps_id;
RK_U8 ps_need_upate;
RK_U8 sps_need_upate;
/*temporary storage for slice_cut_param*/
RK_U32 start_bit;

View File

@@ -1880,7 +1880,7 @@ RK_S32 mpp_hevc_decode_nal_sps(HEVCContext *s)
if (s->sps_list[sps_id] != NULL)
mpp_mem_pool_put(s->sps_pool, s->sps_list[sps_id]);
s->sps_list[sps_id] = sps_buf;
s->ps_need_upate = 1;
s->sps_need_upate = 1;
}
if (s->sps_list[sps_id])