summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-11-20 13:37:51 -0800
committerLinux Build Service Account <lnxbuild@localhost>2019-11-20 13:37:51 -0800
commitc49295f4dc53c2fca0c04922e733697154220da2 (patch)
tree670bd1326c01f467f437fd9637524539d91db80b
parentfb0ba8d0306b25c973c57a1d236c57737ab63232 (diff)
parent759c91aeda4f20a11ede00314876d95b733e8005 (diff)
downloadandroid_hardware_qcom_media-c49295f4dc53c2fca0c04922e733697154220da2.tar.gz
android_hardware_qcom_media-c49295f4dc53c2fca0c04922e733697154220da2.tar.bz2
android_hardware_qcom_media-c49295f4dc53c2fca0c04922e733697154220da2.zip
Merge 759c91aeda4f20a11ede00314876d95b733e8005 on remote branch
Change-Id: I0e1f6bff5f89910117eba260c124361a3d7ed519
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp14
-rwxr-xr-xmm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp6
2 files changed, 16 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 cf2d0e56..dbff8f44 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -12617,8 +12617,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);
}
@@ -12627,9 +12632,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 = 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);
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index a54dd78f..139047d4 100755
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -2109,6 +2109,12 @@ bool venc_dev::venc_get_buf_req(OMX_U32 *min_buff_count,
DEBUG_PRINT_LOW("Set buffer count = %d as metadata mode and batchmode enabled", minCount);
}
+ // reset min count to 4 for HEIC cases
+ if (mIsGridset) {
+ minCount = 4;
+ DEBUG_PRINT_LOW("Set buffer count = %d for HEIC", minCount);
+ }
+
minCount = MAX((unsigned int)control.value, minCount);
m_sInput_buff_property.mincount = minCount;