From 13c1e48e8ec6bce55585f042c695e47f2873c58c Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Thu, 24 Feb 2022 12:33:44 +0100 Subject: 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 Tested-by: Peter Griffin Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/algorithms/blc.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/ipa/rkisp1/algorithms/blc.h (limited to 'src/ipa/rkisp1/algorithms/blc.h') 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 + +#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 */ -- cgit v1.2.1