From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH v2 13/24] avcodec/g2meet: Pre-permute quantization tables
Date: Fri, 21 Oct 2022 22:12:49 +0200
Message-ID: <AS8P250MB074466E3EA1E5A13C6EE764F8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07440727410EF826F84418C68F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
Allows to avoid a permutation lateron.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/g2meet.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 1973ed0741..761fd22fc3 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -59,22 +59,23 @@ enum Compression {
COMPR_KEMPF_J_B,
};
+/* These tables are already permuted according to ff_zigzag_direct */
static const uint8_t luma_quant[64] = {
- 8, 6, 5, 8, 12, 20, 26, 31,
- 6, 6, 7, 10, 13, 29, 30, 28,
- 7, 7, 8, 12, 20, 29, 35, 28,
- 7, 9, 11, 15, 26, 44, 40, 31,
- 9, 11, 19, 28, 34, 55, 52, 39,
- 12, 18, 28, 32, 41, 52, 57, 46,
- 25, 32, 39, 44, 52, 61, 60, 51,
- 36, 46, 48, 49, 56, 50, 52, 50
+ 8, 6, 6, 7, 6, 5, 8, 7,
+ 7, 7, 9, 9, 8, 10, 12, 20,
+ 13, 12, 11, 11, 12, 25, 18, 19,
+ 15, 20, 29, 26, 31, 30, 29, 26,
+ 28, 28, 32, 36, 46, 39, 32, 34,
+ 44, 35, 28, 28, 40, 55, 41, 44,
+ 48, 49, 52, 52, 52, 31, 39, 57,
+ 61, 56, 50, 60, 46, 51, 52, 50,
};
static const uint8_t chroma_quant[64] = {
- 9, 9, 12, 24, 50, 50, 50, 50,
- 9, 11, 13, 33, 50, 50, 50, 50,
- 12, 13, 28, 50, 50, 50, 50, 50,
- 24, 33, 50, 50, 50, 50, 50, 50,
+ 9, 9, 9, 12, 11, 12, 24, 13,
+ 13, 24, 50, 33, 28, 33, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
@@ -250,7 +251,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb,
int nbits = val;
val = get_xbits(gb, nbits);
- val *= qmat[ff_zigzag_direct[pos]];
+ val *= qmat[pos];
block[c->permutated_scantable[pos]] = val;
}
}
--
2.34.1
_______________________________________________
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".
next prev parent reply other threads:[~2022-10-21 20:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 20:11 [FFmpeg-devel] [PATCH v2 01/24] configure: Add idctdsp dependency to codecs that need it Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 02/24] avcodec/eamad: Don't use IDCTDSP-API unnecessarily Andreas Rheinhardt
2022-10-22 0:07 ` Peter Ross
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 03/24] avcodec/eatgq: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 04/24] avcodec/eatqi: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 05/24] avcodec/aic: Remove useless ScanTable Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 06/24] avcodec/imm4: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 07/24] avcodec/idctdsp: Add function to apply permutation to array Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 08/24] avcodec/agm: Only keep what is used from ScanTable Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 09/24] avcodec/asvdec: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 10/24] avcodec/dnxhddec: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 11/24] avcodec/cavs: Only keep what is needed from IDCTDSP-API Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 12/24] avcodec/g2meet: Only keep what is used from ScanTable Andreas Rheinhardt
2022-10-21 20:12 ` Andreas Rheinhardt [this message]
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 14/24] avcodec/intrax8: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 15/24] avcodec/mdec: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 16/24] avcodec/mimic: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 17/24] avcodec/mjpegdec: " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 18/24] avcodec/mjpegenc_common: Only pass " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 19/24] avcodec/speedhqdec: Only keep " Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 20/24] avcodec/wmv2dec: Remove unnecessary ScanTables Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 21/24] avcodec/idctdsp: Move ScanTable to mpegvideo Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 22/24] avcodec/eatgq: Move transient GetByteContext from context to stack Andreas Rheinhardt
2022-10-21 20:12 ` [FFmpeg-devel] [PATCH v2 23/24] avcodec/mpegvideo: Move ASM-offset warning to its proper place Andreas Rheinhardt
2022-10-21 20:13 ` [FFmpeg-devel] [PATCH v2 24/24] avcodec/mpegvideo: Don't use ScanTable where unnecessary Andreas Rheinhardt
2022-10-23 11:17 ` [FFmpeg-devel] [PATCH v2 01/24] configure: Add idctdsp dependency to codecs that need it 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=AS8P250MB074466E3EA1E5A13C6EE764F8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--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