[{"id":38856,"web_url":"https://patchwork.libcamera.org/comment/38856/","msgid":"<85cxz2td2q.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-05-11T11:12:13","subject":"Re: [PATCH v2 09/10] ipa: simple: data: Document tuning parameters\n\tin uncalibrated.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\nThis should be a separate patch.\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 d1f613c5..9663c6da 100644\n> --- a/src/ipa/simple/data/ov01a10.yaml\n> +++ b/src/ipa/simple/data/ov01a10.yaml\n> @@ -51,5 +51,5 @@ algorithms:\n>    - Agc:\n>        exposureTarget: 2.5\n>        hysteresis: 0.2\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..7391c36e 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\nOr taken from the camera sensor helper if provided.\n\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 on the CPU ISP, and should\n> +  # only be enabled if tuned. 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\nI think the proportionalGain description should be a bit clarified.\nIt's not clear whether the given values are applied for the default\nvalue and why the default factor is 0.04 while the other factor values\nare > 1.0.\n\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 EE6D4BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 May 2026 11:12:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D56163020;\n\tMon, 11 May 2026 13:12:21 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B10A62DC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 May 2026 13:12:19 +0200 (CEST)","from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n\t[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-298-ZH77fwMrMWqOxW0xA0NrIw-1; Mon, 11 May 2026 07:12:17 -0400","by mail-wr1-f70.google.com with SMTP id\n\tffacd0b85a97d-44cc3c9b2feso3968624f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 May 2026 04:12:16 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-4548ec6c79fsm26312644f8f.15.2026.05.11.04.12.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 11 May 2026 04:12:14 -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=\"GhZoDV3f\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1778497938;\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=mdeYAd+wJ2cw+HFMQSr1i50Xfn9sTuZcGbuuAkNDMII=;\n\tb=GhZoDV3fj3TTbl/sxqQ5JOTwNhTEdWaSlQSBA23Sb4jDCfEV9FTt28HE50DFpLlvz5jjUr\n\tOg9P6pvJga0cNpptc4RT6vizGwwCpFdrqh5WjOknCtaGbvgIvR6vipJD2ZIuSrvKMHkluU\n\tVO1XrTZsexyfT8NFh5bets49vp1lcB8=","X-MC-Unique":"ZH77fwMrMWqOxW0xA0NrIw-1","X-Mimecast-MFC-AGG-ID":"ZH77fwMrMWqOxW0xA0NrIw_1778497936","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1778497935; x=1779102735;\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=mdeYAd+wJ2cw+HFMQSr1i50Xfn9sTuZcGbuuAkNDMII=;\n\tb=pDJPEA62Fs34Qo7TTHcAuzqEazAhQJosVsQ5lesiwKslSPNz1nUUwFQGFuQ1qAxeL6\n\tAvIqKHkYx/03s62UBEkAPNHk0S48NURBPL1mc3jP4jGd6Cq/h1Oovu5xhnm6I3faioXu\n\t8ECDvIiedAhzb/eRgAxWJZ8gTbWhstyBi5ZTloUawZVYzXv/hGjnRQsTZMOuADo0DVCu\n\tn8Qla0KaR0bkkY+267sGndL5l+82AicPC5Wgi/O2Q433yhytDcuNGTxqVu/iLviyS339\n\tx1uceg/9x0Ye4tljgmRHqwhyz0pK0KXHVbFmMXbNQj7oG1PuWe80p/gPL5R/mX1dx7Ed\n\tNTug==","X-Gm-Message-State":"AOJu0YwxF1QReUvj1gPqFYhrEhtOfBiGoUWCoV5ejCYkMmPtZHPEgmHY\n\tpfn3feIYt9UIV3kIDXziBcVuh/A2OorHZ8BH6W+ms0TDYvXcCen7lA6ccijLvGsCcgJG8TVNQ05\n\t8m0uSXbeo6jrbTdCRRpmjSlLa+PWpmASN/gScXlon7SEPc3nmQg+x1jw8XV6pIRTtIHCx/zud9t\n\t9l/n20M+4BbynRVLHBGvKR5fj/lt43CIRl0xEw2RFffCwacDfUVDf4YnUfo/I=","X-Gm-Gg":"Acq92OGg45wyrdD8TaLpjGL7/6twLjT+PpcwPnECB6VzynUTg/FvY/4k6ZCFJ6/1c74\n\tYxO38T1hOWYacRmAqK8tWZnYVpmp1oSkIPozOf+MVvNWZUULMb/LhIGIQwPOHwpzXi8DG3o/za9\n\tQgBoQxn8ss7CHOGkeVlxeDwDlkkhGha4eLS3YIGc6HmE23l9uAqK8o75zRU/skHW7vbPj07xb3w\n\tHDlhyYGzsvFmPPIZdluRtOYnHPO6OV5+VPHUypxP9pGqGFUSgW6VOhVTLa1UyGb1dD4wK5r9My6\n\taoIkluWTsfC9mpptUz5nJgamo0dDNRjVf1AsEaERhT9QoHUjZlKGw/FNy9L0qRYTSsiuekF03ij\n\t432iN87bk6vYN7X3Ww4kTTOVixj5IZYXL8xWXm6w9vlBjzoxqse2GQIK97SO2IFUn44MCGYxqGU\n\tw=","X-Received":["by 2002:a5d:6e4e:0:b0:456:d5bf:e24d with SMTP id\n\tffacd0b85a97d-456d5bfe26dmr8950390f8f.2.1778497935339; \n\tMon, 11 May 2026 04:12:15 -0700 (PDT)","by 2002:a5d:6e4e:0:b0:456:d5bf:e24d with SMTP id\n\tffacd0b85a97d-456d5bfe26dmr8950344f8f.2.1778497934733; \n\tMon, 11 May 2026 04:12:14 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"d3vv3 <devve.3@gmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 09/10] ipa: simple: data: Document tuning parameters\n\tin uncalibrated.yaml","In-Reply-To":"<20260506230722.1041596-10-devve.3@gmail.com> (d3vv3's message\n\tof \"Thu, 7 May 2026 01:07:21 +0200\")","References":"<20260506230722.1041596-1-devve.3@gmail.com>\n\t<20260506230722.1041596-10-devve.3@gmail.com>","Date":"Mon, 11 May 2026 13:12:13 +0200","Message-ID":"<85cxz2td2q.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":"cXt3YiwwC6sZ5PQpGhsnS0EBa5OQ9UbnDmXnRCwS7wM_1778497936","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>"}}]