aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/fft_init.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-09 13:27:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-09 13:27:42 +0200
commit77aedc77abbe21f2c28052544a0b2f227bca1c77 (patch)
tree78e2b3d349105d6f73cd5f811e5374bca4bbcb94 /libavcodec/x86/fft_init.c
parent4819d43d7f0e220b231699e0ac7b0dc906b3147c (diff)
parent75c37c5ace6271dc9dc996a61b799bcd2fc1b30d (diff)
downloadffmpeg-77aedc77abbe21f2c28052544a0b2f227bca1c77.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: swscale: Provide the right alignment for external mmx asm x86: Replace checks for CPU extensions and flags by convenience macros configure: msvc: fix/simplify setting of flags for hostcc x86: mlpdsp: mlp_filter_channel_x86 requires inline asm Conflicts: libavcodec/x86/fft_init.c libavcodec/x86/h264_intrapred_init.c libavcodec/x86/h264dsp_init.c libavcodec/x86/mpegaudiodec.c libavcodec/x86/proresdsp_init.c libavutil/x86/float_dsp_init.c libswscale/utils.c libswscale/x86/swscale.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/fft_init.c')
-rw-r--r--libavcodec/x86/fft_init.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c
index f14c588e20..d7a31d4efa 100644
--- a/libavcodec/x86/fft_init.c
+++ b/libavcodec/x86/fft_init.c
@@ -17,29 +17,29 @@
*/
#include "libavutil/cpu.h"
+#include "libavutil/x86/cpu.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/dct.h"
#include "fft.h"
av_cold void ff_fft_init_mmx(FFTContext *s)
{
-#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
#if ARCH_X86_32
- if (has_vectors & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) {
+ if (EXTERNAL_AMD3DNOW(has_vectors)) {
/* 3DNow! for K6-2/3 */
s->imdct_calc = ff_imdct_calc_3dnow;
s->imdct_half = ff_imdct_half_3dnow;
s->fft_calc = ff_fft_calc_3dnow;
}
- if (has_vectors & AV_CPU_FLAG_3DNOWEXT && HAVE_AMD3DNOWEXT) {
+ if (EXTERNAL_AMD3DNOWEXT(has_vectors)) {
/* 3DNowEx for K7 */
s->imdct_calc = ff_imdct_calc_3dnowext;
s->imdct_half = ff_imdct_half_3dnowext;
s->fft_calc = ff_fft_calc_3dnowext;
}
#endif
- if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
+ if (EXTERNAL_SSE(has_vectors)) {
/* SSE for P3/P4/K8 */
s->imdct_calc = ff_imdct_calc_sse;
s->imdct_half = ff_imdct_half_sse;
@@ -47,26 +47,23 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
s->fft_calc = ff_fft_calc_sse;
s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
}
- if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX_EXTERNAL && s->nbits >= 5) {
+ if (EXTERNAL_AVX(has_vectors) && s->nbits >= 5) {
/* AVX for SB */
s->imdct_half = ff_imdct_half_avx;
s->fft_calc = ff_fft_calc_avx;
s->fft_permutation = FF_FFT_PERM_AVX;
}
-#endif
}
#if CONFIG_DCT
av_cold void ff_dct_init_mmx(DCTContext *s)
{
-#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
- if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
+ if (EXTERNAL_SSE(has_vectors))
s->dct32 = ff_dct32_float_sse;
- if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
+ if (EXTERNAL_SSE2(has_vectors))
s->dct32 = ff_dct32_float_sse2;
- if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX_EXTERNAL)
+ if (EXTERNAL_AVX(has_vectors))
s->dct32 = ff_dct32_float_avx;
-#endif
}
#endif