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/libipa/colours.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ipa/libipa/colours.h') diff --git a/src/ipa/libipa/colours.h b/src/ipa/libipa/colours.h index b42ed0ac..fa6a8b57 100644 --- a/src/ipa/libipa/colours.h +++ b/src/ipa/libipa/colours.h @@ -9,12 +9,14 @@ #include +#include "vector.h" + namespace libcamera { namespace ipa { -double rec601LuminanceFromRGB(double r, double g, double b); -uint32_t estimateCCT(double red, double green, double blue); +double rec601LuminanceFromRGB(const RGB &rgb); +uint32_t estimateCCT(const RGB &rgb); } /* namespace ipa */ -- cgit v1.2.1