shithub: libvpx

Download patch

ref: 41f4458a030dfd545078a10c1f5097702d6ccdd1
parent: 3809d7bbd984a763cf7f288a51c9924667addf4a
author: John Koleszar <jkoleszar@google.com>
date: Mon Dec 13 12:11:48 EST 2010

Revert "Reduce size of TOKENEXTRA struct"

This reverts commit b7b1e6fb55c6b12ccd078a20cb9855f6734931b5. Previous
fix is incomplete, breaks ARM. Itchy submit finger.

Change-Id: I939dc0d3bf4173cf951c1d152338ab6ea2184bb9

--- a/vp8/encoder/tokenize.c
+++ b/vp8/encoder/tokenize.c
@@ -131,6 +131,9 @@
 
         t->Token = x;
         t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt];
+
+        t->section = frametype * BLOCK_TYPES * 2 + 2 * type + (c == 0);
+
         t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
 
         ++cpi->coef_counts       [type] [band] [pt] [x];
@@ -181,6 +184,8 @@
 
         t->Token = x;
         t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt];
+
+        t->section = frametype * BLOCK_TYPES * 2 + 2 * type + (c == 0);
         t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
 
         ++cpi->coef_counts       [type] [band] [pt] [x];
@@ -429,6 +434,7 @@
 
     t->Token = DCT_EOB_TOKEN;
     t->context_tree = cpi->common.fc.coef_probs [1] [0] [pt];
+    t->section = 11;
     t->skip_eob_node = 0;
     ++cpi->coef_counts       [1] [0] [pt] [DCT_EOB_TOKEN];
     ++t;
@@ -459,6 +465,7 @@
 
     t->Token = DCT_EOB_TOKEN;
     t->context_tree = cpi->common.fc.coef_probs [0] [1] [pt];
+    t->section = 8;
     t->skip_eob_node = 0;
     ++cpi->coef_counts       [0] [1] [pt] [DCT_EOB_TOKEN];
     ++t;
@@ -488,6 +495,7 @@
 
     t->Token = DCT_EOB_TOKEN;
     t->context_tree = cpi->common.fc.coef_probs [2] [0] [pt];
+    t->section = 13;
     t->skip_eob_node = 0;
     ++cpi->coef_counts[2] [0] [pt] [DCT_EOB_TOKEN];
     ++t;
--- a/vp8/encoder/tokenize.h
+++ b/vp8/encoder/tokenize.h
@@ -25,10 +25,11 @@
 
 typedef struct
 {
+    int Token;
+    int Extra;
     const vp8_prob *context_tree;
-    char            skip_eob_node;
-    char            Token;
-    short           Extra;
+    int skip_eob_node;
+    int section;
 } TOKENEXTRA;
 
 int rd_cost_mby(MACROBLOCKD *);