mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 17:05:08 +03:00
ipa: rkisp1: lsc: Use double instead of float to accumulate vector of doubles
clang-tidy's bugprone-fold-init-type check warns about this:
> ../src/ipa/rkisp1/algorithms/lsc.cpp:61:14: warning: folding type 'double' into type 'float' might result in loss of precision [bugprone-fold-init-type]
> float sum = std::accumulate(sizes.begin(), sizes.end(), 0.0f);
> ^
Fixes: b3e96411d8
("ipa: rkisp1: Add support of Lens Shading Correction control")
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
372621352d
commit
68683d3811
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ static std::vector<double> parseSizes(const YamlObject &tuningData,
|
|||
* prevent an exact match (further adjustments will be performed in
|
||||
* LensShadingCorrection::prepare()).
|
||||
*/
|
||||
float sum = std::accumulate(sizes.begin(), sizes.end(), 0.0f);
|
||||
double sum = std::accumulate(sizes.begin(), sizes.end(), 0.0);
|
||||
if (sum < 0.495 || sum > 0.505) {
|
||||
LOG(RkISP1Lsc, Error)
|
||||
<< "Invalid '" << prop << "' values: sum of the elements"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue