[FFmpeg-devel] [PATCH v4] avcodec/cbs_h266: add support for Adaptation parameter set NALU type

James Almer jamrial at gmail.com
Thu Jul 6 04:03:50 EEST 2023


On 7/5/2023 9:41 PM, Nuo Mi wrote:
>> +    if (current->alf_cc_cb_filter_signal_flag)
>> +        ue(alf_cc_cb_filters_signalled_minus1, 0, 3);
>> +    else
>> +        infer(alf_cc_cb_filters_signalled_minus1, 0);
>>
> Not right, it will overread one filter set even
> alf_cc_cb_filter_signal_flag is false.

It will infer all values in alf_cc_cb_mapped_coeff_abs[0][0..7] and 
alf_cc_cb_coeff_sign[0][0..7] to be 0, as they are not present.

> 
>> +    for (k = 0; k <= current->alf_cc_cb_filters_signalled_minus1; k++) {
>> +        for (j = 0; j < 7; j++) {
>> +            if (current->alf_cc_cb_filter_signal_flag)
>> +                ubs(3, alf_cc_cb_mapped_coeff_abs[k][j], 2, k, j);
>> +            else
>> +                infer(alf_cc_cb_mapped_coeff_abs[k][j], 0);
>> +            if (current->alf_cc_cb_mapped_coeff_abs[k][j])
>> +                ubs(1, alf_cc_cb_coeff_sign[k][j], 2, k, j);
>> +            else
>> +                infer(alf_cc_cb_coeff_sign[k][j], 0);
>> +        }
>> +    }
>> +
>> +    if (current->alf_cc_cr_filter_signal_flag)
>> +        ue(alf_cc_cr_filters_signalled_minus1, 0, 3);
>> +    else
>> +        infer(alf_cc_cr_filters_signalled_minus1, 0);
>>
> Not right,

Same as the above.


More information about the ffmpeg-devel mailing list