2013-04-10 08:28:27 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VP9_COMMON_VP9_ENUMS_H_
|
|
|
|
#define VP9_COMMON_VP9_ENUMS_H_
|
|
|
|
|
|
|
|
#include "./vpx_config.h"
|
|
|
|
|
2014-01-19 00:16:11 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-08-23 01:45:24 +04:00
|
|
|
#define MI_SIZE_LOG2 3
|
|
|
|
#define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2) // 64 = 2^6
|
2013-04-26 22:57:17 +04:00
|
|
|
|
2013-08-23 01:45:24 +04:00
|
|
|
#define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit
|
|
|
|
#define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block
|
2013-07-09 01:54:04 +04:00
|
|
|
|
|
|
|
#define MI_MASK (MI_BLOCK_SIZE - 1)
|
2013-05-08 02:36:30 +04:00
|
|
|
|
2013-08-11 02:04:02 +04:00
|
|
|
|
2013-08-26 22:33:16 +04:00
|
|
|
typedef enum BLOCK_SIZE {
|
2013-08-06 02:23:49 +04:00
|
|
|
BLOCK_4X4,
|
|
|
|
BLOCK_4X8,
|
|
|
|
BLOCK_8X4,
|
|
|
|
BLOCK_8X8,
|
|
|
|
BLOCK_8X16,
|
|
|
|
BLOCK_16X8,
|
|
|
|
BLOCK_16X16,
|
|
|
|
BLOCK_16X32,
|
|
|
|
BLOCK_32X16,
|
|
|
|
BLOCK_32X32,
|
|
|
|
BLOCK_32X64,
|
|
|
|
BLOCK_64X32,
|
|
|
|
BLOCK_64X64,
|
2013-08-10 04:47:32 +04:00
|
|
|
BLOCK_SIZES,
|
|
|
|
BLOCK_INVALID = BLOCK_SIZES
|
2013-08-26 22:33:16 +04:00
|
|
|
} BLOCK_SIZE;
|
|
|
|
|
2013-04-16 11:18:02 +04:00
|
|
|
typedef enum PARTITION_TYPE {
|
|
|
|
PARTITION_NONE,
|
|
|
|
PARTITION_HORZ,
|
|
|
|
PARTITION_VERT,
|
|
|
|
PARTITION_SPLIT,
|
2013-08-08 02:33:17 +04:00
|
|
|
PARTITION_TYPES,
|
|
|
|
PARTITION_INVALID = PARTITION_TYPES
|
2013-04-16 11:18:02 +04:00
|
|
|
} PARTITION_TYPE;
|
|
|
|
|
2013-04-23 21:12:18 +04:00
|
|
|
#define PARTITION_PLOFFSET 4 // number of probability models per block size
|
2013-10-19 04:44:19 +04:00
|
|
|
#define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
|
2013-04-16 11:18:02 +04:00
|
|
|
|
2013-11-25 21:58:25 +04:00
|
|
|
// block transform size
|
2013-07-11 03:51:07 +04:00
|
|
|
typedef enum {
|
2013-11-25 21:58:25 +04:00
|
|
|
TX_4X4 = 0, // 4x4 transform
|
|
|
|
TX_8X8 = 1, // 8x8 transform
|
|
|
|
TX_16X16 = 2, // 16x16 transform
|
|
|
|
TX_32X32 = 3, // 32x32 transform
|
2013-07-27 04:15:37 +04:00
|
|
|
TX_SIZES
|
2013-07-11 03:51:07 +04:00
|
|
|
} TX_SIZE;
|
|
|
|
|
2013-11-25 21:58:25 +04:00
|
|
|
// frame transform mode
|
2013-07-19 22:37:13 +04:00
|
|
|
typedef enum {
|
2013-11-25 21:58:25 +04:00
|
|
|
ONLY_4X4 = 0, // only 4x4 transform used
|
|
|
|
ALLOW_8X8 = 1, // allow block transform size up to 8x8
|
|
|
|
ALLOW_16X16 = 2, // allow block transform size up to 16x16
|
|
|
|
ALLOW_32X32 = 3, // allow block transform size up to 32x32
|
|
|
|
TX_MODE_SELECT = 4, // transform specified for each block
|
2013-07-30 00:38:40 +04:00
|
|
|
TX_MODES = 5,
|
2013-07-19 22:37:13 +04:00
|
|
|
} TX_MODE;
|
|
|
|
|
2013-07-11 03:51:07 +04:00
|
|
|
typedef enum {
|
|
|
|
DCT_DCT = 0, // DCT in both horizontal and vertical
|
|
|
|
ADST_DCT = 1, // ADST in vertical, DCT in horizontal
|
|
|
|
DCT_ADST = 2, // DCT in vertical, ADST in horizontal
|
2013-11-23 04:20:45 +04:00
|
|
|
ADST_ADST = 3, // ADST in both directions
|
|
|
|
TX_TYPES = 4
|
2013-07-11 03:51:07 +04:00
|
|
|
} TX_TYPE;
|
|
|
|
|
2013-10-25 23:35:20 +04:00
|
|
|
typedef enum {
|
|
|
|
UNKNOWN = 0,
|
|
|
|
BT_601 = 1, // YUV
|
|
|
|
BT_709 = 2, // YUV
|
|
|
|
SMPTE_170 = 3, // YUV
|
|
|
|
SMPTE_240 = 4, // YUV
|
|
|
|
RESERVED_1 = 5,
|
|
|
|
RESERVED_2 = 6,
|
|
|
|
SRGB = 7 // RGB
|
|
|
|
} COLOR_SPACE;
|
|
|
|
|
2014-01-19 00:16:11 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2013-04-10 08:28:27 +04:00
|
|
|
#endif // VP9_COMMON_VP9_ENUMS_H_
|