Commit 4dcc4f8e authored by Vitor Sessak's avatar Vitor Sessak

SSE optimized 32-point DCT

Originally committed as revision 24077 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent defb0009
......@@ -30,6 +30,7 @@
#include <math.h>
#include "libavutil/mathematics.h"
#include "fft.h"
#include "x86/fft.h"
#define DCT32_FLOAT
#include "dct32.c"
......@@ -213,6 +214,7 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
s->dct_calc = dct32_func;
s->dct32 = dct32;
if (HAVE_MMX) ff_dct_init_mmx(s);
return 0;
}
......
......@@ -112,6 +112,7 @@ void ff_fft_calc_c(FFTContext *s, FFTComplex *z);
void ff_fft_init_altivec(FFTContext *s);
void ff_fft_init_mmx(FFTContext *s);
void ff_fft_init_arm(FFTContext *s);
void ff_dct_init_mmx(DCTContext *s);
/**
* Do the permutation needed BEFORE calling ff_fft_calc().
......
......@@ -42,3 +42,11 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
}
#endif
}
av_cold void ff_dct_init_mmx(DCTContext *s)
{
int has_vectors = mm_support();
if (has_vectors & FF_MM_SSE && HAVE_SSE)
s->dct32 = ff_dct32_float_sse;
}
......@@ -32,5 +32,6 @@ void ff_imdct_calc_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input
void ff_imdct_half_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input);
void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input);
void ff_imdct_half_sse(FFTContext *s, FFTSample *output, const FFTSample *input);
void ff_dct32_float_sse(FFTSample *out, const FFTSample *in);
#endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment