summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorAlex Glaznev <glaznev@google.com>2014-04-24 21:53:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-24 21:53:30 +0000
commitc215abe8e8d27eeae8e8dfff611ca0b4c16477f1 (patch)
tree1194642dbe8c22a4540e9bc9baa7f7abe6bd7b42 /include/media
parent943de2f71beff9566cc58ce5820495fd9776e1e3 (diff)
parent5b155b84a24e0c7018e68a70c25de6c806c7ed4d (diff)
downloadframeworks_native-c215abe8e8d27eeae8e8dfff611ca0b4c16477f1.zip
frameworks_native-c215abe8e8d27eeae8e8dfff611ca0b4c16477f1.tar.gz
frameworks_native-c215abe8e8d27eeae8e8dfff611ca0b4c16477f1.tar.bz2
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."
Diffstat (limited to 'include/media')
-rw-r--r--include/media/openmax/OMX_IndexExt.h1
-rw-r--r--include/media/openmax/OMX_VideoExt.h37
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
}