Patch Detail
Show a patch.
GET /api/1.1/patches/24176/?format=api
{ "id": 24176, "url": "https://patchwork.libcamera.org/api/1.1/patches/24176/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24176/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20250822123709.16966-2-david.plowman@raspberrypi.com>", "date": "2025-08-22T12:37:04", "name": "[1/6] utils: raspberrypi: ctt: Update noise/sharpness tuning", "commit_ref": "dd32736f00b11570fbd7728733da24294930027a", "pull_url": null, "state": "accepted", "archived": false, "hash": "75957916292636a82ade46b75f1d459f0847056a", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24176/mbox/", "series": [ { "id": 5398, "url": "https://patchwork.libcamera.org/api/1.1/series/5398/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5398", "date": "2025-08-22T12:37:03", "name": "Camera tuning updates for Raspberry Pi", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5398/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24176/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24176/checks/", "tags": {}, "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 6D56DBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Aug 2025 12:37:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 15501692EE;\n\tFri, 22 Aug 2025 14:37:17 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 28E2C613DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Aug 2025 14:37:14 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-45a15fd04d9so20913625e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Aug 2025 05:37:14 -0700 (PDT)", "from raspberrypi.pitowers.org\n\t([2a00:1098:3142:1f:ffc9:aff6:7f7f:893b])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3c07487986fsm16685787f8f.1.2025.08.22.05.37.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Aug 2025 05:37:12 -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=\"O94l/ds0\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1755866233; x=1756471033;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=wiumghQ1tOf7RLY7Ch6y8G0M/NNIVVdnDRDSrg9IvwI=;\n\tb=O94l/ds0ztDMH31p71t/DjqMtYpp+ob2056RnggaRTGinImNyki9ZfmZCPm8FET5lE\n\taPRbbeZTr0z7Pt6Fq0RXOFfpirGGHdjbAJ2dclqgB5Wg3NnYflZj1IbjcwJVuNCfgoTv\n\t/YC87EyQpX+1WliQceHbjxOf1L4cEmZ+GtbvKa7lKi7LXpYyoNVwGSyv8hKDE5PfMTvT\n\tRguLRqNP3HIRyylp+rImByjjak/UFqsiwblG/ol6D6I7LnIj4pu0Dn9FoivmNhEcOnt7\n\tK//n1Sd4VMLR+uu3R1Y7WKgrrEjoBsERpaDLUjXO+G4mLBGyeqAzOzOArFesjjQ8X9MC\n\tnFzQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1755866233; x=1756471033;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=wiumghQ1tOf7RLY7Ch6y8G0M/NNIVVdnDRDSrg9IvwI=;\n\tb=ByNThWEe22ce3xH7u9c9300OQIPjDYs967cXJW2Kt0RQqKraqWM4KT4OMrnCNvAlCc\n\tmKqXV54yhfsQ2oCggsBukxhPQ2s9pN9D6NTRRKXUeD/JCuInzE1YkdjUGoKJMscmHMQ4\n\taZCamLqiw3f1yGw9YyzH+/E5NGqOu5Tu4niObxx7NBhTaFra3NW6x0rWB5TW004EFmrK\n\t1EvvbS753Sfq+q6nu0PP6BKx0ICcz9dM5OENIzbQwlayr+HQG/UP1cuiSZi5qfPIShmR\n\tUd/7f1WGCwnBYlfk3O1s8gBlSnFNnKFQESlGRkq0P4QCrgs71LqbHEONWQyhkvz7kyvW\n\t0ZRg==", "X-Gm-Message-State": "AOJu0Yx6Pp0AtHhkMdh1UtRhOOxkXHwBRCRG0+qU7zF7BJpGIgJnlR1Y\n\tvINZsH+EfyVQFvj5GnvXxhTzUsOKI5AmbfoN5QDuUbB2bPYe5qt9SkzdhXjTEcHMxNOk4eEtyPM\n\tFiZkc", "X-Gm-Gg": "ASbGncsbkmnDM5LQfBDZFeGq8A1nMTra7vvIePNEqj4EfsyWEOXayESrUNJjWzLyuq5\n\tyulBiR6vv8HpNS3slNl1Bqkss4H/g6qGS/gNG1uHKRMmU0298jqCaqQd26kvfskciRSM/6ym1/E\n\tIKcA53pGEv5JnRIYOlu/5wkp28OnOCUiCiaFvRG8GIk6LkjVusl8E/RuCpCsxYTEhTEjRtvDzQG\n\tX4pZgQruRpCHxdxUY4ZjeyJrURqVjVg6iTsrPjvmUquj50jQmhnWXH7QDmyxa8hH4wffIUzNEmd\n\tH+ylFZo/3JZ3zKeseiZuFIJiOLDaFbRA9iN3+IWiMUH88CTLfPFyryBkUKFBn7x6R9wE8GiErav\n\tFHAKi4v8d3YeBim8JEmCbfKr3jpawseHFukUS/yQseIFd+tUA2r5k1K9PLQFMu3OuF2iCkRVOAQ\n\tbt+J/gVpadwoMUx8wHorSaJ8tmTFKiP6jJo2wUD7g=", "X-Google-Smtp-Source": "AGHT+IHgE7csRxHLYKP8b2kF6NhHpECDTOq09/WA6PwH1yKKhDBUOTlSf9M5BDM6Z2ogrkPmeeczIw==", "X-Received": "by 2002:a05:600c:3b0c:b0:455:f7d5:1224 with SMTP id\n\t5b1f17b1804b1-45b51791ed7mr22993995e9.9.1755866233355; \n\tFri, 22 Aug 2025 05:37:13 -0700 (PDT)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "David Plowman <david.plowman@raspberrypi.com>", "Subject": "[PATCH 1/6] utils: raspberrypi: ctt: Update noise/sharpness tuning", "Date": "Fri, 22 Aug 2025 13:37:04 +0100", "Message-Id": "<20250822123709.16966-2-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.39.5", "In-Reply-To": "<20250822123709.16966-1-david.plowman@raspberrypi.com>", "References": "<20250822123709.16966-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>" }, "content": "The default noise/sharpness/gamma values are updated to reflect the\nlatest camera tuning work.\n\n- Denoise is inceased when not using temporal denoise.\n- Denoise is reduced when benefitting from temporal denoise.\n- Over-sharpening is reduced.\n- High contrast gamma is slightly reduced.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n utils/raspberrypi/ctt/ctt.py | 3 +-\n utils/raspberrypi/ctt/ctt_pisp.py | 106 +++++++++++++++++-------------\n 2 files changed, 64 insertions(+), 45 deletions(-)", "diff": "diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py\nindex 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 \ndiff --git a/utils/raspberrypi/ctt/ctt_pisp.py b/utils/raspberrypi/ctt/ctt_pisp.py\nindex 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-\t\"threshold\": 0.25,\n-\t\"limit\": 1.0,\n+\t\"threshold\": 0.75,\n+\t\"limit\": 0.5,\n \t\"strength\": 1.0\n },\n \"rpi.hdr\":\n", "prefixes": [ "1/6" ] }