Show a patch.

GET /api/1.1/patches/16854/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16854,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16854/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16854/",
    "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": "<20220727222149.30627-7-laurent.pinchart@ideasonboard.com>",
    "date": "2022-07-27T22:21:46",
    "name": "[libcamera-devel,v5,6/9] ipa: rkisp1: Add support of Lens Shading Correction control",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c857992a82ee7c9b1616ce580e25a42de744dcb3",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16854/mbox/",
    "series": [
        {
            "id": 3338,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3338/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3338",
            "date": "2022-07-27T22:21:40",
            "name": "ipa: rkisp1: Add GSL, LSC, DPCC, Filter and CProc algorithms",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/3338/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16854/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16854/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 C280EBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 22:22:05 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 52E7D63325;\n\tThu, 28 Jul 2022 00:22:05 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7537763317\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Jul 2022 00:21:59 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F3A02835;\n\tThu, 28 Jul 2022 00:21:58 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658960525;\n\tbh=pGfkF6n/cNsX+tXHdh3EF8wWZN2o3bBjdknCyX/6dsg=;\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=Rcy/7De3ECoiBqcV8qwRS94fW2PhX6oUL8C6vuxkDKazVOmcKJ3JUfEq8XldEzSn3\n\tAE+yx67aUxUzk/4p6HQut+F7HEOVThKRN5Bcob0D6znN62evDBqjH6t2zC2EqMqMEO\n\tTAIECt8dqdQpq4eaUbQkWQqIC/zgkkAdgv+gofx2TUwOFLvxv8d6G4r2krr1wWN//L\n\txW8yK11wnP6ynjVdnMfr1JAZMamtF2QabKw9HWuT3gq1yspziiINGWK/qJ/haGAagX\n\t30Vb49Tg5lr4Z5k5WIPZW1yD7uj+t0wv5kGTe1Re2Xf0pMKxDGWsAoVhkAO6f4OMrm\n\ti7DOgT+3bplOQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658960519;\n\tbh=pGfkF6n/cNsX+tXHdh3EF8wWZN2o3bBjdknCyX/6dsg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=N7/bVVti/4bt1KVfYKO+80DjfkNZ2Tw/sEsXDjn3iISzXJPvI+/1KARTtVwvDlvE1\n\tOfm49tilNS9Z8vv5XkV1ZmLo+U98Bu/hT+0tR89Wd1tYLmBcMY2rXwF8f+wB0SFL4k\n\tgBY+4av3R+Pm+wn898y8GpHZcW1YmN+vdF0OEvDo="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"N7/bVVti\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 28 Jul 2022 01:21:46 +0300",
        "Message-Id": "<20220727222149.30627-7-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220727222149.30627-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220727222149.30627-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 6/9] ipa: rkisp1: Add support of Lens\n\tShading Correction control",
        "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Florian Sylvestre <fsylvestre@baylibre.com>\n\nThe Lens Shading Correction algorithm applies multipliers to all pixels\nto compensate for the lens shading effect. The coefficients are\nspecified in a downscaled table in the YAML tuning file.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nChanges since v4:\n\n- Rebase on std::optional-based version of getList()\n---\n src/ipa/rkisp1/algorithms/lsc.cpp     | 178 ++++++++++++++++++++++++++\n src/ipa/rkisp1/algorithms/lsc.h       |  38 ++++++\n src/ipa/rkisp1/algorithms/meson.build |   1 +\n src/ipa/rkisp1/data/ov5640.yaml       |  79 ++++++++++++\n src/ipa/rkisp1/ipa_context.cpp        |   3 +\n src/ipa/rkisp1/ipa_context.h          |   1 +\n src/ipa/rkisp1/rkisp1.cpp             |   1 +\n 7 files changed, 301 insertions(+)\n create mode 100644 src/ipa/rkisp1/algorithms/lsc.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/lsc.h",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nnew file mode 100644\nindex 000000000000..05c8c0dab5c8\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -0,0 +1,178 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021-2022, Ideas On Board\n+ *\n+ * lsc.cpp - RkISP1 Lens Shading Correction control\n+ */\n+\n+#include \"lsc.h\"\n+\n+#include <cmath>\n+#include <numeric>\n+\n+#include <libcamera/base/log.h>\n+#include <libcamera/base/utils.h>\n+\n+#include \"libcamera/internal/yaml_parser.h\"\n+\n+#include \"linux/rkisp1-config.h\"\n+\n+/**\n+ * \\file lsc.h\n+ */\n+\n+namespace libcamera {\n+\n+namespace ipa::rkisp1::algorithms {\n+\n+/**\n+ * \\class LensShadingCorrection\n+ * \\brief RkISP1 Lens Shading Correction control\n+ *\n+ * Due to the optical characteristics of the lens, the light intensity received\n+ * by the sensor is not uniform.\n+ *\n+ * The Lens Shading Correction algorithm applies multipliers to all pixels\n+ * to compensate for the lens shading effect. The coefficients are\n+ * specified in a downscaled table in the YAML tuning file.\n+ */\n+\n+LOG_DEFINE_CATEGORY(RkISP1Lsc)\n+\n+static std::vector<double> parseSizes(const YamlObject &tuningData,\n+\t\t\t\t      const char *prop)\n+{\n+\tstd::vector<double> sizes =\n+\t\ttuningData[prop].getList<double>().value_or(utils::defopt);\n+\tif (sizes.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE\n+\t\t\t<< \" elements, got \" << sizes.size();\n+\t\treturn {};\n+\t}\n+\n+\t/*\n+\t * The sum of all elements must be 0.5 to satisfy hardware constraints.\n+\t * Validate it here, allowing a 1% tolerance as rounding errors may\n+\t * prevent an exact match (further adjustments will be performed in\n+\t * LensShadingCorrection::prepare()).\n+\t */\n+\tfloat sum = std::accumulate(sizes.begin(), sizes.end(), 0.0f);\n+\tif (sum < 0.495 || sum > 0.505) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Invalid '\" << prop << \"' values: sum of the elements\"\n+\t\t\t<< \" should be 0.5, got \" << sum;\n+\t\treturn {};\n+\t}\n+\n+\treturn sizes;\n+}\n+\n+static std::vector<uint16_t> parseTable(const YamlObject &tuningData,\n+\t\t\t\t\tconst char *prop)\n+{\n+\tstatic constexpr unsigned int kLscNumSamples =\n+\t\tRKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX;\n+\n+\tstd::vector<uint16_t> table =\n+\t\ttuningData[prop].getList<uint16_t>().value_or(utils::defopt);\n+\tif (table.size() != kLscNumSamples) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Invalid '\" << prop << \"' values: expected \"\n+\t\t\t<< kLscNumSamples\n+\t\t\t<< \" elements, got \" << table.size();\n+\t\treturn {};\n+\t}\n+\n+\treturn table;\n+}\n+\n+LensShadingCorrection::LensShadingCorrection()\n+\t: initialized_(false)\n+{\n+}\n+\n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::init\n+ */\n+int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,\n+\t\t\t\tconst YamlObject &tuningData)\n+{\n+\txSize_ = parseSizes(tuningData, \"x-size\");\n+\tySize_ = parseSizes(tuningData, \"y-size\");\n+\n+\tif (xSize_.empty() || ySize_.empty())\n+\t\treturn -EINVAL;\n+\n+\trData_ = parseTable(tuningData, \"r\");\n+\tgrData_ = parseTable(tuningData, \"gr\");\n+\tgbData_ = parseTable(tuningData, \"gb\");\n+\tbData_ = parseTable(tuningData, \"b\");\n+\n+\tif (rData_.empty() || grData_.empty() ||\n+\t    gbData_.empty() || bData_.empty())\n+\t\treturn -EINVAL;\n+\n+\tinitialized_ = true;\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::prepare\n+ */\n+void LensShadingCorrection::prepare(IPAContext &context,\n+\t\t\t\t    rkisp1_params_cfg *params)\n+{\n+\tif (context.frameContext.frameCount > 0)\n+\t\treturn;\n+\n+\tif (!initialized_)\n+\t\treturn;\n+\n+\tstruct rkisp1_cif_isp_lsc_config &config = params->others.lsc_config;\n+\tconst Size &size = context.configuration.sensor.size;\n+\tSize totalSize{};\n+\n+\tfor (unsigned int i = 0; i < RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE; ++i) {\n+\t\tconfig.x_size_tbl[i] = xSize_[i] * size.width;\n+\t\tconfig.y_size_tbl[i] = ySize_[i] * size.height;\n+\n+\t\t/*\n+\t\t * To prevent unexpected behavior of the ISP, the sum of x_size_tbl and\n+\t\t * y_size_tbl items shall be equal to respectively size.width/2 and\n+\t\t * size.height/2. Enforce it by computing the last tables value to avoid\n+\t\t * rounding-induced errors.\n+\t\t */\n+\t\tif (i == RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE - 1) {\n+\t\t\tconfig.x_size_tbl[i] = size.width / 2 - totalSize.width;\n+\t\t\tconfig.y_size_tbl[i] = size.height / 2 - totalSize.height;\n+\t\t}\n+\n+\t\ttotalSize.width += config.x_size_tbl[i];\n+\t\ttotalSize.height += config.y_size_tbl[i];\n+\n+\t\tconfig.x_grad_tbl[i] = std::round(32768 / config.x_size_tbl[i]);\n+\t\tconfig.y_grad_tbl[i] = std::round(32768 / config.y_size_tbl[i]);\n+\t}\n+\n+\tstd::copy(rData_.begin(), rData_.end(),\n+\t\t  &params->others.lsc_config.r_data_tbl[0][0]);\n+\tstd::copy(grData_.begin(), grData_.end(),\n+\t\t  &params->others.lsc_config.gr_data_tbl[0][0]);\n+\tstd::copy(gbData_.begin(), gbData_.end(),\n+\t\t  &params->others.lsc_config.gb_data_tbl[0][0]);\n+\tstd::copy(bData_.begin(), bData_.end(),\n+\t\t  &params->others.lsc_config.b_data_tbl[0][0]);\n+\n+\tparams->module_en_update |= RKISP1_CIF_ISP_MODULE_LSC;\n+\tparams->module_ens |= RKISP1_CIF_ISP_MODULE_LSC;\n+\tparams->module_cfg_update |= RKISP1_CIF_ISP_MODULE_LSC;\n+}\n+\n+REGISTER_IPA_ALGORITHM(LensShadingCorrection, \"LensShadingCorrection\")\n+\n+} /* namespace ipa::rkisp1::algorithms */\n+\n+} /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h\nnew file mode 100644\nindex 000000000000..fdb2ec1dd27d\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/lsc.h\n@@ -0,0 +1,38 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021-2022, Ideas On Board\n+ *\n+ * lsc.h - RkISP1 Lens Shading Correction control\n+ */\n+\n+#pragma once\n+\n+#include \"algorithm.h\"\n+\n+namespace libcamera {\n+\n+namespace ipa::rkisp1::algorithms {\n+\n+class LensShadingCorrection : public Algorithm\n+{\n+public:\n+\tLensShadingCorrection();\n+\t~LensShadingCorrection() = default;\n+\n+\tint init(IPAContext &context, const YamlObject &tuningData) override;\n+\tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n+\n+private:\n+\tbool initialized_;\n+\n+\tstd::vector<uint16_t> rData_;\n+\tstd::vector<uint16_t> grData_;\n+\tstd::vector<uint16_t> gbData_;\n+\tstd::vector<uint16_t> bData_;\n+\n+\tstd::vector<double> xSize_;\n+\tstd::vector<double> ySize_;\n+};\n+\n+} /* namespace ipa::rkisp1::algorithms */\n+} /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/meson.build b/src/ipa/rkisp1/algorithms/meson.build\nindex 0597c353a0f7..64e11dced2d5 100644\n--- a/src/ipa/rkisp1/algorithms/meson.build\n+++ b/src/ipa/rkisp1/algorithms/meson.build\n@@ -5,4 +5,5 @@ rkisp1_ipa_algorithms = files([\n     'awb.cpp',\n     'blc.cpp',\n     'gsl.cpp',\n+    'lsc.cpp',\n ])\ndiff --git a/src/ipa/rkisp1/data/ov5640.yaml b/src/ipa/rkisp1/data/ov5640.yaml\nindex 13f764127702..fa2ae4360c9a 100644\n--- a/src/ipa/rkisp1/data/ov5640.yaml\n+++ b/src/ipa/rkisp1/data/ov5640.yaml\n@@ -16,4 +16,83 @@ algorithms:\n         red:   [ 0, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4095 ]\n         green: [ 0, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4095 ]\n         blue:  [ 0, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4095 ]\n+  - LensShadingCorrection:\n+      x-size: [ 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625 ]\n+      y-size: [ 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625 ]\n+      r:  [\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+          ]\n+      gr: [\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+          ]\n+      gb: [\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+          ]\n+      b:  [\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+            1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,\n+          ]\n ...\ndiff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 1559d3ffb748..30bb87a967bd 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -95,6 +95,9 @@ namespace libcamera::ipa::rkisp1 {\n  *\n  * \\var IPASessionConfiguration::sensor.lineDuration\n  * \\brief Line duration in microseconds\n+ *\n+ * \\var IPASessionConfiguration::sensor.size\n+ * \\brief Sensor output resolution\n  */\n \n /**\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex f387cacea363..3bfb262c8eb3 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -33,6 +33,7 @@ struct IPASessionConfiguration {\n \n \tstruct {\n \t\tutils::Duration lineDuration;\n+\t\tSize size;\n \t} sensor;\n \n \tstruct {\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 4468cf8e6f2f..0ebd69aacded 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -210,6 +210,7 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,\n \t/* Set the hardware revision for the algorithms. */\n \tcontext_.configuration.hw.revision = hwRevision_;\n \n+\tcontext_.configuration.sensor.size = info.outputSize;\n \tcontext_.configuration.sensor.lineDuration = info.lineLength * 1.0s / info.pixelRate;\n \n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "6/9"
    ]
}