summaryrefslogtreecommitdiff
path: root/gralloc/gr_utils.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-11-29 07:13:23 -0800
committerLinux Build Service Account <lnxbuild@localhost>2021-11-29 07:13:23 -0800
commit1a45165b9a1dcc07c60a9513deab09d6da717288 (patch)
tree4e787f6cfe8ec01af4a7850a9443852f9403c435 /gralloc/gr_utils.cpp
parent2e497d0353d9fb5cac3b0e7d61bedeeab15387d9 (diff)
parent2827bd1b71b657d7e8cb070d7f25baa889775a44 (diff)
Merge 2827bd1b71b657d7e8cb070d7f25baa889775a44 on remote branch
Change-Id: I47bed760ba98ae85384a6ce033bdce8de650dc58
Diffstat (limited to 'gralloc/gr_utils.cpp')
-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);