[{"id":5334,"web_url":"https://patchwork.libcamera.org/comment/5334/","msgid":"<20200622224714.GJ5852@pendragon.ideasonboard.com>","date":"2020-06-22T22:47:14","subject":"Re: [libcamera-devel] [PATCH v2 2/4] libcamera: ipa: raspberrypi:\n\tmake sharpening mode_factor an ordinary double","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch.\n\nOn Mon, Jun 22, 2020 at 02:55:48PM +0100, David Plowman wrote:\n> No need for it to be std::atomic as SwitchMode runs synchronously with\n> Prepare.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp | 7 +++----\n>  src/ipa/raspberrypi/controller/rpi/sharpen.hpp | 2 +-\n>  2 files changed, 4 insertions(+), 5 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> index 086952f..4c2fdb3 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> @@ -44,13 +44,12 @@ void Sharpen::Read(boost::property_tree::ptree const &params)\n>  \n>  void Sharpen::Prepare(Metadata *image_metadata)\n>  {\n> -\tdouble mode_factor = mode_factor_;\n>  \tstruct SharpenStatus status;\n>  \t// Binned modes seem to need the sharpening toned down with this\n>  \t// pipeline.\n> -\tstatus.threshold = threshold_ * mode_factor;\n> -\tstatus.strength = strength_ / mode_factor;\n> -\tstatus.limit = limit_ / mode_factor;\n> +\tstatus.threshold = threshold_ * mode_factor_;\n> +\tstatus.strength = strength_ / mode_factor_;\n> +\tstatus.limit = limit_ / mode_factor_;\n>  \timage_metadata->Set(\"sharpen.status\", status);\n>  }\n>  \n> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.hpp b/src/ipa/raspberrypi/controller/rpi/sharpen.hpp\n> index f871aa6..a3bf899 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.hpp\n> @@ -26,7 +26,7 @@ private:\n>  \tdouble threshold_;\n>  \tdouble strength_;\n>  \tdouble limit_;\n> -\tstd::atomic<double> mode_factor_;\n> +\tdouble mode_factor_;\n>  };\n>  \n>  } // namespace RPi","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 888E4603BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jun 2020 00:47:39 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 02701327;\n\tTue, 23 Jun 2020 00:47:38 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Fb1U5r84\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592866059;\n\tbh=cXokWyqwwFO0gBMJfRUO8FUmhnRPfyFU9Ty03jku0BE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Fb1U5r84bhMOHrk/iuaOfTTd1O3sJZm5MbmDVeyf15d8s8CNkeE2GU9xIyX56Md4/\n\tMRo7ckQVStShrSMv9jp5kSrYZjGjLsdFmarjUAGVmrYC6kYQieiCWOVxVXCCmsn9Dl\n\twgZRPNUFkn/fkvuP4LDxDdhYayCDhAnFtPYCBKmY=","Date":"Tue, 23 Jun 2020 01:47:14 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200622224714.GJ5852@pendragon.ideasonboard.com>","References":"<20200622135550.10788-1-david.plowman@raspberrypi.com>\n\t<20200622135550.10788-3-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200622135550.10788-3-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v2 2/4] libcamera: ipa: raspberrypi:\n\tmake sharpening mode_factor an ordinary double","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>","X-List-Received-Date":"Mon, 22 Jun 2020 22:47:39 -0000"}}]