summaryrefslogtreecommitdiff
path: root/src/ipa/libipa
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-23 23:12:40 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-24 18:22:30 +0200
commit6981a5169b0415eccdbb5ef2cad4d68c6b01f072 (patch)
tree8aa95add73dc7e79d706ae7b3a04babd447b053b /src/ipa/libipa
parent1a948d5457d5f216c8b21f7b7480408f94cc46ec (diff)
libipa: awb: Pass lux value to calculateAwb() as unsigned int
The lux value can never be negative. Pass it as an unsigned int. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Diffstat (limited to 'src/ipa/libipa')
-rw-r--r--src/ipa/libipa/awb.h2
-rw-r--r--src/ipa/libipa/awb_bayes.cpp2
-rw-r--r--src/ipa/libipa/awb_bayes.h2
-rw-r--r--src/ipa/libipa/awb_grey.cpp2
-rw-r--r--src/ipa/libipa/awb_grey.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h
index 4a1b012a..5c298d3b 100644
--- a/src/ipa/libipa/awb.h
+++ b/src/ipa/libipa/awb.h
@@ -35,7 +35,7 @@ public:
virtual ~AwbAlgorithm() = default;
virtual int init(const YamlObject &tuningData) = 0;
- virtual AwbResult calculateAwb(const AwbStats &stats, int lux) = 0;
+ virtual AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) = 0;
virtual RGB<double> gainsFromColourTemperature(double colourTemperature) = 0;
const ControlInfoMap::Map &controls() const
diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp
index e75bfcd6..9287b884 100644
--- a/src/ipa/libipa/awb_bayes.cpp
+++ b/src/ipa/libipa/awb_bayes.cpp
@@ -275,7 +275,7 @@ RGB<double> AwbBayes::gainsFromColourTemperature(double colourTemperature)
return { { gains[0], 1.0, gains[1] } };
}
-AwbResult AwbBayes::calculateAwb(const AwbStats &stats, int lux)
+AwbResult AwbBayes::calculateAwb(const AwbStats &stats, unsigned int lux)
{
ipa::Pwl prior;
if (lux > 0) {
diff --git a/src/ipa/libipa/awb_bayes.h b/src/ipa/libipa/awb_bayes.h
index 47db7243..23bf8806 100644
--- a/src/ipa/libipa/awb_bayes.h
+++ b/src/ipa/libipa/awb_bayes.h
@@ -34,7 +34,7 @@ public:
AwbBayes() = default;
int init(const YamlObject &tuningData) override;
- AwbResult calculateAwb(const AwbStats &stats, int lux) override;
+ AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;
RGB<double> gainsFromColourTemperature(double temperatureK) override;
void handleControls(const ControlList &controls) override;
diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp
index 06ffd456..e979cc4d 100644
--- a/src/ipa/libipa/awb_grey.cpp
+++ b/src/ipa/libipa/awb_grey.cpp
@@ -70,7 +70,7 @@ int AwbGrey::init(const YamlObject &tuningData)
*
* \return The AWB result
*/
-AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] int lux)
+AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux)
{
AwbResult result;
auto means = stats.getRGBMeans();
diff --git a/src/ipa/libipa/awb_grey.h b/src/ipa/libipa/awb_grey.h
index 1a365e61..e3c34201 100644
--- a/src/ipa/libipa/awb_grey.h
+++ b/src/ipa/libipa/awb_grey.h
@@ -23,7 +23,7 @@ public:
AwbGrey() = default;
int init(const YamlObject &tuningData) override;
- AwbResult calculateAwb(const AwbStats &stats, int lux) override;
+ AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;
RGB<double> gainsFromColourTemperature(double colourTemperature) override;
private: