summaryrefslogtreecommitdiff
path: root/display/com/google/hardware/pixel/display/HistogramConfig.aidl
diff options
context:
space:
mode:
Diffstat (limited to 'display/com/google/hardware/pixel/display/HistogramConfig.aidl')
-rw-r--r--display/com/google/hardware/pixel/display/HistogramConfig.aidl47
1 files changed, 47 insertions, 0 deletions
diff --git a/display/com/google/hardware/pixel/display/HistogramConfig.aidl b/display/com/google/hardware/pixel/display/HistogramConfig.aidl
new file mode 100644
index 0000000..4798447
--- /dev/null
+++ b/display/com/google/hardware/pixel/display/HistogramConfig.aidl
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package com.google.hardware.pixel.display;
+import com.google.hardware.pixel.display.HistogramSamplePos;
+import com.google.hardware.pixel.display.Weight;
+import android.hardware.graphics.common.Rect;
+
+@VintfStability
+parcelable HistogramConfig {
+ /**
+ * roi is the region of interest in the frames that should be sampled
+ * to collect the luma values. Rect is represented by the (int) coordinates
+ * of its 4 edges (left, top, right, bottom). The coordinates should be
+ * calculated based on the full resolution which is described by
+ * getHistogramCapability. Note that the right and bottom coordinates are
+ * exclusive.
+ */
+ Rect roi;
+
+ /**
+ * The weights for red (weight_r), green (weight_g) and blue (weight_b)
+ * colors. The weights are used in luma calculation formula:
+ * luma = weight_r * red + weight_g * green + weight_b * blue
+ * weight_r + weight_g + weight_b should be equal to 1024
+ */
+ Weight weights;
+
+ /**
+ * samplePos is the histogram sample position, could be PRE_POSTPROC
+ * (before post processing) or POST_POSTPROC (after post processing).
+ */
+ HistogramSamplePos samplePos;
+}