diff options
author | Alex Glaznev <glaznev@google.com> | 2014-04-07 11:09:56 -0700 |
---|---|---|
committer | Alex Glaznev <glaznev@google.com> | 2014-04-23 17:15:18 -0700 |
commit | 5b155b84a24e0c7018e68a70c25de6c806c7ed4d (patch) | |
tree | 36c90495b7940d535dcbd7092c361f07b39caa84 /include/media | |
parent | 9cddbd258d24029a6498898e96cb53aa62349767 (diff) | |
download | frameworks_native-5b155b84a24e0c7018e68a70c25de6c806c7ed4d.zip frameworks_native-5b155b84a24e0c7018e68a70c25de6c806c7ed4d.tar.gz frameworks_native-5b155b84a24e0c7018e68a70c25de6c806c7ed4d.tar.bz2 |
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.
Bug: 11969958
Change-Id: I561e03148a7c5d928b5bf350ad3631ae69871065
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/openmax/OMX_IndexExt.h | 1 | ||||
-rw-r--r-- | include/media/openmax/OMX_VideoExt.h | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/include/media/openmax/OMX_IndexExt.h b/include/media/openmax/OMX_IndexExt.h index ffcd4f3..c503dcf 100644 --- a/include/media/openmax/OMX_IndexExt.h +++ b/include/media/openmax/OMX_IndexExt.h @@ -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, diff --git a/include/media/openmax/OMX_VideoExt.h b/include/media/openmax/OMX_VideoExt.h index fa24168..3f18b43 100644 --- a/include/media/openmax/OMX_VideoExt.h +++ b/include/media/openmax/OMX_VideoExt.h @@ -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 } |