[FFmpeg-devel] [PATCH] Add ability to turn off yasm from the command line

Art Clarke aclarke
Wed Feb 4 22:09:55 CET 2009


On Wed, Feb 4, 2009 at 12:30 PM, Art Clarke <aclarke at xuggle.com> wrote:
> Tested this fix on Mac OS-X in all combinations of:
>  - yasm available / not-available on path
>  - --disable-yasm specified / not-specified to configure

My apologies, but after the fact I walked through the build logs in
detail and noticed I hadn't changed references to HAVE_YASM to be
CONFIG_YASM.  This is fixed in this patch.

- Art

-- 
http://www.xuggle.com/
xu?ggle (z?' gl) v. To freely encode, decode, and experience audio and video.

Use Xuggle to get the power of FFMPEG in Java.
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 16989)
+++ configure	(working copy)
@@ -207,6 +207,7 @@
   echo "  --disable-mmi            disable MMI optimizations"
   echo "  --disable-neon           disable neon optimizations"
   echo "  --disable-vis            disable VIS optimizations"
+  echo "  --disable-yasm           disable yasm"
   echo
   echo "Developer options (useful when working on FFmpeg itself):"
   echo "  --disable-debug          disable debugging symbols"
@@ -530,7 +531,7 @@
     echo "$1" > $TMPS
     log_file $TMPS
     shift 1
-    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
+    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS && enable yasm || disable yasm
 }
 
 check_ld(){
@@ -791,6 +792,7 @@
     vhook
     x11grab
     xvmc
+    yasm
     zlib
 "
 
@@ -899,7 +901,6 @@
     threads
     truncf
     winsock2_h
-    yasm
 "
 
 # options emitted with CONFIG_ prefix but not available on command line
@@ -1163,6 +1164,7 @@
 enable protocols
 enable static
 enable stripping
+enable yasm
 vhook="default"
 
 # build settings
@@ -1787,7 +1789,7 @@
         macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
         *)                    append YASMFLAGS "-DPREFIX"  ;;
     esac
-    check_yasm "pabsw xmm0, xmm0" && enable yasm
+    enabled yasm && check_yasm "pabsw xmm0, xmm0"
 fi
 
 # check for assembler specific support
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile	(revision 16989)
+++ libavcodec/Makefile	(working copy)
@@ -416,7 +416,7 @@
 MMX-OBJS-$(CONFIG_VP6A_DECODER)        += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o
 MMX-OBJS-$(CONFIG_VP6F_DECODER)        += x86/vp3dsp_mmx.o x86/vp3dsp_sse2.o
 MMX-OBJS-$(CONFIG_WMV3_DECODER)        += x86/vc1dsp_mmx.o
-MMX-OBJS-$(HAVE_YASM)                  += x86/dsputil_yasm.o            \
+MMX-OBJS-$(CONFIG_YASM)                += x86/dsputil_yasm.o            \
                                           $(YASM-OBJS-yes)
 
 OBJS-$(HAVE_MMX)                       += x86/cpuid.o                   \
Index: libavcodec/fft.c
===================================================================
--- libavcodec/fft.c	(revision 16989)
+++ libavcodec/fft.c	(working copy)
@@ -87,7 +87,7 @@
     s->imdct_half = ff_imdct_half_c;
     s->exptab1 = NULL;
 
-#if HAVE_MMX && HAVE_YASM
+#if HAVE_MMX && CONFIG_YASM
     has_vectors = mm_support();
     if (has_vectors & FF_MM_SSE) {
         /* SSE for P3/P4/K8 */
Index: libavcodec/x86/dsputil_mmx.c
===================================================================
--- libavcodec/x86/dsputil_mmx.c	(revision 16989)
+++ libavcodec/x86/dsputil_mmx.c	(working copy)
@@ -2324,7 +2324,7 @@
     );
 }
 
-#if HAVE_YASM
+#if CONFIG_YASM
 void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len);
 void ff_float_to_int16_interleave6_3dnow(int16_t *dst, const float **src, int len);
 void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len);
@@ -2876,7 +2876,7 @@
         }
 #endif
 
-#if CONFIG_GPL && HAVE_YASM
+#if CONFIG_GPL && CONFIG_YASM
         if( mm_flags&FF_MM_MMXEXT ){
 #if ARCH_X86_32
             c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
Index: libavcodec/x86/h264dsp_mmx.c
===================================================================
--- libavcodec/x86/h264dsp_mmx.c	(revision 16989)
+++ libavcodec/x86/h264dsp_mmx.c	(working copy)
@@ -472,7 +472,7 @@
     }
 }
 
-#if CONFIG_GPL && HAVE_YASM
+#if CONFIG_GPL && CONFIG_YASM
 static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
 {
     __asm__ volatile(



More information about the ffmpeg-devel mailing list