Merge "config: Enable QTI Extensions in AOSP by default"
diff --git a/gralloc/gr_camera_info.cpp b/gralloc/gr_camera_info.cpp
index 5f58de5..6eca72c 100644
--- a/gralloc/gr_camera_info.cpp
+++ b/gralloc/gr_camera_info.cpp
@@ -29,6 +29,12 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * SPDX-License-Identifier: BSD-3-Clause-Clear
+ */
+
#include <dlfcn.h>
#include <log/log.h>
#include <mutex>
@@ -121,6 +127,15 @@
case HAL_PIXEL_FORMAT_NV12_UBWC_FLEX_8_BATCH:
format = CAMERA_PIXEL_FORMAT_UBWC_FLEX_8_BATCH;
break;
+ case HAL_PIXEL_FORMAT_NV12_FLEX_2_BATCH:
+ format = CAMERA_PIXEL_FORMAT_YUV_FLEX_2_BATCH;
+ break;
+ case HAL_PIXEL_FORMAT_NV12_FLEX_4_BATCH:
+ format = CAMERA_PIXEL_FORMAT_YUV_FLEX_4_BATCH;
+ break;
+ case HAL_PIXEL_FORMAT_NV12_FLEX_8_BATCH:
+ format = CAMERA_PIXEL_FORMAT_YUV_FLEX_8_BATCH;
+ break;
case HAL_PIXEL_FORMAT_MULTIPLANAR_FLEX:
format = CAMERA_PIXEL_FORMAT_MULTIPLANAR_FLEX;
break;
diff --git a/gralloc/gr_camera_info.h b/gralloc/gr_camera_info.h
index 28e02b0..0a0cb2b 100644
--- a/gralloc/gr_camera_info.h
+++ b/gralloc/gr_camera_info.h
@@ -27,6 +27,12 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * SPDX-License-Identifier: BSD-3-Clause-Clear
+ */
+
#ifndef __GR_CAMERA_INFO_H__
#define __GR_CAMERA_INFO_H__
@@ -59,6 +65,12 @@
// individual APIs
CAMERA_PIXEL_FORMAT_UBWC_FLEX_8_BATCH = 0x130, // YUV format with fliexible alignment defined by
// individual APIs
+ CAMERA_PIXEL_FORMAT_YUV_FLEX_2_BATCH = 0x140, // YUV format with fliexible alignment defined by
+ // individual APIs
+ CAMERA_PIXEL_FORMAT_YUV_FLEX_4_BATCH = 0x141, // YUV format with fliexible alignment defined by
+ // individual APIs
+ CAMERA_PIXEL_FORMAT_YUV_FLEX_8_BATCH = 0x142, // YUV format with fliexible alignment defined by
+ // individual APIs
CAMERA_PIXEL_FORMAT_NV12_VENUS = 0x7FA30C04, // NV12 video format
CAMERA_PIXEL_FORMAT_NV12_HEIF = 0x00000116, // HEIF video YUV420 format
CAMERA_PIXEL_FORMAT_YCbCr_420_SP_UBWC = 0x7FA30C06, // 8 bit YUV 420 semi-planar UBWC format
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 9621d71..9b9b019 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -117,6 +117,9 @@
case HAL_PIXEL_FORMAT_NV12_UBWC_FLEX_4_BATCH:
case HAL_PIXEL_FORMAT_NV12_UBWC_FLEX_8_BATCH:
case HAL_PIXEL_FORMAT_MULTIPLANAR_FLEX:
+ case HAL_PIXEL_FORMAT_NV12_FLEX_2_BATCH:
+ case HAL_PIXEL_FORMAT_NV12_FLEX_4_BATCH:
+ case HAL_PIXEL_FORMAT_NV12_FLEX_8_BATCH:
return true;
default:
return false;
@@ -215,6 +218,9 @@
case static_cast<int>(PixelFormat::RAW_OPAQUE):
case static_cast<int>(PixelFormat::RAW10):
case static_cast<int>(PixelFormat::RAW12):
+ case HAL_PIXEL_FORMAT_NV12_FLEX_2_BATCH:
+ case HAL_PIXEL_FORMAT_NV12_FLEX_4_BATCH:
+ case HAL_PIXEL_FORMAT_NV12_FLEX_8_BATCH:
if (usage & GRALLOC_USAGE_HW_COMPOSER) {
ALOGW("%s: HW_Composer flag is set for camera custom format: 0x%x, Usage: 0x%" PRIx64,
__FUNCTION__, format, usage);