ipa: rkisp1: Introduce AWB

The RkISP1 ISP calculates a mean value for Y, Cr and Cb at each frame.
There is a RGB mode which could theoretically give us the values for R,
G and B directly, but it seems to be failing right now.

Convert those values into R, G and B and estimate the gain to apply in a
grey world.

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 15:39:50 +01:00
parent 8917c9e7ba
commit 4b2251509f
6 changed files with 258 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#include "algorithms/agc.h"
#include "algorithms/algorithm.h"
#include "algorithms/awb.h"
#include "algorithms/blc.h"
#include "libipa/camera_sensor_helper.h"
@ -121,6 +122,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::Awb>());
algorithms_.push_back(std::make_unique<algorithms::BlackLevelCorrection>());
return 0;