From patchwork Wed Jan 28 11:44:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 26006 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 E1893C3200 for ; Wed, 28 Jan 2026 11:44:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4E27B61FE8; Wed, 28 Jan 2026 12:44:49 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="FeXCFqjx"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5E1C061FD0 for ; Wed, 28 Jan 2026 12:44:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769600682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2k9B05U/io3wxXZ1qBvWXjn6uBX2Bf69MxM3QNtNULg=; b=FeXCFqjxyihsjSWDJPeRh135Ag9fr/YvqNrYji0IFHS6C3N5AinCEhhMr/ijdaXu3sH3ZL wMD6Ue4DHgbBcNQtuXcRkWHmB9t9ROfpC5LWTPPRB1pKHxRhfN4p4uIHqF7dVyJ28fPPvx e1ZyURHbSCZ3dgbKsBZNDMZA3cUS2VU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-PrxF4spXPpu7g_QDc2WRZQ-1; Wed, 28 Jan 2026 06:44:41 -0500 X-MC-Unique: PrxF4spXPpu7g_QDc2WRZQ-1 X-Mimecast-MFC-AGG-ID: PrxF4spXPpu7g_QDc2WRZQ_1769600680 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF13D1944F12; Wed, 28 Jan 2026 11:44:39 +0000 (UTC) Received: from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.34.236]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B2D2719560B2; Wed, 28 Jan 2026 11:44:37 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Robert Mader Subject: [PATCH v5 13/15] libcamera: ipa: simple: Set contrast metadata unconditionally Date: Wed, 28 Jan 2026 12:44:00 +0100 Message-ID: <20260128114402.31570-14-mzamazal@redhat.com> In-Reply-To: <20260128114402.31570-1-mzamazal@redhat.com> References: <20260128114402.31570-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: c_-jTULAiNJxzVqY_KVRbVU4xVZNLlqUuRZAJTQAZss_1769600680 X-Mimecast-Originator: redhat.com 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" Let's do the same with contrast as with other metadata. Reviewed-by: Barnabás Pőcze Reviewed-by: Robert Mader Signed-off-by: Milan Zamazal --- src/ipa/simple/algorithms/adjust.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ipa/simple/algorithms/adjust.cpp b/src/ipa/simple/algorithms/adjust.cpp index 23f6f6ad7..acdd3f741 100644 --- a/src/ipa/simple/algorithms/adjust.cpp +++ b/src/ipa/simple/algorithms/adjust.cpp @@ -124,8 +124,7 @@ void Adjust::process([[maybe_unused]] IPAContext &context, metadata.set(controls::Gamma, gamma); const auto &contrast = frameContext.contrast; - if (contrast) - metadata.set(controls::Contrast, contrast.value()); + metadata.set(controls::Contrast, contrast.value_or(kDefaultContrast)); const auto &saturation = frameContext.saturation; metadata.set(controls::Saturation, saturation.value_or(kDefaultSaturation));