xref: /aosp_15_r20/external/libvpx/vp8/encoder/tokenize.h (revision fb1b10ab9aebc7c7068eedab379b749d7e3900be)
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 VPX_VP8_ENCODER_TOKENIZE_H_
12 #define VPX_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 typedef struct {
22   short Token;
23   short Extra;
24 } TOKENVALUE;
25 
26 typedef struct {
27   const vp8_prob *context_tree;
28   short Extra;
29   unsigned char Token;
30   unsigned char skip_eob_node;
31 } TOKENEXTRA;
32 
33 int rd_cost_mby(MACROBLOCKD *);
34 
35 extern const short *const vp8_dct_value_cost_ptr;
36 /* TODO: The Token field should be broken out into a separate char array to
37  *  improve cache locality, since it's needed for costing when the rest of the
38  *  fields are not.
39  */
40 extern const TOKENVALUE *const vp8_dct_value_tokens_ptr;
41 
42 #ifdef __cplusplus
43 }  // extern "C"
44 #endif
45 
46 #endif  // VPX_VP8_ENCODER_TOKENIZE_H_
47