{"id":19970,"url":"https://patchwork.libcamera.org/api/1.1/patches/19970/?format=json","web_url":"https://patchwork.libcamera.org/patch/19970/","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":"<20240430173430.200392-5-mzamazal@redhat.com>","date":"2024-04-30T17:34:29","name":"[v2,4/5] libcamera: software_isp: Remove DebayerParams::kGain10","commit_ref":null,"pull_url":null,"state":"accepted","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/19970/mbox/","series":[{"id":4280,"url":"https://patchwork.libcamera.org/api/1.1/series/4280/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4280","date":"2024-04-30T17:34:25","name":"Software ISP levels cleanup","version":2,"mbox":"https://patchwork.libcamera.org/series/4280/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19970/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19970/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 2F52CC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Apr 2024 17:35:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE8686341B;\n\tTue, 30 Apr 2024 19:35:02 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E642E63418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Apr 2024 19:35:00 +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-596-_ZpdexPhNZSeIYBu4ddwuA-1; Tue, 30 Apr 2024 13:34:58 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5])\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 EEC86104D982;\n\tTue, 30 Apr 2024 17:34:56 +0000 (UTC)","from nuthatch.redhat.com (unknown [10.45.224.26])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C16F31BDB2;\n\tTue, 30 Apr 2024 17:34:55 +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=\"S34g3DBp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1714498500;\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=ljbHLZZsSzg15d6L7pje8jb7SlEffnNyoibm7/huId4=;\n\tb=S34g3DBpFJJgSG+KJmx32twlKBpSbSXpzlvEXmoYB0qE9MuhtHIqNklBmudImN5+tAzQF/\n\ts8CcwRTgVwbBFca+e6xmwp/gxHga20atboj2+DtpUy3VMbOmJq/ya770XKFebYvXam0hu0\n\tVdkLqbJbRgJ5/kHd4D61mEX7Gb5ZXjM=","X-MC-Unique":"_ZpdexPhNZSeIYBu4ddwuA-1","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v2 4/5] libcamera: software_isp: Remove\n\tDebayerParams::kGain10","Date":"Tue, 30 Apr 2024 19:34:29 +0200","Message-ID":"<20240430173430.200392-5-mzamazal@redhat.com>","In-Reply-To":"<20240430173430.200392-1-mzamazal@redhat.com>","References":"<20240430173430.200392-1-mzamazal@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.11.54.5","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>\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 09f4ff00..6aaa7d4c 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 981e1ae0..0af23ee7 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 ac438a33..548c2ccd 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":["v2","4/5"]}