Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
michael@0 | 3 | * |
michael@0 | 4 | * Use of this source code is governed by a BSD-style license |
michael@0 | 5 | * that can be found in the LICENSE file in the root of the source |
michael@0 | 6 | * tree. An additional intellectual property rights grant can be found |
michael@0 | 7 | * in the file PATENTS. All contributing project authors may |
michael@0 | 8 | * be found in the AUTHORS file in the root of the source tree. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | #ifndef VP9_COMMON_VP9_ENUMS_H_ |
michael@0 | 12 | #define VP9_COMMON_VP9_ENUMS_H_ |
michael@0 | 13 | |
michael@0 | 14 | #include "./vpx_config.h" |
michael@0 | 15 | |
michael@0 | 16 | #define MI_SIZE_LOG2 3 |
michael@0 | 17 | #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6 |
michael@0 | 18 | |
michael@0 | 19 | #define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit |
michael@0 | 20 | #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block |
michael@0 | 21 | |
michael@0 | 22 | #define MI_MASK (MI_BLOCK_SIZE - 1) |
michael@0 | 23 | |
michael@0 | 24 | |
michael@0 | 25 | typedef enum BLOCK_SIZE { |
michael@0 | 26 | BLOCK_4X4, |
michael@0 | 27 | BLOCK_4X8, |
michael@0 | 28 | BLOCK_8X4, |
michael@0 | 29 | BLOCK_8X8, |
michael@0 | 30 | BLOCK_8X16, |
michael@0 | 31 | BLOCK_16X8, |
michael@0 | 32 | BLOCK_16X16, |
michael@0 | 33 | BLOCK_16X32, |
michael@0 | 34 | BLOCK_32X16, |
michael@0 | 35 | BLOCK_32X32, |
michael@0 | 36 | BLOCK_32X64, |
michael@0 | 37 | BLOCK_64X32, |
michael@0 | 38 | BLOCK_64X64, |
michael@0 | 39 | BLOCK_SIZES, |
michael@0 | 40 | BLOCK_INVALID = BLOCK_SIZES |
michael@0 | 41 | } BLOCK_SIZE; |
michael@0 | 42 | |
michael@0 | 43 | typedef enum PARTITION_TYPE { |
michael@0 | 44 | PARTITION_NONE, |
michael@0 | 45 | PARTITION_HORZ, |
michael@0 | 46 | PARTITION_VERT, |
michael@0 | 47 | PARTITION_SPLIT, |
michael@0 | 48 | PARTITION_TYPES, |
michael@0 | 49 | PARTITION_INVALID = PARTITION_TYPES |
michael@0 | 50 | } PARTITION_TYPE; |
michael@0 | 51 | |
michael@0 | 52 | #define PARTITION_PLOFFSET 4 // number of probability models per block size |
michael@0 | 53 | #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET) |
michael@0 | 54 | |
michael@0 | 55 | typedef enum { |
michael@0 | 56 | TX_4X4 = 0, // 4x4 dct transform |
michael@0 | 57 | TX_8X8 = 1, // 8x8 dct transform |
michael@0 | 58 | TX_16X16 = 2, // 16x16 dct transform |
michael@0 | 59 | TX_32X32 = 3, // 32x32 dct transform |
michael@0 | 60 | TX_SIZES |
michael@0 | 61 | } TX_SIZE; |
michael@0 | 62 | |
michael@0 | 63 | typedef enum { |
michael@0 | 64 | ONLY_4X4 = 0, |
michael@0 | 65 | ALLOW_8X8 = 1, |
michael@0 | 66 | ALLOW_16X16 = 2, |
michael@0 | 67 | ALLOW_32X32 = 3, |
michael@0 | 68 | TX_MODE_SELECT = 4, |
michael@0 | 69 | TX_MODES = 5, |
michael@0 | 70 | } TX_MODE; |
michael@0 | 71 | |
michael@0 | 72 | typedef enum { |
michael@0 | 73 | DCT_DCT = 0, // DCT in both horizontal and vertical |
michael@0 | 74 | ADST_DCT = 1, // ADST in vertical, DCT in horizontal |
michael@0 | 75 | DCT_ADST = 2, // DCT in vertical, ADST in horizontal |
michael@0 | 76 | ADST_ADST = 3 // ADST in both directions |
michael@0 | 77 | } TX_TYPE; |
michael@0 | 78 | |
michael@0 | 79 | typedef enum { |
michael@0 | 80 | UNKNOWN = 0, |
michael@0 | 81 | BT_601 = 1, // YUV |
michael@0 | 82 | BT_709 = 2, // YUV |
michael@0 | 83 | SMPTE_170 = 3, // YUV |
michael@0 | 84 | SMPTE_240 = 4, // YUV |
michael@0 | 85 | RESERVED_1 = 5, |
michael@0 | 86 | RESERVED_2 = 6, |
michael@0 | 87 | SRGB = 7 // RGB |
michael@0 | 88 | } COLOR_SPACE; |
michael@0 | 89 | |
michael@0 | 90 | #endif // VP9_COMMON_VP9_ENUMS_H_ |