[SCM] libav/experimental: write cabac low and range variables as early as possible to prevent stalls from reading them before they where written, the P4 is said to disslike that alot, on P3 its 2% faster (START/STOP_TIMER over decode_residual)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:52:08 UTC 2013


The following commit has been merged in the experimental branch:
commit b99f3cabeddf98264fd73fd6757255220651ce62
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Wed Oct 11 16:11:41 2006 +0000

    write cabac low and range variables as early as possible to prevent stalls from reading them before they where written, the P4 is said to disslike that alot, on P3 its 2% faster (START/STOP_TIMER over decode_residual)
    
    Originally committed as revision 6657 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index c852aa5..473e7cf 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -478,8 +478,10 @@ static int get_cabac(CABACContext *c, uint8_t * const state){
 
         "shr $19, %%esi                         \n\t"
         "movzbl " MANGLE(ff_h264_norm_shift) "(%%esi), %%ecx   \n\t"
-        "shll %%cl, %%ebx                       \n\t"
         "shll %%cl, %%edx                       \n\t"
+        "movl %%edx, "RANGE    "(%2)            \n\t"
+        "shll %%cl, %%ebx                       \n\t"
+        "movl %%ebx, "LOW      "(%2)            \n\t"
         "test %%bx, %%bx                        \n\t"
         " jnz 1f                                \n\t"
 
@@ -500,9 +502,8 @@ static int get_cabac(CABACContext *c, uint8_t * const state){
 
         "shll %%cl , %%esi                      \n\t"
         "addl %%esi, %%ebx                      \n\t"
-        "1:                                     \n\t"
-        "movl %%edx, "RANGE    "(%2)            \n\t"
         "movl %%ebx, "LOW      "(%2)            \n\t"
+        "1:                                     \n\t"
         :"=&a"(bit)
         :"r"(state), "r"(c)
         : "%ecx", "%ebx", "%edx", "%esi"

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list