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>
This commit is contained in:
Jean-Michel Hautbois 2022-02-24 12:33:44 +01:00
parent f84e5e01a4
commit 13c1e48e8e
4 changed files with 90 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#include "algorithms/agc.h"
#include "algorithms/algorithm.h"
#include "algorithms/blc.h"
#include "libipa/camera_sensor_helper.h"
#include "ipa_context.h"
@ -120,6 +121,7 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)
/* Construct our Algorithms */
algorithms_.push_back(std::make_unique<algorithms::Agc>());
algorithms_.push_back(std::make_unique<algorithms::BlackLevelCorrection>());
return 0;
}