From patchwork Thu Jan 22 16:19:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 25939 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 57561C32E7 for ; Thu, 22 Jan 2026 16:20:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E459661FD4; Thu, 22 Jan 2026 17:20:44 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="OuzN7tWq"; 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 C9B5C61FD4 for ; Thu, 22 Jan 2026 17:20:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769098839; 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=TUhFj8SRsM46CjnXWoH94NdCUQQqhOFuMXl9BYm8uKQ=; b=OuzN7tWqjIPXlMvTPsWdJFlqPvGE+cWSXRaYeMFLU+hXTvFDQgiYr4rWJvzccSJjhr5DX6 BG2FO4koiITbitAC1cTocjAtFCg36nctmPMpLnflLQ21Rq6vcYghSTZtJdb6sf+N2dR5Ip sXx7cd1LBYzHKLVn453oDXhOas5TiEY= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-gznZBotmPUq7EZA1Xx_wSA-1; Thu, 22 Jan 2026 11:20:38 -0500 X-MC-Unique: gznZBotmPUq7EZA1Xx_wSA-1 X-Mimecast-MFC-AGG-ID: gznZBotmPUq7EZA1Xx_wSA_1769098837 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B3F8118005B9; Thu, 22 Jan 2026 16:20:37 +0000 (UTC) Received: from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.45.224.97]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5CC81800577; Thu, 22 Jan 2026 16:20:35 +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?= Subject: [PATCH v4 13/15] libcamera: ipa: simple: Set contrast metadata unconditionally Date: Thu, 22 Jan 2026 17:19:33 +0100 Message-ID: <20260122161935.208562-14-mzamazal@redhat.com> In-Reply-To: <20260122161935.208562-1-mzamazal@redhat.com> References: <20260122161935.208562-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: nHANZ44jPcP5SJoIBdPrzuSRu-x3nbrXVH73bV_W-8k_1769098837 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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. 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));