diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-21 17:03:12 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-07-22 19:44:06 -0700 |
commit | 3124886554f202edeb0578bf664e576474a5d40f (patch) | |
tree | 5e178b75f671a2e04a0e004dd49087a5257ee384 /libavfilter/x86/gradfun.c | |
parent | 8d2e3fee0bde0ddd075cf613630619f95517de97 (diff) |
lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
This allows compiling this code using compilers that do not understand
gcc-style inline assembly.
Diffstat (limited to 'libavfilter/x86/gradfun.c')
-rw-r--r-- | libavfilter/x86/gradfun.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/x86/gradfun.c b/libavfilter/x86/gradfun.c index 07569de146..f75268a660 100644 --- a/libavfilter/x86/gradfun.c +++ b/libavfilter/x86/gradfun.c @@ -23,6 +23,8 @@ #include "libavutil/x86_cpu.h" #include "libavfilter/gradfun.h" +#if HAVE_INLINE_ASM + DECLARE_ALIGNED(16, static const uint16_t, pw_7f)[8] = {0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F}; DECLARE_ALIGNED(16, static const uint16_t, pw_ff)[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; @@ -164,10 +166,13 @@ static void gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1, } #endif // HAVE_SSE +#endif /* HAVE_INLINE_ASM */ + av_cold void ff_gradfun_init_x86(GradFunContext *gf) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM #if HAVE_MMX2 if (cpu_flags & AV_CPU_FLAG_MMX2) gf->filter_line = gradfun_filter_line_mmx2; @@ -180,4 +185,5 @@ av_cold void ff_gradfun_init_x86(GradFunContext *gf) if (cpu_flags & AV_CPU_FLAG_SSE2) gf->blur_line = gradfun_blur_line_sse2; #endif +#endif /* HAVE_INLINE_ASM */ } |