Commit b7b1e6fb authored by John Koleszar's avatar John Koleszar
Browse files

Reduce size of TOKENEXTRA struct

Change the size of structure elements to reduce memory utilization.
Removed the 'section' member entirely, as it is set but never read.

Change-Id: Iad043830392fb4168cb3cd6075fb0eb70c7f691c
Showing with 3 additions and 12 deletions
...@@ -131,9 +131,6 @@ static void tokenize2nd_order_b ...@@ -131,9 +131,6 @@ static void tokenize2nd_order_b
t->Token = x; t->Token = x;
t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt]; 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)); t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
++cpi->coef_counts [type] [band] [pt] [x]; ++cpi->coef_counts [type] [band] [pt] [x];
...@@ -184,8 +181,6 @@ static void tokenize1st_order_b ...@@ -184,8 +181,6 @@ static void tokenize1st_order_b
t->Token = x; t->Token = x;
t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt]; 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)); t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
++cpi->coef_counts [type] [band] [pt] [x]; ++cpi->coef_counts [type] [band] [pt] [x];
...@@ -434,7 +429,6 @@ static __inline void stuff2nd_order_b ...@@ -434,7 +429,6 @@ static __inline void stuff2nd_order_b
t->Token = DCT_EOB_TOKEN; t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [1] [0] [pt]; t->context_tree = cpi->common.fc.coef_probs [1] [0] [pt];
t->section = 11;
t->skip_eob_node = 0; t->skip_eob_node = 0;
++cpi->coef_counts [1] [0] [pt] [DCT_EOB_TOKEN]; ++cpi->coef_counts [1] [0] [pt] [DCT_EOB_TOKEN];
++t; ++t;
...@@ -465,7 +459,6 @@ static __inline void stuff1st_order_b ...@@ -465,7 +459,6 @@ static __inline void stuff1st_order_b
t->Token = DCT_EOB_TOKEN; t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [0] [1] [pt]; t->context_tree = cpi->common.fc.coef_probs [0] [1] [pt];
t->section = 8;
t->skip_eob_node = 0; t->skip_eob_node = 0;
++cpi->coef_counts [0] [1] [pt] [DCT_EOB_TOKEN]; ++cpi->coef_counts [0] [1] [pt] [DCT_EOB_TOKEN];
++t; ++t;
...@@ -495,7 +488,6 @@ void stuff1st_order_buv ...@@ -495,7 +488,6 @@ void stuff1st_order_buv
t->Token = DCT_EOB_TOKEN; t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [2] [0] [pt]; t->context_tree = cpi->common.fc.coef_probs [2] [0] [pt];
t->section = 13;
t->skip_eob_node = 0; t->skip_eob_node = 0;
++cpi->coef_counts[2] [0] [pt] [DCT_EOB_TOKEN]; ++cpi->coef_counts[2] [0] [pt] [DCT_EOB_TOKEN];
++t; ++t;
......
...@@ -25,11 +25,10 @@ typedef struct ...@@ -25,11 +25,10 @@ typedef struct
typedef struct typedef struct
{ {
int Token;
int Extra;
const vp8_prob *context_tree; const vp8_prob *context_tree;
int skip_eob_node; char skip_eob_node;
int section; char Token;
short Extra;
} TOKENEXTRA; } TOKENEXTRA;
int rd_cost_mby(MACROBLOCKD *); int rd_cost_mby(MACROBLOCKD *);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment