From patchwork Fri May 1 19:13:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: d3vv3 X-Patchwork-Id: 26596 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 D29EBC32F8 for ; Fri, 1 May 2026 19:55:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 01EB563022; Fri, 1 May 2026 21:55:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UwcrfK2e"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5ED516301A for ; Fri, 1 May 2026 21:14:25 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso17785625e9.2 for ; Fri, 01 May 2026 12:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777662865; x=1778267665; 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=KrxqAAeGAaoSzX7v1n5/Rg6Nu5Z7eqs4Ul+TkFEWhCI=; b=UwcrfK2eXcaE3pXUy95P8ZTDXnzmKS1TOK0WsVWlPn+AgB3irifOFVvwF2QvvcqITU VxWaxY2OiriDt6zpVPNK3qlsFyiImvLw+hR5f9svEthgO10vuY1MJ6Y0E9vqYxMcQdoQ B88jsgAiZ0samaDqJ7cAHoYAU/AoUMo7/eVrJs+9MPDIDgPs9JGOubHtpkAUQgAERihJ Ib16MHWQH+a0M1d7VPybXeE9Ed4Be68KCL9KtpLOMGJis16tGvnz2u9/UDC0lz1xjgmF wD6bsKpdijcuQZ0GKvYLamXNYUYmKeOAD9kjJZe4+K13CRnQHAWWht7ZLBmpjEY2G/vk tP6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777662865; x=1778267665; 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=KrxqAAeGAaoSzX7v1n5/Rg6Nu5Z7eqs4Ul+TkFEWhCI=; b=Tzm9M0FamqjGbWmEdm9tTWS1wO5oLiz3T9Pyk98Sq+pvFLvlmKlp8IVdjTKsJHl+46 YypZC7/xDFpnwlxmruGzzxxSkDDciTJ+AjwF8wVf05z7nbY2stUeJFYcDhCwR2wROY7z 6skc1MjhujlxsIJHUIIoIkyFPtyu+dKIEMS0q88hWWZS2/DbVGwuPJOUdAOPHJfsMJS9 fh42zjvjZC8iGCshnlO4ESWTkM4Wi51QeCZKih0dyZ/tK7RWSzwY0Vh3OVkhUsRwnp1V JSmJvosRUv5BYDDQkd4t+oUglEEN99xDGsl0ZBCYtRAwGWKV2yi5jtOOnSDz7nuVN8uw 9zMw== X-Gm-Message-State: AOJu0Yx8Ft8Sc/osTcyKU4JHfZ2G36kJa8bcHAemgvTaPa1d5odUBVYg rB2feMjMx0y8yE9912XbiTU5FqDtnMEFzZ6UHQ6EHvS8AZxgNwSOz2a185FGYg== X-Gm-Gg: AeBDietyuejp2GPY0BOHUhP8CipmQ/dUNWjeqOs6DEg1YXtYqVvMDUSbro9waIEIzcM FAcmN9qHIaAkS/9Q9d6p7ZYBFhaw/K3W9L1pqbxNpop1PQsdx9jH9oieZ2G7Y8MoIH+nB3d0GAd Ex69ujxPFOVn8ctQEnjOu4l/K2dlEssrmE+R3TV7C+PV2bc8momAwzvZW54iZb/T+SjohVlOUEy GmpSyJRDXziHu/XakZl6qAsj3HGIeIB4kZi0WF6deOF7kSX2jVWQhWeWGYULA0SDUMCuJBOsOfM HExXOQMn+fum8Xf1FuZsrU8eJzI9DzuMHM7Vk5leuLhRFHs0iHTkbdoZUChm6qTEk0R8m7WJckC PNTqlqy0hV0/WbeN/2Ar16ZgG+AHsKM9Q+03bsmDLdUHbACYF2as8HQlhMvIiecqOj7ePQR95O8 ajkKPm3idG02pqk5L9OVIv+4EzEdvzictQgncf939OtVN2TkXjjYHE+6H2sL9xfmnEcKZUPO8tk Fjp7LM7OuhSKRSRD6r/QzmB4WJW4/U4 X-Received: by 2002:a05:600c:8590:b0:489:1c1f:35f9 with SMTP id 5b1f17b1804b1-48a98636a93mr5140295e9.9.1777662864853; Fri, 01 May 2026 12:14:24 -0700 (PDT) Received: from dexps.speedport.ip (p200300eda74453f7a35e44f7d2f0427a.dip0.t-ipconnect.de. [2003:ed:a744:53f7:a35e:44f7:d2f0:427a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a8eb69698sm139146305e9.1.2026.05.01.12.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 12:14:24 -0700 (PDT) From: d3vv3 To: libcamera-devel@lists.libcamera.org Cc: d3vv3 Subject: [PATCH] ipa: simple: data: Document tuning parameters in uncalibrated.yaml Date: Fri, 1 May 2026 21:13:13 +0200 Message-ID: <20260501191400.985920-5-devve.3@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260501191400.985920-1-devve.3@gmail.com> References: <20260501191400.985920-1-devve.3@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 01 May 2026 21:55:24 +0200 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" Add comments documenting all algorithm YAML keys (BlackLevel, Awb, Ccm, Adjust, Agc) to the uncalibrated template so sensor calibration authors can discover parameters without reading source code. Update ov01a10.yaml replacing stepDenominator (removed) with proportionalGain for the new proportional AGC controller. Signed-off-by: d3vv3 --- src/ipa/simple/data/ov01a10.yaml | 2 +- src/ipa/simple/data/uncalibrated.yaml | 40 +++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/ipa/simple/data/ov01a10.yaml b/src/ipa/simple/data/ov01a10.yaml index 9b3b8007..927d9dd6 100644 --- a/src/ipa/simple/data/ov01a10.yaml +++ b/src/ipa/simple/data/ov01a10.yaml @@ -21,5 +21,5 @@ algorithms: - Agc: exposureTarget: 1.4 hysteresis: 0.5 - stepDenominator: 20 + proportionalGain: 0.04 ... diff --git a/src/ipa/simple/data/uncalibrated.yaml b/src/ipa/simple/data/uncalibrated.yaml index fc90ca52..f1bcb020 100644 --- a/src/ipa/simple/data/uncalibrated.yaml +++ b/src/ipa/simple/data/uncalibrated.yaml @@ -3,17 +3,45 @@ --- version: 1 algorithms: + # --- Black Level --- + # blackLevel: 16-bit black level pedestal (optional). + # If omitted, auto-detected from histogram dark end. - BlackLevel: + + # --- Auto White Balance --- + # maxGainR: Maximum red channel gain (default 4.0). + # maxGainB: Maximum blue channel gain (default 4.0). + # speed: Temporal smoothing factor 0-1 (default 1.0 = instant). + # 0.25 = slow smooth, 0.5 = moderate, 1.0 = no smoothing. - Awb: - # Color correction matrices can be defined here. The CCM algorithm - # has a significant performance impact, and should only be enabled - # if tuned. + + # --- Color Correction Matrix --- + # Has a significant performance impact, and should only be + # enabled if tuned. Provide ccms as a list of color temperature + # entries with a 3x3 matrix: # - Ccm: # ccms: # - ct: 6500 - # ccm: [ 1, 0, 0, - # 0, 1, 0, - # 0, 0, 1] + # ccm: [ 1.0, 0.0, 0.0, + # 0.0, 1.0, 0.0, + # 0.0, 0.0, 1.0 ] + # - Ccm: + + # --- Image Adjustments --- + # gamma: Gamma encoding value (default 2.2, range 0.1-10.0). + # contrast: Contrast scaling (default 1.0, range 0.0-2.0). + # saturation: Saturation multiplier (default 1.0, range 0.0-2.0). + # Only active when CCM is enabled. - Adjust: + + # --- Auto Gain/Exposure Control (proportional) --- + # exposureTarget: Target MSV (mean sample value) in histogram bins. + # Default: 2.5 (middle of 5-bin range). + # Lower values target a darker exposure. + # hysteresis: Deadband around target where no adjustment occurs. + # Default 0.2. Larger values reduce sensitivity near target. + # proportionalGain: Step scaling factor (default 0.04). + # At max error (~2.5): factor 1.10 (~10% step). + # Near target: factor ~1.01 (~1% step). - Agc: ...