diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2021-01-25 18:48:57 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-01-26 10:46:10 +0200 |
commit | d97b1bcd2a756dbbd12b14f462dcf7620adabe14 (patch) | |
tree | 120f8d64b3aec2e49045daf835fa351e980b818f /src/ipa/raspberrypi/controller/rpi/geq.cpp | |
parent | eb605eab5b3df765082549bda2dc45215cda16f9 (diff) |
ipa: raspberrypi: Replace Raspberry Pi debug with libcamera debug
This commit deals with all the "small" algorithms (that is, not
Agc/Awb/Alsc). A few unnecessary debug messages have also been
removed.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/geq.cpp')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/geq.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp index b6c98414..5eff116c 100644 --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp @@ -5,14 +5,18 @@ * geq.cpp - GEQ (green equalisation) control algorithm */ +#include "libcamera/internal/log.h" + #include "../device_status.h" -#include "../logging.hpp" #include "../lux_status.h" #include "../pwl.hpp" #include "geq.hpp" using namespace RPiController; +using namespace libcamera; + +LOG_DEFINE_CATEGORY(RPiGeq) // We use the lux status so that we can apply stronger settings in darkness (if // necessary). @@ -44,11 +48,12 @@ void Geq::Prepare(Metadata *image_metadata) LuxStatus lux_status = {}; lux_status.lux = 400; if (image_metadata->Get("lux.status", lux_status)) - RPI_WARN("Geq: no lux data found"); + LOG(RPiGeq, Warning) << "no lux data found"; DeviceStatus device_status = {}; device_status.analogue_gain = 1.0; // in case not found if (image_metadata->Get("device.status", device_status)) - RPI_WARN("Geq: no device metadata - use analogue gain of 1x"); + LOG(RPiGeq, Warning) + << "no device metadata - use analogue gain of 1x"; GeqStatus geq_status = {}; double strength = config_.strength.Empty() @@ -60,10 +65,11 @@ void Geq::Prepare(Metadata *image_metadata) double slope = config_.slope * strength; geq_status.offset = std::min(65535.0, std::max(0.0, offset)); geq_status.slope = std::min(.99999, std::max(0.0, slope)); - RPI_LOG("Geq: offset " << geq_status.offset << " slope " - << geq_status.slope << " (analogue gain " - << device_status.analogue_gain << " lux " - << lux_status.lux << ")"); + LOG(RPiGeq, Debug) + << "offset " << geq_status.offset << " slope " + << geq_status.slope << " (analogue gain " + << device_status.analogue_gain << " lux " + << lux_status.lux << ")"; image_metadata->Set("geq.status", geq_status); } |