changeset 8438:89f7279e1eaa libavcodec

Simplify decode_cabac_mb_ref() a little bit, 2 cpu cycles faster on pentium dual.
author michael
date Mon, 22 Dec 2008 17:14:13 +0000
parents 94c16f1cd5cf
children c5302e0ecf4e
files h264.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Mon Dec 22 16:56:05 2008 +0000
+++ b/h264.c	Mon Dec 22 17:14:13 2008 +0000
@@ -4991,10 +4991,7 @@
 
     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;
         }