omx: add constant quality bitrate control mode
bug: 63633199
Change-Id: Idbfe733ca723fb918ec97d1d834f8950b8e7ffa3
diff --git a/headers/media_plugin/media/openmax/OMX_Video.h b/headers/media_plugin/media/openmax/OMX_Video.h
index 76efac9..dc5cdab 100644
--- a/headers/media_plugin/media/openmax/OMX_Video.h
+++ b/headers/media_plugin/media/openmax/OMX_Video.h
@@ -240,6 +240,7 @@
OMX_Video_ControlRateConstant,
OMX_Video_ControlRateVariableSkipFrames,
OMX_Video_ControlRateConstantSkipFrames,
+ OMX_Video_ControlRateConstantQuality,
OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
OMX_Video_ControlRateMax = 0x7FFFFFFF
@@ -254,14 +255,20 @@
* nVersion : OMX spec version info
* nPortIndex : Port that this struct applies to
* eControlRate : Control rate type enum
- * nTargetBitrate : Target bitrate to encode with
+ * nTargetBitrate : Target bitrate to encode with (used when eControlRate is
+ * not OMX_Video_ControlRateConstantQuality)
+ * nQualityFactor : Quality to encode with (used when eControlRate is
+ * OMX_Video_ControlRateConstantQuality only)
*/
typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_VIDEO_CONTROLRATETYPE eControlRate;
- OMX_U32 nTargetBitrate;
+ union {
+ OMX_U32 nTargetBitrate;
+ OMX_U32 nQualityFactor;
+ };
} OMX_VIDEO_PARAM_BITRATETYPE;