summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwenchangliu <wenchangliu@google.com>2021-09-24 15:14:34 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-09-24 15:14:34 +0000
commit27137dba39fbbd8e947627438c34d63d2ce8d7df (patch)
treea37135091395f228de4e87d59be80f76b092974e
parenta787a8bd192b6dde62a8efe0fd8d8c5e2c3e5dda (diff)
parentcfbe775ebb21aa9c1976101cfe52286d229bc75b (diff)
downloadgchips-27137dba39fbbd8e947627438c34d63d2ce8d7df.tar.gz
Add missing 16 alignment constraint of chroma stride for YV12 am: a48bf1aa7e am: cfbe775ebb
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/gchips/+/15898342 Change-Id: I2a7215fb55d1344c20670d33c6afc957e661a1de
-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);
}
}