diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-18 21:07:01 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-26 19:05:20 +0200 |
commit | 29892f1c56c6657a9d650aff203912212c295bd0 (patch) | |
tree | 287034218ce0a0593fe1429f2dc0f8a99dcd8b7c /src/ipa/libipa/colours.h | |
parent | cb3e3095d611462d839d6aec29d8a39cd38abf7c (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/ipa/libipa/colours.h')
-rw-r--r-- | src/ipa/libipa/colours.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 <stdint.h> +#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<double> &rgb); +uint32_t estimateCCT(const RGB<double> &rgb); } /* namespace ipa */ |