summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-02-15 03:14:07 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-02-15 03:14:07 +0000
commitd2235146d3c65d9b93d2afd7ce218e22dad9ab88 (patch)
treec5dc9195f7479351ef97a702ba8403c37df5d406
parentff37bd7398b7f93f309a33d741a47d73f9a0d318 (diff)
parent7338ce29053842d95e83136b53efe43806e5f228 (diff)
downloadmedia-d2235146d3c65d9b93d2afd7ce218e22dad9ab88.tar.gz
Snap for 6210127 from 7338ce29053842d95e83136b53efe43806e5f228 to rvc-d1-release
Change-Id: I080a1ad92c8377e79462c784951087eae36254f1
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp14
1 files changed, 10 insertions, 4 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 af9125f1..8eb30c3f 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -11375,8 +11375,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 receives 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);
}
@@ -11385,9 +11390,10 @@ 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 buffer_size, OMX_U32 actual_count)
+{
+ OMX_U32 expectedSize = is_color_conversion_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);