1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

cbs_h266: fix inference for sh_lmcs_used_flag and sh_explicit_scaling_list_used_flag

if sh_picture_header_in_slice_header_flag is true
sh_lmcs_used_flag and sh_explicit_scaling_list_used_flag are infered from ph

Failed clips:
LMCS: CLM_A_KDDI_2.bit STILL444_A_KDDI_1.bit
Scaling: SCALING_B_InterDigital_1.bit SCALING_A_InterDigital_1.bit

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Nuo Mi 2023-08-08 18:58:56 +08:00 committed by James Almer
parent 7098bec73b
commit fe745c2007

View File

@ -3151,17 +3151,21 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
infer(sh_alf_enabled_flag, 0);
}
if (ph->ph_lmcs_enabled_flag &&
!current->sh_picture_header_in_slice_header_flag)
flag(sh_lmcs_used_flag);
else
infer(sh_lmcs_used_flag, 0);
if (current->sh_picture_header_in_slice_header_flag) {
infer(sh_lmcs_used_flag, ph->ph_lmcs_enabled_flag);
infer(sh_explicit_scaling_list_used_flag,
ph->ph_explicit_scaling_list_enabled_flag);
} else {
if (ph->ph_lmcs_enabled_flag)
flag(sh_lmcs_used_flag);
else
infer(sh_lmcs_used_flag, 0);
if (ph->ph_explicit_scaling_list_enabled_flag &&
!current->sh_picture_header_in_slice_header_flag)
flag(sh_explicit_scaling_list_used_flag);
else
infer(sh_explicit_scaling_list_used_flag, 0);
if (ph->ph_explicit_scaling_list_enabled_flag)
flag(sh_explicit_scaling_list_used_flag);
else
infer(sh_explicit_scaling_list_used_flag, 0);
}
if (!pps->pps_rpl_info_in_ph_flag &&
((nal_unit_type != VVC_IDR_W_RADL &&