OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef VP9_COMMON_VP9_ENUMS_H_ | 11 #ifndef VP9_COMMON_VP9_ENUMS_H_ |
12 #define VP9_COMMON_VP9_ENUMS_H_ | 12 #define VP9_COMMON_VP9_ENUMS_H_ |
13 | 13 |
14 #include "./vpx_config.h" | 14 #include "./vpx_config.h" |
15 | 15 |
16 #define LOG2_MI_SIZE 3 | 16 #define MI_SIZE_LOG2 3 |
17 #define LOG2_MI_BLOCK_SIZE (6 - LOG2_MI_SIZE) // 64 = 2^6 | 17 #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6 |
18 | 18 |
19 #define MI_SIZE (1 << LOG2_MI_SIZE) // pixels per mi-unit | 19 #define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit |
20 #define MI_BLOCK_SIZE (1 << LOG2_MI_BLOCK_SIZE) // mi-units per max block | 20 #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block |
21 | 21 |
22 #define MI_MASK (MI_BLOCK_SIZE - 1) | 22 #define MI_MASK (MI_BLOCK_SIZE - 1) |
23 | 23 |
24 typedef enum BLOCK_SIZE_TYPE { | 24 |
25 BLOCK_SIZE_AB4X4, BLOCK_4X4 = BLOCK_SIZE_AB4X4, | 25 typedef enum BLOCK_SIZE { |
26 BLOCK_SIZE_SB4X8, BLOCK_4X8 = BLOCK_SIZE_SB4X8, | 26 BLOCK_4X4, |
27 BLOCK_SIZE_SB8X4, BLOCK_8X4 = BLOCK_SIZE_SB8X4, | 27 BLOCK_4X8, |
28 BLOCK_SIZE_SB8X8, BLOCK_8X8 = BLOCK_SIZE_SB8X8, | 28 BLOCK_8X4, |
29 BLOCK_SIZE_SB8X16, BLOCK_8X16 = BLOCK_SIZE_SB8X16, | 29 BLOCK_8X8, |
30 BLOCK_SIZE_SB16X8, BLOCK_16X8 = BLOCK_SIZE_SB16X8, | 30 BLOCK_8X16, |
31 BLOCK_SIZE_MB16X16, BLOCK_16X16 = BLOCK_SIZE_MB16X16, | 31 BLOCK_16X8, |
32 BLOCK_SIZE_SB16X32, BLOCK_16X32 = BLOCK_SIZE_SB16X32, | 32 BLOCK_16X16, |
33 BLOCK_SIZE_SB32X16, BLOCK_32X16 = BLOCK_SIZE_SB32X16, | 33 BLOCK_16X32, |
34 BLOCK_SIZE_SB32X32, BLOCK_32X32 = BLOCK_SIZE_SB32X32, | 34 BLOCK_32X16, |
35 BLOCK_SIZE_SB32X64, BLOCK_32X64 = BLOCK_SIZE_SB32X64, | 35 BLOCK_32X32, |
36 BLOCK_SIZE_SB64X32, BLOCK_64X32 = BLOCK_SIZE_SB64X32, | 36 BLOCK_32X64, |
37 BLOCK_SIZE_SB64X64, BLOCK_64X64 = BLOCK_SIZE_SB64X64, | 37 BLOCK_64X32, |
38 BLOCK_SIZE_TYPES, BLOCK_MAX_SB_SEGMENTS = BLOCK_SIZE_TYPES | 38 BLOCK_64X64, |
39 } BLOCK_SIZE_TYPE; | 39 BLOCK_SIZES, |
| 40 BLOCK_INVALID = BLOCK_SIZES |
| 41 } BLOCK_SIZE; |
40 | 42 |
41 typedef enum PARTITION_TYPE { | 43 typedef enum PARTITION_TYPE { |
42 PARTITION_NONE, | 44 PARTITION_NONE, |
43 PARTITION_HORZ, | 45 PARTITION_HORZ, |
44 PARTITION_VERT, | 46 PARTITION_VERT, |
45 PARTITION_SPLIT, | 47 PARTITION_SPLIT, |
46 PARTITION_TYPES, PARTITION_INVALID = PARTITION_TYPES | 48 PARTITION_TYPES, |
| 49 PARTITION_INVALID = PARTITION_TYPES |
47 } PARTITION_TYPE; | 50 } PARTITION_TYPE; |
48 | 51 |
49 #define PARTITION_PLOFFSET 4 // number of probability models per block size | 52 #define PARTITION_PLOFFSET 4 // number of probability models per block size |
50 #define NUM_PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET) | 53 #define NUM_PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET) |
51 | 54 |
52 typedef enum { | 55 typedef enum { |
53 TX_4X4 = 0, // 4x4 dct transform | 56 TX_4X4 = 0, // 4x4 dct transform |
54 TX_8X8 = 1, // 8x8 dct transform | 57 TX_8X8 = 1, // 8x8 dct transform |
55 TX_16X16 = 2, // 16x16 dct transform | 58 TX_16X16 = 2, // 16x16 dct transform |
56 TX_32X32 = 3, // 32x32 dct transform | 59 TX_32X32 = 3, // 32x32 dct transform |
57 TX_SIZE_MAX_SB, // Number of transforms available to SBs | 60 TX_SIZES |
58 } TX_SIZE; | 61 } TX_SIZE; |
59 | 62 |
60 typedef enum { | 63 typedef enum { |
61 ONLY_4X4 = 0, | 64 ONLY_4X4 = 0, |
62 ALLOW_8X8 = 1, | 65 ALLOW_8X8 = 1, |
63 ALLOW_16X16 = 2, | 66 ALLOW_16X16 = 2, |
64 ALLOW_32X32 = 3, | 67 ALLOW_32X32 = 3, |
65 TX_MODE_SELECT = 4, | 68 TX_MODE_SELECT = 4, |
66 NB_TXFM_MODES = 5, | 69 TX_MODES = 5, |
67 } TX_MODE; | 70 } TX_MODE; |
68 | 71 |
69 typedef enum { | 72 typedef enum { |
70 DCT_DCT = 0, // DCT in both horizontal and vertical | 73 DCT_DCT = 0, // DCT in both horizontal and vertical |
71 ADST_DCT = 1, // ADST in vertical, DCT in horizontal | 74 ADST_DCT = 1, // ADST in vertical, DCT in horizontal |
72 DCT_ADST = 2, // DCT in vertical, ADST in horizontal | 75 DCT_ADST = 2, // DCT in vertical, ADST in horizontal |
73 ADST_ADST = 3 // ADST in both directions | 76 ADST_ADST = 3 // ADST in both directions |
74 } TX_TYPE; | 77 } TX_TYPE; |
75 | 78 |
76 #endif // VP9_COMMON_VP9_ENUMS_H_ | 79 #endif // VP9_COMMON_VP9_ENUMS_H_ |
OLD | NEW |