{"id":16634,"url":"https://patchwork.libcamera.org/api/patches/16634/?format=json","web_url":"https://patchwork.libcamera.org/patch/16634/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220714152409.9780-8-naush@raspberrypi.com>","date":"2022-07-14T15:24:08","name":"[libcamera-devel,v5,7/8] utils: raspberrypi: ctt: Output version 2.0 format tuning files","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"a2cbe9836d0078fafef8b6e73b4909a9825b74a7","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16634/mbox/","series":[{"id":3285,"url":"https://patchwork.libcamera.org/api/series/3285/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3285","date":"2022-07-14T15:24:01","name":"Replace boost JSON parser with libyaml in Raspberry Pi IPA","version":5,"mbox":"https://patchwork.libcamera.org/series/3285/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16634/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16634/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 BC1E1BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Jul 2022 15:24:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 61DF063314;\n\tThu, 14 Jul 2022 17:24:28 +0200 (CEST)","from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53C2B63324\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Jul 2022 17:24:23 +0200 (CEST)","by mail-wm1-x334.google.com with SMTP id\n\th14-20020a1ccc0e000000b0039eff745c53so1413138wmb.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Jul 2022 08:24:23 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th14-20020a1ccc0e000000b003a2e7c13a3asm2322476wmb.42.2022.07.14.08.24.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 14 Jul 2022 08:24:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657812268;\n\tbh=y8goIwdID46N1e76oA4FSBS0Xh6vcW1N9CXrLBOoAGY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=ffpQ64GCNHNxwHiH22i8N7j62+5xhXxOB+xaUurDwt0FKdyX9JMMqAPKVJossTwO9\n\tKXbrZ0lngsAkG4evWHAvYtJZt1v7ot5zq+5a810Ijs7zKau0H4tHKpPvZ232ubliM3\n\tmjhzwmup4JFySi+KbeGVDgUB68mXheg4SY/Inp8I59IYn0VnVdtSn7zuFCNktDgU8F\n\tPZrxfkohZWmBqPcLNtHHlxENVElgSh3Gug51XiWz3W8Xc5eKoxquJGzeuv76q+5XW2\n\ttUig4NKDgsOEKYa0wKuTaRIrUznECvRJU8ilts0j40E1TlpWZ+1/zY8KuP0Zn4KY30\n\tt2caR/yBt4V6A==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=TOodaolQR4gfp39MRCnIiMq7MOlHAiUC2bOadxeqkuY=;\n\tb=X3x2JW5UCtWCf1qpsTvp0OMLiUcDhTr45OkDrzcFf/iPOtZK0TW9iIXYz0h2TDbNky\n\tewTPYzkQrFc/JDbo9BRHVubEYcm3Lg1zwzt0y6fIAUJQjbtGpJp/L/WDymUCpgAraIqC\n\t7i02xQNaKO/Xy9JoQOjVU0Yc3eg12ooEJdkCgNCivsMNeMkDggjgRqHKE8taS7Kz5MVo\n\tRafaqDVd5EwBeIvw8+UvbjBaP9PoPkMIBgtGRuh1qcVQpwlUNwwX1myOcnG/9KodgMf2\n\tvbRft7SxP9To3oDNNOjqKxoDfnSJjZZIw2wSG1/fO3jO4efTV425WxtIo2z7PmxXRqw3\n\tfSPA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"X3x2JW5U\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=TOodaolQR4gfp39MRCnIiMq7MOlHAiUC2bOadxeqkuY=;\n\tb=KhYqhHBi2XhN2zPEEwfvrrh3LBv+3jpSzyiQqzUzPyMFOBqgEVYQoXf5raMLFxR17C\n\t/DQuV/v0JpWCYGdZR31IHQE3YAOFpCyt9366V4JzhaWDVyvjedazl3r9WDfHAcAS2Y82\n\tdgI9MNIqcSmM5KpiH+yXm+9SgvIIx8bMApJ8+ksTfMHsm9ilvr2DajXessPGDSbuc5Mt\n\t7LyE63UXq04EM+E1euUTrA5FfpJKq84phcRNsj69HKeOG3fnT3SH12vWPYwmXOWCgk0/\n\twQXO8kAuX+Epp5Mk1bkWhlRNRyaESodSdd+svj4CgMCJnRJqG32JoQ6hPdUPMK/sFYO4\n\tK30Q==","X-Gm-Message-State":"AJIora9ILO9sIJ4fJJX5eng5PDXgnzxWLbl4ELZoIIjqGMeFXmLFmoic\n\tktwjZ5nmNCuqmzP4bOJAe6fwMF6jj9KW7g==","X-Google-Smtp-Source":"AGRyM1st4ZMI2PRxadNFFUVXeIAQc/BHUwe+2RUYoUQ9ajze2XTT8aY/o1YzF+XmWjnRLBNvlnZxuQ==","X-Received":"by 2002:a05:600c:49a2:b0:3a2:e614:a14a with SMTP id\n\th34-20020a05600c49a200b003a2e614a14amr16283459wmp.5.1657812262811; \n\tThu, 14 Jul 2022 08:24:22 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 14 Jul 2022 16:24:08 +0100","Message-Id":"<20220714152409.9780-8-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220714152409.9780-1-naush@raspberrypi.com>","References":"<20220714152409.9780-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 7/8] utils: raspberrypi: ctt: Output\n\tversion 2.0 format tuning files","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Use the tuning file conversion script to output the new tuning file format from\nthe CTT.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n utils/raspberrypi/ctt/ctt.py | 13 ++++++-------\n 1 file changed, 6 insertions(+), 7 deletions(-)","diff":"diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py\nindex 15064634c67f..0d91ada15afa 100755\n--- a/utils/raspberrypi/ctt/ctt.py\n+++ b/utils/raspberrypi/ctt/ctt.py\n@@ -15,7 +15,7 @@ from ctt_alsc import *\n from ctt_lux import *\n from ctt_noise import *\n from ctt_geq import *\n-from ctt_pretty_print_json import *\n+from convert_tuning import convert_v2\n import random\n import json\n import re\n@@ -511,13 +511,12 @@ class Camera:\n     \"\"\"\n     def write_json(self):\n         \"\"\"\n-        Write json dictionary to file\n+        Write json dictionary to file using our version 2 format\n         \"\"\"\n-        jstring = json.dumps(self.json, sort_keys=False)\n-        \"\"\"\n-        make it pretty :)\n-        \"\"\"\n-        pretty_print_json(jstring, self.jf)\n+        out_json = convert_v2(self.json)\n+\n+        with open(self.jf, 'w') as f:\n+            f.write(out_json)\n \n     \"\"\"\n     add a new section to the log file\n","prefixes":["libcamera-devel","v5","7/8"]}