1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00

avcodec/cbs_h266: fix sh_collocated_from_l0_flag and sh_collocated_ref_idx infer

we have to infer sh_collocated_from_l0_flag and sh_collocated_ref_idx from picture head if pps_rpl_info_in_ph_flag is true
This commit is contained in:
Nuo Mi 2024-03-27 21:00:58 +08:00
parent cd540a333e
commit 191fbd7ddc

View File

@ -3221,7 +3221,8 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
flag(sh_cabac_init_flag);
else
infer(sh_cabac_init_flag, 0);
if (ph->ph_temporal_mvp_enabled_flag && !pps->pps_rpl_info_in_ph_flag) {
if (ph->ph_temporal_mvp_enabled_flag) {
if (!pps->pps_rpl_info_in_ph_flag) {
if (current->sh_slice_type == VVC_SLICE_TYPE_B)
flag(sh_collocated_from_l0_flag);
else
@ -3235,6 +3236,13 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
} else {
infer(sh_collocated_ref_idx, 0);
}
} else {
if (current->sh_slice_type == VVC_SLICE_TYPE_B)
infer(sh_collocated_from_l0_flag, ph->ph_collocated_from_l0_flag);
else
infer(sh_collocated_from_l0_flag, 1);
infer(sh_collocated_ref_idx, ph->ph_collocated_ref_idx);
}
}
if (!pps->pps_wp_info_in_ph_flag &&
((pps->pps_weighted_pred_flag &&