diff options
author | Camus Wong <camusw@codeaurora.org> | 2018-09-27 16:38:50 -0400 |
---|---|---|
committer | Camus Wong <camusw@codeaurora.org> | 2018-09-27 16:45:31 -0400 |
commit | a300db677c77b88c4786d80e9248d3b7c34d99e9 (patch) | |
tree | 988a61c4aa759eb327eae013676f09e0f77424fb /gralloc/gr_utils.cpp | |
parent | d7d8a22916b9193911d0579b0875fefb088530b6 (diff) |
Gralloc: Add new color format support
Update gralloc function to handle color format:
HAL_PIXEL_FORMAT_CbYCrY_422_I
Change-Id: Icaa63c6dcc92da2d52c7e93d294c708def99e392
Diffstat (limited to 'gralloc/gr_utils.cpp')
-rw-r--r-- | gralloc/gr_utils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp index 7c825bdc..7fa7e110 100644 --- a/gralloc/gr_utils.cpp +++ b/gralloc/gr_utils.cpp @@ -67,6 +67,7 @@ bool IsYuvFormat(int format) { 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 @@ int GetBufferLayout(private_handle_t *hnd, uint32_t stride[4], uint32_t offset[4 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; |