diff options
author | Midas Chien <midaschieh@google.com> | 2023-03-15 09:18:46 +0000 |
---|---|---|
committer | Midas Chien <midaschieh@google.com> | 2023-03-15 12:29:23 +0000 |
commit | e9298c80ef309ea446b2507a6208e844a91bddcc (patch) | |
tree | 7de68e0d456fdddb1781d7eb2b733761869b590c /libhwc2.1 | |
parent | beae9743b5b505eb30f0d24332a195b227ad8466 (diff) |
libhwc2.1: add MALI_GRALLOC_FORMAT_INTERNAL_NV21 format
Bug: 273397953
Test: check video comp type in camera preview, record
Change-Id: I8f020860728decbe61bd991226371c63e092ee68
Diffstat (limited to 'libhwc2.1')
-rw-r--r-- | libhwc2.1/libhwchelper/ExynosHWCHelper.cpp | 2 | ||||
-rw-r--r-- | libhwc2.1/libhwchelper/ExynosHWCHelper.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp b/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp index 663ab50..aeb7c15 100644 --- a/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp +++ b/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp @@ -699,6 +699,8 @@ uint32_t getExynosBufferYLength(uint32_t width, uint32_t height, int format) case HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_10B_SBWC: return SBWC_10B_Y_SIZE(width, height) + SBWC_10B_Y_HEADER_SIZE(width, height); + case MALI_GRALLOC_FORMAT_INTERNAL_NV21: + return __ALIGN_UP(width, 64) * __ALIGN_UP(height, 2); } return NV12M_Y_SIZE(width, height) + ((width % 128) == 0 ? 0 : 256); diff --git a/libhwc2.1/libhwchelper/ExynosHWCHelper.h b/libhwc2.1/libhwchelper/ExynosHWCHelper.h index f298c33..87b6163 100644 --- a/libhwc2.1/libhwchelper/ExynosHWCHelper.h +++ b/libhwc2.1/libhwchelper/ExynosHWCHelper.h @@ -214,6 +214,8 @@ const format_description_t exynos_format_desc[] = { 1, 1, 12, YUV420|BIT8|AFBC, false, String8("MALI_GRALLOC_FORMAT_INTERNAL_YUV420_8BIT_I"), 0}, {MALI_GRALLOC_FORMAT_INTERNAL_YUV420_10BIT_I, DECON_PIXEL_FORMAT_MAX, DRM_FORMAT_YUV420_10BIT, 1, 1, 15, YUV420|BIT10|AFBC, false, String8("MALI_GRALLOC_FORMAT_INTERNAL_YUV420_10BIT_I"), 0}, + {MALI_GRALLOC_FORMAT_INTERNAL_NV21, DECON_PIXEL_FORMAT_NV21, DRM_FORMAT_NV21, + 2, 1, 12, YUV420|BIT8, false, String8("MALI_GRALLOC_FORMAT_INTERNAL_NV21"), 0}, /* YUV 422 */ {HAL_PIXEL_FORMAT_EXYNOS_CbYCrY_422_I, DECON_PIXEL_FORMAT_MAX, DRM_FORMAT_UNDEFINED, |