summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-02-21 12:49:39 -0800
committerLinux Build Service Account <lnxbuild@localhost>2021-02-21 12:49:39 -0800
commit6c8c0735d663ea910d1d36914300a42a5892eecc (patch)
treec5b8fb6bf6fb86256333aa51fc22f1b534cf77c2
parentc97dd3ff73e80ce1f5dc2b35df944457aeef11c6 (diff)
parent79c187cc3e80ab775682af47b0de0887b48abbb3 (diff)
Merge 79c187cc3e80ab775682af47b0de0887b48abbb3 on remote branch
Change-Id: I135fb301efffe2de500a5a32093b5d120d08a062
-rw-r--r--libplatformconfig/Android.mk2
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp9
-rw-r--r--mm-video-v4l2/vidc/venc/src/omx_video_base.cpp40
3 files changed, 44 insertions, 7 deletions
diff --git a/libplatformconfig/Android.mk b/libplatformconfig/Android.mk
index bde1add3..13b4ef8b 100644
--- a/libplatformconfig/Android.mk
+++ b/libplatformconfig/Android.mk
@@ -2,7 +2,6 @@ LOCAL_PATH := $(call my-dir)
LOCAL_DIR_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_COPY_HEADERS_TO := libplatformconfig
libplatformconfig-def := \
-g0 -O3 -fpic \
@@ -15,7 +14,6 @@ libplatformconfig-def := \
COMMON_CFLAGS := -O3
-include $(BUILD_COPY_HEADERS)
LOCAL_CFLAGS := $(COMMON_CFLAGS) $(libplatformconfig-def)
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 3b1c9d61..29afb595 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010 - 2020, The Linux Foundation. All rights reserved.
+Copyright (c) 2010 - 2021, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -6148,9 +6148,10 @@ OMX_ERRORTYPE omx_vdec::fill_buffer_done(OMX_HANDLETYPE hComp,
output_capability == V4L2_PIX_FMT_MPEG2)
is_duplicate_ts_valid = false;
- time_stamp_dts.get_next_timestamp(buffer,
- is_interlaced && is_duplicate_ts_valid && !is_mbaff);
-
+ if (buffer->nFilledLen > 0) {
+ time_stamp_dts.get_next_timestamp(buffer,
+ is_interlaced && is_duplicate_ts_valid && !is_mbaff);
+ }
}
VIDC_TRACE_INT_LOW("FBD-TS", buffer->nTimeStamp / 1000);
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index eb5016df..3532f505 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2020, Linux Foundation. All rights reserved.
+Copyright (c) 2010-2021, Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -5270,6 +5270,44 @@ OMX_ERRORTYPE omx_video::empty_this_buffer_opaque(OMX_IN OMX_HANDLETYPE hComp,
return OMX_ErrorNone;
}
+ if (dev_is_meta_mode()) {
+ LEGACY_CAM_METADATA_TYPE * meta_buf = NULL;
+
+ meta_buf = (LEGACY_CAM_METADATA_TYPE *)buffer->pBuffer;
+
+ if (meta_buf && m_no_vpss && is_rotation_enabled() &&
+ meta_buf->buffer_type == kMetadataBufferTypeGrallocSource) {
+ VideoGrallocMetadata *meta_buf = (VideoGrallocMetadata *)buffer->pBuffer;
+#ifdef USE_GBM
+ struct gbm_bo *handle = (struct gbm_bo *)meta_buf->pHandle;
+#else
+ private_handle_t *handle = (private_handle_t *)meta_buf->pHandle;
+#endif
+ if (!handle) {
+ DEBUG_PRINT_ERROR("%s : handle is null!", __FUNCTION__);
+ return OMX_ErrorUndefined;
+ }
+
+ // if input buffer dimensions is different from what is configured,
+ // reject the buffer
+#ifdef USE_GBM
+ if (ALIGN((int)m_sInPortDef.format.video.nFrameWidth,32) != ALIGN(handle->width,32) ||
+ ALIGN((int)m_sInPortDef.format.video.nFrameHeight,32) != ALIGN(handle->height,32)) {
+ ALOGE("%s: Graphic buf size(%dx%d) does not match configured size(%ux%u)",
+ __func__, handle->width, handle->height,
+#else
+ if (ALIGN((int)m_sInPortDef.format.video.nFrameWidth,32) != ALIGN(handle->unaligned_width,32) ||
+ ALIGN((int)m_sInPortDef.format.video.nFrameHeight,32) != ALIGN(handle->unaligned_height,32)) {
+ ALOGE("%s: Graphic buf size(%dx%d) does not match configured size(%ux%u)",
+ __func__, handle->unaligned_width, handle->unaligned_height,
+#endif
+ m_sInPortDef.format.video.nFrameWidth, m_sInPortDef.format.video.nFrameHeight);
+ m_pCallbacks.EmptyBufferDone(hComp, m_app_data, buffer);
+ return OMX_ErrorNone;
+ }
+ }
+ }
+
if (!psource_frame) {
psource_frame = buffer;
ret = push_input_buffer(hComp);