[FFmpeg-devel] [PATCH v9 06/13] vvcdec: add inter prediction

Lynne dev at lynne.ee
Tue Jan 2 17:59:09 EET 2024


Jan 2, 2024, 15:16 by nuomi2021 at gmail.com:

> On Mon, Jan 1, 2024 at 11:04 PM Lynne <dev at lynne.ee> wrote:
>
>> Jan 1, 2024, 15:15 by nuomi2021 at gmail.com:
>>
>> > +
>> >
>> +////////////////////////////////////////////////////////////////////////////////
>> > +//
>> >
>> +////////////////////////////////////////////////////////////////////////////////
>> >
>>
>> What's with these markers?
>>
> Copied from hevc code, If you perfered, I can remove it.
>
>>
>>
>> > +static void FUNC(put_pixels)(int16_t *dst,
>> > +    const uint8_t *_src, const ptrdiff_t _src_stride,
>> > +    const int height, const int8_t *hf, const int8_t *vf, const int
>> width)
>> > +{
>> > +    const pixel *src            = (const pixel *)_src;
>> > +    const ptrdiff_t src_stride  = _src_stride / sizeof(pixel);
>> > +
>> > +    for (int y = 0; y < height; y++) {
>> > +        for (int x = 0; x < width; x++)
>> > +            dst[x] = src[x] << (14 - BIT_DEPTH);
>> > +        src += src_stride;
>> > +        dst += MAX_PB_SIZE;
>> > +    }
>> > +}
>> >
>>
>> av_image_copy(AV_PIX_FMT_GRAY14, input_format)?
>>
> It's  a copy from hevc.
> if we want change, better change it together.
>

If you're not planning to share the code, might as well change it.


>> Also, why is the decoder using 14-bits internally rather than expanding
>> it to 16-bits? Headroom to avoid overflows?
>>
> If we check ff_vvc_inter_luma_filters. ff_vvc_inter_chroma_filters, the sum
> of each row is 64.
> It means inter will use a 6-bits fixed-point multiply. If your coefficient
> is 8-bit, the intermediate result is 14-bit (6 + 8)
>

Okay.


More information about the ffmpeg-devel mailing list