{"id":16617,"url":"https://patchwork.libcamera.org/api/1.1/patches/16617/?format=json","web_url":"https://patchwork.libcamera.org/patch/16617/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20220713092159.9014-8-naush@raspberrypi.com>","date":"2022-07-13T09:21:58","name":"[libcamera-devel,v4,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/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16617/mbox/","series":[{"id":3277,"url":"https://patchwork.libcamera.org/api/1.1/series/3277/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3277","date":"2022-07-13T09:21:51","name":"Replace boost JSON parser with libyaml in Raspberry Pi IPA","version":4,"mbox":"https://patchwork.libcamera.org/series/3277/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16617/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16617/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 019F0BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jul 2022 09:22:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64E2363315;\n\tWed, 13 Jul 2022 11:22:26 +0200 (CEST)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B7BA863319\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 11:22:20 +0200 (CEST)","by mail-wr1-x429.google.com with SMTP id a5so14601502wrx.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jul 2022 02:22:20 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbd20-20020a05600c1f1400b0039747cf8354sm1514778wmb.39.2022.07.13.02.22.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Jul 2022 02:22:19 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657704146;\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=vNwKH6LUWCzn0urcJ/ciSbzvSYnGgHoTG7t9daJg1utImacGW/GEhfK0mgMtawN4U\n\tr71kVt5yCLft55oClMZMSR549qVjeL5qtfqJop6S239qn28xywfzo9s/+xrKB7I9cP\n\tJ00J+4QTMwP6ExK00KGsVfFZOZOf1+ph1+MHQD6wUjzqHim/XXNWcTxgWMKrU/KIOO\n\tlf//KkF9OvUuKtwq5CH5+16pMn2WW8fuv8syzkDxS2mere9xgIyntyARoFUPcbBvd+\n\tkWw3zmMOHcHrfrEtmYRjiF7qfFv6yF3GQf994WVNkD1B2u0ayVvKfYI/bpI37ZBjHd\n\t3rTXjv/jayu4Q==","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=dIYinefVbBUow+3lr2dXFph+W5w6yO9mL+ZM9In6pT6MiBGNwRHEVg58LbN93+GKR1\n\teZtu/IcIP+gulAThjDpAeaawjD2LNCIa/RUEtxrpukU3H3kStcH4a4LlePfV69K3nNXo\n\tqco51zLYT0JJm+4a32JBrz7/MmHlVASnlCN2fZUiaVGJuKS2GQuPoBRRVevicLIujJbm\n\tUc9xDyo724HC1GJmKo2BoHNfoFdQHUZ6H9Ws5NjyclWhro0htV3MObJ0JwcPUX8zC+7u\n\trmI62lVtP7rgifZ+QSEbdHwZV7jfkMV86hTnjb0XyQeoJprfI4g+3H3+KURMQLigAGIq\n\tORtw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"dIYinefV\"; 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=OzSOFmtR7nnAKtdjfqpnRkQtr49Hrs0RHOrKUFeCLwi7eroqYBIoXt8CBsVVkNhhD1\n\t9JjssnBWp+I8ulFpDq9Xo/DiUMV6k5WT5f8BzQOs+VD0uEsKARDXUc0+qg79siu6OEFA\n\tZDlm74sJJgCY0qtmikIdwGMZ88ITvoMUzGaUxLXLyq4acdPCkORE/9iEgsCesBBjOGCY\n\t/khJLEkTVedxFXrqGpaubYaGq/NvY15yhO5Fdz712iB4y9YPFD3A7+Fy4+LCNg8Ay3gm\n\t8GPmzaonqLFIG1sbqs8afD+HqF/LMlFCjQv0BHfamdMZGdMtnmttFHX24QFZAPmTD7uT\n\tY30Q==","X-Gm-Message-State":"AJIora9UEEyzYGbvs5RdJKR09JG3WrUcV/VChsahksnkn1CRWghv+8oW\n\trAA/k8yXoIxB3CUIa1dMcQbWTQNKyMkNuA==","X-Google-Smtp-Source":"AGRyM1stmKVO2fUZQwcyQcNBA7L4bcXlksrTdSN3eNOfj20AZCzFrJ3ygeIZP1YpKobleSPs/OgdQg==","X-Received":"by 2002:a5d:588d:0:b0:21d:a5cf:c6f with SMTP id\n\tn13-20020a5d588d000000b0021da5cf0c6fmr2373771wrf.716.1657704140114; \n\tWed, 13 Jul 2022 02:22:20 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 13 Jul 2022 10:21:58 +0100","Message-Id":"<20220713092159.9014-8-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220713092159.9014-1-naush@raspberrypi.com>","References":"<20220713092159.9014-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 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","v4","7/8"]}