diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-02 04:10:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-02 04:10:19 +0200 |
commit | 563fe360c356c0144badd63063c16dae989b5379 (patch) | |
tree | 38b250fdf76bf31fa5e3c7c91fc9a0456f57f98d /libswscale | |
parent | 73a502dd436425875fae1305d47cf0c1fbf24d68 (diff) | |
parent | d7e5aebae7652ac766034f1d90e5a4f62677fb3c (diff) | |
download | ffmpeg-563fe360c356c0144badd63063c16dae989b5379.tar.gz |
Merge commit 'd7e5aeb' into oldabi
* commit 'd7e5aeb': (24 commits)
Fix runtime CPU detection in libswscale.
ac3enc: correct the flipped sign in the ac3_fixed encoder
Eliminate pointless '#if 1' statements without matching '#else'.
Add AVX FFT implementation.
Increase alignment of av_malloc() as needed by AVX ASM.
Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
documentation: extend documentation for ffmpeg -aspect option
APIChanges: update commit hashes for recent additions.
lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
aac: add headers needed for log2f()
lavc: remove FF_API_MB_Q cruft
lavc: remove FF_API_RATE_EMU cruft
lavc: remove FF_API_HURRY_UP cruft
pad: make the filter parametric
vsrc_movie: add key_frame and pict_type.
vsrc_movie: fix leak in request_frame()
lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
vsrc_buffer: add sample_aspect_ratio fields to arguments.
lavfi: add fieldorder filter
...
Conflicts:
libavcodec/version.h
libavfilter/avfilter.h
libavutil/avutil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/rgb2rgb.c | 2 | ||||
-rw-r--r-- | libswscale/swscale.c | 7 | ||||
-rw-r--r-- | libswscale/utils.c | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index a5cebcfb35..adc5d59c8c 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -199,7 +199,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; void sws_rgb2rgb_init(int flags) { -#if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX +#if HAVE_SSE2 || HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX if (flags & SWS_CPU_CAPS_SSE2) rgb2rgb_init_SSE2(); else if (flags & SWS_CPU_CAPS_MMX2) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index c0e4db3b26..bf41180a62 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -62,7 +62,6 @@ untested special converters #include "rgb2rgb.h" #include "libavutil/intreadwrite.h" #include "libavutil/x86_cpu.h" -#include "libavutil/cpu.h" #include "libavutil/avutil.h" #include "libavutil/mathematics.h" #include "libavutil/bswap.h" @@ -1314,12 +1313,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c) #if CONFIG_RUNTIME_CPUDETECT int flags = c->flags; - int cpuflags = av_get_cpu_flags(); - - flags |= (cpuflags & AV_CPU_FLAG_MMX ? SWS_CPU_CAPS_MMX : 0); - flags |= (cpuflags & AV_CPU_FLAG_MMX2 ? SWS_CPU_CAPS_MMX2 : 0); - flags |= (cpuflags & AV_CPU_FLAG_3DNOW ? SWS_CPU_CAPS_3DNOW : 0); - #if ARCH_X86 // ordered per speed fastest first if (flags & SWS_CPU_CAPS_MMX2) { diff --git a/libswscale/utils.c b/libswscale/utils.c index 1f4a6c41cd..2080742e90 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -41,6 +41,7 @@ #include "rgb2rgb.h" #include "libavutil/intreadwrite.h" #include "libavutil/x86_cpu.h" +#include "libavutil/cpu.h" #include "libavutil/avutil.h" #include "libavutil/bswap.h" #include "libavutil/opt.h" @@ -742,6 +743,13 @@ static int update_flags_cpu(int flags) |SWS_CPU_CAPS_ALTIVEC |SWS_CPU_CAPS_BFIN); flags |= ff_hardcodedcpuflags(); +#else /* !CONFIG_RUNTIME_CPUDETECT */ + int cpuflags = av_get_cpu_flags(); + + flags |= (cpuflags & AV_CPU_FLAG_SSE2 ? SWS_CPU_CAPS_SSE2 : 0); + flags |= (cpuflags & AV_CPU_FLAG_MMX ? SWS_CPU_CAPS_MMX : 0); + flags |= (cpuflags & AV_CPU_FLAG_MMX2 ? SWS_CPU_CAPS_MMX2 : 0); + flags |= (cpuflags & AV_CPU_FLAG_3DNOW ? SWS_CPU_CAPS_3DNOW : 0); #endif /* CONFIG_RUNTIME_CPUDETECT */ return flags; } |