1 /*
2  *  Copyright (c) 2011 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_DECODER_EC_TYPES_H_
12 #define VP8_DECODER_EC_TYPES_H_
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #define MAX_OVERLAPS 16
19 
20 
21 /* The area (pixel area in Q6) the block pointed to by bmi overlaps
22  * another block with.
23  */
24 typedef struct
25 {
26     int overlap;
27     union b_mode_info *bmi;
28 } OVERLAP_NODE;
29 
30 /* Structure to keep track of overlapping blocks on a block level. */
31 typedef struct
32 {
33     /* TODO(holmer): This array should be exchanged for a linked list */
34     OVERLAP_NODE overlaps[MAX_OVERLAPS];
35 } B_OVERLAP;
36 
37 /* Structure used to hold all the overlaps of a macroblock. The overlaps of a
38  * macroblock is further divided into block overlaps.
39  */
40 typedef struct
41 {
42     B_OVERLAP overlaps[16];
43 } MB_OVERLAP;
44 
45 /* Structure for keeping track of motion vectors and which reference frame they
46  * refer to. Used for motion vector interpolation.
47  */
48 typedef struct
49 {
50     MV mv;
51     MV_REFERENCE_FRAME ref_frame;
52 } EC_BLOCK;
53 
54 #ifdef __cplusplus
55 }  // extern "C"
56 #endif
57 
58 #endif  // VP8_DECODER_EC_TYPES_H_
59