From 29892f1c56c6657a9d650aff203912212c295bd0 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 18 Nov 2024 21:07:01 +0200 Subject: ipa: libipa: colour: Use the RGB class to model RGB values The rec601LuminanceFromRGB() and estimateCCT() functions take RGB triplets as three variables. Replace them with instances of the RGB class and adapt the users accordingly. Only variables passed directly to these functions are converted to RGB instances, further conversion of IPA modules to the RGB class will be performed separately. While at it, fix a typo in the documentation of the estimateCCT() function. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal --- src/ipa/ipu3/algorithms/awb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ipa/ipu3/algorithms/awb.cpp') diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp index 7c6bff09..55de05d9 100644 --- a/src/ipa/ipu3/algorithms/awb.cpp +++ b/src/ipa/ipu3/algorithms/awb.cpp @@ -412,7 +412,7 @@ void Awb::awbGreyWorld() blueGain = sumBlue.g() / (sumBlue.b() + 1); /* Color temperature is not relevant in Grey world but still useful to estimate it :-) */ - asyncResults_.temperatureK = estimateCCT(sumRed.r(), sumRed.g(), sumBlue.b()); + asyncResults_.temperatureK = estimateCCT({{ sumRed.r(), sumRed.g(), sumBlue.b() }}); /* * Gain values are unsigned integer value ranging [0, 8) with 13 bit -- cgit v1.2.1