2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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.
11 #ifndef VP9_COMMON_VP9_ENUMS_H_
12 #define VP9_COMMON_VP9_ENUMS_H_
14 #include "./vpx_config.h"
20 #define MI_SIZE_LOG2 3
21 #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6
23 #define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit
24 #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block
26 #define MI_MASK (MI_BLOCK_SIZE - 1)
28 // Bitstream profiles indicated by 2-3 bits in the uncompressed header.
29 // 00: Profile 0. 8-bit 4:2:0 only.
30 // 10: Profile 1. Adds 4:4:4, 4:2:2, and 4:4:0 to Profile 0.
31 // 01: Profile 2. Supports 10-bit and 12-bit color only, with 4:2:0 sampling.
32 // 110: Profile 3. Supports 10-bit and 12-bit color only, with 4:2:2/4:4:4/4:4:0
34 // 111: Undefined profile.
35 typedef enum BITSTREAM_PROFILE {
43 typedef enum BIT_DEPTH {
49 typedef enum BLOCK_SIZE {
64 BLOCK_INVALID = BLOCK_SIZES
67 typedef enum PARTITION_TYPE {
73 PARTITION_INVALID = PARTITION_TYPES
76 #define PARTITION_PLOFFSET 4 // number of probability models per block size
77 #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
79 // block transform size
81 TX_4X4 = 0, // 4x4 transform
82 TX_8X8 = 1, // 8x8 transform
83 TX_16X16 = 2, // 16x16 transform
84 TX_32X32 = 3, // 32x32 transform
88 // frame transform mode
90 ONLY_4X4 = 0, // only 4x4 transform used
91 ALLOW_8X8 = 1, // allow block transform size up to 8x8
92 ALLOW_16X16 = 2, // allow block transform size up to 16x16
93 ALLOW_32X32 = 3, // allow block transform size up to 32x32
94 TX_MODE_SELECT = 4, // transform specified for each block
99 DCT_DCT = 0, // DCT in both horizontal and vertical
100 ADST_DCT = 1, // ADST in vertical, DCT in horizontal
101 DCT_ADST = 2, // DCT in vertical, ADST in horizontal
102 ADST_ADST = 3, // ADST in both directions
110 SMPTE_170 = 3, // YUV
111 SMPTE_240 = 4, // YUV
118 VP9_LAST_FLAG = 1 << 0,
119 VP9_GOLD_FLAG = 1 << 1,
120 VP9_ALT_FLAG = 1 << 2,
127 #endif // VP9_COMMON_VP9_ENUMS_H_