From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 21/22] avcodec/idctdsp: Move ScanTable to mpegvideo Date: Thu, 20 Oct 2022 10:45:39 +0200 Message-ID: <AS8P250MB074429B14E38C9EF564AE77D8F2A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB0744A863420578904013459B8F2A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> Only used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/idctdsp.c | 21 --------------------- libavcodec/idctdsp.h | 11 ----------- libavcodec/mpegvideo.c | 21 +++++++++++++++++++++ libavcodec/mpegvideo.h | 11 +++++++++++ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index 50156930ed..7216afb094 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -36,27 +36,6 @@ av_cold void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], } } -av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, - const uint8_t *src_scantable) -{ - int i, end; - - st->scantable = src_scantable; - - for (i = 0; i < 64; i++) { - int j = src_scantable[i]; - st->permutated[i] = permutation[j]; - } - - end = -1; - for (i = 0; i < 64; i++) { - int j = st->permutated[i]; - if (j > end) - end = j; - st->raster_end[i] = end; - } -} - av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type) { diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h index b286bc231c..7224463349 100644 --- a/libavcodec/idctdsp.h +++ b/libavcodec/idctdsp.h @@ -25,15 +25,6 @@ #include "avcodec.h" -/** - * Scantable. - */ -typedef struct ScanTable { - const uint8_t *scantable; - uint8_t permutated[64]; - uint8_t raster_end[64]; -} ScanTable; - enum idct_permutation_type { FF_IDCT_PERM_NONE, FF_IDCT_PERM_LIBMPEG2, @@ -45,8 +36,6 @@ enum idct_permutation_type { void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], const uint8_t permutation[64]); -void ff_init_scantable(const uint8_t *permutation, ScanTable *st, - const uint8_t *src_scantable); void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type); int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index fbe9884b4c..4326f7f9a5 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -320,6 +320,27 @@ static av_cold int dct_init(MpegEncContext *s) return 0; } +av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, + const uint8_t *src_scantable) +{ + int end; + + st->scantable = src_scantable; + + for (int i = 0; i < 64; i++) { + int j = src_scantable[i]; + st->permutated[i] = permutation[j]; + } + + end = -1; + for (int i = 0; i < 64; i++) { + int j = st->permutated[i]; + if (j > end) + end = j; + st->raster_end[i] = end; + } +} + av_cold void ff_mpv_idct_init(MpegEncContext *s) { if (s->codec_id == AV_CODEC_ID_MPEG4) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 237adf2388..60d2ec751e 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -55,6 +55,15 @@ #define MAX_B_FRAMES 16 +/** + * Scantable. + */ +typedef struct ScanTable { + const uint8_t *scantable; + uint8_t permutated[64]; + uint8_t raster_end[64]; +} ScanTable; + /** * MpegEncContext. */ @@ -576,6 +585,8 @@ int ff_update_duplicate_context(MpegEncContext *dst, const MpegEncContext *src); void ff_set_qscale(MpegEncContext * s, int qscale); void ff_mpv_idct_init(MpegEncContext *s); +void ff_init_scantable(const uint8_t *permutation, ScanTable *st, + const uint8_t *src_scantable); void ff_init_block_index(MpegEncContext *s); void ff_mpv_motion(MpegEncContext *s, -- 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-20 8:48 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 ` Andreas Rheinhardt [this message] 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 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=AS8P250MB074429B14E38C9EF564AE77D8F2A9@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