{"id":14276,"url":"https://patchwork.libcamera.org/api/1.1/patches/14276/?format=json","web_url":"https://patchwork.libcamera.org/patch/14276/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20211022151218.111966-11-jeanmichel.hautbois@ideasonboard.com>","date":"2021-10-22T15:12:09","name":"[libcamera-devel,v3,10/19] ipa: ipu3: tonemapping: Add the documentation for ToneMapping","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"e31ced11b9544732c119a48b97b899af421b56a7","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14276/mbox/","series":[{"id":2651,"url":"https://patchwork.libcamera.org/api/1.1/series/2651/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2651","date":"2021-10-22T15:11:59","name":"Document IPU3 IPA","version":3,"mbox":"https://patchwork.libcamera.org/series/2651/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14276/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14276/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 4EC9BBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 15:12:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D789068F5F;\n\tFri, 22 Oct 2021 17:12:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9B94768F61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 17:12:24 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:22cc:3af6:5ccb:8367])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5789589A;\n\tFri, 22 Oct 2021 17:12:24 +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=\"Z3G7Deic\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634915544;\n\tbh=Tb9dRQeJyDC3AgsvHNbwtAsmSbnWX4N9gmEtYX7HEIo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Z3G7DeiczLrVuzvI4yJ9xO/Vh7G2OySM2kwsSfuLTocrZkYE9rTpJdTsbt1Yt0Fyj\n\tW9UNn4LuwEb8qQWIUQMtEGNc75OYWykUOHPYPqCBK6isHOWKqzB60ud7npqRnDZeao\n\t7d95T/xuyzBl+8SkwYQ86ON5Zs+LaZ2B2N60ZcJQ=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 22 Oct 2021 17:12:09 +0200","Message-Id":"<20211022151218.111966-11-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211022151218.111966-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20211022151218.111966-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 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>\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 8fa8c7e9..832e5670 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","v3","10/19"]}