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/utils.c | |
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/utils.c')
-rw-r--r-- | libswscale/utils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index f2a007f936..4b14c737af 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -47,6 +47,7 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "libavutil/x86/asm.h" +#include "libavutil/x86/cpu.h" #include "rgb2rgb.h" #include "swscale.h" #include "swscale_internal.h" @@ -497,7 +498,7 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, filterAlign = 1; } - if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) { + if (INLINE_MMX(cpu_flags)) { // special case for unscaled vertical filtering if (minFilterSize == 1 && filterAlign == 2) filterAlign = 1; @@ -1024,8 +1025,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, c->srcBpc = 16; if (c->dstBpc == 16) dst_stride <<= 1; - if (HAVE_MMXEXT && HAVE_INLINE_ASM && cpu_flags & AV_CPU_FLAG_MMXEXT && - c->srcBpc == 8 && c->dstBpc <= 14) { + if (INLINE_MMXEXT(cpu_flags) && c->srcBpc == 8 && c->dstBpc <= 14) { c->canMMX2BeUsed = (dstW >= srcW && (dstW & 31) == 0 && (srcW & 15) == 0) ? 1 : 0; if (!c->canMMX2BeUsed && dstW >= srcW && (srcW & 15) == 0 @@ -1055,7 +1055,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, c->chrXInc += 20; } // we don't use the x86 asm scaler if MMX is available - else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX && c->dstBpc <= 14) { + else if (INLINE_MMX(cpu_flags) && c->dstBpc <= 14) { c->lumXInc = ((int64_t)(srcW - 2) << 16) / (dstW - 2) - 20; c->chrXInc = ((int64_t)(c->chrSrcW - 2) << 16) / (c->chrDstW - 2) - 20; } @@ -1273,11 +1273,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, #endif av_get_pix_fmt_name(dstFormat)); - if (HAVE_MMXEXT && cpu_flags & AV_CPU_FLAG_MMXEXT) + if (INLINE_MMXEXT(cpu_flags)) av_log(c, AV_LOG_INFO, "using MMX2\n"); - else if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW) + else if (INLINE_AMD3DNOW(cpu_flags)) av_log(c, AV_LOG_INFO, "using 3DNOW\n"); - else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) + else if (INLINE_MMX(cpu_flags)) av_log(c, AV_LOG_INFO, "using MMX\n"); else if (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) av_log(c, AV_LOG_INFO, "using AltiVec\n"); |