summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2021-10-26 03:55:04 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2021-10-26 03:55:04 -0700
commit6452fb244ec3fca1bcb79898211544c374169f26 (patch)
tree2d9d3530aef7e62f5a8c583ea68a8a87aa324bb3
parent77244586f135b83ec785f663caf9366f5acf7ca0 (diff)
parent53f98bbc9034b04f7ca70ff7d753769da4d640fa (diff)
Merge "Revert "gralloc: Fix align width and heigth for YCrCb and YCbCr format""
-rw-r--r--gralloc/gr_utils.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index d9559122..7c6265ed 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -1080,17 +1080,12 @@ void GetAlignedWidthAndHeight(const BufferInfo &info, unsigned int *alignedw,
// Below should be only YUV family
switch (format) {
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
- /*
- * Todo: relook this alignment again
- * Change made to unblock the software EIS feature from camera
- * Currently using same alignment as camera doing
- */
- aligned_w = INT(VENUS_Y_STRIDE(COLOR_FMT_NV21, width));
- aligned_h = INT(VENUS_Y_SCANLINES(COLOR_FMT_NV21, height));
- break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP:
- aligned_w = INT(VENUS_Y_STRIDE(COLOR_FMT_NV12, width));
- aligned_h = INT(VENUS_Y_SCANLINES(COLOR_FMT_NV12, height));
+ if (AdrenoMemInfo::GetInstance() == nullptr) {
+ return;
+ }
+ alignment = AdrenoMemInfo::GetInstance()->GetGpuPixelAlignment();
+ aligned_w = ALIGN(width, alignment);
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
aligned_w = ALIGN(width, alignment);