michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #ifndef VP9_COMMON_VP9_ENUMS_H_ michael@0: #define VP9_COMMON_VP9_ENUMS_H_ michael@0: michael@0: #include "./vpx_config.h" michael@0: michael@0: #define MI_SIZE_LOG2 3 michael@0: #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6 michael@0: michael@0: #define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit michael@0: #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block michael@0: michael@0: #define MI_MASK (MI_BLOCK_SIZE - 1) michael@0: michael@0: michael@0: typedef enum BLOCK_SIZE { michael@0: BLOCK_4X4, michael@0: BLOCK_4X8, michael@0: BLOCK_8X4, michael@0: BLOCK_8X8, michael@0: BLOCK_8X16, michael@0: BLOCK_16X8, michael@0: BLOCK_16X16, michael@0: BLOCK_16X32, michael@0: BLOCK_32X16, michael@0: BLOCK_32X32, michael@0: BLOCK_32X64, michael@0: BLOCK_64X32, michael@0: BLOCK_64X64, michael@0: BLOCK_SIZES, michael@0: BLOCK_INVALID = BLOCK_SIZES michael@0: } BLOCK_SIZE; michael@0: michael@0: typedef enum PARTITION_TYPE { michael@0: PARTITION_NONE, michael@0: PARTITION_HORZ, michael@0: PARTITION_VERT, michael@0: PARTITION_SPLIT, michael@0: PARTITION_TYPES, michael@0: PARTITION_INVALID = PARTITION_TYPES michael@0: } PARTITION_TYPE; michael@0: michael@0: #define PARTITION_PLOFFSET 4 // number of probability models per block size michael@0: #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET) michael@0: michael@0: typedef enum { michael@0: TX_4X4 = 0, // 4x4 dct transform michael@0: TX_8X8 = 1, // 8x8 dct transform michael@0: TX_16X16 = 2, // 16x16 dct transform michael@0: TX_32X32 = 3, // 32x32 dct transform michael@0: TX_SIZES michael@0: } TX_SIZE; michael@0: michael@0: typedef enum { michael@0: ONLY_4X4 = 0, michael@0: ALLOW_8X8 = 1, michael@0: ALLOW_16X16 = 2, michael@0: ALLOW_32X32 = 3, michael@0: TX_MODE_SELECT = 4, michael@0: TX_MODES = 5, michael@0: } TX_MODE; michael@0: michael@0: typedef enum { michael@0: DCT_DCT = 0, // DCT in both horizontal and vertical michael@0: ADST_DCT = 1, // ADST in vertical, DCT in horizontal michael@0: DCT_ADST = 2, // DCT in vertical, ADST in horizontal michael@0: ADST_ADST = 3 // ADST in both directions michael@0: } TX_TYPE; michael@0: michael@0: typedef enum { michael@0: UNKNOWN = 0, michael@0: BT_601 = 1, // YUV michael@0: BT_709 = 2, // YUV michael@0: SMPTE_170 = 3, // YUV michael@0: SMPTE_240 = 4, // YUV michael@0: RESERVED_1 = 5, michael@0: RESERVED_2 = 6, michael@0: SRGB = 7 // RGB michael@0: } COLOR_SPACE; michael@0: michael@0: #endif // VP9_COMMON_VP9_ENUMS_H_