[{"id":37003,"web_url":"https://patchwork.libcamera.org/comment/37003/","msgid":"<851plr9wzy.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-11-21T16:22:09","subject":"Re: [PATCH 22/22] libcamera: software_isp: lut: Make contrast\n\tavailable in debayer params","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:\n\n> Provide the contrast used in IPA to Bayer parameters. Similar to the\n> calculated Gamma value we will pass this value into the debayer fragment\n> shader for further consumption.\n>\n> Signed-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(+)\n>\n> diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\n> index 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\nSingle line, or omit (it's pretty obvious that `contrast' is contrast).\n\n> +\tfloat contrast;\t\t\t/**< Contrast value for GPUISP */\n\nExtra \"*<\".\n\nWith that fixed:\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> index 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,","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 9E28EC3333\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 16:22:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A09B260A8B;\n\tFri, 21 Nov 2025 17:22:16 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0714860805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 17:22:14 +0100 (CET)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-613-SvgC5FAePyGLOi_jVQTQZw-1; Fri, 21 Nov 2025 11:22:12 -0500","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-4775fcf67d8so21882445e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 08:22:12 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-477bf35f976sm52260775e9.4.2025.11.21.08.22.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 21 Nov 2025 08:22:10 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"NSiT27zb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1763742134;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=qaosoddQEZiwekXHBbJyG4+9lutkwSbAsek/1a6c+0U=;\n\tb=NSiT27zb2a76tOqSvph5BNTnZtX5cl2w40uEsIVxaQNj252dQ7+AqLscMoCyEoWfl6TkPI\n\t113RqMQdECeYWHc0HuCh4pP7KPW2IynWhiDGJNHdgODahUI3wbrw4DjSheTpWWapl28rxZ\n\tMJFknV37W/Krr+U3RDceubO0bHmaMuw=","X-MC-Unique":"SvgC5FAePyGLOi_jVQTQZw-1","X-Mimecast-MFC-AGG-ID":"SvgC5FAePyGLOi_jVQTQZw_1763742131","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763742131; x=1764346931;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=qaosoddQEZiwekXHBbJyG4+9lutkwSbAsek/1a6c+0U=;\n\tb=JPBWJgdK5AK9YR+aWo7WltAlKcrit3dPw+McxyO/2SBXXXQJSYjnRGHTmg3Y08r47C\n\tmOLJpQb/BIt8Uvl7bk391VaAlEz0+EmsxVKxL5xT9oxnn5U+5UicknGC3TjuNnoOjtW6\n\tOUnQ/w4fO8CCCP4lObtxh2uWEzEwSLdszpOVS5BZp/eH4w3IgXuWUUlFi2foTnaTMsyp\n\t07A9J9L+wJT8573R4VOb1vJPplEzgJF3YFWnn8PM2th/84MAtRsS8iWvghrdFKbspfrZ\n\t0SLSuSIi7O0fNHiO0lpiF5XcLSyAUH+AA9nRkhCaQMTprsA0dkWbzi7b5b0wCEfJjM0R\n\tyGSA==","X-Gm-Message-State":"AOJu0YyrUAfgv52gagRW2swLIeThPLfoVMud7NMvZCCbw8ycnNuKq690\n\tG9+YUP2AEXkn/hT4BJ+uUt6dTu0npfrmfj+JIzrduiiLu22KM/hbfpaVnhp8ni75ruLknyK/+tU\n\t1rh5rpj5NgErJGZDD63bOb4qCJ0iTo8kLZGgxxsj6MrUeSwn8cpzBTdwD4RMux2oYeoW7nNTxIS\n\ts=","X-Gm-Gg":"ASbGncu1WsWAqPHj0GkPpgAL8ppHyFk43Eplr5b9ENpQf3YhT2m/71fKTMwpNRQebuI\n\tCm1YkYXipE6/HAfDONpS6IfFY+73W1KRzVINudFU5xi/4jOB4nJEp/iLZc4fZslTu+HmA0y20mp\n\tSmQiVHbYWpEURDEllJJWLKjpw0eWSdydpF6jk5moh0fQbPmtcTBWMYPmkCQUzOOih7wo1by/FtO\n\tFtewRr/2hXWnrvIxy05p/IfNljuPIbiSqm5I3UMV5mGWm5ca44oifxWTLFNsYuzCmiEO3+AuWEO\n\t57mWJNp1qsKUHB7TOp5go5+ToC7LWsbBf/n5/mfpV/IIgmzHEuh9XsqdVDbKhlVHnKxtgrq8OO4\n\tvhftQAtj5XqAiebrMDqe2N+FYNR7iFAQ/efw1Njub1dsXWhbfcpYc3hDYdw18C/4=","X-Received":["by 2002:a05:600c:1550:b0:477:7a53:f493 with SMTP id\n\t5b1f17b1804b1-477c01df47cmr33145225e9.23.1763742131195; \n\tFri, 21 Nov 2025 08:22:11 -0800 (PST)","by 2002:a05:600c:1550:b0:477:7a53:f493 with SMTP id\n\t5b1f17b1804b1-477c01df47cmr33144985e9.23.1763742130822; \n\tFri, 21 Nov 2025 08:22:10 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IHY2e0AKCnIbP2bj6jDaMrM9i8Jq5qYm1lJB/hJZnLRfdudZPC1y4e/Jal9wiHUqLSLOyZ0lA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org,  pavel@ucw.cz","Subject":"Re: [PATCH 22/22] libcamera: software_isp: lut: Make contrast\n\tavailable in debayer params","In-Reply-To":"<20251120232019.3590-23-bryan.odonoghue@linaro.org> (Bryan\n\tO'Donoghue's message of \"Thu, 20 Nov 2025 23:20:19 +0000\")","References":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>\n\t<20251120232019.3590-23-bryan.odonoghue@linaro.org>","Date":"Fri, 21 Nov 2025 17:22:09 +0100","Message-ID":"<851plr9wzy.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"8HSeDLdwOtK8WXrvx7KwBMJjxVuqJWCOMaR3ofVOOqU_1763742131","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]