x86: lavfi: fix gradfun/yadif build with mmx/sse disabled
authorMans Rullgard <mans@mansr.com>
Mon, 2 Jul 2012 22:04:04 +0000 (23:04 +0100)
committerMans Rullgard <mans@mansr.com>
Tue, 3 Jul 2012 13:14:13 +0000 (14:14 +0100)
These functions are defined conditionally so any uses need to have
preprocessor guards.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavfilter/x86/gradfun.c
libavfilter/x86/yadif.c

index 1d6a7ab..07569de 100644 (file)
@@ -168,10 +168,16 @@ av_cold void ff_gradfun_init_x86(GradFunContext *gf)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2)
+#if HAVE_MMX2
+    if (cpu_flags & AV_CPU_FLAG_MMX2)
         gf->filter_line = gradfun_filter_line_mmx2;
-    if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3)
+#endif
+#if HAVE_SSSE3
+    if (cpu_flags & AV_CPU_FLAG_SSSE3)
         gf->filter_line = gradfun_filter_line_ssse3;
-    if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
+#endif
+#if HAVE_SSE
+    if (cpu_flags & AV_CPU_FLAG_SSE2)
         gf->blur_line = gradfun_blur_line_sse2;
+#endif
 }
index fe77f3a..6d9f9b2 100644 (file)
@@ -53,10 +53,16 @@ av_cold void ff_yadif_init_x86(YADIFContext *yadif)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
+#if HAVE_MMX
+    if (cpu_flags & AV_CPU_FLAG_MMX)
         yadif->filter_line = yadif_filter_line_mmx;
-    if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
+#endif
+#if HAVE_SSE
+    if (cpu_flags & AV_CPU_FLAG_SSE2)
         yadif->filter_line = yadif_filter_line_sse2;
-    if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3)
+#endif
+#if HAVE_SSSE3
+    if (cpu_flags & AV_CPU_FLAG_SSSE3)
         yadif->filter_line = yadif_filter_line_ssse3;
+#endif
 }