Patch Detail
Show a patch.
GET /api/patches/17407/?format=api
{ "id": 17407, "url": "https://patchwork.libcamera.org/api/patches/17407/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17407/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20220926122911.13412-3-naush@raspberrypi.com>", "date": "2022-09-26T12:29:09", "name": "[libcamera-devel,v1,2/4] pipeline: raspberrypi: Update naming convention for tuning files", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "3c8d74f56dddee1c19064b216d314d26e22fcfed", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17407/mbox/", "series": [ { "id": 3504, "url": "https://patchwork.libcamera.org/api/series/3504/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3504", "date": "2022-09-26T12:29:07", "name": "imx296 colour tuning", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3504/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17407/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17407/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 66C97BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Sep 2022 12:29:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1356F62266;\n\tMon, 26 Sep 2022 14:29:26 +0200 (CEST)", "from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24A126225F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 14:29:22 +0200 (CEST)", "by mail-wr1-x42d.google.com with SMTP id cc5so9975798wrb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 05:29:22 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ti24-20020a1c5418000000b003a601a1c2f7sm11243700wmb.19.2022.09.26.05.29.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Sep 2022 05:29:20 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664195366;\n\tbh=/W+6w22mwo/UbUeLx2OiB9XQvA7QNLWp3TyyjuUiy9E=;\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=yuTqvLtwyvbd5Fc0WIBxoZD/hoNwr+aD6jq1W9MZy1blqaQmuzjD8Fc9aMp1XS6t6\n\tXLIwAiBxJwGTC9xrcSXnQCADKLkDiZSdWsfR0ZjtadTrTWh5b+wFrr+kTU3tlwSCdr\n\tsOJCJ+gxqDU+vZ8+r4tvkn3RakHGJqYmiJC64ty/OYkzDfojMmapSh+c5XiXB2BCEy\n\t2AVRcQ1lSlyVFkWZasBrdvSNYsokcsv1r/+feuRqUlrUuEBKWWXvjqgWml1I6nxKqX\n\tPljOZFEtoAiniySyPSUKNuWlPpYrMj8x2RmW5Kf215BC+Q+xfkzq4JY19i05FSXJoF\n\tOV+wNCcSMb6gQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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\tbh=lk4xKf8q+Qd6eW3jkL4LSWFq+x5ua71EkVwKLtYfjmg=;\n\tb=W6NtRKYTbOEIkDsg9kShavtE1LntET6KRfqqDGrOC+Y7wXJaCq5vYA1ayOSirhk5VE\n\tulBFDfzm/bb5dZSw1BDuxlRS3AuRWfy70WPOgjjpZRv8vlpdemAci0g/kYrpJdc3Gqb2\n\tJY3KWC3HdGeOseOhZjkKbowMwI6Xwv7ePDc06mo72vwmFk3ezMmrOQLMG258GfYs/29y\n\tZpRCmcgTh4XNUTHTLJaOVXWYJkQ5HTVOoAW2xGupIWdYvzhQOgPkEbjRZ8v9xye6L939\n\tYO3w5ssmAaNLZ8H0TI2ilcX24aXeOFxRR6MuGIUH3pSzekkLFITUxEQuIKDF2vvZl5JB\n\t1+bQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"W6NtRKYT\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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;\n\tbh=lk4xKf8q+Qd6eW3jkL4LSWFq+x5ua71EkVwKLtYfjmg=;\n\tb=M6zxsVUT5fQMS9MrxQuIHdCOfYe8kh802b1rhNklmWEk1yxSuwLjptDOdyqrKbJkL0\n\tMdriqYlf9PmVyWDbJ7b792pslVfNtB/UxcHWtHbOCApn3oEVmYGP7LsvnsdFCVWE3Yxm\n\txHjoFiwIgXVASzYnx0OGZLXyNT9oKo55CE1ILQ2qSTObdjHUMSdORGO+jpjtbiBjgEJK\n\tA1B5JunqeDq2Jggv6KluhZEFfgKEkyXctw4ZAuqxOMB9RSqlT6xnBwiuHDi9qWzBHcmM\n\tS2fovIYsDkm6f4pBIyPmcKSXtFCRTPJ6J9uZmiKo5y7dfbB+wDZWYQ4X9ZiEiXSZptYh\n\t6LqQ==", "X-Gm-Message-State": "ACrzQf2mTSi1lr/K+/aYKfX+kewB2L4ptACKI4X2QiMuQiV91p4GxmYC\n\tns0JI/aAlcTIo1EJRaIkq9y8THD0+RuIB7wn", "X-Google-Smtp-Source": "AMsMyM6tOlzkXbay2n4KkhHxbk9Q/340Hf4c7lTGg2nZuehP3WHRE38B+FZL8kPF2HFFpUKxdqWqoQ==", "X-Received": "by 2002:adf:ecd2:0:b0:228:6439:a24 with SMTP id\n\ts18-20020adfecd2000000b0022864390a24mr13271914wro.401.1664195361168; \n\tMon, 26 Sep 2022 05:29:21 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 26 Sep 2022 13:29:09 +0100", "Message-Id": "<20220926122911.13412-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220926122911.13412-1-naush@raspberrypi.com>", "References": "<20220926122911.13412-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 2/4] pipeline: raspberrypi: Update\n\tnaming convention for 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": "Append \"_mono\" to the sensor name when generating the tuning filename for\nmonochrome sensor variants. So the new naming convention is as follows:\n\n<sensor_name>.json - Standard colour sensor variant\n<sensor_name>_mono.json - Monochrom sensor variant\n\nRename the existing imx296.json file to imx296_mono.json as this tuning file\nis based on the monochrome variant of the IMX296.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../data/{imx296.json => imx296_mono.json} | 0\n src/ipa/raspberrypi/data/meson.build | 2 +-\n .../pipeline/raspberrypi/raspberrypi.cpp | 19 +++++++++++++++----\n 3 files changed, 16 insertions(+), 5 deletions(-)\n rename src/ipa/raspberrypi/data/{imx296.json => imx296_mono.json} (100%)", "diff": "diff --git a/src/ipa/raspberrypi/data/imx296.json b/src/ipa/raspberrypi/data/imx296_mono.json\nsimilarity index 100%\nrename from src/ipa/raspberrypi/data/imx296.json\nrename to src/ipa/raspberrypi/data/imx296_mono.json\ndiff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build\nindex 211811cfa915..465a7a17ce6f 100644\n--- a/src/ipa/raspberrypi/data/meson.build\n+++ b/src/ipa/raspberrypi/data/meson.build\n@@ -4,7 +4,7 @@ conf_files = files([\n 'imx219.json',\n 'imx219_noir.json',\n 'imx290.json',\n- 'imx296.json',\n+ 'imx296_mono.json',\n 'imx378.json',\n 'imx477.json',\n 'imx477_noir.json',\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex dcd81650c32d..c068b07b31fe 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -67,6 +67,14 @@ SensorFormats populateSensorFormats(std::unique_ptr<CameraSensor> &sensor)\n \treturn formats;\n }\n \n+bool isMonoSensor(std::unique_ptr<CameraSensor> &sensor)\n+{\n+\tunsigned int mbusCode = sensor->mbusCodes()[0];\n+\tBayerFormat bayer = BayerFormat::fromMbusCode(mbusCode);\n+\n+\treturn bayer.order == BayerFormat::Order::MONO;\n+}\n+\n PixelFormat mbusCodeToPixelFormat(unsigned int mbus_code,\n \t\t\t\t BayerFormat::Packing packingReq)\n {\n@@ -1551,10 +1559,13 @@ int RPiCameraData::loadIPA(ipa::RPi::IPAInitResult *result)\n \t */\n \tstd::string configurationFile;\n \tchar const *configFromEnv = utils::secure_getenv(\"LIBCAMERA_RPI_TUNING_FILE\");\n-\tif (!configFromEnv || *configFromEnv == '\\0')\n-\t\tconfigurationFile = ipa_->configurationFile(sensor_->model() + \".json\");\n-\telse\n-\t\tconfigurationFile = std::string(configFromEnv);\n+\tstd::string sensorStr = sensor_->model();\n+\tif (!configFromEnv || *configFromEnv == '\\0') {\n+\t\tif (isMonoSensor(sensor_))\n+\t\t\tconfigurationFile += \"_mono\";\n+\t\tconfigurationFile = ipa_->configurationFile(sensorStr + \".json\");\n+\t} else\n+\t\tconfigurationFile = sensorStr;\n \n \tIPASettings settings(configurationFile, sensor_->model());\n \n", "prefixes": [ "libcamera-devel", "v1", "2/4" ] }