summaryrefslogtreecommitdiff
path: root/gralloc/gr_utils.cpp
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-10-16 14:50:14 +0200
committerArian <arian.kulmer@web.de>2021-11-30 18:32:04 +0100
commit1dec611dd1c56ab236b00a77dac85206c441ed69 (patch)
tree8565f693b5659d3b40da268f9cc50f1b77bb97f7 /gralloc/gr_utils.cpp
parentc5575085e685a2a44f75efbc2833301ed41cd4fd (diff)
gralloc: Add option for unaligned NV21_ZSL pixel format
* Not sure why this is a thing but on some devices (eg. Samsung Galaxy Tab S5e) aligning NV21_ZSL to 64 results in invalid width and height. Change-Id: I8611752798a8c66ba55d52d826aa532fd76abe33
Diffstat (limited to 'gralloc/gr_utils.cpp')
-rw-r--r--gralloc/gr_utils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 20508344..d157ad61 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -1064,8 +1064,10 @@ void GetAlignedWidthAndHeight(const BufferInfo &info, unsigned int *alignedw,
case HAL_PIXEL_FORMAT_RAW_OPAQUE:
break;
case HAL_PIXEL_FORMAT_NV21_ZSL:
+#ifndef USE_UNALIGNED_NV21_ZSL
aligned_w = ALIGN(width, 64);
aligned_h = ALIGN(height, 64);
+#endif
break;
case HAL_PIXEL_FORMAT_NV12_HEIF:
aligned_w = INT(VENUS_Y_STRIDE(COLOR_FMT_NV12_512, width));