Gralloc: Add new color format support
Update gralloc function to handle color format:
HAL_PIXEL_FORMAT_CbYCrY_422_I
Change-Id: Icaa63c6dcc92da2d52c7e93d294c708def99e392
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 7c825bd..7fa7e11 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -67,6 +67,7 @@
case HAL_PIXEL_FORMAT_BLOB:
case HAL_PIXEL_FORMAT_RAW_OPAQUE:
case HAL_PIXEL_FORMAT_NV12_HEIF:
+ case HAL_PIXEL_FORMAT_CbYCrY_422_I:
return true;
default:
return false;
@@ -1002,6 +1003,9 @@
offset[2] = static_cast<uint32_t>(reinterpret_cast<uint64_t>(yuvInfo.cb) - hnd->base);
(*num_planes)++;
break;
+ case HAL_PIXEL_FORMAT_CbYCrY_422_I:
+ *num_planes = 1;
+ break;
default:
ALOGW("%s: Unsupported format", __FUNCTION__);
ret = -EINVAL;