diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-22 07:01:09 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-22 07:05:02 +0400 |
commit | 32c3038734c97fa02e544447597a04798a67e0e1 (patch) | |
tree | 951dfc08cd81369234ff67560f0603e3fc179282 /libswscale | |
parent | 1aeb87fa072450699b1daa953b5b3e647b7330d3 (diff) | |
parent | b2668c85e9d3745847f716f909ba4d3f6de0e12e (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
x86: swscale: Place inline assembly code under appropriate #ifdefs
rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro.
configure: Remove redundant RTMPT/RTMPTS dependencies
configure: add filtering of host cflags/ldflags
configure: initialise all flag filters at the same place
configure: add filtering of linker flags
configure: name some variables more consistently
configure: remove filter_cppflags
configure: set icc_version where it is needed
mpegenc: remove disabled code
Conflicts:
configure
libavformat/movenc.c
libswscale/x86/swscale_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 6 | ||||
-rw-r--r-- | libswscale/x86/swscale_mmx.c | 6 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb_mmx.c | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 9359f0b1f3..92deda2f5f 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -33,6 +33,8 @@ #include "libswscale/swscale.h" #include "libswscale/swscale_internal.h" +#if HAVE_INLINE_ASM + DECLARE_ASM_CONST(8, uint64_t, mmx_ff) = 0x00000000000000FFULL; DECLARE_ASM_CONST(8, uint64_t, mmx_null) = 0x0000000000000000ULL; DECLARE_ASM_CONST(8, uint64_t, mmx_one) = 0xFFFFFFFFFFFFFFFFULL; @@ -126,8 +128,11 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; 32-bit C version, and and&add trick by Michael Niedermayer */ +#endif /* HAVE_INLINE_ASM */ + void rgb2rgb_init_x86(void) { +#if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); if (cpu_flags & AV_CPU_FLAG_MMX) @@ -138,4 +143,5 @@ void rgb2rgb_init_x86(void) rgb2rgb_init_MMX2(); if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) rgb2rgb_init_SSE2(); +#endif /* HAVE_INLINE_ASM */ } diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c index 86576bd6ec..48d1a8e9c7 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale_mmx.c @@ -28,6 +28,8 @@ #include "libavutil/cpu.h" #include "libavutil/pixdesc.h" +#if HAVE_INLINE_ASM + #define DITHER1XBPP DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL; @@ -262,6 +264,8 @@ static void yuv2yuvX_sse3(const int16_t *filter, int filterSize, } #endif +#endif /* HAVE_INLINE_ASM */ + #define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt) \ extern void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \ SwsContext *c, int16_t *data, \ @@ -367,6 +371,7 @@ void ff_sws_init_swScale_mmx(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM if (cpu_flags & AV_CPU_FLAG_MMX) sws_init_swScale_MMX(c); #if HAVE_MMX2 @@ -377,6 +382,7 @@ void ff_sws_init_swScale_mmx(SwsContext *c) c->yuv2planeX = yuv2yuvX_sse3; } #endif +#endif /* HAVE_INLINE_ASM */ #if HAVE_YASM #define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \ diff --git a/libswscale/x86/yuv2rgb_mmx.c b/libswscale/x86/yuv2rgb_mmx.c index fd184eb71d..2107dd1ca4 100644 --- a/libswscale/x86/yuv2rgb_mmx.c +++ b/libswscale/x86/yuv2rgb_mmx.c @@ -36,6 +36,8 @@ #include "libavutil/x86_cpu.h" #include "libavutil/cpu.h" +#if HAVE_INLINE_ASM + #define DITHER1XBPP // only for MMX /* hope these constant values are cache line aligned */ @@ -64,8 +66,11 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL; #include "yuv2rgb_template.c" #endif /* HAVE_MMX2 */ +#endif /* HAVE_INLINE_ASM */ + SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) { +#if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); #if HAVE_MMX2 @@ -99,6 +104,7 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) case PIX_FMT_RGB555: return yuv420_rgb15_MMX; } } +#endif /* HAVE_INLINE_ASM */ return NULL; } |