|
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 VP9_COMMON_VP9_ENUMS_H_ |
|
12 #define VP9_COMMON_VP9_ENUMS_H_ |
|
13 |
|
14 #include "./vpx_config.h" |
|
15 |
|
16 #define MI_SIZE_LOG2 3 |
|
17 #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6 |
|
18 |
|
19 #define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit |
|
20 #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block |
|
21 |
|
22 #define MI_MASK (MI_BLOCK_SIZE - 1) |
|
23 |
|
24 |
|
25 typedef enum BLOCK_SIZE { |
|
26 BLOCK_4X4, |
|
27 BLOCK_4X8, |
|
28 BLOCK_8X4, |
|
29 BLOCK_8X8, |
|
30 BLOCK_8X16, |
|
31 BLOCK_16X8, |
|
32 BLOCK_16X16, |
|
33 BLOCK_16X32, |
|
34 BLOCK_32X16, |
|
35 BLOCK_32X32, |
|
36 BLOCK_32X64, |
|
37 BLOCK_64X32, |
|
38 BLOCK_64X64, |
|
39 BLOCK_SIZES, |
|
40 BLOCK_INVALID = BLOCK_SIZES |
|
41 } BLOCK_SIZE; |
|
42 |
|
43 typedef enum PARTITION_TYPE { |
|
44 PARTITION_NONE, |
|
45 PARTITION_HORZ, |
|
46 PARTITION_VERT, |
|
47 PARTITION_SPLIT, |
|
48 PARTITION_TYPES, |
|
49 PARTITION_INVALID = PARTITION_TYPES |
|
50 } PARTITION_TYPE; |
|
51 |
|
52 #define PARTITION_PLOFFSET 4 // number of probability models per block size |
|
53 #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET) |
|
54 |
|
55 typedef enum { |
|
56 TX_4X4 = 0, // 4x4 dct transform |
|
57 TX_8X8 = 1, // 8x8 dct transform |
|
58 TX_16X16 = 2, // 16x16 dct transform |
|
59 TX_32X32 = 3, // 32x32 dct transform |
|
60 TX_SIZES |
|
61 } TX_SIZE; |
|
62 |
|
63 typedef enum { |
|
64 ONLY_4X4 = 0, |
|
65 ALLOW_8X8 = 1, |
|
66 ALLOW_16X16 = 2, |
|
67 ALLOW_32X32 = 3, |
|
68 TX_MODE_SELECT = 4, |
|
69 TX_MODES = 5, |
|
70 } TX_MODE; |
|
71 |
|
72 typedef enum { |
|
73 DCT_DCT = 0, // DCT in both horizontal and vertical |
|
74 ADST_DCT = 1, // ADST in vertical, DCT in horizontal |
|
75 DCT_ADST = 2, // DCT in vertical, ADST in horizontal |
|
76 ADST_ADST = 3 // ADST in both directions |
|
77 } TX_TYPE; |
|
78 |
|
79 typedef enum { |
|
80 UNKNOWN = 0, |
|
81 BT_601 = 1, // YUV |
|
82 BT_709 = 2, // YUV |
|
83 SMPTE_170 = 3, // YUV |
|
84 SMPTE_240 = 4, // YUV |
|
85 RESERVED_1 = 5, |
|
86 RESERVED_2 = 6, |
|
87 SRGB = 7 // RGB |
|
88 } COLOR_SPACE; |
|
89 |
|
90 #endif // VP9_COMMON_VP9_ENUMS_H_ |