{"id":20094,"url":"https://patchwork.libcamera.org/api/1.1/patches/20094/?format=json","web_url":"https://patchwork.libcamera.org/patch/20094/","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":"<20240523112656.559150-5-mzamazal@redhat.com>","date":"2024-05-23T11:26:55","name":"[v3,4/5] libcamera: software_isp: Remove DebayerParams::kGain10","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8166baf2e1ec9ce6d394e405972948e4127fc935","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/1.1/people/177/?format=json","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20094/mbox/","series":[{"id":4323,"url":"https://patchwork.libcamera.org/api/1.1/series/4323/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4323","date":"2024-05-23T11:26:51","name":"Software ISP levels cleanup","version":3,"mbox":"https://patchwork.libcamera.org/series/4323/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20094/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20094/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 E6FD3BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 May 2024 11:27:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CDD1A634AA;\n\tThu, 23 May 2024 13:27:35 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 97720634A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 May 2024 13:27:30 +0200 (CEST)","from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-57-yCq1eVefPOmEpqaBlVUw3Q-1; Thu, 23 May 2024 07:27:25 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DE0585A58C;\n\tThu, 23 May 2024 11:27:25 +0000 (UTC)","from nuthatch.redhat.com (unknown [10.45.226.101])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 516CB2026D68;\n\tThu, 23 May 2024 11:27:24 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"TWSZpAl3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1716463649;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=GFE8obJIxpEiOdx2OVXRa2I77214va2tRKqE7Ik7ptw=;\n\tb=TWSZpAl3+Gq6RRyZXQ3o//1V2Y9mSItHuWqcb9eEEpUmeTNJ1SeAEcqO8Qum/iDkoBNoBP\n\tFaoYtIT+WbC3OmpwxxBg6QSDueLbVn4C6HwNU+iYjAiZlQ63IZDu6DqobVTH4G14VU3/RK\n\t74noWZPXdOREoKMyGCamvUIJzzmi2cg=","X-MC-Unique":"yCq1eVefPOmEpqaBlVUw3Q-1","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tAndrei Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v3 4/5] libcamera: software_isp: Remove\n\tDebayerParams::kGain10","Date":"Thu, 23 May 2024 13:26:55 +0200","Message-ID":"<20240523112656.559150-5-mzamazal@redhat.com>","In-Reply-To":"<20240523112656.559150-1-mzamazal@redhat.com>","References":"<20240523112656.559150-1-mzamazal@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.11.54.4","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain; charset=\"US-ASCII\"; x-default=true","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 constant is used in a single place internally and doesn't belong to\nDebayerParams anymore.  Let's use 256 directly.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 1 -\n src/ipa/simple/soft_simple.cpp                           | 3 +--\n src/libcamera/software_isp/debayer.cpp                   | 5 -----\n 3 files changed, 1 insertion(+), 8 deletions(-)","diff":"diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 463d24b3..7d8fdd48 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -16,7 +16,6 @@\n namespace libcamera {\n \n struct DebayerParams {\n-\tstatic constexpr unsigned int kGain10 = 256;\n \tstatic constexpr unsigned int kRGBLookupSize = 256;\n \n \tusing ColorLookupTable = std::array<uint8_t, kRGBLookupSize>;\ndiff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\nindex 1b0655fe..cd89e673 100644\n--- a/src/ipa/simple/soft_simple.cpp\n+++ b/src/ipa/simple/soft_simple.cpp\n@@ -290,8 +290,7 @@ void IPASoftSimple::processStats(const ControlList &sensorControls)\n \n \tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n \t\tconstexpr unsigned int div =\n-\t\t\tDebayerParams::kRGBLookupSize * DebayerParams::kGain10 /\n-\t\t\tkGammaLookupSize;\n+\t\t\tDebayerParams::kRGBLookupSize * 256 / kGammaLookupSize;\n \t\tunsigned int idx;\n \n \t\t/* Apply gamma after gain! */\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 3f3969f7..f4a299d5 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -18,11 +18,6 @@ namespace libcamera {\n  * \\brief Struct to hold the debayer parameters.\n  */\n \n-/**\n- * \\var DebayerParams::kGain10\n- * \\brief const value for 1.0 gain\n- */\n-\n /**\n  * \\var DebayerParams::kRGBLookupSize\n  * \\brief Size of a color lookup table\n","prefixes":["v3","4/5"]}