OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * |
| 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. |
| 9 */ |
| 10 |
| 11 |
| 12 #ifndef VP9_ENCODER_VP9_TOKENIZE_H_ |
| 13 #define VP9_ENCODER_VP9_TOKENIZE_H_ |
| 14 |
| 15 #include "vp9/common/vp9_entropy.h" |
| 16 #include "vp9/encoder/vp9_block.h" |
| 17 |
| 18 void vp9_tokenize_initialize(); |
| 19 |
| 20 typedef struct { |
| 21 short Token; |
| 22 short Extra; |
| 23 } TOKENVALUE; |
| 24 |
| 25 typedef struct { |
| 26 const vp9_prob *context_tree; |
| 27 short Extra; |
| 28 unsigned char Token; |
| 29 unsigned char skip_eob_node; |
| 30 } TOKENEXTRA; |
| 31 |
| 32 extern int vp9_mby_is_skippable_4x4(MACROBLOCKD *xd, int has_y2_block); |
| 33 extern int vp9_mbuv_is_skippable_4x4(MACROBLOCKD *xd); |
| 34 extern int vp9_mby_is_skippable_8x8(MACROBLOCKD *xd, int has_y2_block); |
| 35 extern int vp9_mbuv_is_skippable_8x8(MACROBLOCKD *xd); |
| 36 extern int vp9_mby_is_skippable_16x16(MACROBLOCKD *xd); |
| 37 |
| 38 struct VP9_COMP; |
| 39 |
| 40 extern void vp9_tokenize_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd, |
| 41 TOKENEXTRA **t, int dry_run); |
| 42 |
| 43 extern void vp9_stuff_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd, |
| 44 TOKENEXTRA **t, int dry_run); |
| 45 |
| 46 extern void vp9_fix_contexts(MACROBLOCKD *xd); |
| 47 |
| 48 #ifdef ENTROPY_STATS |
| 49 void init_context_counters(); |
| 50 void print_context_counters(); |
| 51 |
| 52 extern INT64 context_counters[BLOCK_TYPES][COEF_BANDS] |
| 53 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; |
| 54 extern INT64 context_counters_8x8[BLOCK_TYPES_8X8][COEF_BANDS] |
| 55 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; |
| 56 extern INT64 context_counters_16x16[BLOCK_TYPES_16X16][COEF_BANDS] |
| 57 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; |
| 58 #endif |
| 59 |
| 60 extern const int *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 |
| 63 * fields are not. |
| 64 */ |
| 65 extern const TOKENVALUE *vp9_dct_value_tokens_ptr; |
| 66 |
| 67 #endif /* tokenize_h */ |
OLD | NEW |