libcamera: ipa: simple: Remove Lut algorithm

The Lut algorithm is not really an algorithm.  Moreover, algorithms may
be enabled or disabled but with Lut disabled, nothing will work.

Let's move the construction of lookup tables to CPU debayering, where it
is used.  The implied and related changes are:

- DebayerParams is changed to contain the real params rather than lookup
  tables.
- contrastExp parameter introduced by GPU ISP is used for CPU ISP too.
- The params must be initialised so that debayering gets meaningful
  parameter values even when some algorithms are disabled.
- combinedMatrix must be put to params everywhere where it is modified.
- Matrix changes needn't be tracked in the algorithms any more.
- CPU debayering must watch for changes of the corresponding parameters
  to update the lookup tables when and only when needed.
- Swapping red and blue is integrated into lookup table constructions.
- gpuIspEnabled flags are removed as they are not needed any more.

Reviewed-by: Robert Mader <robert.mader@collabora.com>
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Milan Zamazal
2026-01-28 12:44:01 +01:00
committed by Kieran Bingham
parent c43aeaade0
commit 3ffaa4c0e2
18 changed files with 188 additions and 478 deletions

View File

@@ -37,7 +37,7 @@ int Awb::configure(IPAContext &context,
void Awb::prepare(IPAContext &context,
[[maybe_unused]] const uint32_t frame,
IPAFrameContext &frameContext,
[[maybe_unused]] DebayerParams *params)
DebayerParams *params)
{
auto &gains = context.activeState.awb.gains;
Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,
@@ -45,9 +45,11 @@ void Awb::prepare(IPAContext &context,
0, 0, gains.b() } };
context.activeState.combinedMatrix =
context.activeState.combinedMatrix * gainMatrix;
/* Just report, the gains are applied in LUT algorithm. */
frameContext.gains.red = gains.r();
frameContext.gains.blue = gains.b();
params->gains = gains;
}
void Awb::process(IPAContext &context,