libcamera: software_isp: Use a specific integer type for black level
The documented range of values corresponds to uint8_t, so let's use that type. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
aad5837d70
commit
738bd37905
2 changed files with 4 additions and 3 deletions
|
@ -43,7 +43,7 @@ BlackLevel::BlackLevel()
|
||||||
* \return The black level, in the range from 0 (minimum) to 255 (maximum).
|
* \return The black level, in the range from 0 (minimum) to 255 (maximum).
|
||||||
* If the black level couldn't be determined yet, return 0.
|
* If the black level couldn't be determined yet, return 0.
|
||||||
*/
|
*/
|
||||||
unsigned int BlackLevel::get() const
|
uint8_t BlackLevel::get() const
|
||||||
{
|
{
|
||||||
return blackLevelSet_ ? blackLevel_ : 0;
|
return blackLevelSet_ ? blackLevel_ : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "libcamera/internal/software_isp/swisp_stats.h"
|
#include "libcamera/internal/software_isp/swisp_stats.h"
|
||||||
|
|
||||||
|
@ -17,11 +18,11 @@ class BlackLevel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BlackLevel();
|
BlackLevel();
|
||||||
unsigned int get() const;
|
uint8_t get() const;
|
||||||
void update(SwIspStats::Histogram &yHistogram);
|
void update(SwIspStats::Histogram &yHistogram);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int blackLevel_;
|
uint8_t blackLevel_;
|
||||||
bool blackLevelSet_;
|
bool blackLevelSet_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue