[FFmpeg-cvslog] r24441 - in trunk/libavcodec: vp8.c vp8data.h

darkshikari subversion
Fri Jul 23 00:08:09 CEST 2010


Author: darkshikari
Date: Fri Jul 23 00:08:09 2010
New Revision: 24441

Log:
Eliminate a LUT in escape decoding in VP8 decode_block_coeffs

Modified:
   trunk/libavcodec/vp8.c
   trunk/libavcodec/vp8data.h

Modified: trunk/libavcodec/vp8.c
==============================================================================
--- trunk/libavcodec/vp8.c	Fri Jul 23 00:06:46 2010	(r24440)
+++ trunk/libavcodec/vp8.c	Fri Jul 23 00:08:09 2010	(r24441)
@@ -803,7 +803,7 @@ static int decode_block_coeffs(VP56Range
         else if (token >= DCT_CAT1) {
             int cat = token-DCT_CAT1;
             token = vp8_rac_get_coeff(c, vp8_dct_cat_prob[cat]);
-            token += vp8_dct_cat_offset[cat];
+            token += 3 + (2<<cat);
         }
 
         // after the first token, the non-zero prediction context becomes

Modified: trunk/libavcodec/vp8data.h
==============================================================================
--- trunk/libavcodec/vp8data.h	Fri Jul 23 00:06:46 2010	(r24440)
+++ trunk/libavcodec/vp8data.h	Fri Jul 23 00:08:09 2010	(r24441)
@@ -361,8 +361,6 @@ static const uint8_t * const vp8_dct_cat
     vp8_dct_cat6_prob,
 };
 
-static const uint8_t vp8_dct_cat_offset[6] = { 5, 7, 11, 19, 35, 67 };
-
 static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS-1] =
 {
     {



More information about the ffmpeg-cvslog mailing list