{"id":10948,"url":"https://patchwork.libcamera.org/api/patches/10948/?format=json","web_url":"https://patchwork.libcamera.org/patch/10948/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210122092537.708375-5-naush@raspberrypi.com>","date":"2021-01-22T09:25:35","name":"[libcamera-devel,v2,4/6] ipa: raspberrypi: Rename SdnStatus to DenoiseStatus","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"705c4ce75834921bfaa0ccb1470c8dde91f102bd","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10948/mbox/","series":[{"id":1596,"url":"https://patchwork.libcamera.org/api/series/1596/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1596","date":"2021-01-22T09:25:31","name":"Raspberry Pi: Colour denoise","version":2,"mbox":"https://patchwork.libcamera.org/series/1596/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10948/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10948/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EB83EBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jan 2021 09:25:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A9DA46823F;\n\tFri, 22 Jan 2021 10:25:49 +0100 (CET)","from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 61A6C68237\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 10:25:47 +0100 (CET)","by mail-wr1-x430.google.com with SMTP id 6so4391133wri.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 01:25:47 -0800 (PST)","from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\th15sm10664801wru.4.2021.01.22.01.25.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Jan 2021 01:25:46 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"PfswshWR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Vzzrj/KlOj+CqFi/Wht/455yZW2spTHYWAEfF1rC0TE=;\n\tb=PfswshWRNP2XAReGXK4hN01ZQ+YHrUq/+6RzmQrEI+NbPv9BTXpQzp9bRNMzQOytcP\n\tTg0JTBgDcSZTSe5yV+4W4iCoyasGxB93/udNiqKTngOL0T0q2LHjUrOSEMq2DueOo5FG\n\tHqlVwvREqpZbZkrlJGdl3DWDABdNUYzMkYNXNttZZBu2zbKIe8+bpqJRt5luH1N+lyV7\n\tihq+uqVxwPfQ7qSFhtI24CGuOivlLrTBRfklOqjoFmzl01MuB4URXeOMUWVrIdx/B1Bc\n\tpUvJvPNCgakItb2/mMyTL0KdKQkCburfBX/0tZ2KwUL8x+8nordej6BjJKCn55vYi757\n\tMfBg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=Vzzrj/KlOj+CqFi/Wht/455yZW2spTHYWAEfF1rC0TE=;\n\tb=RF/n7bf965KmSv852jto7mmUHft5b9XvC6xZ+XAN8AyO2NLNBsIV3STCpjpQz9mNGv\n\t/FxTePuDK9GTUW8+g4eiIhPUzWrRJ9xk00A7FAyXtVs68GbQYeTxGitWwR9SOS0qHOcc\n\tg1g//HCQkEtOH/AlNl7MpLnFanCGg4F3GZ6FkbWmLJxdHeCjtFuZopqiAVcaQMCpNJbO\n\tVvNPpe2xt4VEppI0zoL8ZBs0+5z81pdh6ecMqfg5K5S59Jyrbgz4WvkFmmxnfYPGsshu\n\td+q4lJBrv2wyeAsuHwwum4S3DJCZYCvcKN1H9JaRzD3ZMA0koRrS91PhxtBmFEvF59sI\n\tDpqg==","X-Gm-Message-State":"AOAM531zlljaAedqz2iU1GAw0du6TWV8KKhS37hjwq5Or3d1ymYxNata\n\tEWOZvqx3HklLPiToXItGzMq9crbvslfOVw==","X-Google-Smtp-Source":"ABdhPJwPdQfSqoxqPwR5ztpK0HeCL0bWlbMH4I085K6OnCmq/RYKvEOO0q2BOUqhw52oNPl/uGiUKw==","X-Received":"by 2002:adf:80d0:: with SMTP id 74mr3621348wrl.110.1611307546876;\n\tFri, 22 Jan 2021 01:25:46 -0800 (PST)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 22 Jan 2021 09:25:35 +0000","Message-Id":"<20210122092537.708375-5-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210122092537.708375-1-naush@raspberrypi.com>","References":"<20210122092537.708375-1-naush@raspberrypi.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 4/6] ipa: raspberrypi: Rename SdnStatus\n\tto DenoiseStatus","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This change is in anticipation of the addition of a DenoiseAlgorithm\nbase class which the SDN class will derive from. We want to match the\nmetadata object name with the base class algorithm name.\n\nThis renames:\n- SdnStatus metadata object to DenoiseStatus\n- \"sdn.status\" metadata string key to \"denoise.status\"\n- sdn_status.h header file to denoise_status.h\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../controller/{sdn_status.h => denoise_status.h}         | 6 +++---\n src/ipa/raspberrypi/controller/rpi/sdn.cpp                | 6 +++---\n src/ipa/raspberrypi/raspberrypi.cpp                       | 8 ++++----\n 3 files changed, 10 insertions(+), 10 deletions(-)\n rename src/ipa/raspberrypi/controller/{sdn_status.h => denoise_status.h} (65%)","diff":"diff --git a/src/ipa/raspberrypi/controller/sdn_status.h b/src/ipa/raspberrypi/controller/denoise_status.h\nsimilarity index 65%\nrename from src/ipa/raspberrypi/controller/sdn_status.h\nrename to src/ipa/raspberrypi/controller/denoise_status.h\nindex 871e0b62af1f..06d7cfb91ae8 100644\n--- a/src/ipa/raspberrypi/controller/sdn_status.h\n+++ b/src/ipa/raspberrypi/controller/denoise_status.h\n@@ -1,8 +1,8 @@\n /* SPDX-License-Identifier: BSD-2-Clause */\n /*\n- * Copyright (C) 2019, Raspberry Pi (Trading) Limited\n+ * Copyright (C) 2019-2021, Raspberry Pi (Trading) Limited\n  *\n- * sdn_status.h - SDN (spatial denoise) control algorithm status\n+ * denoise_status.h - Spatial Denoise control algorithm status\n  */\n #pragma once\n \n@@ -12,7 +12,7 @@\n extern \"C\" {\n #endif\n \n-struct SdnStatus {\n+struct DenoiseStatus {\n \tdouble noise_constant;\n \tdouble noise_slope;\n \tdouble strength;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\nindex aa82830b02b4..d8c1521a6633 100644\n--- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n@@ -5,8 +5,8 @@\n  * sdn.cpp - SDN (spatial denoise) control algorithm\n  */\n \n+#include \"../denoise_status.h\"\n #include \"../noise_status.h\"\n-#include \"../sdn_status.h\"\n \n #include \"sdn.hpp\"\n \n@@ -44,11 +44,11 @@ void Sdn::Prepare(Metadata *image_metadata)\n \tRPI_LOG(\"Noise profile: constant \" << noise_status.noise_constant\n \t\t\t\t\t   << \" slope \"\n \t\t\t\t\t   << noise_status.noise_slope);\n-\tstruct SdnStatus status;\n+\tstruct DenoiseStatus status;\n \tstatus.noise_constant = noise_status.noise_constant * deviation_;\n \tstatus.noise_slope = noise_status.noise_slope * deviation_;\n \tstatus.strength = strength_;\n-\timage_metadata->Set(\"sdn.status\", status);\n+\timage_metadata->Set(\"denoise.status\", status);\n \tRPI_LOG(\"Sdn: programmed constant \" << status.noise_constant\n \t\t\t\t\t    << \" slope \" << status.noise_slope\n \t\t\t\t\t    << \" strength \"\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 5ccc7a6551f5..220cf174aa4f 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -43,13 +43,13 @@\n #include \"contrast_algorithm.hpp\"\n #include \"contrast_status.h\"\n #include \"controller.hpp\"\n+#include \"denoise_status.h\"\n #include \"dpc_status.h\"\n #include \"focus_status.h\"\n #include \"geq_status.h\"\n #include \"lux_status.h\"\n #include \"metadata.hpp\"\n #include \"noise_status.h\"\n-#include \"sdn_status.h\"\n #include \"sharpen_algorithm.hpp\"\n #include \"sharpen_status.h\"\n \n@@ -109,7 +109,7 @@ private:\n \tvoid applyBlackLevel(const struct BlackLevelStatus *blackLevelStatus, ControlList &ctrls);\n \tvoid applyGamma(const struct ContrastStatus *contrastStatus, ControlList &ctrls);\n \tvoid applyGEQ(const struct GeqStatus *geqStatus, ControlList &ctrls);\n-\tvoid applyDenoise(const struct SdnStatus *denoiseStatus, ControlList &ctrls);\n+\tvoid applyDenoise(const struct DenoiseStatus *denoiseStatus, ControlList &ctrls);\n \tvoid applySharpen(const struct SharpenStatus *sharpenStatus, ControlList &ctrls);\n \tvoid applyDPC(const struct DpcStatus *dpcStatus, ControlList &ctrls);\n \tvoid applyLS(const struct AlscStatus *lsStatus, ControlList &ctrls);\n@@ -899,7 +899,7 @@ void IPARPi::prepareISP(unsigned int bufferId)\n \t\tif (geqStatus)\n \t\t\tapplyGEQ(geqStatus, ctrls);\n \n-\t\tSdnStatus *denoiseStatus = rpiMetadata_.GetLocked<SdnStatus>(\"sdn.status\");\n+\t\tDenoiseStatus *denoiseStatus = rpiMetadata_.GetLocked<DenoiseStatus>(\"denoise.status\");\n \t\tif (denoiseStatus)\n \t\t\tapplyDenoise(denoiseStatus, ctrls);\n \n@@ -1083,7 +1083,7 @@ void IPARPi::applyGEQ(const struct GeqStatus *geqStatus, ControlList &ctrls)\n \tctrls.set(V4L2_CID_USER_BCM2835_ISP_GEQ, c);\n }\n \n-void IPARPi::applyDenoise(const struct SdnStatus *denoiseStatus, ControlList &ctrls)\n+void IPARPi::applyDenoise(const struct DenoiseStatus *denoiseStatus, ControlList &ctrls)\n {\n \tbcm2835_isp_denoise denoise;\n \n","prefixes":["libcamera-devel","v2","4/6"]}