summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2019-11-06 14:08:16 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-06 14:08:16 -0800
commit2cdb256fd8776554b740a5e6a9a111bdfb6b5cec (patch)
tree969b700ffbc273213c170c4570e298995e43adb7
parent4abe554996896af1e0aa4591ef1302e5e2e5770a (diff)
parent52c99663e7b98bd9b210f3a4ff8a78e9e763c02d (diff)
Merge "vdec: Set correct output buffer size: dynamic meta mode"
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index ab2bbc42..a1a95b34 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -8662,8 +8662,13 @@ OMX_BUFFERHEADERTYPE* omx_vdec::allocate_color_convert_buf::get_il_buf_hdr
{
bool status = true;
pthread_mutex_lock(&omx->c_lock);
+ /* Whenever port mode is set to kPortModeDynamicANWBuffer, Video Frameworks
+ always uses VideoNativeMetadata and OMX recives buffer type as
+ grallocsource via storeMetaDataInBuffers_l API. The buffer_size
+ will be communicated to frameworks via IndexParamPortdefinition. */
if (!enabled)
- buffer_size = omx->drv_ctx.op_buf.buffer_size;
+ buffer_size = omx->dynamic_buf_mode ? sizeof(struct VideoNativeMetadata) :
+ omx->drv_ctx.op_buf.buffer_size;
else {
buffer_size = c2dcc.getBuffSize(C2D_OUTPUT);
}
@@ -8674,8 +8679,8 @@ OMX_BUFFERHEADERTYPE* omx_vdec::allocate_color_convert_buf::get_il_buf_hdr
OMX_ERRORTYPE omx_vdec::allocate_color_convert_buf::set_buffer_req(
OMX_U32 buffer_size, OMX_U32 actual_count)
{
- OMX_U32 expectedSize = enabled ? buffer_size_req : omx->drv_ctx.op_buf.buffer_size;
-
+ OMX_U32 expectedSize = enabled ? buffer_size_req : omx->dynamic_buf_mode ?
+ sizeof(struct VideoDecoderOutputMetaData) : omx->drv_ctx.op_buf.buffer_size;
if (buffer_size < expectedSize) {
DEBUG_PRINT_ERROR("OP Requirements: Client size(%u) insufficient v/s requested(%u)",
buffer_size, expectedSize);