Merge "Add VP8 encoder extra parameters structure to support configuring encoder key frame interval, number of temporal layers, type of temporal layer pattern and minimum and maximum quantization parameters."

This commit is contained in:
Alex Glaznev 2014-04-24 21:53:29 +00:00 committed by Android (Google) Code Review
commit c215abe8e8
2 changed files with 38 additions and 0 deletions

View File

@ -71,6 +71,7 @@ typedef enum OMX_INDEXEXTTYPE {
OMX_IndexParamVideoVp8, /**< reference: OMX_VIDEO_PARAM_VP8TYPE */
OMX_IndexConfigVideoVp8ReferenceFrame, /**< reference: OMX_VIDEO_VP8REFERENCEFRAMETYPE */
OMX_IndexConfigVideoVp8ReferenceFrameType, /**< reference: OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE */
OMX_IndexParamVideoAndroidVp8Encoder, /**< reference: OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE */
/* Image & Video common configurations */
OMX_IndexExtCommonStartUnused = OMX_IndexKhronosExtensions + 0x00700000,

View File

@ -108,6 +108,43 @@ typedef struct OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE {
OMX_BOOL bIsGoldenOrAlternateFrame;
} OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE;
/** Maximum number of VP8 temporal layers */
#define OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS 3
/** VP8 temporal layer patterns */
typedef enum OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE {
OMX_VIDEO_VPXTemporalLayerPatternNone = 0,
OMX_VIDEO_VPXTemporalLayerPatternWebRTC = 1,
OMX_VIDEO_VPXTemporalLayerPatternMax = 0x7FFFFFFF
} OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE;
/**
* Android specific VP8 encoder params
*
* STRUCT MEMBERS:
* nSize : Size of the structure in bytes
* nVersion : OMX specification version information
* nPortIndex : Port that this structure applies to
* nKeyFrameInterval : Key frame interval in frames
* eTemporalPattern : Type of temporal layer pattern
* nTemporalLayerCount : Number of temporal coding layers
* nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
* streams in percentage
* nMinQuantizer : Minimum (best quality) quantizer
* nMaxQuantizer : Maximum (worst quality) quantizer
*/
typedef struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_U32 nKeyFrameInterval;
OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern;
OMX_U32 nTemporalLayerCount;
OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS];
OMX_U32 nMinQuantizer;
OMX_U32 nMaxQuantizer;
};
#ifdef __cplusplus
}