summaryrefslogtreecommitdiff
path: root/gralloc/gr_utils.cpp
diff options
context:
space:
mode:
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);