summaryrefslogtreecommitdiff
authorlingjie li <lingjie.li@amlogic.com>2019-11-07 07:36:54 (GMT)
committer Sky Zhou <sky.zhou@amlogic.com>2019-12-05 12:44:53 (GMT)
commit6a9cc9e442d01f2faa04049775aebb5970b11175 (patch)
tree6a0ae26e7fdaae10eac5a5151e115eb30282b8b5
parente0780946155513c2c106bcf70b0d2080b69c9b7e (diff)
downloadgralloc-6a9cc9e442d01f2faa04049775aebb5970b11175.zip
gralloc-6a9cc9e442d01f2faa04049775aebb5970b11175.tar.gz
gralloc-6a9cc9e442d01f2faa04049775aebb5970b11175.tar.bz2
gralloc: 4K HDR video playback green screen On Non-HDR TV. [1/1]
PD#SWPL-16137 Problem: 4K HDR video playback green screen On Non-HDR TV.Because the buffer which just include the omx's pts was rendered. Solution: reduce the size of buffer which just include the omx's pts when play 4K tv. so that the buffer will be attach fail befor render. Verify: Local AC214 on AndroidQ Change-Id: Ie298f1bf05aabd3273107a4e3b5f628e36078a40 Signed-off-by: lingjie li <lingjie.li@amlogic.com>
Diffstat
-rw-r--r--mali_gralloc_bufferallocation.cpp5
-rw-r--r--mali_gralloc_bufferdescriptor.cpp11
2 files changed, 10 insertions, 6 deletions
diff --git a/mali_gralloc_bufferallocation.cpp b/mali_gralloc_bufferallocation.cpp
index 523d7e3..d5ec125 100644
--- a/mali_gralloc_bufferallocation.cpp
+++ b/mali_gralloc_bufferallocation.cpp
@@ -928,8 +928,13 @@ int mali_gralloc_derive_format_and_size(mali_gralloc_module *m,
legacy::mali_gralloc_adjust_dimensions(bufDescriptor->internal_format,
usage,
legacy_alloc_type,
+#ifdef GRALLOC_AML_EXTEND
+ alloc_width,
+ alloc_height,
+#else
bufDescriptor->width,
bufDescriptor->height,
+#endif
&bufDescriptor->old_alloc_width,
&bufDescriptor->old_alloc_height);
diff --git a/mali_gralloc_bufferdescriptor.cpp b/mali_gralloc_bufferdescriptor.cpp
index cc65c9d..c158f9a 100644
--- a/mali_gralloc_bufferdescriptor.cpp
+++ b/mali_gralloc_bufferdescriptor.cpp
@@ -315,15 +315,14 @@ int mali_gralloc_validate_buffer_size(buffer_handle_t buffer, gralloc1_buffer_de
AERR("Bad stride!Not the same with allocated buffer " );
return GRALLOC1_ERROR_BAD_VALUE;
}
- if (am_gralloc_is_omx_metadata_extend_usage(hnd->usage))
+#ifdef GRALLOC_AML_EXTEND
+ if (am_gralloc_is_omx_metadata_extend_usage(hnd->producer_usage|hnd->consumer_usage))
{
- ALOGW("omx buffer: descriptorInfo->width:%d descriptorInfo->height:%d", descriptorInfo->width, descriptorInfo->height);
+ //work around: this buffer only have omx metadata, not for rander, just need a small buffer.
return GRALLOC1_ERROR_NONE;
}
- else
- {
- bufferSize = hnd->byte_stride / stride * descriptorInfo->width * descriptorInfo->height;
- }
+#endif
+ bufferSize = hnd->byte_stride / stride * descriptorInfo->width * descriptorInfo->height;
}
else
{