changeset 8397:81c6cec28a62 libavcodec

Simplify ctx calculation in decode_cabac_mb_dqp() no speed change
author michael
date Fri, 19 Dec 2008 01:50:20 +0000
parents 11b1f7762830
children 5ffdec2cd80c
files h264.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Dec 19 01:11:52 2008 +0000
+++ b/h264.c	Fri Dec 19 01:50:20 2008 +0000
@@ -4955,12 +4955,9 @@
     return 1 + get_cabac_noinline( &h->cabac, &h->cabac_state[77 + ctx] );
 }
 static int decode_cabac_mb_dqp( H264Context *h) {
-    int   ctx = 0;
+    int   ctx= h->last_qscale_diff != 0;
     int   val = 0;
 
-    if( h->last_qscale_diff != 0 )
-        ctx++;
-
     while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) {
         if( ctx < 2 )
             ctx = 2;