From patchwork Thu Nov 20 23:20:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 25123 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F2A44C3330 for ; Thu, 20 Nov 2025 23:21:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BC60D60B31; Fri, 21 Nov 2025 00:21:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="qwGZ7Jn7"; dkim-atps=neutral Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0134B60B13 for ; Fri, 21 Nov 2025 00:21:03 +0100 (CET) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-477563e28a3so10095885e9.1 for ; Thu, 20 Nov 2025 15:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763680862; x=1764285662; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TU2m7Tc7hCiC/4jWw549iHAkv5vmQq6nhrkowOLldmk=; b=qwGZ7Jn7gIJF45OLXfrYdSTG8WKOOSSw+yu7trzM0vSqb/In5YA9lTFi4SSMWlwCF+ dJAHUfmPsBqjiJio/MPKtqRY4/pQPCkb22qrPlXiOPytO9y0VjLA+NuepV7CCb8qWKCr Ls0wWmFubjm5EE9zRFI1JBln9aN5J9BOZ9UBdlyAxu2Dhe74hpMcG0vPehC+atTZJJho dmnuZuZrNBqIPtDULfNKR20Vy2vsM2COX3M6KsRqgzxZlhNG7Pudud6UT6u8+XHyhtsf 98ftp7wYmhCKhSBEsFTMv9yI5W987qqO5RwyAZ60pM1RRM3eUwj/uweG5FfpTWDd8By6 wK5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763680862; x=1764285662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TU2m7Tc7hCiC/4jWw549iHAkv5vmQq6nhrkowOLldmk=; b=VziHK7YJ5+ze9npDQgXvGmmEjb0/TBMWrxywtfi3GS16qk35Bju7Nr1H750vLwu3JQ QKJBrer3TG8Gl0afs1L6xJAwkMlTcdVawxSTULMtarwAx6U5ewQGn3F6T5LTrfRI4T3d +bEj1aUOgfHnAd50E3LJ57Iq4AUAfFJG1OZLYqQS0VuJWrsfGwrJm2/KIp6Ges2DZwt3 iY6Mp+yTwG4TJ2AsYzxaD0ffUm7pJm66II4gACVFQu1f2cHlDEd5ZJRZtJ/MmltQFBe/ S43qI1GPf/tDxJcS/dmx0JxA6nT3OlEEoWmKtIDm77Bsa6N6iPfF40L/Nm/zvqxdrZkr LPbQ== X-Gm-Message-State: AOJu0YyVitqjUBHbulh3+8lNlrUh1Icij7RUWeCwB3pFBKigfrfnA/Ko TRhGXPeRL8QebHljUX5/3+z+URdQupN13g4uNSXTcRnE9QyRB8W0KwFwJLTiDXuhebphGJFL+mt uMbhD8sc= X-Gm-Gg: ASbGncvHxpEeXZpwNut4vgc8v4DNwEib0s+b0kAlemrEyeZW4sL1BJFztnf/ReZaF2+ 8Sh76DVZzJAZomcFiv14FAY3vABMf/jovRcEBjrjBnO4GOtOcTtVXFCL4SBfPBkxfaGBV2Xt7OI Co/AWJReDvNzRN4hmZjd9WqSxyNJ1p7Ny470Hr9VEbWOVAKlzaH5Fbtu17gbuwmELNhgbiQyoTH mF2UdLQeStBAMpXRiOr7YG9w5fCmd1CI6uE+DMhmvJ1Kyl3XnBDlQtVGrsxh82HL04HNe0XPDCP +Zbyc00PUIAtwYpRJXbzuAFTHt2xXPdTY9lHu9UUJ+OJF9TMYkiExf6ZYexS9t3anTnCUNg+ifO xT+23+hHw+re+fc2wCAvNtPEQnkFs6uoNjs5TkAmCPQ6JgkJgeG7Uegu4iCq5oo8DYgTv/9IZy9 4KPkUiZPNghO0gjmhjhwx+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 5b1f17b1804b1-477c05139c2mr2473585e9.11.1763680862337; Thu, 20 Nov 2025 15:21:02 -0800 (PST) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477bf3af0ecsm11618415e9.9.2025.11.20.15.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 15:21:01 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue Subject: [PATCH 22/22] libcamera: software_isp: lut: Make contrast available in 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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Provide the contrast used in IPA to Bayer parameters. Similar to the calculated Gamma value we will pass this value into the debayer fragment shader for further consumption. Signed-off-by: Bryan O'Donoghue --- include/libcamera/internal/software_isp/debayer_params.h | 5 +++++ src/ipa/simple/algorithms/lut.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h index 5f340a7a6..2bfa71529 100644 --- a/include/libcamera/internal/software_isp/debayer_params.h +++ b/include/libcamera/internal/software_isp/debayer_params.h @@ -67,6 +67,11 @@ struct DebayerParams { * Gamma value as provided by the IPA */ float gamma; /**< Gamma for GPUISP */ + + /* + * Contrast + */ + float contrast; /**< Contrast value for GPUISP */ }; } /* namespace libcamera */ diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp index ea5a86b20..9aaab54f1 100644 --- a/src/ipa/simple/algorithms/lut.cpp +++ b/src/ipa/simple/algorithms/lut.cpp @@ -149,6 +149,7 @@ void Lut::prepare(IPAContext &context, } params->gamma = context.configuration.gamma; + params->contrast = context.activeState.gamma.contrast; } void Lut::process([[maybe_unused]] IPAContext &context,