[FFmpeg-devel] [PATCH] Fix link errors when HAVE_X86ASM is not defined
Haihao Xiang
haihao.xiang at intel.com
Wed Nov 21 04:47:34 EET 2018
This fixes the link errors below:
LD ffmpeg_g
libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_avx2'
libavfilter/libavfilter.so: undefined reference to `ff_scene_sad_sse2'
collect2: error: ld returned 1 exit status
Makefile:108: recipe for target 'ffmpeg_g' failed
make: *** [ffmpeg_g] Error 1
Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
---
libavfilter/x86/scene_sad_init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavfilter/x86/scene_sad_init.c b/libavfilter/x86/scene_sad_init.c
index 461fa406d9..7e93ef44d3 100644
--- a/libavfilter/x86/scene_sad_init.c
+++ b/libavfilter/x86/scene_sad_init.c
@@ -20,6 +20,7 @@
#include "libavutil/x86/cpu.h"
#include "libavfilter/scene_sad.h"
+#if HAVE_X86ASM
#define SCENE_SAD_FUNC(FUNC_NAME, ASM_FUNC_NAME, MMSIZE) \
void ASM_FUNC_NAME(SCENE_SAD_PARAMS); \
\
@@ -50,3 +51,12 @@ ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth)
}
return NULL;
}
+
+#else
+
+ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth)
+{
+ return NULL;
+}
+
+#endif
\ No newline at end of file
--
2.17.1
More information about the ffmpeg-devel
mailing list