summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Goyal <layog@google.com>2023-04-03 17:13:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-03 17:13:33 +0000
commit552369679b23aa15f6793aa7c3094e2e7750b99f (patch)
tree4175df814365cdcf169a9ee3378dd911670718bd
parent9a176cad1f4f1a3424705cd69eda63da73f2446f (diff)
parent84eadeff2bea27f3d5002af797947190b6d94443 (diff)
downloadgchips-552369679b23aa15f6793aa7c3094e2e7750b99f.tar.gz
gralloc4: Remove local SBWC macros am: 84eadeff2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/gchips/+/22370762 Change-Id: I1a918fc919d917939879c1b4ce1bda3f60ea14aa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--gralloc4/src/core/exynos_format_allocation.h5
-rw-r--r--gralloc4/src/core/mfc_macros_local.h59
2 files changed, 0 insertions, 64 deletions
diff --git a/gralloc4/src/core/exynos_format_allocation.h b/gralloc4/src/core/exynos_format_allocation.h
index 0abfbd0..7c07b96 100644
--- a/gralloc4/src/core/exynos_format_allocation.h
+++ b/gralloc4/src/core/exynos_format_allocation.h
@@ -16,12 +16,7 @@
#pragma once
-#if __has_include(<linux/videodev2_exynos_media.h>)
#include <linux/videodev2_exynos_media.h>
-#else
-#include "mfc_macros_local.h"
-#endif
-
#include <gralloc_priv.h>
#define PLANE_SIZE(w, h) ((w) * (h))
diff --git a/gralloc4/src/core/mfc_macros_local.h b/gralloc4/src/core/mfc_macros_local.h
deleted file mode 100644
index ab66d17..0000000
--- a/gralloc4/src/core/mfc_macros_local.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2020 Samsung Electronics Co. Ltd.
- * Copyright (C) 2021 Google LLC.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#if __has_include(<video/mfc_macros.h>)
-#error "This header should not be included if mfc_macros is available in UAPI"
-#endif
-
-/* helper macros */
-#ifndef __ALIGN_UP
-#define __ALIGN_UP(x, a) (((x) + ((a) - 1)) & ~((a) - 1))
-#endif
-
-/* SBWC align macros */
-#define SBWC_8B_STRIDE(w) (128 * (((w) + 31) / 32))
-#define SBWC_10B_STRIDE(w) (160 * (((w) + 31) / 32))
-#define SBWC_HEADER_STRIDE(w) ((((((w) + 63) / 64) + 15) / 16) * 16)
-
-#define SBWC_Y_VSTRIDE_BLOCKS(h) ((__ALIGN_UP((h), 16) + 3) / 4)
-#define SBWC_CBCR_VSTRIDE_BLOCKS(h) (((__ALIGN_UP((h), 16) / 2) + 3) / 4)
-
-#define SBWC_8B_Y_SIZE(w, h) ((SBWC_8B_STRIDE(w) * ((__ALIGN_UP((h), 16) + 3) / 4)) + 64)
-#define SBWC_8B_Y_HEADER_SIZE(w, h) __ALIGN_UP(((SBWC_HEADER_STRIDE(w) * ((__ALIGN_UP((h), 16) + 3) / 4)) + 256), 32)
-#define SBWC_8B_CBCR_SIZE(w, h) ((SBWC_8B_STRIDE(w) * (((__ALIGN_UP((h), 16) / 2) + 3) / 4)) + 64)
-#define SBWC_8B_CBCR_HEADER_SIZE(w, h) ((SBWC_HEADER_STRIDE(w) * (((__ALIGN_UP((h), 16) / 2) + 3) / 4)) + 128)
-
-#define SBWC_10B_Y_SIZE(w, h) ((SBWC_10B_STRIDE(w) * ((__ALIGN_UP((h), 16) + 3) / 4)) + 64)
-#define SBWC_10B_Y_HEADER_SIZE(w, h) __ALIGN_UP((((__ALIGN_UP((w), 32) * __ALIGN_UP((h), 16) * 2) + 256) - SBWC_10B_Y_SIZE(w, h)), 32)
-#define SBWC_10B_CBCR_SIZE(w, h) ((SBWC_10B_STRIDE(w) * (((__ALIGN_UP((h), 16) / 2) + 3) / 4)) + 64)
-#define SBWC_10B_CBCR_HEADER_SIZE(w, h) (((__ALIGN_UP((w), 32) * __ALIGN_UP((h), 16)) + 256) - SBWC_10B_CBCR_SIZE(w, h))
-
-/* SBWC Lossy align macros */
-#define SBWCL_8B_STRIDE(w, r) (((128 * (r)) / 100) * (((w) + 31) / 32))
-#define SBWCL_10B_STRIDE(w, r) (((160 * (r)) / 100) * (((w) + 31) / 32))
-
-#define SBWCL_8B_Y_SIZE(w, h, r) ((SBWCL_8B_STRIDE(w, r) * ((__ALIGN_UP((h), 8) + 3) / 4)) + 64)
-#define SBWCL_8B_CBCR_SIZE(w, h, r) ((SBWCL_8B_STRIDE(w, r) * (((__ALIGN_UP((h), 8) / 2) + 3) / 4)) + 64)
-
-#define SBWCL_10B_Y_SIZE(w, h, r) ((SBWCL_10B_STRIDE(w, r) * ((__ALIGN_UP((h), 8) + 3) / 4)) + 64)
-#define SBWCL_10B_CBCR_SIZE(w, h, r) ((SBWCL_10B_STRIDE(w, r) * (((__ALIGN_UP((h), 8) / 2) + 3) / 4)) + 64)
-
-#define SBWCL_8B_CBCR_BASE(base, w, h, r) ((base) + SBWCL_8B_Y_SIZE(w, h, r))
-#define SBWCL_10B_CBCR_BASE(base, w, h, r) ((base) + SBWCL_10B_Y_SIZE(w, h, r))
-