fix[av1_vdpu383]: Fix the CDF issue between GOPs

Platform: rk3575/vdpu383

Error case:
The idr frame (frm0) does not update the cdf, and then frm1,
when using the cdf, mistakenly uses the cdf of the previous
gop instead of the default cdf

Solution:
At the beginning of GOP, reset all validity flags

Reported-by: Detlev Casanova <detlev.casanova@collabora.com>

Source: av1.video.es

Change-Id: I72152664d1c4275cb39f657c94ed4ba89a076465
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
This commit is contained in:
Hongjin Li 2024-11-29 14:05:06 +08:00
parent 7954ee2324
commit 45b28c7a32

View file

@ -2088,6 +2088,9 @@ static void vdpu383_av1d_set_cdf(Av1dHalCtx *p_hal, DXVA_PicParams_AV1 *dxva)
sprintf(dump_cur_fname_path, "%s/%s", dump_cur_dir, cur_fname);
}
#endif
if (dxva->format.frame_type == AV1_FRAME_KEY)
for (i = 0; i < NUM_REF_FRAMES; i++)
reg_ctx->ref_info_tbl[i].cdf_valid = 0;
/* def coeff cdf idx */
coeff_cdf_idx = dxva->quantization.base_qindex <= 20 ? 0 :
dxva->quantization.base_qindex <= 60 ? 1 :