summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/blc.h
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2022-02-24 12:33:44 +0100
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2022-03-28 12:31:37 +0200
commit13c1e48e8ec6bce55585f042c695e47f2873c58c (patch)
treed59fc24ff2402d25bdfe0f7850e7e84102bae7e4 /src/ipa/rkisp1/algorithms/blc.h
parentf84e5e01a4dbec6183c53810d1e579d32674aaae (diff)
ipa: rkisp1: Introduce Black Level Correction
In order to have the proper pixel levels, apply a fixed black level correction, based on the imx219 tuning file in RPi. The value is 4096 on 16 bits, and the pipeline for RkISP1 is on 12 bits, scale it. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Tested-by: Peter Griffin <peter.griffin@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/blc.h')
-rw-r--r--src/ipa/rkisp1/algorithms/blc.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/algorithms/blc.h b/src/ipa/rkisp1/algorithms/blc.h
new file mode 100644
index 00000000..69874d8f
--- /dev/null
+++ b/src/ipa/rkisp1/algorithms/blc.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2021-2022, Ideas On Board
+ *
+ * blc.h - RkISP1 Black Level Correction control
+ */
+
+#pragma once
+
+#include <linux/rkisp1-config.h>
+
+#include "algorithm.h"
+
+namespace libcamera {
+
+struct IPACameraSensorInfo;
+
+namespace ipa::rkisp1::algorithms {
+
+class BlackLevelCorrection : public Algorithm
+{
+public:
+ BlackLevelCorrection() = default;
+ ~BlackLevelCorrection() = default;
+
+ void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
+};
+
+} /* namespace ipa::rkisp1::algorithms */
+} /* namespace libcamera */