2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef VP9_ENCODER_VP9_TOKENIZE_H_
12 #define VP9_ENCODER_VP9_TOKENIZE_H_
14 #include "vp9/common/vp9_entropy.h"
16 #include "vp9/encoder/vp9_block.h"
17 #include "vp9/encoder/vp9_treewriter.h"
23 void vp9_tokenize_initialize();
25 #define EOSB_TOKEN 127 // Not signalled, encoder only
29 #if CONFIG_VP9_HIGHBITDEPTH
37 const vp9_prob *context_tree;
38 #if CONFIG_VP9_HIGHBITDEPTH
44 uint8_t skip_eob_node;
47 extern const vp9_tree_index vp9_coef_tree[];
48 extern const vp9_tree_index vp9_coef_con_tree[];
49 extern struct vp9_token vp9_coef_encodings[];
51 int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
52 int vp9_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
57 void vp9_tokenize_sb(struct VP9_COMP *cpi, struct ThreadData *td,
58 TOKENEXTRA **t, int dry_run, BLOCK_SIZE bsize);
60 extern const int16_t *vp9_dct_value_cost_ptr;
61 /* TODO: The Token field should be broken out into a separate char array to
62 * improve cache locality, since it's needed for costing when the rest of the
65 extern const TOKENVALUE *vp9_dct_value_tokens_ptr;
66 #if CONFIG_VP9_HIGHBITDEPTH
67 extern const int16_t *vp9_dct_value_cost_high10_ptr;
68 extern const TOKENVALUE *vp9_dct_value_tokens_high10_ptr;
69 extern const int16_t *vp9_dct_value_cost_high12_ptr;
70 extern const TOKENVALUE *vp9_dct_value_tokens_high12_ptr;
71 #endif // CONFIG_VP9_HIGHBITDEPTH
77 #endif // VP9_ENCODER_VP9_TOKENIZE_H_