From b1439c87d118776274296ef07136919a693e73fc Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Fri, 15 Nov 2024 07:46:23 +0000 Subject: ipa: libipa: Add colour helpers We start to have some functions relating to colour that are effectively identical crop up across the IPA modules. Add a file allowing those to be centralised within libipa so that a single implementation can be used in all of the IPAs. Signed-off-by: Daniel Scally Reviewed-by: Kieran Bingham Reviewed-by: Milan Zamazal Reviewed-by: Laurent Pinchart --- src/ipa/libipa/colours.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/ipa/libipa/colours.h (limited to 'src/ipa/libipa/colours.h') diff --git a/src/ipa/libipa/colours.h b/src/ipa/libipa/colours.h new file mode 100644 index 00000000..b42ed0ac --- /dev/null +++ b/src/ipa/libipa/colours.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2024, Ideas on Board Oy + * + * libipa miscellaneous colour helpers + */ + +#pragma once + +#include + +namespace libcamera { + +namespace ipa { + +double rec601LuminanceFromRGB(double r, double g, double b); +uint32_t estimateCCT(double red, double green, double blue); + +} /* namespace ipa */ + +} /* namespace libcamera */ -- cgit v1.2.1