diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-09 13:27:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-09 13:27:42 +0200 |
commit | 77aedc77abbe21f2c28052544a0b2f227bca1c77 (patch) | |
tree | 78e2b3d349105d6f73cd5f811e5374bca4bbcb94 /libswscale/x86 | |
parent | 4819d43d7f0e220b231699e0ac7b0dc906b3147c (diff) | |
parent | 75c37c5ace6271dc9dc996a61b799bcd2fc1b30d (diff) | |
download | ffmpeg-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 'libswscale/x86')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 9 | ||||
-rw-r--r-- | libswscale/x86/swscale.c | 15 |
2 files changed, 12 insertions, 12 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 24b284eec7..83734a218b 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -28,6 +28,7 @@ #include "config.h" #include "libavutil/attributes.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavutil/cpu.h" #include "libavutil/bswap.h" #include "libswscale/rgb2rgb.h" @@ -136,13 +137,13 @@ av_cold void rgb2rgb_init_x86(void) #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); - if (cpu_flags & AV_CPU_FLAG_MMX) + if (INLINE_MMX(cpu_flags)) rgb2rgb_init_MMX(); - if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW) + if (INLINE_AMD3DNOW(cpu_flags)) rgb2rgb_init_3DNOW(); - if (HAVE_MMXEXT && cpu_flags & AV_CPU_FLAG_MMXEXT) + if (INLINE_MMXEXT(cpu_flags)) rgb2rgb_init_MMX2(); - if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) + if (INLINE_SSE2(cpu_flags)) rgb2rgb_init_SSE2(); #endif /* HAVE_INLINE_ASM */ } diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index e633e922a7..2ff37f55f0 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -26,6 +26,7 @@ #include "libavutil/avassert.h" #include "libavutil/intreadwrite.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "libavutil/cpu.h" #include "libavutil/pixdesc.h" @@ -385,7 +386,6 @@ av_cold void ff_sws_init_swScale_mmx(SwsContext *c) #endif #endif /* HAVE_INLINE_ASM */ -#if HAVE_YASM #define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \ if (c->srcBpc == 8) { \ hscalefn = c->dstBpc <= 14 ? ff_hscale8to15_ ## filtersize ## _ ## opt2 : \ @@ -436,7 +436,7 @@ switch(c->dstBpc){ \ c->chrToYV12 = ff_ ## x ## ToUV_ ## opt; \ break #if ARCH_X86_32 - if (cpu_flags & AV_CPU_FLAG_MMX) { + if (EXTERNAL_MMX(cpu_flags)) { ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx); ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx); ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMXEXT); @@ -471,7 +471,7 @@ switch(c->dstBpc){ \ break; } } - if (cpu_flags & AV_CPU_FLAG_MMXEXT) { + if (EXTERNAL_MMXEXT(cpu_flags)) { ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2, , 1); } #endif /* ARCH_X86_32 */ @@ -483,7 +483,7 @@ switch(c->dstBpc){ \ else ASSIGN_SCALE_FUNC2(hscalefn, X8, opt1, opt2); \ break; \ } - if (cpu_flags & AV_CPU_FLAG_SSE2) { + if (EXTERNAL_SSE2(cpu_flags)) { ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2, , @@ -520,7 +520,7 @@ switch(c->dstBpc){ \ break; } } - if (cpu_flags & AV_CPU_FLAG_SSSE3) { + if (EXTERNAL_SSSE3(cpu_flags)) { ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, ssse3, ssse3); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, ssse3, ssse3); switch (c->srcFormat) { @@ -530,7 +530,7 @@ switch(c->dstBpc){ \ break; } } - if (cpu_flags & AV_CPU_FLAG_SSE4) { + if (EXTERNAL_SSE4(cpu_flags)) { /* Xto15 don't need special sse4 functions */ ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); @@ -541,7 +541,7 @@ switch(c->dstBpc){ \ c->yuv2plane1 = ff_yuv2plane1_16_sse4; } - if (HAVE_AVX_EXTERNAL && cpu_flags & AV_CPU_FLAG_AVX) { + if (EXTERNAL_AVX(cpu_flags)) { ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, , HAVE_ALIGNED_STACK || ARCH_X86_64); ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1); @@ -569,5 +569,4 @@ switch(c->dstBpc){ \ break; } } -#endif } |