{"id":25415,"url":"https://patchwork.libcamera.org/api/patches/25415/?format=json","web_url":"https://patchwork.libcamera.org/patch/25415/","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":"<20251210003139.43606-20-bryan.odonoghue@linaro.org>","date":"2025-12-10T00:31:36","name":"[v4,19/20] libcamera: software_isp: lut: Make gamma from lut.cpp available in debayer params","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"7e3165c52936b4a82668272030fb62fd74c41dad","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25415/mbox/","series":[{"id":5644,"url":"https://patchwork.libcamera.org/api/series/5644/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5644","date":"2025-12-10T00:31:17","name":"GPUISP precursor series","version":4,"mbox":"https://patchwork.libcamera.org/series/5644/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25415/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25415/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 DCD81C326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:32:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C0616147B;\n\tWed, 10 Dec 2025 01:32:47 +0100 (CET)","from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com\n\t[IPv6:2607:f8b0:4864:20::1033])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 399F661475\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:32:46 +0100 (CET)","by mail-pj1-x1033.google.com with SMTP id\n\t98e67ed59e1d1-3436d6ca17bso6257843a91.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:32:46 -0800 (PST)","from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:32:44 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"SGYYOy9i\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765326765; x=1765931565;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=BO1WtgKOG/1zSyyE29t2Y9M/8GgNCuKl/Tzsg9gDYHU=;\n\tb=SGYYOy9ip9iTWAK++x49ID/tr6Ew2csSaMJC2uXY4rtn5YlRMFDbtscSfAv4eJ8CxP\n\tXsOzdU03pKvCfUIZgvMYDMkog3OyQtuQctFcnsx5Pa4fnVNoywioTuqVSHB17m09fT2h\n\tOqOiitZzRlirRRtdFtoAdsGwJj04lqGKrpOOhu7PKSUc+rKhoW/EQHLmkG6BTRBHJ4zD\n\tTcCXK8NMfHDVNzsgIC4OsB+gEUUTMZg8DUFgSKMGMqEaQURYiMVvF0HZWZyRdKsFQOH0\n\teTlsEgJFL4NmQGUPPY6hpE4mcrW3Qn6kERqgioJsLkGi2N3xFwoRBKrhufhIv8ZZ9sqD\n\tBHCQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765326765; x=1765931565;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=BO1WtgKOG/1zSyyE29t2Y9M/8GgNCuKl/Tzsg9gDYHU=;\n\tb=DkAAPNboPIGiM5TA1j0Zdm8DaN/XTidGD4Qs1DT9zLArIMX/lVr1U28o1HST3jOU6w\n\tZbqq32z2i6lOGjZkE5TdqQbpg2SQNoT/ssIot0CtFg1/ff+UfIeXWTqTxlKyeuD/RinF\n\tsJaoyVJo4Eq0Ej/tsIMLhcy86t4AJNRqUnHxpyFUWZ+sx58xRtf+xZcWsZhpkBubRwP6\n\tibEUAWrw7FFLo3KW9ep63m2a+B2cigbLpzPUZbVZyajz6InKASh4JURL+bEl/mY/2lwA\n\tuPeFagTF7LIGAzjBZ4ZIpNiJ5YZQBK+alfcIXdbpwJInBdteN1s6h+6TO/ys8fP3WgF/\n\tvx8w==","X-Gm-Message-State":"AOJu0YxRAfPMFUMs6hkXEne+5Q9uncLnFDii89JSjORqHE34Ql7ZvD49\n\t31wqQiGSj5XULJOtc3UGgftoQsixbhTBBpxcHaMEfsv8RHldk9ZL9HTL39b1FZ9k0OqOlET7tmM\n\tyggZm","X-Gm-Gg":"AY/fxX6a8AAOeOaM2B0BV52MqWrkWzJzSkjUQ0zTfTdgDBjsSOJy8WXbv5SB8Eaimdi\n\tLRa83nB1oA9XATxc1dEQB1J+Z+oiedYkBx/eCZw51PX4SGQLK85dyWin8itOur04aqRYLswMvcc\n\tdsf2xvE4mwp6ux8M8mt/n2muyzbV7Md4Gb8Mxg8RiZCnIH/cVWp4JGvoPdzALLQHD/c+/P1vAi0\n\tiq4tJ2cbRYf4ENATTW51+IimK4Cpaj1gZ/as1QYW/V59FUnB2fapyQoOygXpV3wlSFDUigmBv7K\n\tj9hKADl7UEqnC5m4xsBJv3oWbDT+xBKcRFs642peKaHqHJb8E3xwWCJm4W3jts9SME5J3T7s2N8\n\ti/vhgiWC8AECZ04TkwFTo/BqXV57Yffqug4kGXd+8RxVUg+/0NHj3eMgLJpq37IogpBG9ysT7bv\n\tzuAJSTKRj8fls/UpwsbZYQhzBjoRhJFAbpdmeQL0+Hg2H9kXtSuWAK/LmDgZ2kgpG6","X-Google-Smtp-Source":"AGHT+IEylds9U/fO0HwSA4zl24D8CIfjunI4S3rvmKfZ6ki8UlfyfD9t3qGYX0GavYKXfC7f+Ybd5g==","X-Received":"by 2002:a17:90b:1346:b0:340:c261:f9db with SMTP id\n\t98e67ed59e1d1-34a7281a399mr493483a91.10.1765326764578; \n\tTue, 09 Dec 2025 16:32:44 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tMilan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v4 19/20] libcamera: software_isp: lut: Make gamma from\n\tlut.cpp available in debayer params","Date":"Wed, 10 Dec 2025 00:31:36 +0000","Message-ID":"<20251210003139.43606-20-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251210003139.43606-1-bryan.odonoghue@linaro.org>","References":"<20251210003139.43606-1-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"Provide the gamma used in IPA to Bayer parameters. We will pass Gamma into\nthe shader via a uniform and can then tweak that value from outside at\nwill.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 1 +\n src/ipa/simple/algorithms/lut.cpp                        | 2 ++\n src/libcamera/software_isp/debayer.cpp                   | 5 +++++\n 3 files changed, 8 insertions(+)","diff":"diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 5a0d9438f..d5dad1a98 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -58,6 +58,7 @@ struct DebayerParams {\n \t */\n \tMatrix<float, 3, 3> ccm;\n \tRGB<float> blackLevel;\n+\tfloat gamma;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex 49482d711..ea5a86b20 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -147,6 +147,8 @@ void Lut::prepare(IPAContext &context,\n \t\t\tparams->gammaLut[i] = gammaTable[i / div];\n \t\t}\n \t}\n+\n+\tparams->gamma = context.configuration.gamma;\n }\n \n void Lut::process([[maybe_unused]] IPAContext &context,\ndiff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex 34460f316..8e7eac793 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -110,6 +110,11 @@ namespace libcamera {\n  * \\brief Blacklevel gains for the GPUISP\n  */\n \n+/**\n+ * \\var DebayerParams::gamma\n+ * \\brief Gamma value for the GPUISP\n+ */\n+\n /**\n  * \\class Debayer\n  * \\brief Base debayering class\n","prefixes":["v4","19/20"]}