summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwenchangliu <wenchangliu@google.com>2021-09-24 15:01:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-09-24 15:01:20 +0000
commit6d608c038985673f504d6cbedfb8c17d8cf5ba2f (patch)
treea37135091395f228de4e87d59be80f76b092974e
parente23ef4b341bf51e246ee3f1a7ca83fc6e1c148da (diff)
parenta48bf1aa7ec589878545d291b2b44110b54076db (diff)
downloadgchips-6d608c038985673f504d6cbedfb8c17d8cf5ba2f.tar.gz
Add missing 16 alignment constraint of chroma stride for YV12 am: a48bf1aa7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/gchips/+/15898342 Change-Id: Iea245d1e42a77475c52e17d8092e26dd6608269c
-rw-r--r--gralloc4/src/core/mali_gralloc_bufferallocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
index fe2349b..e928637 100644
--- a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
+++ b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
@@ -446,7 +446,7 @@ static void update_yv12_stride(int8_t plane,
{
if (plane == 0)
{
- *byte_stride = GRALLOC_ALIGN(luma_stride, stride_align);
+ *byte_stride = GRALLOC_ALIGN(luma_stride, GRALLOC_ALIGN(stride_align, 32));
}
else
{
@@ -456,7 +456,7 @@ static void update_yv12_stride(int8_t plane,
* 2. Multiple of 16px (16 bytes)
*/
*byte_stride = luma_stride / 2;
- assert(*byte_stride == GRALLOC_ALIGN(*byte_stride, stride_align / 2));
+ assert(*byte_stride == GRALLOC_ALIGN(*byte_stride, GRALLOC_ALIGN(stride_align / 2, 16)));
assert(*byte_stride & 15 == 0);
}
}