changeset 3982:af16271634c2 libavcodec

moving another bit&1 out, this is as fast as with it in there, but it makes more sense with it outside of the loop
author michael
date Tue, 10 Oct 2006 06:56:51 +0000
parents 9854f686ba79
children fec25fd9febf
files cabac.h
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cabac.h	Tue Oct 10 01:17:39 2006 +0000
+++ b/cabac.h	Tue Oct 10 06:56:51 2006 +0000
@@ -441,12 +441,11 @@
         "2:                                     \n\t"
         "movl %%edx, "RANGE    "(%2)            \n\t"
         "movl %%ebx, "LOW      "(%2)            \n\t"
-        "andl $1, %%eax                         \n\t"
-
         :"=&a"(bit) //FIXME this is fragile gcc either runs out of registers or misscompiles it (for example if "+a"(bit) or "+m"(*state) is used
         :"r"(state), "r"(c)
         : "%ecx", "%ebx", "%edx", "%esi"
     );
+    bit&=1;
 #else
     asm volatile(
         "movzbl (%1), %%eax                     \n\t"