[FFmpeg-cvslog] avfilter/vf_eq: fix compilation with x86 asm disabled

James Almer git at videolan.org
Thu Sep 26 18:20:13 EEST 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Sep 26 12:12:33 2019 -0300| [1dbd3c61163c6bb0b7f66499acdc52758044f59e] | committer: James Almer

avfilter/vf_eq: fix compilation with x86 asm disabled

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dbd3c61163c6bb0b7f66499acdc52758044f59e
---

 libavfilter/x86/Makefile     | 2 +-
 libavfilter/x86/vf_eq_init.c | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile
index f2922c4597..4cd914366a 100644
--- a/libavfilter/x86/Makefile
+++ b/libavfilter/x86/Makefile
@@ -43,7 +43,7 @@ X86ASM-OBJS-$(CONFIG_BLEND_FILTER)           += x86/vf_blend.o
 X86ASM-OBJS-$(CONFIG_BWDIF_FILTER)           += x86/vf_bwdif.o
 X86ASM-OBJS-$(CONFIG_COLORSPACE_FILTER)      += x86/colorspacedsp.o
 X86ASM-OBJS-$(CONFIG_CONVOLUTION_FILTER)     += x86/vf_convolution.o
-X86ASM-OBJS-$(CONFIG_CONVOLUTION_FILTER)     += x86/vf_eq.o
+X86ASM-OBJS-$(CONFIG_EQ_FILTER)              += x86/vf_eq.o
 X86ASM-OBJS-$(CONFIG_FRAMERATE_FILTER)       += x86/vf_framerate.o
 X86ASM-OBJS-$(CONFIG_FSPP_FILTER)            += x86/vf_fspp.o
 X86ASM-OBJS-$(CONFIG_GBLUR_FILTER)           += x86/vf_gblur.o
diff --git a/libavfilter/x86/vf_eq_init.c b/libavfilter/x86/vf_eq_init.c
index 52848d5996..274325074a 100644
--- a/libavfilter/x86/vf_eq_init.c
+++ b/libavfilter/x86/vf_eq_init.c
@@ -31,6 +31,7 @@ extern void ff_process_one_line_mmxext(const uint8_t *src, uint8_t *dst, short c
 extern void ff_process_one_line_sse2(const uint8_t *src, uint8_t *dst, short contrast,
                                      short brightness, int w);
 
+#if HAVE_X86ASM
 static void process_mmxext(EQParameters *param, uint8_t *dst, int dst_stride,
                            const uint8_t *src, int src_stride, int w, int h)
 {
@@ -59,15 +60,17 @@ static void process_sse2(EQParameters *param, uint8_t *dst, int dst_stride,
         dst += dst_stride;
     }
 }
+#endif
 
 av_cold void ff_eq_init_x86(EQContext *eq)
 {
+#if HAVE_X86ASM
     int cpu_flags = av_get_cpu_flags();
-
-    if (cpu_flags & AV_CPU_FLAG_MMXEXT) {
+    if (EXTERNAL_MMXEXT(cpu_flags)) {
         eq->process = process_mmxext;
     }
-    if (cpu_flags & AV_CPU_FLAG_SSE2) {
+    if (EXTERNAL_SSE2(cpu_flags)) {
         eq->process = process_sse2;
     }
+#endif
 }



More information about the ffmpeg-cvslog mailing list