{"id":16736,"url":"https://patchwork.libcamera.org/api/patches/16736/?format=json","web_url":"https://patchwork.libcamera.org/patch/16736/","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":"<20220722151635.239221-4-fsylvestre@baylibre.com>","date":"2022-07-22T15:16:33","name":"[libcamera-devel,v2,3/5] ipa: rkisp1: Add support of Lens Shading Correction control","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"f91d9bc1638fb6e9a35cd49c9de6aaac58e2fd72","submitter":{"id":123,"url":"https://patchwork.libcamera.org/api/people/123/?format=json","name":"Florian Sylvestre","email":"fsylvestre@baylibre.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16736/mbox/","series":[{"id":3319,"url":"https://patchwork.libcamera.org/api/series/3319/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3319","date":"2022-07-22T15:16:30","name":"Add GSL, LSC and DPCC tuning support for rkisp1","version":2,"mbox":"https://patchwork.libcamera.org/series/3319/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16736/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16736/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 19F03BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jul 2022 15:16:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C795A6331E;\n\tFri, 22 Jul 2022 17:16:49 +0200 (CEST)","from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C400B63313\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jul 2022 17:16:46 +0200 (CEST)","by mail-wr1-x435.google.com with SMTP id l15so2883200wro.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jul 2022 08:16:46 -0700 (PDT)","from BL087.. ([2a01:e34:eea9:e630:e9da:4076:6aa:6cd2])\n\tby smtp.gmail.com with ESMTPSA id\n\tb1-20020a5d4d81000000b0021e4fd8e10bsm4871557wru.11.2022.07.22.08.16.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Jul 2022 08:16:45 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658503009;\n\tbh=uIQRt3tgLBP2wUuVLW3iScSP9ZCGC1V+KOdc1uSOlU4=;\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=aNa77w8AeUOICOGmnqndxoTbkWWNE8pHCBGU0c6XbHB5KZTXbM+0z1ufwdGJTfS+U\n\tlYEb4X/tO5vw3Tby5+MqUTWjRWA4aj32m/Mk6sluZj5nmSA2P3ZWweaLzvp9oEEjfU\n\twGKy/9RTgsY7qA86EhE50P/Sn9VJOWMBuHKiYV31/50GZ+0ghtTwsyVrIpJXsFHiku\n\t/CbgqVwVquBJcmyF+KejD805dBmUSSHFlf5W2mkyfEd4gZWvbHI0ZmzNKgGBA9R89K\n\tyfH6WodqLDC5uN6TSwRVUf66karHZqOxIF7ZLMJWjmLoAI/X8vnwfgSSgzmGA4oVm4\n\t0BD+r6FtxD7VQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=0GDsfgHnGEmlcwmNDd4pSttSpqPQsfWll1BGmVaQbT0=;\n\tb=OEo6D+Jp2y4+NYnekHG5DsIufNxOfv9Xnti6AlZnEXEP2oCIpWM/g95ZETHA6PWoXo\n\tG2be2UpmrUoE+nOy3dAnTSU40xn6XhNaJpO0oGauzLSPi8BTNXdeomYMgnOR36qlDPE1\n\tnaM4TgXv5FlZHNtE56LDLnt8eg1G0Zc2RiQuLC5wjTB/4VdUhqFMEXv47a7n2BSsj40r\n\ttiMp7/8uy+w3F68R1cK7CJQ3zwyUZeXZjdtiut41ESOMZX43oli3mgkgrK8qJP8H8loj\n\tdacPVyz6L5pl5mmWK/n9squNrDvqPn743yt2k2pd4z2Qsj5aLIZ+mDDx350iTq+tWV++\n\tbExA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"OEo6D+Jp\"; \n\tdkim-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=0GDsfgHnGEmlcwmNDd4pSttSpqPQsfWll1BGmVaQbT0=;\n\tb=MMAnuvxvlo+MmqyNcH86hEwnFsr41L2y3kl3Es8eLQ3gGT9KuKLV7+NSOL4Yg+ScVd\n\tGAPhUtWh2U+KCBU+aEe7lAItIqwebj3lSMYRTFIL1F8NzU/WTeaQxDMW1wp41Z3ItB8a\n\tlN1GltCGpjmXcWXZjBDVl/ouz95tnPk6nNZDCN10VE5u1ek3CBOHRElPTX0PzsoDV5/+\n\tDTkadiMkJL0fUEqtWsDdpuZ6y6fidcXkVdS7C216atGFjrCoIKDJKE74A/kzw7mD7ovq\n\tHkWOzfD/SHy8wGqQH5dDDyuzgCJ7VHKAXI1D8t1PHqg/HFcm+XNDR+Q+umlr/j0ueqOa\n\tdEDQ==","X-Gm-Message-State":"AJIora91v2mkKo//IYRaP93vN1UMLIae3lfl/NmJUuHJI74F+bMjhVfr\n\tDIWN1kBNjl7E6ruRxpWJZ/rr7bcIAdJdqsYW","X-Google-Smtp-Source":"AGRyM1tUrxC7H9CF4XbxpHysuutF5xWyviWro9ofyb12CXFLJY3ilAOLjqzWC86+Gkw8vXUVLrqBVA==","X-Received":"by 2002:a5d:45d0:0:b0:21e:48a5:660e with SMTP id\n\tb16-20020a5d45d0000000b0021e48a5660emr301357wrs.122.1658503005850; \n\tFri, 22 Jul 2022 08:16:45 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 22 Jul 2022 17:16:33 +0200","Message-Id":"<20220722151635.239221-4-fsylvestre@baylibre.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220722151635.239221-1-fsylvestre@baylibre.com>","References":"<20220722151635.239221-1-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 3/5] 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":"Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Florian Sylvestre <fsylvestre@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The Lens Shading Correction algorithm applies a correction on the pixels based\non values defined in the YAML tuning file.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\n---\n src/ipa/rkisp1/algorithms/lsc.cpp     | 170 ++++++++++++++++++++++++++\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.h          |   1 +\n src/ipa/rkisp1/rkisp1.cpp             |   2 +\n 6 files changed, 291 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 00000000..8a53bc74\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -0,0 +1,170 @@\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 <math.h>\n+\n+#include <libcamera/base/log.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 a correction on the pixels for\n+ * each component based on measurement done during the camera tuning process.\n+ */\n+\n+LOG_DEFINE_CATEGORY(RkISP1Lsc)\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_ = tuningData[\"x-size\"].getList<double>();\n+\tif (xSize_.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'x-size'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< xSize_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE << \")\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tySize_ = tuningData[\"y-size\"].getList<double>();\n+\tif (ySize_.size() != RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'y-size'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< ySize_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE << \")\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\trData_ = tuningData[\"r\"].getList<uint16_t>();\n+\tif (rData_.size() != RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'r'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< rData_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX << \")\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tgrData_ = tuningData[\"gr\"].getList<uint16_t>();\n+\tif (grData_.size() != RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'gr'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< grData_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX << \")\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tgbData_ = tuningData[\"gb\"].getList<uint16_t>();\n+\tif (gbData_.size() != RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'gb'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< gbData_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX << \")\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tbData_ = tuningData[\"b\"].getList<uint16_t>();\n+\tif (bData_.size() != RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX) {\n+\t\tLOG(RkISP1Lsc, Error)\n+\t\t\t<< \"Issue while parsing 'b'\"\n+\t\t\t<< \"in tuning file (list size:\"\n+\t\t\t<< bData_.size() << \"/\"\n+\t\t\t<< RKISP1_CIF_ISP_LSC_SAMPLES_MAX * RKISP1_CIF_ISP_LSC_SAMPLES_MAX << \")\";\n+\t\treturn -EINVAL;\n+\t}\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+\tSize total_size{};\n+\n+\tfor (unsigned int i = 0; i < RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE; ++i) {\n+\t\tstruct rkisp1_cif_isp_lsc_config &config = params->others.lsc_config;\n+\t\tSize &size = context.configuration.sensor.size;\n+\n+\t\tconfig.x_size_tbl[i] = xSize_[i] * size.width;\n+\t\tconfig.y_size_tbl[i] = ySize_[i] * size.height;\n+\t\ttotal_size.width += config.x_size_tbl[i];\n+\t\ttotal_size.height += config.y_size_tbl[i];\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.\n+\t\t */\n+\t\tif (i == RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE - 1) {\n+\t\t\tconfig.x_size_tbl[i] += total_size.width - size.width / 2;\n+\t\t\tconfig.y_size_tbl[i] += total_size.height - size.height / 2;\n+\t\t}\n+\n+\t\tconfig.x_grad_tbl[i] = round(32768 / config.x_size_tbl[i]);\n+\t\tconfig.y_grad_tbl[i] = 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 00000000..fdb2ec1d\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 0597c353..64e11dce 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 13f76412..fa2ae436 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.h b/src/ipa/rkisp1/ipa_context.h\nindex f387cace..3bfb262c 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 1c002939..af0f43f2 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -32,6 +32,7 @@\n #include \"algorithms/awb.h\"\n #include \"algorithms/blc.h\"\n #include \"algorithms/gsl.h\"\n+#include \"algorithms/lsc.h\"\n #include \"libipa/camera_sensor_helper.h\"\n \n #include \"ipa_context.h\"\n@@ -212,6 +213,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","v2","3/5"]}