libcamera: ipa: simple: Fix multiplication order in Awb
The matrix multiplication in Awb is swapped: the gains should be applied after combinedMatrix, i.e. on the left side. The mistake happened when `ccm' was replaced with combinedMatrix and gainMatrix multiplication was moved to Awb. While CCM must be applied after gains, the gains must be applied after the combined matrix, which no longer corresponds to CCM in Awb. Since there is currently no algorithm modifying combinedMatrix before Awb, combinedMatrix is an identity matrix there and the wrong order doesn't influence the output at the moment. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
4ceceb682a
commit
bb2e6d0833
@@ -44,7 +44,7 @@ void Awb::prepare(IPAContext &context,
|
||||
0, gains.g(), 0,
|
||||
0, 0, gains.b() } };
|
||||
context.activeState.combinedMatrix =
|
||||
context.activeState.combinedMatrix * gainMatrix;
|
||||
gainMatrix * context.activeState.combinedMatrix;
|
||||
|
||||
frameContext.gains.red = gains.r();
|
||||
frameContext.gains.blue = gains.b();
|
||||
|
||||
Reference in New Issue
Block a user