summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilli Ye <williye97@gmail.com>2019-10-24 23:05:04 +0200
committeralk3pInjection <webmaster@raspii.tech>2022-09-05 22:00:03 +0800
commit505f6e87c9455a668f92ef6e71ff5b80e76fa948 (patch)
tree940e579a9c3de4aeaff3b428353fc5037c9373fd
parent82dc4153e1649971f67b167829c02c5581305c58 (diff)
gralloc: Add option for unaligned YCrCb pixel format
* Same problem as unaligned NV21_ZSL (Samsung Galaxy A70 needs this) Change-Id: Iddf19433ddef8023b9fa3f7b735f40039dafe3a6
-rw-r--r--gralloc/Android.mk3
-rw-r--r--gralloc/gr_utils.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index c3f41337..57fee80f 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -49,6 +49,9 @@ endif
ifeq ($(TARGET_USES_UNALIGNED_NV21_ZSL),true)
LOCAL_CFLAGS += -DUSE_UNALIGNED_NV21_ZSL
endif
+ifeq ($(TARGET_USES_UNALIGNED_YCRCB),true)
+ LOCAL_CFLAGS += -DUSE_UNALIGNED_YCRCB
+endif
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := gr_utils.cpp gr_adreno_info.cpp
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index d157ad61..4306663e 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -1001,6 +1001,9 @@ void GetAlignedWidthAndHeight(const BufferInfo &info, unsigned int *alignedw,
// Below should be only YUV family
switch (format) {
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+#ifdef USE_UNALIGNED_YCRCB
+ break;
+#endif
case HAL_PIXEL_FORMAT_YCbCr_420_SP:
if (AdrenoMemInfo::GetInstance() == nullptr) {
return;