[FFmpeg-devel] [PATCH v9 07/13] vvcdec: add inv transform 1d

Lynne dev at lynne.ee
Mon Jan 1 16:50:45 EET 2024


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

> + */
> +void ff_vvc_inv_dct2_4(int *coeffs, const ptrdiff_t stride, const size_t nz)
> +{
> +    const int a = 64, b = 83, c = 36;
> +    const int x0 = coeffs[0 * stride], x1 = coeffs[1 * stride];
> +    const int x2 = coeffs[2 * stride], x3 = coeffs[3 * stride];
> +    const int E[2] = {
> +        a * (x0 + G2(+x2)),
> +        a * (x0 + G2(-x2)),
> +    };
> +    const int O[2] = {
> +        b * x1 + G2(+c * x3),
> +        c * x1 + G2(-b * x3),
> +    };
> +
> +    coeffs[0 * stride] = E[0] + O[0];
> +    coeffs[1 * stride] = E[1] + O[1];
> +    coeffs[2 * stride] = E[1] - O[1];
> +    coeffs[3 * stride] = E[0] - O[0];
> +}
>

Is that how the transforms are specified (matrices)?
Also, why are you not adding the transformed residual *directly* to the input.
This is how all our other decoders do this, because it skips a copy. This isn't
something you can quite optimize later on.



More information about the ffmpeg-devel mailing list