[FFmpeg-cvslog] r17151 - in trunk: configure libavcodec/x86/dsputil_mmx.c
diego
subversion
Wed Feb 11 12:16:00 CET 2009
Author: diego
Date: Wed Feb 11 12:16:00 2009
New Revision: 17151
Log:
Add check whether the compiler/assembler supports 10 or more operands.
thanks to Loren for some help with the asm statements
Modified:
trunk/configure
trunk/libavcodec/x86/dsputil_mmx.c
Modified: trunk/configure
==============================================================================
--- trunk/configure Wed Feb 11 12:09:36 2009 (r17150)
+++ trunk/configure Wed Feb 11 12:16:00 2009 (r17151)
@@ -898,6 +898,7 @@ HAVE_LIST="
sys_select_h
sys_soundcard_h
sys_videoio_h
+ ten_operands
termios_h
threads
truncf
@@ -1778,6 +1779,18 @@ EOF
# check wether EBX is available on x86
check_asm ebx_available '"":::"%ebx"'
+ # check whether more than 10 operands are supported
+ check_cc <<EOF && enable ten_operands
+int main(void) {
+ int x=0;
+ __asm__ volatile(
+ ""
+ :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
+ );
+ return 0;
+}
+EOF
+
# check whether binutils is new enough to compile SSSE3/MMX2
enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
enabled mmx2 && check_asm mmx2 '"movss %xmm0, %xmm0"'
@@ -2190,6 +2203,7 @@ if enabled x86; then
echo "CMOV is fast ${fast_cmov-no}"
echo "EBX available ${ebx_available-no}"
echo "EBP available ${ebp_available-no}"
+ echo "10 operands supported ${ten_operands-no}"
fi
if enabled arm; then
echo "ARMv5TE enabled ${armv5te-no}"
Modified: trunk/libavcodec/x86/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/x86/dsputil_mmx.c Wed Feb 11 12:09:36 2009 (r17150)
+++ trunk/libavcodec/x86/dsputil_mmx.c Wed Feb 11 12:16:00 2009 (r17151)
@@ -548,7 +548,7 @@ static void add_bytes_l2_mmx(uint8_t *ds
dst[i] = src1[i] + src2[i];
}
-#if HAVE_7REGS
+#if HAVE_7REGS && HAVE_TEN_OPERANDS
static void add_hfyu_median_prediction_cmov(uint8_t *dst, uint8_t *top, uint8_t *diff, int w, int *left, int *left_top) {
x86_reg w2 = -w;
x86_reg x;
@@ -2799,7 +2799,7 @@ void dsputil_init_mmx(DSPContext* c, AVC
#if HAVE_YASM
c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
#endif
-#if HAVE_7REGS
+#if HAVE_7REGS && HAVE_TEN_OPERANDS
if( mm_flags&FF_MM_3DNOW )
c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov;
#endif
More information about the ffmpeg-cvslog
mailing list