[FFmpeg-cvslog] r11876 - in trunk/libavcodec/i386: dsputil_mmx.c h264dsp_mmx.c

lorenm subversion
Wed Feb 6 05:44:22 CET 2008


Author: lorenm
Date: Wed Feb  6 05:44:21 2008
New Revision: 11876

Log:
put loop counter in a register if possible. makes some of the qpel functions 3% faster.


Modified:
   trunk/libavcodec/i386/dsputil_mmx.c
   trunk/libavcodec/i386/h264dsp_mmx.c

Modified: trunk/libavcodec/i386/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/i386/dsputil_mmx.c	(original)
+++ trunk/libavcodec/i386/dsputil_mmx.c	Wed Feb  6 05:44:21 2008
@@ -2061,7 +2061,7 @@ static void OPNAME ## mpeg4_qpel16_h_low
         "add %4, %1                       \n\t"\
         "decl %2                          \n\t"\
         " jnz 1b                          \n\t"\
-        : "+a"(src), "+c"(dst), "+m"(h)\
+        : "+a"(src), "+c"(dst), "+g"(h)\
         : "d"((long)srcStride), "S"((long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
         : "memory"\
     );\
@@ -2174,7 +2174,7 @@ static void OPNAME ## mpeg4_qpel8_h_lowp
         "add %4, %1                       \n\t"\
         "decl %2                          \n\t"\
         " jnz 1b                          \n\t"\
-        : "+a"(src), "+c"(dst), "+m"(h)\
+        : "+a"(src), "+c"(dst), "+g"(h)\
         : "S"((long)srcStride), "D"((long)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\
         : "memory"\
     );\

Modified: trunk/libavcodec/i386/h264dsp_mmx.c
==============================================================================
--- trunk/libavcodec/i386/h264dsp_mmx.c	(original)
+++ trunk/libavcodec/i386/h264dsp_mmx.c	Wed Feb  6 05:44:21 2008
@@ -796,7 +796,7 @@ static av_noinline void OPNAME ## h264_q
         "add %4, %1                 \n\t"\
         "decl %2                    \n\t"\
         " jnz 1b                    \n\t"\
-        : "+a"(src), "+c"(dst), "+m"(h)\
+        : "+a"(src), "+c"(dst), "+g"(h)\
         : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
         : "memory"\
     );\
@@ -930,7 +930,7 @@ static av_noinline void OPNAME ## h264_q
         "add %3, %1                 \n\t"\
         "decl %2                    \n\t"\
         " jnz 1b                    \n\t"\
-        : "+a"(tmp), "+c"(dst), "+m"(h)\
+        : "+a"(tmp), "+c"(dst), "+g"(h)\
         : "S"((long)dstStride)\
         : "memory"\
     );\
@@ -987,7 +987,7 @@ static av_noinline void OPNAME ## h264_q
         "add %4, %1                 \n\t"\
         "decl %2                    \n\t"\
         " jnz 1b                    \n\t"\
-        : "+a"(src), "+c"(dst), "+m"(h)\
+        : "+a"(src), "+c"(dst), "+g"(h)\
         : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
         : "memory"\
     );\
@@ -1201,7 +1201,7 @@ static av_noinline void OPNAME ## h264_q
         "add %3, %1                 \n\t"\
         "decl %2                    \n\t"\
         " jnz 1b                    \n\t"\
-        : "+a"(tmp), "+c"(dst), "+m"(h)\
+        : "+a"(tmp), "+c"(dst), "+g"(h)\
         : "S"((long)dstStride)\
         : "memory"\
     );\




More information about the ffmpeg-cvslog mailing list