diff options
author | John Wei <a0272715@ti.com> | 2011-08-18 22:45:05 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-29 12:02:38 -0700 |
commit | 831d195f81fcd391e54bddd46b56e251f84f4638 (patch) | |
tree | 7c7b5860400a6e1357dcc1ed01680b8ea11ebe16 /domx | |
parent | c925a3ba719d6d8c92685bc4efcedd12f31d5288 (diff) | |
download | hardware_ti_omap4xxx-831d195f81fcd391e54bddd46b56e251f84f4638.zip hardware_ti_omap4xxx-831d195f81fcd391e54bddd46b56e251f84f4638.tar.gz hardware_ti_omap4xxx-831d195f81fcd391e54bddd46b56e251f84f4638.tar.bz2 |
domx: request and allocate smaller-sized buffer in metadata mode recording
request and allocate smaller-sized buffer in metadata mode recording.
the buffer is used to hold video_metadata_t structure (12 bytes). It is
a big saving from allocating an NV12 buffer size. Corresponding Ducati
side change on UseBuffer() is required.
Change-Id: I7e4730c0982e826def844e3cf5050d83063fa2a7
Signed-off-by: John Wei <a0272715@ti.com>
Diffstat (limited to 'domx')
-rw-r--r-- | domx/domx/omx_proxy_common/src/omx_proxy_common.c | 3 | ||||
-rw-r--r-- | domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/domx/domx/omx_proxy_common/src/omx_proxy_common.c b/domx/domx/omx_proxy_common/src/omx_proxy_common.c index a5aac98..e2e36f2 100644 --- a/domx/domx/omx_proxy_common/src/omx_proxy_common.c +++ b/domx/domx/omx_proxy_common/src/omx_proxy_common.c @@ -677,7 +677,8 @@ static OMX_ERRORTYPE PROXY_AllocateBuffer(OMX_IN OMX_HANDLETYPE hComponent, PROXY_assert(eError == OMX_ErrorNone, eError, "Failed to get stride of component"); - if (nStride == LINUX_PAGE_SIZE) //Allocate 2D buffer + if (nStride == LINUX_PAGE_SIZE && \ + pCompPrv->proxyPortBuffers[nPortIndex].proxyBufferType != EncoderMetadataPointers) //Allocate 2D buffer { tParamRect.nSize = sizeof(OMX_CONFIG_RECTTYPE); tParamRect.nVersion.s.nVersionMajor = 1; diff --git a/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c b/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c index 6238f6b..de2417d 100644 --- a/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c +++ b/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c @@ -207,6 +207,14 @@ OMX_ERRORTYPE LOCAL_PROXY_H264E_GetParameter(OMX_IN OMX_HANDLETYPE hComponent, { pPortDef->format.video.eColorFormat = OMX_TI_COLOR_FormatYUV420PackedSemiPlanar; } + + if(pPortDef->nPortIndex == OMX_H264E_INPUT_PORT) + { + if(pCompPrv->proxyPortBuffers[OMX_H264E_INPUT_PORT].proxyBufferType == EncoderMetadataPointers) + { + pPortDef->nBufferSize = sizeof(video_metadata_t); + } + } } else if ( nParamIndex == OMX_IndexParamVideoPortFormat) { |