summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwenchangliu <wenchangliu@google.com>2021-09-24 15:27:37 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-09-24 15:27:37 +0000
commit1c226376c5b284420228531447f1cc0f613c7fc7 (patch)
treea37135091395f228de4e87d59be80f76b092974e
parente61e8219a28b2743279c793b8422681ac70209e9 (diff)
parenta1010a3bf6dcf0b25d3532a068d43a247904cecf (diff)
downloadgchips-1c226376c5b284420228531447f1cc0f613c7fc7.tar.gz
Add missing 16 alignment constraint of chroma stride for YV12 am: a48bf1aa7e am: 6d608c0389 am: a1010a3bf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/gchips/+/15898342 Change-Id: I2c16890e412530729f20ec97315ca6e309ad348b
-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);
}
}