Commit 97495c5c authored by Johann's avatar Johann Committed by Gerrit Code Review

Merge "Makes all global data in tokenize.c const"

parents a91b42f0 b35a0db0
This diff is collapsed.
This diff is collapsed.
......@@ -219,7 +219,6 @@ void vp8_initialize()
{
vp8_scale_machine_specific_config();
vp8_initialize_common();
vp8_tokenize_initialize();
init_done = 1;
}
......
......@@ -26,14 +26,20 @@ _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTR
void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCKD *x, TOKENEXTRA **t) ;
void vp8_fix_contexts(MACROBLOCKD *x);
static TOKENVALUE dct_value_tokens[DCT_MAX_VALUE*2];
const TOKENVALUE *vp8_dct_value_tokens_ptr;
static int dct_value_cost[DCT_MAX_VALUE*2];
const int *vp8_dct_value_cost_ptr;
#include "dct_value_tokens.h"
#include "dct_value_cost.h"
const TOKENVALUE *const vp8_dct_value_tokens_ptr = dct_value_tokens +
DCT_MAX_VALUE;
const short *const vp8_dct_value_cost_ptr = dct_value_cost + DCT_MAX_VALUE;
#if 0
int skip_true_count = 0;
int skip_false_count = 0;
#endif
/* function used to generate dct_value_tokens and dct_value_cost tables */
/*
static void fill_value_tokens()
{
......@@ -80,7 +86,7 @@ static void fill_value_tokens()
if (Length)
cost += vp8_treed_cost(p->tree, p->prob, extra >> 1, Length);
cost += vp8_cost_bit(vp8_prob_half, extra & 1); /* sign */
cost += vp8_cost_bit(vp8_prob_half, extra & 1); // sign
dct_value_cost[i + DCT_MAX_VALUE] = cost;
}
......@@ -92,6 +98,7 @@ static void fill_value_tokens()
vp8_dct_value_tokens_ptr = dct_value_tokens + DCT_MAX_VALUE;
vp8_dct_value_cost_ptr = dct_value_cost + DCT_MAX_VALUE;
}
*/
static void tokenize2nd_order_b
(
......@@ -476,12 +483,6 @@ void print_context_counters()
#endif
void vp8_tokenize_initialize()
{
fill_value_tokens();
}
static void stuff2nd_order_b
(
TOKENEXTRA **tp,
......
......@@ -40,11 +40,11 @@ void print_context_counters();
extern _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS];
#endif
extern const int *vp8_dct_value_cost_ptr;
extern const short *const vp8_dct_value_cost_ptr;
/* TODO: The Token field should be broken out into a separate char array to
* improve cache locality, since it's needed for costing when the rest of the
* fields are not.
*/
extern const TOKENVALUE *vp8_dct_value_tokens_ptr;
extern const TOKENVALUE *const vp8_dct_value_tokens_ptr;
#endif /* tokenize_h */
......@@ -78,6 +78,8 @@ VP8_CX_SRCS-yes += encoder/segmentation.c
VP8_CX_SRCS-yes += encoder/segmentation.h
VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS) += encoder/ssim.c
VP8_CX_SRCS-yes += encoder/tokenize.c
VP8_CX_SRCS-yes += encoder/dct_value_cost.h
VP8_CX_SRCS-yes += encoder/dct_value_tokens.h
VP8_CX_SRCS-yes += encoder/treewriter.c
VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.h
VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.c
......
Markdown is supported
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