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>
This commit is contained in:
parent
1a948d5457
commit
6981a5169b
5 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue