Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Lynne <dev@lynne.ee>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v9 07/13] vvcdec: add inv transform 1d
Date: Tue, 2 Jan 2024 16:55:45 +0100 (CET)
Message-ID: <Nn9spII--3-9@lynne.ee> (raw)
In-Reply-To: <CAFXK13fOXZQn+bJtg_PDD--CtoRMz5qFN9hMGfPpHHKeu8Lngw@mail.gmail.com>

Jan 2, 2024, 14:01 by nuomi2021@gmail.com:

> On Mon, Jan 1, 2024 at 10:50 PM Lynne <dev@lynne.ee> wrote:
>
>> Jan 1, 2024, 15:16 by nuomi2021@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)?
>>
> Yes, a, b, c are matrix coeffs.
>

Awful codec design carried over from HEVC.
Whatever.


>> 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.
>>
> It is possible, but it's a bit more complicated than other codecs.
> For chroma, we need to perform lmcs_scale_chroma before adding it to the
> residual.
> Let's track it with https://github.com/ffvvc/FFmpeg/issues/177, and fix it
> later.
>

At the resolutions VVC is designed to deal with, a fully memory copy
can add significant overhead, and this could be tricky to do later on.
It would also block SIMD code from being added.

I wouldn't mind templaing the transforms for luma and chroma,
and integrating lmcs_scale_chroma directly in the transforms.
Would that help?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2024-01-02 15:55 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240101141239.6623-1-nuomi2021@gmail.com>
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 01/13] vvcdec: add vvc_data Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 02/13] vvcdec: add parameter parser for sps, pps, ph, sh Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 03/13] vvcdec: add cabac decoder Nuo Mi
2024-01-01 15:13   ` Lynne
2024-01-02 13:21     ` Nuo Mi
2024-01-02 15:57       ` Lynne
2024-01-03  1:38         ` Nuo Mi
2024-01-01 17:34   ` Michael Niedermayer
2024-01-02 13:44     ` Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 04/13] vvcdec: add reference management Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 05/13] vvcdec: add motion vector decoder Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 06/13] vvcdec: add inter prediction Nuo Mi
2024-01-01 15:04   ` Lynne
2024-01-02 14:16     ` Nuo Mi
2024-01-02 14:30       ` Kieran Kunhya
2024-01-02 15:59       ` Lynne
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 07/13] vvcdec: add inv transform 1d Nuo Mi
2024-01-01 14:50   ` Lynne
2024-01-02 13:01     ` Nuo Mi
2024-01-02 15:55       ` Lynne [this message]
2024-01-03 12:04         ` Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 08/13] vvcdec: add intra prediction Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 09/13] vvcdec: add LMCS, Deblocking, SAO, and ALF filters Nuo Mi
2024-01-01 15:17   ` Lynne
2024-01-02  9:47     ` Nuo Mi
2024-01-02 11:38       ` Jean-Baptiste Kempf
2024-01-02 15:51       ` Lynne
2024-01-03  1:14         ` Nuo Mi
2024-01-03 18:38       ` Michael Niedermayer
2024-01-04 11:45         ` Nuo Mi
2024-01-04 12:06           ` Martin Storsjö
2024-01-04 13:57             ` Nuo Mi
2024-01-04 14:53               ` James Almer
2024-01-05  0:02                 ` Nuo Mi
2024-01-05 11:55                 ` Martin Storsjö
2024-01-05 20:47                   ` Michael Niedermayer
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 10/13] vvcdec: add dsp init and inv transform Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 11/13] vvcdec: add CTU parser Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 12/13] vvcdec: add CTU thread logical Nuo Mi
2024-01-01 14:12 ` [FFmpeg-devel] [PATCH v9 13/13] vvcdec: add vvc decoder Nuo Mi
2024-01-01 14:53   ` Lynne
2024-01-01 15:14     ` Hendrik Leppkes
2024-01-01 15:22       ` Lynne
2024-01-02  9:38         ` Nuo Mi
2024-01-02 11:41           ` Jean-Baptiste Kempf
2024-01-02 16:00           ` Lynne
2024-01-05 20:48   ` James Almer
2024-01-06 17:47   ` James Almer
2024-01-07  5:31     ` Nuo Mi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Nn9spII--3-9@lynne.ee \
    --to=dev@lynne.ee \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git