As explained in the coding style document, usage of std::abs() is
preferred over abs() or fabs() as it picks the correct function based on
the argument type. Replace calls to abs() and fabs() with std::abs() in
the Raspberry Pi algorithms.
This fixes a reported warning from clang:
../src/ipa/rpi/controller/rpi/awb.cpp:508:6: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
if (abs(denominator) > eps) {
^
../src/ipa/rpi/controller/rpi/awb.cpp:508:6: note: use function 'std::abs' instead
if (abs(denominator) > eps) {
^~~
std::abs
Reported-by: Maarten Lankhorst <dev@lankhorst.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
.. SPDX-License-Identifier: BSD-2-Clause
libcamera for the Raspberry Pi
Raspberry Pi provides a fully featured pipeline handler and control algorithms (IPAs, or "Image Processing Algorithms") to work with libcamera. Support is included for all existing Raspberry Pi camera modules.
libcamera for the Raspberry Pi allows users to:
- Use their existing Raspberry Pi cameras.
- Change the tuning of the image processing for their Raspberry Pi cameras.
- Alter or amend the control algorithms (such as AGC/AEC, AWB or any others) that control the sensor and ISP.
- Implement their own custom control algorithms.
- Supply new tunings and/or algorithms for completely new sensors.
How to install and run libcamera on the Raspberry Pi
Please follow the instructions here.
Documentation
Full documentation for the Raspberry Pi Camera Algorithm and Tuning Guide can be found here.