changeset 3995:b00c06477dff libavcodec

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)
author michael
date Wed, 11 Oct 2006 16:11:41 +0000
parents 2734b228fc87
children c4ff7d570f19
files cabac.h
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cabac.h	Wed Oct 11 15:20:08 2006 +0000
+++ b/cabac.h	Wed Oct 11 16:11:41 2006 +0000
@@ -478,8 +478,10 @@
 
         "shr $19, %%esi                         \n\t"
         "movzbl " MANGLE(ff_h264_norm_shift) "(%%esi), %%ecx   \n\t"
+        "shll %%cl, %%edx                       \n\t"
+        "movl %%edx, "RANGE    "(%2)            \n\t"
         "shll %%cl, %%ebx                       \n\t"
-        "shll %%cl, %%edx                       \n\t"
+        "movl %%ebx, "LOW      "(%2)            \n\t"
         "test %%bx, %%bx                        \n\t"
         " jnz 1f                                \n\t"
 
@@ -500,9 +502,8 @@
 
         "shll %%cl , %%esi                      \n\t"
         "addl %%esi, %%ebx                      \n\t"
+        "movl %%ebx, "LOW      "(%2)            \n\t"
         "1:                                     \n\t"
-        "movl %%edx, "RANGE    "(%2)            \n\t"
-        "movl %%ebx, "LOW      "(%2)            \n\t"
         :"=&a"(bit)
         :"r"(state), "r"(c)
         : "%ecx", "%ebx", "%edx", "%esi"