Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 24/24] avcodec/mpegvideo: Don't use ScanTable where unnecessary
Date: Fri, 21 Oct 2022 20:46:08 +0200
Message-ID: <20221021184608.GA4048598@pb2> (raw)
In-Reply-To: <AS8P250MB0744FCF99B3F9CD3872FAE168F2A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>


[-- Attachment #1.1: Type: text/plain, Size: 1865 bytes --]

On Thu, Oct 20, 2022 at 07:24:36PM +0200, Andreas Rheinhardt wrote:
> For the intra_[hv]_scantables, only ScanTable.permutated
> is used, so one only needs to keep that.
[...]
> diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
> index 8e6e35b927..bf499a2206 100644
> --- a/libavcodec/mpeg4videoenc.c
> +++ b/libavcodec/mpeg4videoenc.c
> @@ -175,7 +175,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64],
>                      ac_val1[i + 8] = level;
>                  }
>              }
> -            st[n] = s->intra_h_scantable.permutated;
> +            st[n] = s->intra_h_scantable;
>          } else {
>              const int xy = s->mb_x - 1 + s->mb_y * s->mb_stride;
>              /* left prediction */
> @@ -197,7 +197,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64],
>                      ac_val1[i + 8] = block[n][s->idsp.idct_permutation[i]];
>                  }
>              }
> -            st[n] = s->intra_v_scantable.permutated;
> +            st[n] = s->intra_v_scantable;

Iam thinking that replacing 
s->intra_v_scantable.permutated
by
intra_v_scantable
is semantically feeling inferrior to calling it
permutated_intra_v_scantable
or something like that

The same probably applies to te other patches too
iam not happy about the long name but having consistent
naming between scantables (as in the spec) and scantables permutated
for idct optimizations could improve readability of the code

thx
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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:[~2022-10-21 18:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  8:31 [FFmpeg-devel] [PATCH 01/22] configure: Add idctdsp dependency to codecs that need it Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 02/22] avcodec/eamad: Don't use IDCTDSP-API unnecessarily Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 03/22] avcodec/eatgq: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 04/22] avcodec/eatqi: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 05/22] avcodec/aic: Remove useless ScanTable Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 06/22] avcodec/imm4: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 07/22] avcodec/idctdsp: Add function to apply permutation to array Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 08/22] avcodec/agm: Only keep what is used from ScanTable Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 09/22] avcodec/asvdec: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 10/22] avcodec/dnxhddec: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 11/22] avcodec/cavs: Only keep what is needed from IDCTDSP-API Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 12/22] avcodec/g2meet: Only keep what is used from ScanTable Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 13/22] avcodec/g2meet: Pre-permute quantization tables Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 14/22] avcodec/intrax8: Only keep what is used from ScanTable Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 15/22] avcodec/mdec: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 16/22] avcodec/mimic: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 17/22] avcodec/mjpegdec: " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 18/22] avcodec/mjpegenc_common: Only pass " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 19/22] avcodec/speedhq: Only keep " Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 20/22] avcodec/wmv2dec: Remove unnecessary ScanTables Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 21/22] avcodec/idctdsp: Move ScanTable to mpegvideo Andreas Rheinhardt
2022-10-20  8:45 ` [FFmpeg-devel] [PATCH 22/22] avcodec/eatgq: Move transient GetByteContext from context to stack Andreas Rheinhardt
2022-10-20 17:24 ` [FFmpeg-devel] [PATCH 23/24] avcodec/mpegvideo: Move ASM-offset warning to its proper place Andreas Rheinhardt
2022-10-20 17:24 ` [FFmpeg-devel] [PATCH 24/24] avcodec/mpegvideo: Don't use ScanTable where unnecessary Andreas Rheinhardt
2022-10-21 18:46   ` Michael Niedermayer [this message]
2022-10-21 19:00     ` Andreas Rheinhardt

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=20221021184608.GA4048598@pb2 \
    --to=michael@niedermayer.cc \
    --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