[{"id":35561,"web_url":"https://patchwork.libcamera.org/comment/35561/","msgid":"<CAEmqJPps7Zz_MSnTvA4fjPESrHrYHNWAeHDohSW1gtTOCRH8GA@mail.gmail.com>","date":"2025-08-26T07:12:27","subject":"Re: [PATCH 1/6] utils: raspberrypi: ctt: Update noise/sharpness\n\ttuning","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nOn Fri, 22 Aug 2025 at 13:37, David Plowman\n<david.plowman@raspberrypi.com> wrote:\n>\n> The default noise/sharpness/gamma values are updated to reflect the\n> latest camera tuning work.\n>\n> - Denoise is inceased when not using temporal denoise.\n\ns/inceased/increased/\n\nHopefully it can be fixed when merging?\n\n> - Denoise is reduced when benefitting from temporal denoise.\n> - Over-sharpening is reduced.\n> - High contrast gamma is slightly reduced.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n> ---\n>  utils/raspberrypi/ctt/ctt.py      |   3 +-\n>  utils/raspberrypi/ctt/ctt_pisp.py | 106 +++++++++++++++++-------------\n>  2 files changed, 64 insertions(+), 45 deletions(-)\n>\n> diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py\n> index 186afda5..93a8e8fb 100755\n> --- a/utils/raspberrypi/ctt/ctt.py\n> +++ b/utils/raspberrypi/ctt/ctt.py\n> @@ -436,7 +436,8 @@ class Camera:\n>          write to json\n>          \"\"\"\n>          self.json['rpi.noise']['reference_constant'] = int(noise_out[1])\n> -        self.json['rpi.noise']['reference_slope'] = round(noise_out[0], 3)\n> +        # Results are better with about 40% higher deviation.\n> +        self.json['rpi.noise']['reference_slope'] = round(1.4 * noise_out[0], 3)\n>          self.log += '\\nNOISE calibrations written to json'\n>          print('Finished NOISE calibrations')\n>\n> diff --git a/utils/raspberrypi/ctt/ctt_pisp.py b/utils/raspberrypi/ctt/ctt_pisp.py\n> index a59b053c..8a5fc03f 100755\n> --- a/utils/raspberrypi/ctt/ctt_pisp.py\n> +++ b/utils/raspberrypi/ctt/ctt_pisp.py\n> @@ -29,11 +29,11 @@ json_template = {\n>          {\n>              \"sdn\":\n>              {\n> -                \"deviation\": 1.6,\n> -                \"strength\": 0.5,\n> +                \"deviation\": 0.6,\n> +                \"strength\": 0.95,\n>                  \"deviation2\": 3.2,\n>                  \"deviation_no_tdn\": 3.2,\n> -                \"strength_no_tdn\": 0.75\n> +                \"strength_no_tdn\": 0.95\n>              },\n>              \"cdn\":\n>              {\n> @@ -42,7 +42,7 @@ json_template = {\n>              },\n>              \"tdn\":\n>              {\n> -                \"deviation\": 0.8,\n> +                \"deviation\": 1.0,\n>                  \"threshold\": 0.05\n>              }\n>          },\n> @@ -50,11 +50,11 @@ json_template = {\n>          {\n>              \"sdn\":\n>              {\n> -                \"deviation\": 1.6,\n> -                \"strength\": 0.5,\n> +                \"deviation\": 0.6,\n> +                \"strength\": 0.95,\n>                  \"deviation2\": 3.2,\n>                  \"deviation_no_tdn\": 3.2,\n> -                \"strength_no_tdn\": 0.75\n> +                \"strength_no_tdn\": 0.95\n>              },\n>              \"cdn\":\n>              {\n> @@ -71,11 +71,11 @@ json_template = {\n>          {\n>              \"sdn\":\n>              {\n> -                \"deviation\": 1.6,\n> -                \"strength\": 0.5,\n> +                \"deviation\": 0.6,\n> +                \"strength\": 0.95,\n>                  \"deviation2\": 3.2,\n>                  \"deviation_no_tdn\": 3.2,\n> -                \"strength_no_tdn\": 0.75\n> +                \"strength_no_tdn\": 0.95\n>              },\n>              \"cdn\":\n>              {\n> @@ -714,38 +714,56 @@ json_template = {\n>      \"rpi.contrast\": {\n>          \"ce_enable\": 1,\n>          \"gamma_curve\": [\n> -            0,     0,\n> -            1024,  5040,\n> -            2048,  9338,\n> -            3072,  12356,\n> -            4096,  15312,\n> -            5120,  18051,\n> -            6144,  20790,\n> -            7168,  23193,\n> -            8192,  25744,\n> -            9216,  27942,\n> -            10240, 30035,\n> -            11264, 32005,\n> -            12288, 33975,\n> -            13312, 35815,\n> -            14336, 37600,\n> -            15360, 39168,\n> -            16384, 40642,\n> -            18432, 43379,\n> -            20480, 45749,\n> -            22528, 47753,\n> -            24576, 49621,\n> -            26624, 51253,\n> -            28672, 52698,\n> -            30720, 53796,\n> -            32768, 54876,\n> -            36864, 57012,\n> -            40960, 58656,\n> -            45056, 59954,\n> -            49152, 61183,\n> -            53248, 62355,\n> -            57344, 63419,\n> -            61440, 64476,\n> +            0, 0,\n> +            512, 2518,\n> +            1024, 5033,\n> +            1536, 7175,\n> +            2048, 9309,\n> +            2560, 10814,\n> +            3072, 12312,\n> +            3584, 13773,\n> +            4096, 15225,\n> +            4608, 16566,\n> +            5120, 17899,\n> +            5632, 19221,\n> +            6144, 20534,\n> +            6656, 21684,\n> +            7168, 22826,\n> +            7680, 24024,\n> +            8192, 25212,\n> +            9216, 27251,\n> +            10240, 29167,\n> +            11264, 30947,\n> +            12288, 32696,\n> +            13312, 34309,\n> +            14336, 35849,\n> +            15360, 37194,\n> +            16384, 38445,\n> +            17408, 39598,\n> +            18432, 40732,\n> +            19456, 41717,\n> +            20480, 42687,\n> +            22528, 44343,\n> +            24576, 45871,\n> +            26624, 47222,\n> +            28672, 48441,\n> +            30720, 49460,\n> +            32768, 50470,\n> +            34816, 51476,\n> +            36864, 52480,\n> +            38912, 53382,\n> +            40960, 54294,\n> +            43008, 55155,\n> +            45056, 56035,\n> +            47104, 56920,\n> +            49152, 57824,\n> +            51200, 58737,\n> +            53248, 59666,\n> +            55296, 60604,\n> +            57344, 61558,\n> +            59392, 62529,\n> +            61440, 63516,\n> +            63488, 64519,\n>              65535, 65535\n>          ]\n>      },\n> @@ -754,8 +772,8 @@ json_template = {\n>      \"rpi.cac\": {\n>      },\n>      \"rpi.sharpen\": {\n> -       \"threshold\": 0.25,\n> -       \"limit\": 1.0,\n> +       \"threshold\": 0.75,\n> +       \"limit\": 0.5,\n>         \"strength\": 1.0\n>      },\n>      \"rpi.hdr\":\n> --\n> 2.39.5\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 42ABABEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Aug 2025 07:13:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D2434692E9;\n\tTue, 26 Aug 2025 09:13:06 +0200 (CEST)","from mail-ua1-x930.google.com (mail-ua1-x930.google.com\n\t[IPv6:2607:f8b0:4864:20::930])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25A0069257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Aug 2025 09:13:05 +0200 (CEST)","by mail-ua1-x930.google.com with SMTP id\n\ta1e0cc1a2514c-89238f8c1f1so56492241.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Aug 2025 00:13:05 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"e+FpHcD5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1756192384; x=1756797184;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Gg6H8aPnb+xPP4RW80t7kcsbtK+4CWdA12QbEOGNkT8=;\n\tb=e+FpHcD5g0CuYOWKKn91G9qGaFOvIqa5A9zFUePPmxttFrQm6O1iBjvYjLHk1+P3gO\n\tdBTUd/SkfZmwH7VZD1FVDxaqRWlSU+O4ADcHvJNH4dXTG+KSo2hAXtOSL0REhPOZdlal\n\tnLCId2zGUdDP/YqCF9dAfGRUtDii3BrsZx2gNC+V9A4LGwRnnvZSW5B5uuWg1R1VO9aS\n\tkH0cJOwbtBYmX3bDRsgBXdcTrCzSgblw1PmVOiBCt4hp7ACpCRmbswDvwrPNHgZWltDQ\n\tcUepDgW52KVqjwN9beOSG91+7d0jxfIQ948ewpXwc7XOC6QF7kDG2++XM4IFn+tySGJm\n\t72Aw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1756192384; x=1756797184;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=Gg6H8aPnb+xPP4RW80t7kcsbtK+4CWdA12QbEOGNkT8=;\n\tb=dbkMt8SGUNBCjQs5lZlnkJms/ltksz8LxIJtPbrbPNq6WvlWu2XUDWvNcyUmSlq7ti\n\tqX/NsJoOZOWgRoOwQRgKe4/GpcinuD5AOoDaqqmcNdz+dkJog9kyAamP0vJk7YhuIaRW\n\tArtPfQAbsmbTW+wsqREDJd9rt41L1dywTucgMDX9mus61FW0iXb8Qbmqh/+5SfiQygiF\n\tSLLPj+NwnR02K1hTTczce9ZnCXWPCEYxc2SK/r/KzYd8tmDs3YfC9MzuSmHfwGA6rOjA\n\tBlXyRPkj0OHKFLbfdQMTnCcJ1/axP+1d+EgpW7rFL2JDI+LJgisq5KMVV/8eNz6K1baX\n\tdtIg==","X-Gm-Message-State":"AOJu0YzZ2u57yr717ISo0F93aqP0knUrDdix0FIaXOfuS+WiCs1bWWWX\n\tmo9ZCi6hbVkNlGQipaQaOhbTEURP6airIPHjbq5YXU+o0J2hmrJ3qd0lX5EMYekgh6nzEqqDvZ8\n\t5O5Ji0f3uuIzehKgn4Nlpfnx94CQYEdoE4uGsfXkhpQ==","X-Gm-Gg":"ASbGnctkTgkUfxg3V/pndDoT3Ehan87BZsEo1nLNnuJPJGcmftWuNuGdpbmxyohNvWX\n\t7HPQlXlPtJlf5yDXOIQRQN/DHk0RByQj2cZp3gfShcLbMOjiTUG05fibvrkMGhJ9crjba2Eb8wJ\n\tBklhn3BJz4MIdYBEac4OET6KgFaETu9IJIzvdwZam1wOi8SxI304HkCeKxmDMKfqzCDV0ioPr8y\n\tlYj8Y0roLU9Qeia+BuP8sYXh/jIZBLsIDcbyyc=","X-Google-Smtp-Source":"AGHT+IFe7uwm2dH1v7s98zhQznDtfesemWGd7ebxpgzZXtcsqXTewZKSwMANiQW97QCALv6sU2sC3QO6MueLYSDqyBk=","X-Received":"by 2002:a05:6102:d93:b0:4ec:c546:be3d with SMTP id\n\tada2fe7eead31-51d0e8b3a52mr1624797137.3.1756192383696;\n\tTue, 26 Aug 2025 00:13:03 -0700 (PDT)","MIME-Version":"1.0","References":"<20250822123709.16966-1-david.plowman@raspberrypi.com>\n\t<20250822123709.16966-2-david.plowman@raspberrypi.com>","In-Reply-To":"<20250822123709.16966-2-david.plowman@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Tue, 26 Aug 2025 08:12:27 +0100","X-Gm-Features":"Ac12FXyKQ9MZqjvcvqN0uP9Z0gEWOtWRnvIrgiReM9m9IbrfMrHSYNliHOoBugU","Message-ID":"<CAEmqJPps7Zz_MSnTvA4fjPESrHrYHNWAeHDohSW1gtTOCRH8GA@mail.gmail.com>","Subject":"Re: [PATCH 1/6] utils: raspberrypi: ctt: Update noise/sharpness\n\ttuning","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","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>"}}]