From patchwork Thu Nov 27 02:22:54 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: 25236 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 D409DC32DE for ; Thu, 27 Nov 2025 02:23:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 85F3B60BDD; Thu, 27 Nov 2025 03:23:54 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Sjus5DFw"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A94EF60AB3 for ; Thu, 27 Nov 2025 03:23:50 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso2942555e9.3 for ; Wed, 26 Nov 2025 18:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764210230; x=1764815030; 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=TAFofCRjRwju8c6LgHdbB3OSOLTvh/yl77wh8eBrJ3s=; b=Sjus5DFwKBwBQbULyOn6wIb762HxrLwg5+cbSGKaT/BZ3P82sG2U6UEDX15GLU0bE2 M5qDDpP7S57f2D+RkSeGUxEPhcTgl/N+248YN2nE8x6mSbnGpEUX2tfnviWAWebgyytS PfRK2S5BlNbM0CkBjeg1zqic0kxrxjS63Uh5xJdXGadizCiwSJUNpehTSztndPURmXz7 OkdUrOmZu+SJXvVvfoK9yLpyDPKSHx2KP3gKo0htvD2XGw9rzZdgX4IrMORU8lWUjcki hpZ5YsAkDv/Vpj+5SRqETWDE26QcO3f4SEmVKBdIFU7zDTw+MGp90nbTaJJS4XfEiRnZ amRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764210230; x=1764815030; 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=TAFofCRjRwju8c6LgHdbB3OSOLTvh/yl77wh8eBrJ3s=; b=bkm+6tned8O7OTdiR/nSLgccuczJA5lVyaHoJmXgM1YQaxicMFjyUyI8FcVz7DsrR4 2oM3fyZvlrXPBR0hlBXSk+35aOjDnQfPnQJoUSZdYKIklQdtx7EZsActPMO4XyqeujJa gHseZko5de1gBcJwFBUkSPviQm9UHI1bgfHG89aqc8ibRrzta6otnjIQ3lHud6zitq0D Rgupob5m6X3zYwR1oB8dwNmjnWZDsnS6kb/4Fr0kaicQbOMojKEAL1DqbmIKf46HMv/W 0Lkk0/8lUjZwZuD/DDNcVtpONL9anqM2iznKpMHDlA9uSwrtaN5+hhSjQbj5nOXuT0Ys QEAA== X-Gm-Message-State: AOJu0YxMwkXh1Lrn4Zl/DU3oZRTg9b0sbdTY1PYtDCMUV7+zUFAlajxB E+Azt/11uvkAnGXLjgUIEM77qYldh3XsNE6azZf0VHEV83tCBST6MvwNWOagNOZ7NflnDneM+NO 1YVfpyBk= X-Gm-Gg: ASbGncupcMFoIkgZ8U+COlp66vgngTEX4mTWM5YqUEr+LdCg4NuXmOj3VTJLRXBr6zs k7ZjYkG0OY1lcnKYjoQR8ByzX/TMPljbHuObeMV/H8pxOQKXvHjLww3sUDrWrZ+b5+GhpMGnqEQ 1QLQDm75WcJkQQibIHqAopp/chfAi/Lul6rN7cipRJfpX417THWcBWIjdzgQZHiJ8B0Qr1owfv4 nPMsPRXO8QOSijRNChC0AjY1NjhGciB5KJdYqIkTyL4HNSR9m85skqulb+bL0hhhp8lIbxrywhY wNt8EoxXwkmFv5hoFvdlWn98Blf9i/PvLerSjZJmOS2HlrdN5ITs/9J/K8pAqhvUmtNK5fZpXrf BeUMb9+OeMLUul6D4lHeI77M/SjbLRBVen/KLHdylDqOKb5Ylfs5kB2ZCDX11vVgAxVqgojJDTV BFqaUBhU3hwfihRFkd3gA+8cIc9O5b9q25JtX6S1gPF3jzqBWR2OP1MZGmbH6+B9qc4hM= X-Google-Smtp-Source: AGHT+IHErMILY2dosC1BTv2NfRqYlEeafYQ2eiwRfkTKwGTVtuL20SiTvnt123GTLBv4SH+3VIWfXQ== X-Received: by 2002:a05:600c:1ca4:b0:45d:f83b:96aa with SMTP id 5b1f17b1804b1-477c10c92d8mr257620405e9.7.1764210230019; Wed, 26 Nov 2025 18:23:50 -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-4790b0e21e8sm71549495e9.15.2025.11.26.18.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 18:23:48 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal Subject: [PATCH v2 22/22] libcamera: software_isp: lut: Make contrast available in debayer params Date: Thu, 27 Nov 2025 02:22:54 +0000 Message-ID: <20251127022256.178929-23-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251127022256.178929-1-bryan.odonoghue@linaro.org> References: <20251127022256.178929-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 Signed-off-by: Bryan O'Donoghue Reviewed-by: Kieran Bingham --- 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 8bcbd5dde..f0307549b 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