michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #ifndef tokenize_h michael@0: #define tokenize_h michael@0: michael@0: #include "vp8/common/entropy.h" michael@0: #include "block.h" michael@0: michael@0: void vp8_tokenize_initialize(); michael@0: michael@0: typedef struct michael@0: { michael@0: short Token; michael@0: short Extra; michael@0: } TOKENVALUE; michael@0: michael@0: typedef struct michael@0: { michael@0: const vp8_prob *context_tree; michael@0: short Extra; michael@0: unsigned char Token; michael@0: unsigned char skip_eob_node; michael@0: } TOKENEXTRA; michael@0: michael@0: int rd_cost_mby(MACROBLOCKD *); michael@0: michael@0: #ifdef VP8_ENTROPY_STATS michael@0: void init_context_counters(); michael@0: void print_context_counters(); michael@0: michael@0: extern _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS]; michael@0: #endif michael@0: michael@0: extern const short *const vp8_dct_value_cost_ptr; michael@0: /* TODO: The Token field should be broken out into a separate char array to michael@0: * improve cache locality, since it's needed for costing when the rest of the michael@0: * fields are not. michael@0: */ michael@0: extern const TOKENVALUE *const vp8_dct_value_tokens_ptr; michael@0: michael@0: #endif /* tokenize_h */