diff options
author | Michael Niedermayer | 2008-12-22 17:14:13 +0000 |
---|---|---|
committer | Michael Niedermayer | 2008-12-22 17:14:13 +0000 |
commit | ec3686e8890f3d0bc7e6a9a42886f28034cbbb07 (patch) | |
tree | 80299abebc614cf4964ea4136e82d6ec3d2b3e30 /libavcodec | |
parent | 26695973c73ece644db8e48f4687e013d53b33d9 (diff) |
Simplify decode_cabac_mb_ref() a little bit, 2 cpu cycles faster on
pentium dual.
Originally committed as revision 16279 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 0883018460..a170177fa4 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4991,10 +4991,7 @@ static int decode_cabac_mb_ref( H264Context *h, int list, int n ) { while( get_cabac( &h->cabac, &h->cabac_state[54+ctx] ) ) { ref++; - if( ctx < 4 ) - ctx = 4; - else - ctx = 5; + ctx = (ctx>>2)+4; if(ref >= 32 /*h->ref_list[list]*/){ return -1; } |