{"id":25123,"url":"https://patchwork.libcamera.org/api/1.1/patches/25123/?format=json","web_url":"https://patchwork.libcamera.org/patch/25123/","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":"<20251120232019.3590-23-bryan.odonoghue@linaro.org>","date":"2025-11-20T23:20:19","name":"[22/22] libcamera: software_isp: lut: Make contrast available in debayer params","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b94a9bb67776e5ec7b5b7c528f7e244543e211c1","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25123/mbox/","series":[{"id":5599,"url":"https://patchwork.libcamera.org/api/1.1/series/5599/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5599","date":"2025-11-20T23:19:57","name":"GPUISP precursor series","version":1,"mbox":"https://patchwork.libcamera.org/series/5599/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25123/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25123/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 F2A44C3330\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:21:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC60D60B31;\n\tFri, 21 Nov 2025 00:21:07 +0100 (CET)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0134B60B13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:21:03 +0100 (CET)","by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-477563e28a3so10095885e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:21:02 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-477bf3af0ecsm11618415e9.9.2025.11.20.15.21.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:21:01 -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=\"qwGZ7Jn7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763680862; x=1764285662;\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=TU2m7Tc7hCiC/4jWw549iHAkv5vmQq6nhrkowOLldmk=;\n\tb=qwGZ7Jn7gIJF45OLXfrYdSTG8WKOOSSw+yu7trzM0vSqb/In5YA9lTFi4SSMWlwCF+\n\tdJAHUfmPsBqjiJio/MPKtqRY4/pQPCkb22qrPlXiOPytO9y0VjLA+NuepV7CCb8qWKCr\n\tLs0wWmFubjm5EE9zRFI1JBln9aN5J9BOZ9UBdlyAxu2Dhe74hpMcG0vPehC+atTZJJho\n\tdmnuZuZrNBqIPtDULfNKR20Vy2vsM2COX3M6KsRqgzxZlhNG7Pudud6UT6u8+XHyhtsf\n\t98ftp7wYmhCKhSBEsFTMv9yI5W987qqO5RwyAZ60pM1RRM3eUwj/uweG5FfpTWDd8By6\n\twK5w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763680862; x=1764285662;\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=TU2m7Tc7hCiC/4jWw549iHAkv5vmQq6nhrkowOLldmk=;\n\tb=VziHK7YJ5+ze9npDQgXvGmmEjb0/TBMWrxywtfi3GS16qk35Bju7Nr1H750vLwu3JQ\n\tQKJBrer3TG8Gl0afs1L6xJAwkMlTcdVawxSTULMtarwAx6U5ewQGn3F6T5LTrfRI4T3d\n\t+bEj1aUOgfHnAd50E3LJ57Iq4AUAfFJG1OZLYqQS0VuJWrsfGwrJm2/KIp6Ges2DZwt3\n\tiY6Mp+yTwG4TJ2AsYzxaD0ffUm7pJm66II4gACVFQu1f2cHlDEd5ZJRZtJ/MmltQFBe/\n\tS43qI1GPf/tDxJcS/dmx0JxA6nT3OlEEoWmKtIDm77Bsa6N6iPfF40L/Nm/zvqxdrZkr\n\tLPbQ==","X-Gm-Message-State":"AOJu0YyVitqjUBHbulh3+8lNlrUh1Icij7RUWeCwB3pFBKigfrfnA/Ko\n\tTRhGXPeRL8QebHljUX5/3+z+URdQupN13g4uNSXTcRnE9QyRB8W0KwFwJLTiDXuhebphGJFL+mt\n\tuMbhD8sc=","X-Gm-Gg":"ASbGncvHxpEeXZpwNut4vgc8v4DNwEib0s+b0kAlemrEyeZW4sL1BJFztnf/ReZaF2+\n\t8Sh76DVZzJAZomcFiv14FAY3vABMf/jovRcEBjrjBnO4GOtOcTtVXFCL4SBfPBkxfaGBV2Xt7OI\n\tCo/AWJReDvNzRN4hmZjd9WqSxyNJ1p7Ny470Hr9VEbWOVAKlzaH5Fbtu17gbuwmELNhgbiQyoTH\n\tmF2UdLQeStBAMpXRiOr7YG9w5fCmd1CI6uE+DMhmvJ1Kyl3XnBDlQtVGrsxh82HL04HNe0XPDCP\n\t+Zbyc00PUIAtwYpRJXbzuAFTHt2xXPdTY9lHu9UUJ+OJF9TMYkiExf6ZYexS9t3anTnCUNg+ifO\n\txT+23+hHw+re+fc2wCAvNtPEQnkFs6uoNjs5TkAmCPQ6JgkJgeG7Uegu4iCq5oo8DYgTv/9IZy9\n\t4KPkUiZPNghO0gjmhjhwx+J0RiE/xa4mPkIeMWtbAhBEBdHpx0xrSPbwP3M2VzyVOUtfo=","X-Google-Smtp-Source":"AGHT+IH+4cu6UR+CsG+yjPIJ7okFAybKgwGMDXKtndRYmn5h0go48t5/WGBIEGAwR3iY5TkzLszGmQ==","X-Received":"by 2002:a05:600c:3ba7:b0:46e:59bd:f7e2 with SMTP id\n\t5b1f17b1804b1-477c05139c2mr2473585e9.11.1763680862337; \n\tThu, 20 Nov 2025 15:21:02 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH 22/22] libcamera: software_isp: lut: Make contrast available\n\tin debayer params","Date":"Thu, 20 Nov 2025 23:20:19 +0000","Message-ID":"<20251120232019.3590-23-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>","References":"<20251120232019.3590-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 contrast used in IPA to Bayer parameters. Similar to the\ncalculated Gamma value we will pass this value into the debayer fragment\nshader for further consumption.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 5 +++++\n src/ipa/simple/algorithms/lut.cpp                        | 1 +\n 2 files changed, 6 insertions(+)","diff":"diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 5f340a7a6..2bfa71529 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -67,6 +67,11 @@ struct DebayerParams {\n \t * Gamma value as provided by the IPA\n \t */\n \tfloat gamma;\t\t\t/**< Gamma for GPUISP */\n+\n+\t/*\n+\t * Contrast\n+\t */\n+\tfloat contrast;\t\t\t/**< Contrast value for GPUISP */\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex ea5a86b20..9aaab54f1 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -149,6 +149,7 @@ void Lut::prepare(IPAContext &context,\n \t}\n \n \tparams->gamma = context.configuration.gamma;\n+\tparams->contrast = context.activeState.gamma.contrast;\n }\n \n void Lut::process([[maybe_unused]] IPAContext &context,\n","prefixes":["22/22"]}