{"id":14321,"url":"https://patchwork.libcamera.org/api/patches/14321/?format=json","web_url":"https://patchwork.libcamera.org/patch/14321/","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":"<20211026095534.90348-11-jeanmichel.hautbois@ideasonboard.com>","date":"2021-10-26T09:55:25","name":"[libcamera-devel,v4,10/19] ipa: ipu3: tonemapping: Add the documentation for ToneMapping","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e31ced11b9544732c119a48b97b899af421b56a7","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14321/mbox/","series":[{"id":2656,"url":"https://patchwork.libcamera.org/api/series/2656/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2656","date":"2021-10-26T09:55:15","name":"Document IPU3 IPA","version":4,"mbox":"https://patchwork.libcamera.org/series/2656/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14321/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14321/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 1141CBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Oct 2021 09:55:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9EB7B64895;\n\tTue, 26 Oct 2021 11:55:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8197F6487E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Oct 2021 11:55:46 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:dce3:eb54:18d7:6f3d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3374AE79;\n\tTue, 26 Oct 2021 11:55:46 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MpKP3Pli\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635242146;\n\tbh=7BGr7hiTSDbpG7tzJHV7R/26QoDeqAxF3NbLgzjonZY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=MpKP3PliVsikYi47Uuwbwb6pYjvKk2hPDyau/FRXUvy5WMkwgVOBi/zzupUSuyeRJ\n\tUzQ/nqFlBtR8SgpV1LjaLTBe4mM5/HqbLSi5JRQtajRuzsq7E+4jCHfS9EhJYMwTwN\n\tu+VsMqUQ5ur4dwBxwWrrsQCmRvAnwcw8R/RMoYUc=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 26 Oct 2021 11:55:25 +0200","Message-Id":"<20211026095534.90348-11-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211026095534.90348-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20211026095534.90348-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 10/19] ipa: ipu3: tonemapping: Add the\n\tdocumentation for ToneMapping","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The tone mapping algorithm is currently undocumented.\n\nProvide an introduction and overview to the implementation as the class\ndefinition and document how the algorithm operates in the process and\nprepare methods.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nv3:\n- rename gamma control as tone mapping\n---\n src/ipa/ipu3/algorithms/tone_mapping.cpp | 30 +++++++++++++++++++++++-\n 1 file changed, 29 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp\nindex fcd22d0b..2040eda5 100644\n--- a/src/ipa/ipu3/algorithms/tone_mapping.cpp\n+++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp\n@@ -10,10 +10,22 @@\n #include <cmath>\n #include <string.h>\n \n+/**\n+ * \\file tone_mapping.h\n+ */\n+\n namespace libcamera {\n \n namespace ipa::ipu3::algorithms {\n \n+/**\n+ * \\class ToneMapping\n+ * \\brief A class to handle tone mapping based on gamma\n+ *\n+ * This algorithm improves the image dynamic using a look-up table which is\n+ * generated based on a gamma parameter.\n+ */\n+\n ToneMapping::ToneMapping()\n \t: gamma_(1.0)\n {\n@@ -35,6 +47,14 @@ int ToneMapping::configure(IPAContext &context,\n \treturn 0;\n }\n \n+/**\n+ * \\brief Fill in the parameter structure, and enable gamma control\n+ * \\param context The shared IPA context\n+ * \\param params The IPU3 parameters\n+ *\n+ * Populate the IPU3 parameter structure with our tone mapping look up table and\n+ * enable the gamma control module in the processing blocks.\n+ */\n void ToneMapping::prepare([[maybe_unused]] IPAContext &context,\n \t\t\t  ipu3_uapi_params *params)\n {\n@@ -49,7 +69,15 @@ void ToneMapping::prepare([[maybe_unused]] IPAContext &context,\n \tparams->acc_param.gamma.gc_ctrl.enable = 1;\n }\n \n-void ToneMapping::process([[maybe_unused]] IPAContext &context,\n+/**\n+ * \\brief Calculate the tone mapping look up table\n+ * \\param context The shared IPA context\n+ * \\param stats The IPU3 statistics and ISP results\n+ *\n+ * The tone mapping look up table is generated as an inverse power curve from\n+ * our gamma setting.\n+ */\n+void ToneMapping::process(IPAContext &context,\n \t\t\t  [[maybe_unused]] const ipu3_uapi_stats_3a *stats)\n {\n \t/*\n","prefixes":["libcamera-devel","v4","10/19"]}