aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cabac.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-11 17:59:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-11 17:59:40 +0000
commit1f4d5e9f69e84f4d6cd78e31909f547d4d698ed8 (patch)
tree2f7086297cb4efde3b1a81f89e0ef05198d31cf3 /libavcodec/cabac.h
parentf3239539b997e9c6fbd9182f4109fa0941b7d7d1 (diff)
downloadffmpeg-1f4d5e9f69e84f4d6cd78e31909f547d4d698ed8.tar.gz
slightly faster on P3 slightly slower on athlon and probably faster on P4
Originally committed as revision 6663 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cabac.h')
-rw-r--r--libavcodec/cabac.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index ba2799311c..372123086a 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -382,10 +382,20 @@ static int get_cabac(CABACContext *c, uint8_t * const state){
"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