[{"id":38727,"web_url":"https://patchwork.libcamera.org/comment/38727/","msgid":"<85jyti2cq2.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-05-05T13:43:49","subject":"Re: [PATCH] ipa: simple: data: Document tuning parameters in\n\tuncalibrated.yaml","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"d3vv3 <devve.3@gmail.com> writes:\n\n> Add comments documenting all algorithm YAML keys (BlackLevel, Awb,\n> Ccm, Adjust, Agc) to the uncalibrated template so sensor calibration\n> authors can discover parameters without reading source code.\n> Update ov01a10.yaml replacing stepDenominator (removed) with\n> proportionalGain for the new proportional AGC controller.\n>\n> Signed-off-by: d3vv3 <devve.3@gmail.com>\n> ---\n>  src/ipa/simple/data/ov01a10.yaml      |  2 +-\n>  src/ipa/simple/data/uncalibrated.yaml | 40 +++++++++++++++++++++++----\n>  2 files changed, 35 insertions(+), 7 deletions(-)\n>\n> diff --git a/src/ipa/simple/data/ov01a10.yaml b/src/ipa/simple/data/ov01a10.yaml\n> index 9b3b8007..927d9dd6 100644\n> --- a/src/ipa/simple/data/ov01a10.yaml\n> +++ b/src/ipa/simple/data/ov01a10.yaml\n> @@ -21,5 +21,5 @@ algorithms:\n>    - Agc:\n>        exposureTarget: 1.4\n>        hysteresis: 0.5\n> -      stepDenominator: 20\n> +      proportionalGain: 0.04\n>  ...\n> diff --git a/src/ipa/simple/data/uncalibrated.yaml b/src/ipa/simple/data/uncalibrated.yaml\n> index fc90ca52..f1bcb020 100644\n> --- a/src/ipa/simple/data/uncalibrated.yaml\n> +++ b/src/ipa/simple/data/uncalibrated.yaml\n> @@ -3,17 +3,45 @@\n>  ---\n>  version: 1\n>  algorithms:\n> +  # --- Black Level ---\n> +  # blackLevel: 16-bit black level pedestal (optional).\n> +  #   If omitted, auto-detected from histogram dark end.\n>    - BlackLevel:\n> +\n> +  # --- Auto White Balance ---\n> +  # maxGainR: Maximum red channel gain (default 4.0).\n> +  # maxGainB: Maximum blue channel gain (default 4.0).\n> +  # speed: Temporal smoothing factor 0-1 (default 1.0 = instant).\n> +  #   0.25 = slow smooth, 0.5 = moderate, 1.0 = no smoothing.\n>    - Awb:\n> -  # Color correction matrices can be defined here. The CCM algorithm\n> -  # has a significant performance impact, and should only be enabled\n> -  # if tuned.\n> +\n> +  # --- Color Correction Matrix ---\n> +  # Has a significant performance impact, and should only be\n> +  # enabled if tuned.  \n\nWhen on it, this should be fixed -- the performance impact applies only\nto CPU ISP.\n\n> Provide ccms as a list of color temperature\n> +  # entries with a 3x3 matrix:\n>    # - Ccm:\n>    #     ccms:\n>    #       - ct: 6500\n> -  #         ccm: [ 1, 0, 0,\n> -  #                0, 1, 0,\n> -  #                0, 0, 1]\n> +  #         ccm: [ 1.0,  0.0,  0.0,\n> +  #                0.0,  1.0,  0.0,\n> +  #                0.0,  0.0,  1.0 ]\n> +  # - Ccm:\n> +\n> +  # --- Image Adjustments ---\n> +  # gamma: Gamma encoding value (default 2.2, range 0.1-10.0).\n> +  # contrast: Contrast scaling (default 1.0, range 0.0-2.0).\n> +  # saturation: Saturation multiplier (default 1.0, range 0.0-2.0).\n> +  #   Only active when CCM is enabled.\n>    - Adjust:\n> +\n> +  # --- Auto Gain/Exposure Control (proportional) ---\n> +  # exposureTarget: Target MSV (mean sample value) in histogram bins.\n> +  #   Default: 2.5 (middle of 5-bin range).\n> +  #   Lower values target a darker exposure.\n> +  # hysteresis: Deadband around target where no adjustment occurs.\n> +  #   Default 0.2. Larger values reduce sensitivity near target.\n> +  # proportionalGain: Step scaling factor (default 0.04).\n> +  #   At max error (~2.5): factor 1.10 (~10% step).\n> +  #   Near target: factor ~1.01 (~1% step).\n>    - Agc:\n>  ...","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 F37F7BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 May 2026 13:44:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE56A62DC4;\n\tTue,  5 May 2026 15:44:00 +0200 (CEST)","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 0E0D962DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 May 2026 15:43:58 +0200 (CEST)","from mail-wr1-f72.google.com (mail-wr1-f72.google.com\n\t[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-49-gCAdB8JTOaqg5gs5ascXDg-1; Tue, 05 May 2026 09:43:55 -0400","by mail-wr1-f72.google.com with SMTP id\n\tffacd0b85a97d-44d9ace59efso1794339f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 05 May 2026 06:43:53 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb ([213.175.37.14])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-45052483166sm4798656f8f.7.2026.05.05.06.43.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 05 May 2026 06:43:50 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"VBwqz847\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1777988637;\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=vrTDxD4I34+Qm7wiAkTWVokeH/v+orWZ7plMtQUj5rc=;\n\tb=VBwqz847cPKRTJgd3r3K54CKs2IdEH8RB4FjzdDuYMtDDp3eAMiGQt9q2S0jX56mUoQAeJ\n\tvkIQb/LUoPC9VoMAhiE11NR4v2+INJpYOrXCBXn1vi1P4dGl94f/KfxwU6NFgQKoC05pLM\n\tWgGkDLWMNsM/oQUl6pqSdERQlrgEVXQ=","X-MC-Unique":"gCAdB8JTOaqg5gs5ascXDg-1","X-Mimecast-MFC-AGG-ID":"gCAdB8JTOaqg5gs5ascXDg_1777988632","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1777988632; x=1778593432;\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=vrTDxD4I34+Qm7wiAkTWVokeH/v+orWZ7plMtQUj5rc=;\n\tb=c6e6gBHug2ej1zInQ5f2H2Yqr2yjUP6cHmQ5ZI8wmzfC1JHBU96GfYNu2807q5QABg\n\thCgU5+IuuT2nWjPTTBWkjcQq1qNp3gIPyUJdVNpRM3LvocmPtHakV3H9JBWnO/8yyQ5y\n\tTFnHb/0z0faCtabrcKQO6GAeSHvvZ3Hva9R8CehPTO03GMMLX9km9YRXw/C+uK157dJK\n\tkDY1dwbi8QG46Temkxh8Z82sMDp0RG5xNL3fkOx8LkTCoWQoxddM581t8e9GvOgiLMMa\n\tg6DTxesDvZFc15mKube3SZzMFCQuFSYcbESOeqglPacVlo8FSFNArCh3icy+x1/vSiFe\n\txqEg==","X-Gm-Message-State":"AOJu0Yzj09fr6Ip4j9m8ZH8WxnIWtj5MreUW0w0lVvHXjf09tm+jbWSe\n\tiapIitC+1z6xfbEroerD722+lnp+roGOchyYliZoLVwJ3MzPXkeMWbQASgeAtu9dDk2v/KEkwd8\n\t8iZd1Jp+/uoqvrmHx1t7ULVlD+YW1XydinUPFJ/56sw9REjwdITnH+bUWIzhaiBnbpnNZTecqKD\n\toab5/1atIIIr+y6FO+nr1rda/S874QPrq0Auixn9kJuPcCYvrOkIqB300kTrQ=","X-Gm-Gg":"AeBDievhKhg+pOwcNWq/fcntq/MwNPAaFFHVM7WvQKSKoo3ATe9B7z5lp6pNLNgLb7G\n\tGZIxpkrz1FcJJrG/2ojm1Sy4AFwi/G0QxL/oGgBI91eVeThxkrRe4ZWds8zzX1N97Tpf0s2mkjo\n\tz3O91SpuW2WegoEML25imXSxR2+YtTxwKhYdHU6aLwkFqVj1iBZo7SN956wwcuL5VuMlL3cH5gM\n\t4mDE11Db4UG9vubYOgMscgVwUNWm3igVWZglVn7mNTbokywYxIgLRuMA0Gkz7bYHT+eE8XBfK9E\n\tijgBVZROE+MihUFZQF3RBKUqzCSsvtgJ4Bx0KYmzkppXHOuYUOM+FSLsoJDhsGHzdx7n0KetXK9\n\tE9KwG9BMi0ZGissfq5FNmEQMHMU9ULkeGHVGe67vK+i7Y7V3i","X-Received":["by 2002:a05:6000:2f87:b0:43c:f8b4:e58 with SMTP id\n\tffacd0b85a97d-44bb6ab1e87mr23022525f8f.41.1777988631853; \n\tTue, 05 May 2026 06:43:51 -0700 (PDT)","by 2002:a05:6000:2f87:b0:43c:f8b4:e58 with SMTP id\n\tffacd0b85a97d-44bb6ab1e87mr23022454f8f.41.1777988631239; \n\tTue, 05 May 2026 06:43:51 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"d3vv3 <devve.3@gmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] ipa: simple: data: Document tuning parameters in\n\tuncalibrated.yaml","In-Reply-To":"<20260501191400.985920-5-devve.3@gmail.com> (d3vv3's message of\n\t\"Fri, 1 May 2026 21:13:13 +0200\")","References":"<20260501191400.985920-1-devve.3@gmail.com>\n\t<20260501191400.985920-5-devve.3@gmail.com>","Date":"Tue, 05 May 2026 15:43:49 +0200","Message-ID":"<85jyti2cq2.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":"mSrvAYwyKJR3jAjWezW6LhioBa9zwQpc826iiRGJ-9w_1777988632","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>"}}]