changeset 12229:cf675a4d5195 libavcodec

Eliminate a LUT in escape decoding in VP8 decode_block_coeffs
author darkshikari
date Thu, 22 Jul 2010 22:08:09 +0000
parents 9c63566f623f
children 00a4a6b56c7f
files vp8.c vp8data.h
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vp8.c	Thu Jul 22 21:05:30 2010 +0000
+++ b/vp8.c	Thu Jul 22 22:08:09 2010 +0000
@@ -803,7 +803,7 @@
         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
--- a/vp8data.h	Thu Jul 22 21:05:30 2010 +0000
+++ b/vp8data.h	Thu Jul 22 22:08:09 2010 +0000
@@ -361,8 +361,6 @@
     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] =
 {
     {