# HG changeset patch # User michael # Date 1160589580 0 # Node ID 6cbad3675632629b0d6a1e5963ddf23759cfe47c # Parent f76c914fea4e9a310e319f30aadfb3ea27835526 slightly faster on P3 slightly slower on athlon and probably faster on P4 diff -r f76c914fea4e -r 6cbad3675632 cabac.h --- a/cabac.h Wed Oct 11 17:14:02 2006 +0000 +++ b/cabac.h Wed Oct 11 17:59:40 2006 +0000 @@ -382,10 +382,20 @@ "subl %%esi, %%edx \n\t" "cmpl %%edx, %%ebx \n\t" " ja 1f \n\t" + +#if 1 + //athlon:4067 P3:4110 + "lea -0x2000000(%%edx), %%ecx \n\t" + "shr $31, %%ecx \n\t" + "shl %%cl, %%edx \n\t" + "shl %%cl, %%ebx \n\t" +#else + //athlon:4057 P3:4130 "cmp $0x2000000, %%edx \n\t" //FIXME avoidable "setb %%cl \n\t" "shl %%cl, %%edx \n\t" "shl %%cl, %%ebx \n\t" +#endif "movzbl "MANGLE(ff_h264_mps_state)"(%%eax), %%ecx \n\t" "movb %%cl, (%1) \n\t" //eax:state ebx:low, edx:range, esi:RangeLPS