summaryrefslogtreecommitdiff
path: root/msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2016-03-30 00:19:58 -0700
committerLajos Molnar <lajos@google.com>2016-08-25 11:01:00 -0700
commit03783f82008b7447073e0da4550da02bdc2286cf (patch)
tree5dd97f92baa30476a11c9dff90e25c861d92d1b4 /msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
parentbfdb1adb7ea840c4c0a9e0c9ad8ebc0ecd43919a (diff)
downloadmedia-03783f82008b7447073e0da4550da02bdc2286cf.tar.gz
mm-video-v4l2: venc: add support for encoding with temporal layers
Implement OMX_IndexParamAndroidVideoTemporalLayers to expose configuration of temporal-layered encoding to client. Layer-wise bitrate support and changing layer-count dynamically is not supported. Bug: 27596987 Change-Id: Ib32e7aea22e2cbaf78a903561b67de7d14ed57e5
Diffstat (limited to 'msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp')
-rw-r--r--msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index 6e7e05a..9c71157 100644
--- a/msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/msm8974/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -1910,6 +1910,19 @@ OMX_ERRORTYPE omx_video::get_parameter(OMX_IN OMX_HANDLETYPE hComp,
memcpy(initqp, &m_sParamInitqp, sizeof(m_sParamInitqp));
break;
}
+ case OMX_IndexParamAndroidVideoTemporalLayering:
+ {
+ VALIDATE_OMX_PARAM_DATA(paramData, OMX_VIDEO_PARAM_ANDROID_TEMPORALLAYERINGTYPE);
+ OMX_VIDEO_PARAM_ANDROID_TEMPORALLAYERINGTYPE *pLayerInfo =
+ reinterpret_cast<OMX_VIDEO_PARAM_ANDROID_TEMPORALLAYERINGTYPE*>(paramData);
+ if (!dev_get_temporal_layer_caps(&m_sParamTemporalLayers.nLayerCountMax,
+ &m_sParamTemporalLayers.nBLayerCountMax)) {
+ DEBUG_PRINT_ERROR("Failed to get temporal layer capabilities");
+ eRet = OMX_ErrorHardware;
+ }
+ memcpy(pLayerInfo, &m_sParamTemporalLayers, sizeof(m_sParamTemporalLayers));
+ break;
+ }
case OMX_IndexParamVideoSliceFMO:
default:
{
@@ -2042,6 +2055,14 @@ OMX_ERRORTYPE omx_video::get_config(OMX_IN OMX_HANDLETYPE hComp,
memcpy(pParam, &m_sConfigIntraRefresh, sizeof(m_sConfigIntraRefresh));
break;
}
+ case OMX_IndexParamAndroidVideoTemporalLayering:
+ {
+ VALIDATE_OMX_PARAM_DATA(configData, OMX_VIDEO_CONFIG_ANDROID_TEMPORALLAYERINGTYPE);
+ OMX_VIDEO_CONFIG_ANDROID_TEMPORALLAYERINGTYPE *layerConfig =
+ (OMX_VIDEO_CONFIG_ANDROID_TEMPORALLAYERINGTYPE *)configData;
+ memcpy(configData, &m_sConfigTemporalLayers, sizeof(m_sConfigTemporalLayers));
+ break;
+ }
default:
DEBUG_PRINT_ERROR("ERROR: unsupported index %d", (int) configIndex);
return OMX_ErrorUnsupportedIndex;