summaryrefslogtreecommitdiffstats
path: root/thirdparties/common/include/wels/codec_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparties/common/include/wels/codec_def.h')
-rwxr-xr-xthirdparties/common/include/wels/codec_def.h178
1 files changed, 89 insertions, 89 deletions
diff --git a/thirdparties/common/include/wels/codec_def.h b/thirdparties/common/include/wels/codec_def.h
index de3110e..dfc89cd 100755
--- a/thirdparties/common/include/wels/codec_def.h
+++ b/thirdparties/common/include/wels/codec_def.h
@@ -34,66 +34,66 @@
#define WELS_VIDEO_CODEC_DEFINITION_H__
typedef enum {
- /*rgb color formats*/
- videoFormatRGB = 1,
- videoFormatRGBA = 2,
- videoFormatRGB555 = 3,
- videoFormatRGB565 = 4,
- videoFormatBGR = 5,
- videoFormatBGRA = 6,
- videoFormatABGR = 7,
- videoFormatARGB = 8,
-
- /*yuv color formats*/
- videoFormatYUY2 = 20,
- videoFormatYVYU = 21,
- videoFormatUYVY = 22,
- videoFormatI420 = 23, //same as IYUV
- videoFormatYV12 = 24,
- videoFormatInternal = 25, // Only Used for SVC decoder testbed
-
- videoFormatNV12 = 26, // new format for output by DXVA decoding
-
- videoFormatVFlip = 0x80000000
+ /*rgb color formats*/
+ videoFormatRGB = 1,
+ videoFormatRGBA = 2,
+ videoFormatRGB555 = 3,
+ videoFormatRGB565 = 4,
+ videoFormatBGR = 5,
+ videoFormatBGRA = 6,
+ videoFormatABGR = 7,
+ videoFormatARGB = 8,
+
+ /*yuv color formats*/
+ videoFormatYUY2 = 20,
+ videoFormatYVYU = 21,
+ videoFormatUYVY = 22,
+ videoFormatI420 = 23, //same as IYUV
+ videoFormatYV12 = 24,
+ videoFormatInternal = 25, // Only Used for SVC decoder testbed
+
+ videoFormatNV12 = 26, // new format for output by DXVA decoding
+
+ videoFormatVFlip = 0x80000000
} EVideoFormatType;
typedef enum {
- videoFrameTypeInvalid, /* Encoder not ready or parameters are invalidate */
- videoFrameTypeIDR, /* This type is only available for H264 if this frame is key frame, then return this type */
- videoFrameTypeI, /* I frame type */
- videoFrameTypeP, /* P frame type */
- videoFrameTypeSkip, /* Skip the frame based encoder kernel */
- videoFrameTypeIPMixed, /* Frame type introduced I and P slices are mixing */
+ videoFrameTypeInvalid, /* Encoder not ready or parameters are invalidate */
+ videoFrameTypeIDR, /* This type is only available for H264 if this frame is key frame, then return this type */
+ videoFrameTypeI, /* I frame type */
+ videoFrameTypeP, /* P frame type */
+ videoFrameTypeSkip, /* Skip the frame based encoder kernel */
+ videoFrameTypeIPMixed, /* Frame type introduced I and P slices are mixing */
} EVideoFrameType;
typedef enum {
- cmResultSuccess,
- cmInitParaError, /*Parameters are invalid */
- cmUnkonwReason,
- cmMallocMemeError, /*Malloc a memory error*/
- cmInitExpected, /*Initial action is expected*/
- cmUnsupportedData,
+ cmResultSuccess,
+ cmInitParaError, /*Parameters are invalid */
+ cmUnkonwReason,
+ cmMallocMemeError, /*Malloc a memory error*/
+ cmInitExpected, /*Initial action is expected*/
+ cmUnsupportedData,
} CM_RETURN;
/* nal unit type */
enum ENalUnitType {
- NAL_UNKNOWN = 0,
- NAL_SLICE = 1,
- NAL_SLICE_DPA = 2,
- NAL_SLICE_DPB = 3,
- NAL_SLICE_DPC = 4,
- NAL_SLICE_IDR = 5, /* ref_idc != 0 */
- NAL_SEI = 6, /* ref_idc == 0 */
- NAL_SPS = 7,
- NAL_PPS = 8
- /* ref_idc == 0 for 6,9,10,11,12 */
+ NAL_UNKNOWN = 0,
+ NAL_SLICE = 1,
+ NAL_SLICE_DPA = 2,
+ NAL_SLICE_DPB = 3,
+ NAL_SLICE_DPC = 4,
+ NAL_SLICE_IDR = 5, /* ref_idc != 0 */
+ NAL_SEI = 6, /* ref_idc == 0 */
+ NAL_SPS = 7,
+ NAL_PPS = 8
+ /* ref_idc == 0 for 6,9,10,11,12 */
};
/* NRI: eNalRefIdc */
enum ENalPriority {
- NAL_PRIORITY_DISPOSABLE = 0,
- NAL_PRIORITY_LOW = 1,
- NAL_PRIORITY_HIGH = 2,
- NAL_PRIORITY_HIGHEST = 3,
+ NAL_PRIORITY_DISPOSABLE = 0,
+ NAL_PRIORITY_LOW = 1,
+ NAL_PRIORITY_HIGH = 2,
+ NAL_PRIORITY_HIGHEST = 3,
};
#define IS_PARAMETER_SET_NAL(eNalRefIdc, eNalType) \
@@ -108,30 +108,30 @@ enum ENalPriority {
/* Error Tools definition */
typedef unsigned short ERR_TOOL;
enum {
- ET_NONE = 0x00, // NONE Error Tools
- ET_IP_SCALE = 0x01, // IP Scalable
- ET_FMO = 0x02, // Flexible Macroblock Ordering
- ET_IR_R1 = 0x04, // Intra Refresh in predifined 2% MB
- ET_IR_R2 = 0x08, // Intra Refresh in predifined 5% MB
- ET_IR_R3 = 0x10, // Intra Refresh in predifined 10% MB
- ET_FEC_HALF = 0x20, // Forward Error Correction in 50% redundency mode
- ET_FEC_FULL = 0x40, // Forward Error Correction in 100% redundency mode
- ET_RFS = 0x80, // Reference Frame Selection
+ ET_NONE = 0x00, // NONE Error Tools
+ ET_IP_SCALE = 0x01, // IP Scalable
+ ET_FMO = 0x02, // Flexible Macroblock Ordering
+ ET_IR_R1 = 0x04, // Intra Refresh in predifined 2% MB
+ ET_IR_R2 = 0x08, // Intra Refresh in predifined 5% MB
+ ET_IR_R3 = 0x10, // Intra Refresh in predifined 10% MB
+ ET_FEC_HALF = 0x20, // Forward Error Correction in 50% redundency mode
+ ET_FEC_FULL = 0x40, // Forward Error Correction in 100% redundency mode
+ ET_RFS = 0x80, // Reference Frame Selection
};
/* information of coded Slice(=NAL)(s) */
typedef struct SliceInformation {
- unsigned char* pBufferOfSlices; // base buffer of coded slice(s)
- int iCodedSliceCount; // number of coded slices
- unsigned int* pLengthOfSlices; // array of slices length accordingly by number of slice
- int iFecType; // FEC type[0, 50%FEC, 100%FEC]
- unsigned char uiSliceIdx; // index of slice in frame [FMO: 0,..,uiSliceCount-1; No FMO: 0]
- unsigned char uiSliceCount; // count number of slice in frame [FMO: 2-8; No FMO: 1]
- char iFrameIndex; // index of frame[-1, .., idr_interval-1]
- unsigned char uiNalRefIdc; // NRI, priority level of slice(NAL)
- unsigned char uiNalType; // NAL type
- unsigned char
- uiContainingFinalNal; // whether final NAL is involved in buffer of coded slices, flag used in Pause feature in T27
+ unsigned char* pBufferOfSlices; // base buffer of coded slice(s)
+ int iCodedSliceCount; // number of coded slices
+ unsigned int* pLengthOfSlices; // array of slices length accordingly by number of slice
+ int iFecType; // FEC type[0, 50%FEC, 100%FEC]
+ unsigned char uiSliceIdx; // index of slice in frame [FMO: 0,..,uiSliceCount-1; No FMO: 0]
+ unsigned char uiSliceCount; // count number of slice in frame [FMO: 2-8; No FMO: 1]
+ char iFrameIndex; // index of frame[-1, .., idr_interval-1]
+ unsigned char uiNalRefIdc; // NRI, priority level of slice(NAL)
+ unsigned char uiNalType; // NAL type
+ unsigned char
+ uiContainingFinalNal; // whether final NAL is involved in buffer of coded slices, flag used in Pause feature in T27
} SliceInfo, *PSliceInfo;
@@ -147,44 +147,44 @@ typedef struct SliceInformation {
/* thresholds of the initial, maximal and minimal rate */
typedef struct {
- int iWidth; // frame width
- int iHeight; // frame height
- int iThresholdOfInitRate; // threshold of initial rate
- int iThresholdOfMaxRate; // threshold of maximal rate
- int iThresholdOfMinRate; // threshold of minimal rate
- int iMinThresholdFrameRate; //min frame rate min
- int iSkipFrameRate; //skip to frame rate min
- int iSkipFrameStep; //how many frames to skip
+ int iWidth; // frame width
+ int iHeight; // frame height
+ int iThresholdOfInitRate; // threshold of initial rate
+ int iThresholdOfMaxRate; // threshold of maximal rate
+ int iThresholdOfMinRate; // threshold of minimal rate
+ int iMinThresholdFrameRate; //min frame rate min
+ int iSkipFrameRate; //skip to frame rate min
+ int iSkipFrameStep; //how many frames to skip
} SRateThresholds, *PRateThresholds;
typedef struct TagSysMemBuffer {
- int iWidth; //width of decoded pic for display
- int iHeight; //height of decoded pic for display
- int iFormat; // type is "EVideoFormatType"
- int iStride[2]; //stride of 2 component
+ int iWidth; //width of decoded pic for display
+ int iHeight; //height of decoded pic for display
+ int iFormat; // type is "EVideoFormatType"
+ int iStride[2]; //stride of 2 component
} SSysMEMBuffer;
typedef struct TagBufferInfo {
- int iBufferStatus; // 0: one frame data is not ready; 1: one frame data is ready
- union {
- SSysMEMBuffer sSystemBuffer;
- } UsrData;
+ int iBufferStatus; // 0: one frame data is not ready; 1: one frame data is ready
+ union {
+ SSysMEMBuffer sSystemBuffer;
+ } UsrData;
} SBufferInfo;
/* Constants related to transmission rate at various resolutions */
static const SRateThresholds ksRateThrMap[4] = {
- // initial-maximal-minimal
- {CIF_WIDTH, CIF_HEIGHT, 225000, 384000, 96000, 3, 1, 1}, // CIF
- {QVGA_WIDTH, QVGA_HEIGHT, 192000, 320000, 80000, -1, -1, -1}, // QVGA
- {QCIF_WIDTH, QCIF_HEIGHT, 150000, 256000, 64000, 8, 4, 2}, // QCIF
- {SQCIF_WIDTH, SQCIF_HEIGHT, 120000, 192000, 48000, 5, 3, 1} // SQCIF
+ // initial-maximal-minimal
+ {CIF_WIDTH, CIF_HEIGHT, 225000, 384000, 96000, 3, 1, 1}, // CIF
+ {QVGA_WIDTH, QVGA_HEIGHT, 192000, 320000, 80000, -1, -1, -1}, // QVGA
+ {QCIF_WIDTH, QCIF_HEIGHT, 150000, 256000, 64000, 8, 4, 2}, // QCIF
+ {SQCIF_WIDTH, SQCIF_HEIGHT, 120000, 192000, 48000, 5, 3, 1} // SQCIF
};
// In a GOP, multiple of the key frame number, derived from
// the number of layers(index or array below)
static const char kiKeyNumMultiple[] = {
- 1, 1, 2, 4, 8, 16,
+ 1, 1, 2, 4, 8, 16,
};
#endif//WELS_VIDEO_CODEC_DEFINITION_H__
OpenPOWER on IntegriCloud