Commit graph

6 commits

Author SHA1 Message Date
Laurent Pinchart
2101af47e4 ipa: libipa: Pass a reference instead of pointer to Algorithm::process()
Frame contexts will become the core component of IPA modules, always
available to functions of the algorithms. To indicate and prepare for
this, turn the frame context pointer passed to Algorithm::process() into
a reference.

The RkISP1 IPA module doesn't use frame contexts yet, so pass a dummy
context for now.

While at it, drop an unneeded [[maybe_unused]] from Agc::process() and
add a missing parameter documentation for the frameContext argument to
Awb::process().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-09-27 14:39:47 +03:00
Florian Sylvestre
ea549c46d3 ipa: rkisp1: Add enable field for AWB algorithm in IPA context
Add an enable variable in the awb struct in IPASessionConfiguration
which indicates if the AWB hardware module is enabled. This will allow
other algorithms to retrieve this information.

Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-08-21 21:50:12 +03:00
Paul Elder
3200bb635c ipa: rkisp1: Add manual color gains
Add support for manually controlling the color gains on the rkisp1 IPA.
To that end, add and plumb the AwbEnable and ColourGains controls. As
per-frame controls aren't supported yet in the rkisp1 IPA, simply apply
and perform checks on the controls immediately.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-08-19 18:14:16 +03:00
Laurent Pinchart
d22c0020ef ipa: rkisp1: Register algorithms
To prepare for dynamic instantiation of algorithms from the tuning file,
register the algorithms with the Module class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-29 17:21:12 +03:00
Umang Jain
8b291bce82 ipa: libipa: Add frame context pointer in process()
Currently we have a single structure of IPAFrameContext but
subsequently, we shall have a ring buffer (or similar) container
to keep IPAFrameContext structures for each frame.

It would be a hassle to query out the frame context required for
process() (since they will reside in a ring buffer) by the IPA
for each process. Hence, prepare the process() libipa template to
accept a particular IPAFrameContext early on.

As for this patch, we shall pass in the pointer as nullptr, so
that the changes compile and keep working as-is.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-18 15:27:32 +01:00
Jean-Michel Hautbois
4b2251509f 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>
2022-03-28 12:31:37 +02:00