Patch Detail
Show a patch.
GET /api/patches/17499/?format=api
{ "id": 17499, "url": "https://patchwork.libcamera.org/api/patches/17499/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17499/", "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": "<20221003095558.1993-3-naush@raspberrypi.com>", "date": "2022-10-03T09:55:56", "name": "[libcamera-devel,v3,2/4] pipeline: raspberrypi: Update naming convention for tuning files", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d5218ff08851d40bd96b523219a9c2674c55ae8c", "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/17499/mbox/", "series": [ { "id": 3524, "url": "https://patchwork.libcamera.org/api/series/3524/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3524", "date": "2022-10-03T09:55:54", "name": "imx296 colour tuning", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3524/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17499/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17499/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 6A1EFC327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Oct 2022 09:56:10 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C10FB62CEE;\n\tMon, 3 Oct 2022 11:56:08 +0200 (CEST)", "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC63262CDF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Oct 2022 11:56:05 +0200 (CEST)", "by mail-wr1-x430.google.com with SMTP id j16so3958597wrh.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 03 Oct 2022 02:56:05 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tz10-20020a5d4c8a000000b002286670bafasm9120637wrs.48.2022.10.03.02.56.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 03 Oct 2022 02:56:04 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664790968;\n\tbh=70dY/2yOG09GmxWV4XkYxNxjmwdy+OBE7EfCZ8fYhOQ=;\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=WcE2WDZkA1A3D3QAKh+aNftHp+wpDpgsnKL6dNpnjm9yjM7KwlUtmg+ZglbfAwgsk\n\tGAqNIFvAwv4J2dY80+7w+Iv0Ebv6vgBVmZcMUC5sFAuzFl1VyyMI1yIPRt/0ksya5R\n\tdqVxQ8UgHoBkJXKZa8M1nlcRFnr6qRD431ltgjFqpS21nfD4IxbOXROeF2W3zNUTRC\n\tjgaAoAqC07kAf6Bt6UnpHFUxJsU9DEarxkL3p+j333n2VINa1Dh8SW0x3Nn8+AvEWu\n\tQeHTzlxMogAjUntJC9nybYcfVd2VQbiNDze5whq3aEgiwPPWWTGTIB5IgV9HY9onOG\n\tC6hsgGGDoWGFQ==", "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=5AJn6sGm0U4RPdVN5h5oRKuT8tBty6smtZCUrNTqYQg=;\n\tb=eCGhXujSsWJnfF6hyYU1oGoBPF76Adn9olkEkjwnRtjF5D1ExGw7VATdskZtR0GHZU\n\t+3iCrV1totICFgVJ/O0PM58nYfK/xsZr0JNOC4sXHKHoFQHtwr7uX3W4/sDUKmDUOAKE\n\tb+kCaeeoEKUCDlpJQra2icY/i5wMbsjlCUI48gK21AqUxD+WbPmztLPrOFCW/KYGPdoE\n\tiDx/YTk675MR/KSmelYJXkDPZ+bPeH5iYYkXo2JZypZGyACJTPMhIKSI8Wfo3BeGjUgG\n\tNAal1o3yd+LNQB6l2CqD7h98DugbXZEv9ea76uDvVo3iYDHzmF4Wk6g+7DVOaUSpdMUW\n\tpqmg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"eCGhXujS\"; 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=5AJn6sGm0U4RPdVN5h5oRKuT8tBty6smtZCUrNTqYQg=;\n\tb=ifIgZkdpmnUrRC6nWE9rXW1gecZBoU/UtUH/2luYr4Wxv8cv3p2W6J4WR8IYx6Orjm\n\tzhKKfVuQz3hSFwOALMCW6a4DVvr4We8c8ICO6canLvhBTYJztJyptXMmuKHdYTLLc4+P\n\tq2mpYCJwbeaHpPiT5no8FRuOHxNgNa7wUbaG+MHxi0Tm4wjoqIVaO5u9wPMJEddlFzst\n\tFHLfisBYetfEKucygB3nzGWOyCNt4i4i3clL/DKo2H1SUN0u31Epg3x5DHouA9Kzv5ra\n\tJBvu/Jndj8jqevv0UUwvUwwUCdSgjxtIVVnhw25QOLHIey5TTSs54TUD7+WMkEedQTWC\n\tXLNg==", "X-Gm-Message-State": "ACrzQf2rXebkSdPq82CGyZQnO+qvVJGpkPTSLGCQzdb+OGwatngCgAnl\n\tr21Ykzkdiy/C+pTvYg8u0PQg2lSakfhNFw==", "X-Google-Smtp-Source": "AMsMyM6FaQuXx6uPHzJ2Ksep5dnykcsOJO8lNL8VNoOyFaAs18ceytyhq9lZRJeFDgv18uf7IhcaEw==", "X-Received": "by 2002:a5d:5846:0:b0:22a:f7d2:9045 with SMTP id\n\ti6-20020a5d5846000000b0022af7d29045mr13104889wrf.250.1664790965207; \n\tMon, 03 Oct 2022 02:56:05 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 3 Oct 2022 10:55:56 +0100", "Message-Id": "<20221003095558.1993-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221003095558.1993-1-naush@raspberrypi.com>", "References": "<20221003095558.1993-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 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 | 20 +++++++++++++++----\n 3 files changed, 17 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..39a1c798df2e 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+\tconst BayerFormat &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,12 +1559,16 @@ 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+\tstd::string model = sensor_->model();\n+\tif (!configFromEnv || *configFromEnv == '\\0') {\n+\t\tif (isMonoSensor(sensor_))\n+\t\t\tmodel += \"_mono\";\n+\t\tconfigurationFile = ipa_->configurationFile(model + \".json\");\n+\t} else {\n \t\tconfigurationFile = std::string(configFromEnv);\n+\t}\n \n-\tIPASettings settings(configurationFile, sensor_->model());\n+\tIPASettings settings(configurationFile, model);\n \n \treturn ipa_->init(settings, result);\n }\n", "prefixes": [ "libcamera-devel", "v3", "2/4" ] }