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>
This commit is contained in:
parent
eb605eab5b
commit
d97b1bcd2a
9 changed files with 97 additions and 45 deletions
|
@ -5,12 +5,17 @@
|
|||
* sdn.cpp - SDN (spatial denoise) control algorithm
|
||||
*/
|
||||
|
||||
#include "libcamera/internal/log.h"
|
||||
|
||||
#include "../noise_status.h"
|
||||
#include "../sdn_status.h"
|
||||
|
||||
#include "sdn.hpp"
|
||||
|
||||
using namespace RPiController;
|
||||
using namespace libcamera;
|
||||
|
||||
LOG_DEFINE_CATEGORY(RPiSdn)
|
||||
|
||||
// Calculate settings for the spatial denoise block using the noise profile in
|
||||
// the image metadata.
|
||||
|
@ -40,19 +45,19 @@ void Sdn::Prepare(Metadata *image_metadata)
|
|||
struct NoiseStatus noise_status = {};
|
||||
noise_status.noise_slope = 3.0; // in case no metadata
|
||||
if (image_metadata->Get("noise.status", noise_status) != 0)
|
||||
RPI_WARN("Sdn: no noise profile found");
|
||||
RPI_LOG("Noise profile: constant " << noise_status.noise_constant
|
||||
<< " slope "
|
||||
<< noise_status.noise_slope);
|
||||
LOG(RPiSdn, Warning) << "no noise profile found";
|
||||
LOG(RPiSdn, Debug)
|
||||
<< "Noise profile: constant " << noise_status.noise_constant
|
||||
<< " slope " << noise_status.noise_slope;
|
||||
struct SdnStatus status;
|
||||
status.noise_constant = noise_status.noise_constant * deviation_;
|
||||
status.noise_slope = noise_status.noise_slope * deviation_;
|
||||
status.strength = strength_;
|
||||
image_metadata->Set("sdn.status", status);
|
||||
RPI_LOG("Sdn: programmed constant " << status.noise_constant
|
||||
<< " slope " << status.noise_slope
|
||||
<< " strength "
|
||||
<< status.strength);
|
||||
LOG(RPiSdn, Debug)
|
||||
<< "programmed constant " << status.noise_constant
|
||||
<< " slope " << status.noise_slope
|
||||
<< " strength " << status.strength;
|
||||
}
|
||||
|
||||
// Register algorithm with the system.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue