1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/mpegaudiodsp: Init dct32 directly

This avoids using dct.c and will allow removing it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-09-28 18:00:05 +02:00
parent 145db38f9b
commit d9464f3e34
5 changed files with 10 additions and 8 deletions

1
configure vendored
View File

@ -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"

View File

@ -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 \

View File

@ -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;

View File

@ -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

View File

@ -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 */
}