diff options
author | wenchangliu <wenchangliu@google.com> | 2023-02-08 08:33:27 +0000 |
---|---|---|
committer | wenchangliu <wenchangliu@google.com> | 2023-02-08 09:12:57 +0000 |
commit | 237bc863dd79214575c0260c9fa3be43f1e61370 (patch) | |
tree | d358437d091022dd8a9a1c778044c475c4db484a /gralloc4/src | |
parent | 3cfeb0ad2f9e7bf42453b85fdb0434878830900e (diff) | |
download | gchips-237bc863dd79214575c0260c9fa3be43f1e61370.tar.gz |
gralloc4: perfer P010_SPN for MFC
Before common format finish for Big and MFC.
Use MFC format by default for YCBCR_P010 when buffer have
HW encoder/decoder usage flags.
Bug: 229547170
Bug: 267738300
Bug: 267744065
Test: record by multistreamcam.apk
Test: atest CtsMediaDecoderTestCases:ImageReaderDecoderTest
Test: atest CtsMediaV2TestCases
Change-Id: Id60eda92b16b8cc0b4ff28617b72ef9d9b5d6eff
Diffstat (limited to 'gralloc4/src')
-rw-r--r-- | gralloc4/src/core/mali_gralloc_formats.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gralloc4/src/core/mali_gralloc_formats.cpp b/gralloc4/src/core/mali_gralloc_formats.cpp index b9f78e2..082879f 100644 --- a/gralloc4/src/core/mali_gralloc_formats.cpp +++ b/gralloc4/src/core/mali_gralloc_formats.cpp @@ -1472,6 +1472,10 @@ uint32_t get_base_format(const uint64_t req_format, { base_format = HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B; } + else if (usage & (GRALLOC_USAGE_HW_VIDEO_ENCODER | GRALLOC_USAGE_HW_VIDEO_DECODER)) + { + base_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_SPN; + } } /* Obtain a valid base format, optionally mapped to internal. Flex formats |