From patchwork Wed May 6 22:15:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: devve X-Patchwork-Id: 26645 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 A930FBE173 for ; Wed, 6 May 2026 22:15:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B73AE6301A; Thu, 7 May 2026 00:15:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UaCSZtjh"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CB5D86271A for ; Thu, 7 May 2026 00:15:24 +0200 (CEST) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-488b3f8fa2bso13766895e9.1 for ; Wed, 06 May 2026 15:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778105724; x=1778710524; 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=5PP/kzy3vfZIEAOuJZ3TmxOyZvT0FLcHqGADU314l9M=; b=UaCSZtjhfSE83gwNf+Ds6jIVxJVvmoq69SeoQo3oNxkmagtgnF3d/kYOL6MFQAh6Ev oM0EJkZPHH0mAKMBdM5YJIPhLNZ64KCqHB31IA2s/PwO2TfbEJgAnfP+igJWkeLAqY6p yiAUDxNOQkF3dX/F6CNU2Ss1foCBATh9lZGInbmGwOSDSxxWopMGUaJZlxavZryhgRBB DzFgq6uRQXOlwuYNnyjJ2yOZvMkkliH5jHX1cijVUWIWO10F2p66ov0fbqKiBlnoWw/R gVh1XAiXPhE+gkFUlkrq8+dSQUzCODm4t/8aQW7ScWHdZgvv4hVJWR3rL5DEX9DjSuVK YPnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778105724; x=1778710524; 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=5PP/kzy3vfZIEAOuJZ3TmxOyZvT0FLcHqGADU314l9M=; b=ajLktEqadn36/4jc3bAnSN9aObK45PW7dk33L7PAygkZhv4X1vCUmWHNVclFTadVL+ EwZ5MP6XhjhTflLt6cyPRnzJ7cXxwjiSuzEiAD0Mwvjmpw2wgMRgQ+Yc+mB+WHtVOVZd 3mSN70ljKOxryqa/m5oLNccDWMJR2EyjrsIEUVdi8AFq/wmZ2yOQJEH1vZWyV79fDQNI BjVoO4mHObWGkzS0cuc2o2a9RTTroexcbTYebS4Uvc3yKm5amh5N/KdBpf+5zDDYSQ3X o9lEW7hW/kKsiM4O8AnsOtHFnbZ2OgI0OyBMZ8k+IeEMHyPJIcdRVnnlAgn5UJnT1tqK jGvQ== X-Gm-Message-State: AOJu0YxQDnkrFKsb1qFrGfVTxvZcYvShSU61omOppTKeeX+vBnH1HR9g tpE3PD9AdzsNh+D3sGvSYAMQslaJ9BZ+8O87aIUA7P/ckwNDFQthFNDyQv7ezA== X-Gm-Gg: AeBDies6yLM+NKZ2qGoXrvJaI25XhISt022ctUJdw7nvWXqPUGHUbRWtYeAQy22ivEn 09d31cDNaEeS8IB0OQa1lUQAmZyjpfcrHggAZ4KLbzFYFzlgzEgTDvn/eMkpqkbK0F468KZFJ2N lwT1z/rKCi9QQ7PVhQ8Alwq994z+n3OPPN1WdNWeMSexmcnFeYlbnUmctQyaWFZfBUSGca4GEXy eFo6OPM8tETz8vOYhx6Gq+vQdSaCj4vcmp74FlvCKS6j7/LWUp6qEpVjiuvZNHp2kAofKjEZRiH UUnb+bOVr1tLRdahbKjuL0xx+cvlqmTPzHq5BcSJwF/qIixBrTnm1DAVn5q6X/du2+0HUSBov/9 vV/xdMzPXVBRt8PGfobCFUlHrBmZd9S8i338aMJtfMOKivaDugiwTkKb39vfhC3NcJbP1DS/sD9 fnVO+5v5t6chza5je/HdW3mrNdUTn95lHOFhhQne1oM/+743V+tnTuFa/weyVDFAkX+GC1pYaWl DDpLzlkCnVZkeyReR7snDj52/ceYdz6 X-Received: by 2002:a05:600c:638e:b0:48a:53cb:8604 with SMTP id 5b1f17b1804b1-48e5e00c1b9mr4273305e9.14.1778105724154; Wed, 06 May 2026 15:15:24 -0700 (PDT) Received: from dexps.speedport.ip (p200300eda74453cf3cf3f7929e513b94.dip0.t-ipconnect.de. [2003:ed:a744:53cf:3cf3:f792:9e51:3b94]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e538fad5fsm84266155e9.10.2026.05.06.15.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 15:15:23 -0700 (PDT) From: d3vv3 To: libcamera-devel@lists.libcamera.org Cc: d3vv3 Subject: [PATCH v2] ipa: simple: data: Document tuning parameters in uncalibrated.yaml Date: Thu, 7 May 2026 00:15:20 +0200 Message-ID: <20260506221520.874372-1-devve.3@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260501191400.985920-5-devve.3@gmail.com> References: <20260501191400.985920-5-devve.3@gmail.com> 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" 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 fa5afcdd..b96f29e7 100644 --- a/src/ipa/simple/data/ov01a10.yaml +++ b/src/ipa/simple/data/ov01a10.yaml @@ -51,5 +51,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..7391c36e 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 on the CPU ISP, 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: ...