[FFmpeg-devel] [PATCH v7 14/14] vvcdec: add full vvc decoder

Nuo Mi nuomi2021 at gmail.com
Sun Dec 10 18:23:51 EET 2023


>
>
>
> +
> +    if (AV_CEIL_RSHIFT(fc->tab.width,  5) != w32 ||
> AV_CEIL_RSHIFT(fc->tab.height,  5) != h32) {
> +        for (int i = LUMA; i <= CHROMA; i++) {
> +            av_freep(&fc->tab.msm[i]);
> +            fc->tab.msm[i] = av_calloc(w32, h32);
> +            if (!fc->tab.msm[i])
> +                goto fail;
> +        }
> +    } else {
> +        for (int i = LUMA; i <= CHROMA; i++)
> +            memset(fc->tab.msm[i], 0, w32 * h32);
> +    }
> +    if (AV_CEIL_RSHIFT(fc->tab.width,  6) != w64 ||
> AV_CEIL_RSHIFT(fc->tab.height,  6) != h64) {
> +        av_freep(&fc->tab.ispmf);
> +        fc->tab.ispmf = av_calloc(w64, h64);
> +        if (!fc->tab.ispmf)
> +            goto fail;
> +    } else {
> +        memset(fc->tab.ispmf, 0, w64 * h64);
> +    }

 We can use TAB_ADD for these too. but from code size consideration. It may
not be worth it.
If you prefer. I will send a patch for this after the merge.


>


> --
> 2.25.1
>
>


More information about the ffmpeg-devel mailing list