diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2025-05-22 14:03:18 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2025-05-23 09:44:57 +0200 |
commit | ad5326c926831fe7a943d10fd800de43e596f171 (patch) | |
tree | 978526ccf84578871856f193a0329bafe548e856 /src/ipa | |
parent | 516f365670235f9dac97defa1b586d0503f8e310 (diff) |
A simple typo crept in where the red gain had been re-typed rather
than using the correct green gain. In particular, this was causing
very dark images for sensors that use large red gains, such as the
IMX477 outdoors.
Fixes: 29892f1c56c6 ("ipa: libipa: colour: Use the RGB class to model RGB values")
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r-- | src/ipa/rpi/controller/rpi/agc_channel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp index a5562760..b2999364 100644 --- a/src/ipa/rpi/controller/rpi/agc_channel.cpp +++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp @@ -717,7 +717,7 @@ static double computeInitialY(StatisticsPtr &stats, AwbStatus const &awb, /* Factor in the AWB correction if needed. */ if (stats->agcStatsPos == Statistics::AgcStatsPos::PreWb) - sum *= RGB<double>{ { awb.gainR, awb.gainR, awb.gainB } }; + sum *= RGB<double>{ { awb.gainR, awb.gainG, awb.gainB } }; double ySum = ipa::rec601LuminanceFromRGB(sum); |