summaryrefslogtreecommitdiff
path: root/libgralloc1
diff options
context:
space:
mode:
authorArun Kumar K.R <akumarkr@codeaurora.org>2016-09-07 18:59:46 -0700
committerArun Kumar K.R <akumarkr@codeaurora.org>2016-09-20 11:16:39 -0700
commitfc2a27f23779b093b0493cd0322380c955d05590 (patch)
treeceffecfdccd7212b4dcdd4232e5912534c7c0979 /libgralloc1
parente06d05ab9842f436c92cb564734ad4fee294683d (diff)
downloaddisplay-fc2a27f23779b093b0493cd0322380c955d05590.tar.gz
gralloc: Store aligned width in pvt handle for TP10
- For TP10 Venus UBWC format, the Venus macro returns the stride, which is 4/3 times the width. - Need to store the pixel width instead of stride in the private handle hence * 3/4 Change-Id: I2c1348c6b90f141ecef6cabf493780325f17db77 Crs-fixed: 1059165
Diffstat (limited to 'libgralloc1')
-rw-r--r--libgralloc1/gr_allocator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgralloc1/gr_allocator.cpp b/libgralloc1/gr_allocator.cpp
index b45ba83c..1a269be8 100644
--- a/libgralloc1/gr_allocator.cpp
+++ b/libgralloc1/gr_allocator.cpp
@@ -670,6 +670,11 @@ void Allocator::GetYuvUBwcWidthAndHeight(int width, int height, int format, unsi
*aligned_w = VENUS_Y_STRIDE(COLOR_FMT_NV12_UBWC, width);
*aligned_h = VENUS_Y_SCANLINES(COLOR_FMT_NV12_UBWC, height);
break;
+ case HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC:
+ // The macro returns the stride which is 4/3 times the width, hence * 3/4
+ *aligned_w = (VENUS_Y_STRIDE(COLOR_FMT_NV12_BPP10_UBWC, width) * 3) / 4;
+ *aligned_h = VENUS_Y_SCANLINES(COLOR_FMT_NV12_BPP10_UBWC, height);
+ break;
default:
ALOGE("%s: Unsupported pixel format: 0x%x", __FUNCTION__, format);
*aligned_w = 0;