[FFmpeg-devel] [PATCH] Add ability to turn off yasm from the command line
Art Clarke
aclarke
Thu Feb 5 00:35:38 CET 2009
On Wed, Feb 4, 2009 at 3:29 PM, M?ns Rullg?rd <mans at mansr.com> wrote:
>> - check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
>> + check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS && enable yasm || disable yasm
>
> That is wrong. The check_yasm should not mess with the yasm variable.
Fair enough.
> Moving yasm from CONFIG_ to HAVE_ effectively disables it if you don't
> update places that reference it.
Agreed, and that's what my updated patch was about (but I'm guessing
you didn't see that). My apologies for missing it the first time
around.
> I like my fixed version better.
That's fair, but according to DrD it doesn't work (although to be fair
I haven't tested it).
For completeness, I've updated my patch to account for your feedback.
- 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"
@@ -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" || disable yasm
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