diff cabac.h @ 3964:162bea01a5d4 libavcodec

decrease ff_h264_norm_shift[] size
author michael
date Mon, 09 Oct 2006 00:59:42 +0000
parents 2acfc35c3075
children 01e1a12aa380
line wrap: on
line diff
--- a/cabac.h	Sun Oct 08 21:26:19 2006 +0000
+++ b/cabac.h	Mon Oct 09 00:59:42 2006 +0000
@@ -51,7 +51,7 @@
 extern const uint8_t ff_h264_lps_range[64][4];
 extern const uint8_t ff_h264_mps_state[64];
 extern const uint8_t ff_h264_lps_state[64];
-extern const uint8_t ff_h264_norm_shift[256];
+extern const uint8_t ff_h264_norm_shift[128];
 
 
 void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
@@ -270,7 +270,7 @@
     int i, x;
 
     x= c->low ^ (c->low-1);
-    i= 9 - ff_h264_norm_shift[x>>(CABAC_BITS+1)];
+    i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS+1)];
 
     x= -CABAC_MASK;
 
@@ -393,7 +393,7 @@
 #endif
         renorm_cabac_decoder_once(c);
     }else{
-        bit= ff_h264_norm_shift[RangeLPS>>17];
+        bit= ff_h264_norm_shift[RangeLPS>>19];
         c->low -= c->range;
         *state= c->lps_state[s];
         c->range = RangeLPS<<bit;