From a5f7d78a06b7c64a12747ac080d4aac25c3c94d7 Mon Sep 17 00:00:00 2001 From: Jim Bankoski Date: Mon, 22 Dec 2014 13:35:56 -0800 Subject: [PATCH] make vp9_coef_encodings const Change-Id: I28a3d342a4a4b23e02a0f47bb8037c4403f71d61 --- vp9/encoder/vp9_encoder.c | 2 -- vp9/encoder/vp9_tokenize.c | 9 ++++----- vp9/encoder/vp9_tokenize.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 4492c6d66..59733c671 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -51,7 +51,6 @@ #include "vp9/encoder/vp9_resize.h" #include "vp9/encoder/vp9_svc_layercontext.h" -void vp9_coef_tree_initialize(); #define SHARP_FILTER_QTHRESH 0 /* Q threshold for 8-tap sharp filter */ @@ -187,7 +186,6 @@ void vp9_initialize_enc(void) { if (!init_done) { vp9_rtcd(); vp9_init_intra_predictors(); - vp9_coef_tree_initialize(); vp9_tokenize_initialize(); vp9_init_me_luts(); vp9_rc_init_minq_luts(); diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index d54520f9f..a0cfb34b3 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -152,11 +152,10 @@ const vp9_extra_bit vp9_extra_bits_high12[ENTROPY_TOKENS] = { }; #endif -struct vp9_token vp9_coef_encodings[ENTROPY_TOKENS]; - -void vp9_coef_tree_initialize() { - vp9_tokens_from_tree(vp9_coef_encodings, vp9_coef_tree); -} +const struct vp9_token vp9_coef_encodings[ENTROPY_TOKENS] = { + {2, 2}, {6, 3}, {28, 5}, {58, 6}, {59, 6}, {60, 6}, {61, 6}, {124, 7}, + {125, 7}, {126, 7}, {127, 7}, {0, 1} +}; static void tokenize_init_one(TOKENVALUE *t, const vp9_extra_bit *const e, int16_t *value_cost, int max_value) { diff --git a/vp9/encoder/vp9_tokenize.h b/vp9/encoder/vp9_tokenize.h index 00afb723e..2e9e8c9af 100644 --- a/vp9/encoder/vp9_tokenize.h +++ b/vp9/encoder/vp9_tokenize.h @@ -46,7 +46,7 @@ typedef struct { extern const vp9_tree_index vp9_coef_tree[]; extern const vp9_tree_index vp9_coef_con_tree[]; -extern struct vp9_token vp9_coef_encodings[]; +extern const struct vp9_token vp9_coef_encodings[]; int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane); int vp9_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane); -- 2.40.0