Home | History | Annotate | Download | only in encoder
      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 #ifndef VP8_ENCODER_TOKENIZE_H_
     12 #define VP8_ENCODER_TOKENIZE_H_
     13 
     14 #include "vp8/common/entropy.h"
     15 #include "block.h"
     16 
     17 #ifdef __cplusplus
     18 extern "C" {
     19 #endif
     20 
     21 void vp8_tokenize_initialize();
     22 
     23 typedef struct {
     24   short Token;
     25   short Extra;
     26 } TOKENVALUE;
     27 
     28 typedef struct {
     29   const vp8_prob *context_tree;
     30   short Extra;
     31   unsigned char Token;
     32   unsigned char skip_eob_node;
     33 } TOKENEXTRA;
     34 
     35 int rd_cost_mby(MACROBLOCKD *);
     36 
     37 #ifdef VP8_ENTROPY_STATS
     38 void init_context_counters();
     39 void print_context_counters();
     40 
     41 extern _int64 context_counters[BLOCK_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
     42                               [MAX_ENTROPY_TOKENS];
     43 #endif
     44 
     45 extern const short *const vp8_dct_value_cost_ptr;
     46 /* TODO: The Token field should be broken out into a separate char array to
     47  *  improve cache locality, since it's needed for costing when the rest of the
     48  *  fields are not.
     49  */
     50 extern const TOKENVALUE *const vp8_dct_value_tokens_ptr;
     51 
     52 #ifdef __cplusplus
     53 }  // extern "C"
     54 #endif
     55 
     56 #endif  // VP8_ENCODER_TOKENIZE_H_
     57