From patchwork Thu Dec 11 23:22:45 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: 25514 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 BF996C3257 for ; Thu, 11 Dec 2025 23:24:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7BE6C616AB; Fri, 12 Dec 2025 00:24:21 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="HEYDkPdS"; dkim-atps=neutral Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6511861623 for ; Fri, 12 Dec 2025 00:24:19 +0100 (CET) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7aa2170adf9so564782b3a.0 for ; Thu, 11 Dec 2025 15:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765495458; x=1766100258; 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=rcK4g8w70ZrNIJtUf3jJQYX0oOGoIStom0aO1MEkaxk=; b=HEYDkPdS3oFWzY6eVtASaWmEV6/86HiYeIfhAkWgajzJGKCoeFP6NFl/LeHVsJLQQv BBdh3ussAI443plOpgdQaanrwyw0st0/nxLOJT3eigG4JOxpCIlY3baj++8F/+KIiMT7 QF2ZwOArc2BKnud59TeuXbK8gT7mKCbaRgvunZx8EfxrQSXz5Lc3syqppSDc447nqXH1 bj4APDGiwQa/k3P6mu/o8ymfUIJsPpf+9yB2pF0LWhPF0O+GBWsvXZfl6Svl5M68b50X FrDzsBFTlz4UfZ/DCOFUJT4aDOqxVPcKbMv+3mgi+HmfzLKsfFZtlnCfcr5j0KNjX/HK CEUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765495458; x=1766100258; 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=rcK4g8w70ZrNIJtUf3jJQYX0oOGoIStom0aO1MEkaxk=; b=a0sxG3uBMiMqfnId93EV8ET22AwJFabQkqiMpwWf85jgYH+PANBNaJsoJJVnQcALd3 o8+Y1Vm1FS0qztsDZaJgWj7tNdhzlpo+sazZRZH+Jo9Fzyzncjd9UmqgDAyOkOj1L6j9 N9ZN9hofbE16LPh+lbayLT4C4Mw/aQsI3ENGQW3ZNEYRFve8tEHO0r+OB/r+02OKMGIM zDrmOHII+5wbw+BcUE/Br8JMtwImUXrXIUi8mawbFbRu28aGSun0VN02HpkMiFhI6afE myXBtED36M+lSglQ/6kEAKVDvDEgnbANJVzQlu5GV1JKhanec4rIgBA+OhLhba3Nr4q4 5g7w== X-Gm-Message-State: AOJu0Yz/myop2+X0ar2nufENBPK9aLDUzMu0nqJxTunb6sUbciVxBm6n kmZuuwicQ6/W0Ke5jBRM5HDSQmE+Q/soCbgCG527xjV7ky7UPYBN13TqG86Jkbl9IGNGz7m/Ikp TBRkt X-Gm-Gg: AY/fxX4VTi2WCBGTsETc42FTjl2GR2J+m67qKjJbBUCgT5uOXJu19dkYSdq3NCe7cw7 QWHwUYDsQnJ04gPf41KSNjNazhBrx2tt35pCtmHEoMy37s5H9mULSLwAxiYkFnd500oTnwJPo4y mUHfDrAWRsWkp9WQHq50CnOVGv2PrgX5qjXaQ2txYW9++QEDhveQTssr9bJ/OxQfYKbPfvl4Fi7 +MKL55AM4tdijpfF3L/szxyMffhm3vLRTjUxxbWX7NGt2TmDixcPw1eLWt4bc5BIUIgw0a4vFMX mhVlNbgoYlQlmH3oeLBpgP7noBTy2PbkShS4oefklB1xEGsiFWMvaasu6v7Ub3KfPv4iFMv0Yle 2efpSGAD7X2DirY4RE1PczPpVFTw6Xp6X1H4W+BSW9tOupDFpT2knOSHQ+eFQkt7oXvs+daSa3w PDpIZpXkaeOPzs3jBXJFXxytkyB00x+kR4VHSlYLSs3JcY6dpum7rbBKRhpFaOAA== X-Google-Smtp-Source: AGHT+IEgYOM/qqkIbnrVqlL4hRP4YxhD3ycJ03XZJgc1WaVZDRloWeQI7UUtflkrfMzCS0zmpl0sdg== X-Received: by 2002:a05:6a00:368c:b0:7e8:43f5:bd36 with SMTP id d2e1a72fcca58-7f6692aaca9mr203827b3a.34.1765495457774; Thu, 11 Dec 2025 15:24:17 -0800 (PST) Received: from inspiron14p-linux (M106185144161.v4.enabler.ne.jp. [106.185.144.161]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7f4c4ab52aasm3399933b3a.38.2025.12.11.15.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 15:24:17 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal , Kieran Bingham Subject: [PATCH v5 20/20] libcamera: software_isp: lut: Make contrast available in debayer params Date: Thu, 11 Dec 2025 23:22:45 +0000 Message-ID: <20251211232246.31330-21-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251211232246.31330-1-bryan.odonoghue@linaro.org> References: <20251211232246.31330-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. Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham Signed-off-by: Bryan O'Donoghue --- include/libcamera/internal/software_isp/debayer_params.h | 1 + src/ipa/simple/algorithms/lut.cpp | 1 + src/libcamera/software_isp/debayer.cpp | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h index d5dad1a98..8033f7d5b 100644 --- a/include/libcamera/internal/software_isp/debayer_params.h +++ b/include/libcamera/internal/software_isp/debayer_params.h @@ -59,6 +59,7 @@ struct DebayerParams { Matrix ccm; RGB blackLevel; float gamma; + float contrast; }; } /* 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, diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp index b3615b32b..b5b99d390 100644 --- a/src/libcamera/software_isp/debayer.cpp +++ b/src/libcamera/software_isp/debayer.cpp @@ -115,6 +115,11 @@ namespace libcamera { * \brief Gamma value for the GPUISP */ +/** + * \var DebayerParams::contrast + * \brief Contrast value for GPUISP + */ + /** * \class Debayer * \brief Base debayering class