From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 04/14] avcodec/mpegaudiodsp: Init dct32 directly Date: Thu, 28 Sep 2023 23:35:38 +0200 Message-ID: <AS8P250MB07449F11EC919296EB5598CC8FC1A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB0744136FB53B9E573DD249D68FC1A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> This avoids using dct.c and will allow removing it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- configure | 1 - libavcodec/Makefile | 3 ++- libavcodec/mpegaudiodsp.c | 6 +----- libavcodec/x86/Makefile | 2 +- libavcodec/x86/mpegaudiodsp.c | 6 ++++++ 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 28f1753ecb..f64086186c 100755 --- a/configure +++ b/configure @@ -2790,7 +2790,6 @@ mdct_select="fft" me_cmp_select="idctdsp" mpeg_er_select="error_resilience" mpegaudio_select="mpegaudiodsp mpegaudioheader" -mpegaudiodsp_select="dct" mpegvideo_select="blockdsp hpeldsp idctdsp videodsp" mpegvideodec_select="h264chroma mpegvideo mpeg_er" mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index cae2e773a1..0a3a8fcdf9 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -134,7 +134,8 @@ OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o mpegaudiodec_common.o \ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \ mpegaudiodsp_data.o \ mpegaudiodsp_fixed.o \ - mpegaudiodsp_float.o + mpegaudiodsp_float.o \ + dct32_fixed.o dct32_float.o OBJS-$(CONFIG_MPEGAUDIOHEADER) += mpegaudiodecheader.o mpegaudiotabs.o OBJS-$(CONFIG_MPEG4AUDIO) += mpeg4audio.o mpeg4audio_sample_rates.o OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o rl.o \ diff --git a/libavcodec/mpegaudiodsp.c b/libavcodec/mpegaudiodsp.c index 5a5a679d91..0971c28734 100644 --- a/libavcodec/mpegaudiodsp.c +++ b/libavcodec/mpegaudiodsp.c @@ -23,7 +23,6 @@ #include "libavutil/thread.h" #include "mpegaudio.h" #include "mpegaudiodsp.h" -#include "dct.h" #include "dct32.h" static AVOnce mpadsp_table_init = AV_ONCE_INIT; @@ -81,15 +80,12 @@ static av_cold void mpadsp_init_tabs(void) av_cold void ff_mpadsp_init(MPADSPContext *s) { - DCTContext dct; - - ff_dct_init(&dct, 5, DCT_II); ff_thread_once(&mpadsp_table_init, &mpadsp_init_tabs); s->apply_window_float = ff_mpadsp_apply_window_float; s->apply_window_fixed = ff_mpadsp_apply_window_fixed; - s->dct32_float = dct.dct32; + s->dct32_float = ff_dct32_float; s->dct32_fixed = ff_dct32_fixed; s->imdct36_blocks_float = ff_imdct36_blocks_float; diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index b4cc5e0d08..2ceb88968f 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -126,7 +126,7 @@ X86ASM-OBJS-$(CONFIG_LLVIDDSP) += x86/lossless_videodsp.o X86ASM-OBJS-$(CONFIG_LLVIDENCDSP) += x86/lossless_videoencdsp.o X86ASM-OBJS-$(CONFIG_LPC) += x86/lpc.o X86ASM-OBJS-$(CONFIG_ME_CMP) += x86/me_cmp.o -X86ASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/imdct36.o +X86ASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/dct32.o x86/imdct36.o X86ASM-OBJS-$(CONFIG_MPEGVIDEOENC) += x86/mpegvideoencdsp.o X86ASM-OBJS-$(CONFIG_OPUS_DECODER) += x86/opusdsp.o X86ASM-OBJS-$(CONFIG_OPUS_ENCODER) += x86/celt_pvq_search.o diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c index 6586fe0726..43662cd279 100644 --- a/libavcodec/x86/mpegaudiodsp.c +++ b/libavcodec/x86/mpegaudiodsp.c @@ -45,6 +45,9 @@ void ff_four_imdct36_float_sse(float *out, float *buf, float *in, float *win, void ff_four_imdct36_float_avx(float *out, float *buf, float *in, float *win, float *tmpbuf); +void ff_dct32_float_sse2(float *out, const float *in); +void ff_dct32_float_avx (float *out, const float *in); + DECLARE_ALIGNED(16, static float, mdct_win_sse)[2][4][4*40]; #if HAVE_6REGS && HAVE_SSE_INLINE @@ -267,6 +270,7 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s) #if HAVE_SSE if (EXTERNAL_SSE2(cpu_flags)) { s->imdct36_blocks_float = imdct36_blocks_sse2; + s->dct32_float = ff_dct32_float_sse2; } if (EXTERNAL_SSE3(cpu_flags)) { s->imdct36_blocks_float = imdct36_blocks_sse3; @@ -279,6 +283,8 @@ av_cold void ff_mpadsp_init_x86(MPADSPContext *s) if (EXTERNAL_AVX(cpu_flags)) { s->imdct36_blocks_float = imdct36_blocks_avx; } + if (EXTERNAL_AVX_FAST(cpu_flags)) + s->dct32_float = ff_dct32_float_avx; #endif #endif /* HAVE_X86ASM */ } -- 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:[~2023-09-28 21:35 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-28 21:32 [FFmpeg-devel] [PATCH 01/14] configure: Remove obsolete wmavoice->rdft, dct dependencies Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 02/14] configure: Remove obsolete ffplay->rdft dependency Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 03/14] configure: Remove unnecessary vf_spp->fft dependency Andreas Rheinhardt 2023-09-28 21:35 ` Andreas Rheinhardt [this message] 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 06/14] configure: Remove dct, fft, mdct, rdft subsystems Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 07/14] avcodec/vorbis: Use void* logctx instead of AVCodecContext* Andreas Rheinhardt 2023-09-30 10:28 ` Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 08/14] avcodec/utvideo: Split UTvideoContext into decoder and encoder contexts Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 09/14] avcodec/sipr: Remove write-only AVCodecContext* Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 10/14] avcodec/roqvideo: Use void*, not AVCodecContext* for logctx Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 11/14] avcodec/opus_silk: Use void* instead of AVCodecContext* as logctx Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 12/14] avcodec/lagarith: " Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 13/14] avcodec/flac_parse: " Andreas Rheinhardt 2023-09-28 21:35 ` [FFmpeg-devel] [PATCH 14/14] avcodec/bgmc: " Andreas Rheinhardt 2023-09-28 21:42 ` [FFmpeg-devel] [PATCH 01/14] configure: Remove obsolete wmavoice->rdft, dct dependencies Andreas Rheinhardt 2023-09-28 21:59 ` Lynne 2023-09-28 22:11 ` Andreas Rheinhardt 2023-09-28 23:26 ` Lynne
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=AS8P250MB07449F11EC919296EB5598CC8FC1A@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