[{"id":5336,"web_url":"https://patchwork.libcamera.org/comment/5336/","msgid":"<20200622230555.GL5852@pendragon.ideasonboard.com>","date":"2020-06-22T23:05:55","subject":"Re: [libcamera-devel] [PATCH v2 4/4] libcamera: ipa: raspberrypi:\n\tplumb the libcamera sharpness control through to the Raspberry Pi\n\timplementation","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\nSame comment as for patch 3/4, maybe the subject line could be shortened\nto \"libcamera: ipa: raspberrypi: Plumb the libcamera sharpness control\" ?\n\nOn Mon, Jun 22, 2020 at 02:55:50PM +0100, David Plowman wrote:\n> This simply wires up the libcamera sharpness control in the Raspberry\n> Pi IPAs so that it controls the strength of the Raspberry Pi sharpness\n> control algorithm.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/libcamera/ipa/raspberrypi.h |  1 +\n>  src/ipa/raspberrypi/raspberrypi.cpp | 12 ++++++++++++\n>  2 files changed, 13 insertions(+)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index c109469..a18ce9a 100644\n> --- a/include/libcamera/ipa/raspberrypi.h\n> +++ b/include/libcamera/ipa/raspberrypi.h\n> @@ -51,6 +51,7 @@ static const ControlInfoMap RPiControls = {\n>  \t{ &controls::Brightness, ControlInfo(-1.0f, 1.0f) },\n>  \t{ &controls::Contrast, ControlInfo(0.0f, 32.0f) },\n>  \t{ &controls::Saturation, ControlInfo(0.0f, 32.0f) },\n> +\t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 42c84b1..bc89ab5 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -47,6 +47,7 @@\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>  namespace libcamera {\n> @@ -633,6 +634,17 @@ void IPARPi::queueRequest(const ControlList &controls)\n>  \t\t\tbreak;\n>  \t\t}\n>  \n> +\t\tcase controls::SHARPNESS: {\n> +\t\t\tRPi::SharpenAlgorithm *sharpen = dynamic_cast<RPi::SharpenAlgorithm *>(\n> +\t\t\t\tcontroller_.GetAlgorithm(\"sharpen\"));\n> +\t\t\tASSERT(sharpen);\n> +\n> +\t\t\tsharpen->SetStrength(ctrl.second.get<float>());\n> +\t\t\tlibcameraMetadata_.set(controls::Sharpness,\n> +\t\t\t\t\t       ctrl.second.get<float>());\n> +\t\t\tbreak;\n> +\t\t}\n> +\n>  \t\tdefault:\n>  \t\t\tLOG(IPARPI, Warning)\n>  \t\t\t\t<< \"Ctrl \" << controls::controls.at(ctrl.first)->name()","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 859E8603BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jun 2020 01:06:20 +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 25A81327;\n\tTue, 23 Jun 2020 01:06:20 +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=\"pG+REHo0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592867180;\n\tbh=agLGIBDKS0TKCfk8VIkkmB3KXRiUnse1EWQaYZ3moaI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pG+REHo0hG4G/kPLDPjjzK3SLVMZtJmtLxVv1xHQNxDUHgV71a/zhWPCkSP9YLrxX\n\tJ0xi4rZ1dgmml2xDor4O0E6TglJaEM9Auj03sej/1jp8L4eeIyVcsFDVrK6ECtNWkg\n\tSeICWAZuapAA1u6D6C2N5Qf+U36H32z54809/vGc=","Date":"Tue, 23 Jun 2020 02:05:55 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200622230555.GL5852@pendragon.ideasonboard.com>","References":"<20200622135550.10788-1-david.plowman@raspberrypi.com>\n\t<20200622135550.10788-5-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200622135550.10788-5-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v2 4/4] libcamera: ipa: raspberrypi:\n\tplumb the libcamera sharpness control through to the Raspberry Pi\n\timplementation","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 23:06:20 -0000"}}]