[FFmpeg-devel] [PATCH 11/11] avcodec/vvcdec: add Intra Block Copy decoder

Nuo Mi nuomi2021 at gmail.com
Sun Feb 25 05:07:31 EET 2024


On Sat, Feb 24, 2024 at 9:20 PM Ronald S. Bultje <rsbultje at gmail.com> wrote:

> Hi,
>
> On Thu, Feb 22, 2024 at 2:15 AM Nuo Mi <nuomi2021 at gmail.com> wrote:
>
>> +static void ibc_fill_vir_buf(const VVCLocalContext *lc, const CodingUnit
>> *cu)
>> [..]
>>
> +        av_image_copy_plane(ibc_buf, ibc_stride, src, src_stride,
>> cu->cb_width >> hs << ps , cu->cb_height >> vs);
>>
>
> I'm admittedly not super-familiar with VVC, but I wonder why we need the
> double buffering here (from ref_pos in pic to ibc_buf, and then back from
> ibc_buf back to cur block in pic)? In AV1, this is done with just a single
> copy. Why is this done this way?
>
Hi Ronald,
Two major differences between AV1 and VVC are:
1. AV1 disables all in-loop filters for IBC, while VVC does not.
2. AV1 can refer to any reconstructed super blocks, except the delayed
super block, whereas VVC can only refer to the left and current CTU.
Therefore, in VVC, we need to allocate memory for each line to save pixels
before applying filters. VVC refers to this memory as IbcVirBuf, which is a
2D cyclic buffer.
Every new reconstructed Coding Block will be copied to this buffer, and we
can only copy pixels from this buffer.

Best Regards.

>
> Ronald
>


More information about the ffmpeg-devel mailing list