[PATCH] ipa: rkisp1: algorithms: awb: Fix AWB means vector order in RGB mode

Stefan Klug stefan.klug at ideasonboard.com
Thu Feb 13 20:35:56 CET 2025


Fix the order of the rgbMeans vector that got broken accidentally
during refactoring.  As there is currently no way to enable rgb mode at
runtime it went unnoticed.

Fixes: 29892f1c56c6 ("ipa: libipa: colour: Use the RGB class to model RGB values")
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index cffaa06a22c1..16e829469313 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -245,8 +245,8 @@ void Awb::process(IPAContext &context,
 
 	if (rgbMode_) {
 		rgbMeans = {{
-			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
 			static_cast<double>(awb->awb_mean[0].mean_cr_or_r),
+			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
 			static_cast<double>(awb->awb_mean[0].mean_cb_or_b)
 		}};
 	} else {
-- 
2.43.0



More information about the libcamera-devel mailing list