ipa: raspberrypi: Rename SdnStatus to DenoiseStatus

This change is in anticipation of the addition of a DenoiseAlgorithm
base class which the SDN class will derive from. We want to match the
metadata object name with the base class algorithm name.

This renames:
- SdnStatus metadata object to DenoiseStatus
- "sdn.status" metadata string key to "denoise.status"
- sdn_status.h header file to denoise_status.h

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-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:
Naushir Patuck
2021-02-08 15:07:36 +00:00
committed by Laurent Pinchart
parent 1c362b7855
commit 44ea5b65c8
3 changed files with 11 additions and 11 deletions
@@ -1,18 +1,18 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2019, Raspberry Pi (Trading) Limited
* Copyright (C) 2019-2021, Raspberry Pi (Trading) Limited
*
* sdn_status.h - SDN (spatial denoise) control algorithm status
* denoise_status.h - Denoise control algorithm status
*/
#pragma once
// This stores the parameters required for Spatial Denoise (SDN).
// This stores the parameters required for Denoise.
#ifdef __cplusplus
extern "C" {
#endif
struct SdnStatus {
struct DenoiseStatus {
double noise_constant;
double noise_slope;
double strength;
+3 -3
View File
@@ -7,8 +7,8 @@
#include "libcamera/internal/log.h"
#include "../denoise_status.h"
#include "../noise_status.h"
#include "../sdn_status.h"
#include "sdn.hpp"
@@ -49,11 +49,11 @@ void Sdn::Prepare(Metadata *image_metadata)
LOG(RPiSdn, Debug)
<< "Noise profile: constant " << noise_status.noise_constant
<< " slope " << noise_status.noise_slope;
struct SdnStatus status;
struct DenoiseStatus 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);
image_metadata->Set("denoise.status", status);
LOG(RPiSdn, Debug)
<< "programmed constant " << status.noise_constant
<< " slope " << status.noise_slope