summaryrefslogtreecommitdiff
path: root/msm8998
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenwang@google.com>2018-10-04 17:08:38 -0700
committerShuzhen Wang <shuzhenwang@google.com>2018-10-26 15:30:59 -0700
commit809460afb949a4f919d5012ff6aa5e885e81a1b8 (patch)
treedd56c431f73a8395cb20ae286550e6e8c92a932d /msm8998
parent19cfae38692b8a8a218f4cb9b48fe784fe29ff24 (diff)
downloaddisplay-809460afb949a4f919d5012ff6aa5e885e81a1b8.tar.gz
libgralloc1: Add Y8 support for gralloc allocator
Y8 format is single plane 8-byte per pixel image format. The stride is 64 pixels, and scanline alignment is 64 lines. Test: testY8 Camera CTS test Bug: 70216652 Change-Id: Ie6ef2ed03a30e7f65053e79a4e6ba72511cc8eda
Diffstat (limited to 'msm8998')
-rw-r--r--msm8998/libgralloc1/gr_allocator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/msm8998/libgralloc1/gr_allocator.cpp b/msm8998/libgralloc1/gr_allocator.cpp
index 2e21302d..16d8618c 100644
--- a/msm8998/libgralloc1/gr_allocator.cpp
+++ b/msm8998/libgralloc1/gr_allocator.cpp
@@ -229,6 +229,7 @@ unsigned int Allocator::GetSize(const BufferDescriptor &descriptor, unsigned int
size = ALIGN(alignedw * alignedh, SIZE_4K);
break;
case HAL_PIXEL_FORMAT_RAW8:
+ case HAL_PIXEL_FORMAT_Y8:
size = alignedw * alignedh * 1;
break;
@@ -848,6 +849,7 @@ void Allocator::GetAlignedWidthAndHeight(const BufferDescriptor &descriptor, uns
case HAL_PIXEL_FORMAT_RAW_OPAQUE:
break;
case HAL_PIXEL_FORMAT_NV21_ZSL:
+ case HAL_PIXEL_FORMAT_Y8:
aligned_w = ALIGN(width, 64);
aligned_h = ALIGN(height, 64);
break;