Show a patch.

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

{
    "id": 14074,
    "url": "https://patchwork.libcamera.org/api/patches/14074/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14074/",
    "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": "<638360E6-389E-4699-A524-584E7A555C61@arducam.com>",
    "date": "2021-10-11T03:32:08",
    "name": "[libcamera-devel] libcamera: ipa: raspberrypi: Add support for imx519 sensor",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "84521363fe1aaec696a3b94d54de6477b96e7d60",
    "submitter": {
        "id": 99,
        "url": "https://patchwork.libcamera.org/api/people/99/?format=api",
        "name": "Arducam info",
        "email": "info@arducam.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14074/mbox/",
    "series": [
        {
            "id": 2610,
            "url": "https://patchwork.libcamera.org/api/series/2610/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2610",
            "date": "2021-10-11T03:32:08",
            "name": "[libcamera-devel] libcamera: ipa: raspberrypi: Add support for imx519 sensor",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2610/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14074/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14074/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 D8D3EBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Oct 2021 04:06:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36CDF68F4D;\n\tMon, 11 Oct 2021 06:06:25 +0200 (CEST)",
            "from out28-101.mail.aliyun.com (out28-101.mail.aliyun.com\n\t[115.124.28.101])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2B2346023B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Oct 2021 05:32:13 +0200 (CEST)",
            "from 192.168.0.57(mailfrom:info@arducam.com\n\tfp:SMTPD_---.LX.k1lZ_1633923128)\n\tby smtp.aliyun-inc.com(10.147.41.187);\n\tMon, 11 Oct 2021 11:32:08 +0800"
        ],
        "X-Alimail-AntiSpam": "AC=CONTINUE; BC=0.07436283|-1; CH=green;\n\tDM=|CONTINUE|false|;\n\tDS=CONTINUE|ham_system_inform|0.016892-0.000351436-0.982757;\n\tFP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047208; MF=info@arducam.com; NM=1;\n\tPH=DS; \n\tRN=2; RT=2; SR=0; TI=SMTPD_---.LX.k1lZ_1633923128; ",
        "From": "Arducam info <info@arducam.com>",
        "Content-Type": "text/plain;\n\tcharset=us-ascii",
        "Content-Transfer-Encoding": "quoted-printable",
        "Mime-Version": "1.0 (Mac OS X Mail 14.0 \\(3654.60.0.2.21\\))",
        "Message-Id": "<638360E6-389E-4699-A524-584E7A555C61@arducam.com>",
        "Date": "Mon, 11 Oct 2021 11:32:08 +0800",
        "To": "libcamera-devel@lists.libcamera.org",
        "X-Mailer": "Apple Mail (2.3654.60.0.2.21)",
        "X-Mailman-Approved-At": "Mon, 11 Oct 2021 06:06:23 +0200",
        "Subject": "[libcamera-devel] [PATCH] libcamera: ipa: raspberrypi: Add support\n\tfor imx519 sensor",
        "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>",
        "Cc": "Arducam info <info@arducam.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The necessary tuning file and CamHelper is added for the imx519 sensor.\n\nThe imx519 is a 16MP rolling shutter sensor. To enable\nit, please add\n\ndtoverlay=imx519\n\nto the /boot/config.txt file and reboot the Pi.\n\nSigned-off-by: Lee Jackson <info@arducam.com>\n---\n src/ipa/raspberrypi/cam_helper_imx519.cpp | 185 +++++++++++++++\n src/ipa/raspberrypi/data/imx519.json      | 272 ++++++++++++++++++++++\n src/ipa/raspberrypi/data/meson.build      |   1 +\n src/ipa/raspberrypi/meson.build           |   1 +\n 4 files changed, 459 insertions(+)\n create mode 100644 src/ipa/raspberrypi/cam_helper_imx519.cpp\n create mode 100644 src/ipa/raspberrypi/data/imx519.json",
    "diff": "diff --git a/src/ipa/raspberrypi/cam_helper_imx519.cpp b/src/ipa/raspberrypi/cam_helper_imx519.cpp\nnew file mode 100644\nindex 00000000..eaf24982\n--- /dev/null\n+++ b/src/ipa/raspberrypi/cam_helper_imx519.cpp\n@@ -0,0 +1,185 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Based on cam_helper_imx477.cpp\n+ * Copyright (C) 2020, Raspberry Pi (Trading) Limited\n+ *\n+ * cam_helper_imx519.cpp - camera helper for imx519 sensor\n+ * Copyright (C) 2021, Arducam Technology co., Ltd.\n+ */\n+\n+#include <assert.h>\n+#include <cmath>\n+#include <stddef.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+\n+#include <libcamera/base/log.h>\n+\n+#include \"cam_helper.hpp\"\n+#include \"md_parser.hpp\"\n+\n+using namespace RPiController;\n+using namespace libcamera;\n+using libcamera::utils::Duration;\n+\n+namespace libcamera {\n+LOG_DECLARE_CATEGORY(IPARPI)\n+}\n+\n+/*\n+ * We care about two gain registers and a pair of exposure registers. Their\n+ * I2C addresses from the Sony IMX519 datasheet:\n+ */\n+constexpr uint32_t expHiReg = 0x0202;\n+constexpr uint32_t expLoReg = 0x0203;\n+constexpr uint32_t gainHiReg = 0x0204;\n+constexpr uint32_t gainLoReg = 0x0205;\n+constexpr uint32_t frameLengthHiReg = 0x0340;\n+constexpr uint32_t frameLengthLoReg = 0x0341;\n+constexpr std::initializer_list<uint32_t> registerList =\n+\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg  };\n+\n+class CamHelperImx519 : public CamHelper\n+{\n+public:\n+\tCamHelperImx519();\n+\tuint32_t GainCode(double gain) const override;\n+\tdouble Gain(uint32_t gain_code) const override;\n+\tvoid Prepare(libcamera::Span<const uint8_t> buffer, Metadata &metadata) override;\n+\tuint32_t GetVBlanking(Duration &exposure, Duration minFrameDuration,\n+\t\t\t      Duration maxFrameDuration) const override;\n+\tvoid GetDelays(int &exposure_delay, int &gain_delay,\n+\t\t       int &vblank_delay) const override;\n+\tbool SensorEmbeddedDataPresent() const override;\n+\n+private:\n+\t/*\n+\t * Smallest difference between the frame length and integration time,\n+\t * in units of lines.\n+\t */\n+\tstatic constexpr int frameIntegrationDiff = 32;\n+\t/* Maximum frame length allowable for long exposure calculations. */\n+\tstatic constexpr int frameLengthMax = 0xffdc;\n+\t/* Largest long exposure scale factor given as a left shift on the frame length. */\n+\tstatic constexpr int longExposureShiftMax = 7;\n+\n+\tvoid PopulateMetadata(const MdParser::RegisterMap &registers,\n+\t\t\t      Metadata &metadata) const override;\n+};\n+\n+CamHelperImx519::CamHelperImx519()\n+\t: CamHelper(std::make_unique<MdParserSmia>(registerList), frameIntegrationDiff)\n+{\n+}\n+\n+uint32_t CamHelperImx519::GainCode(double gain) const\n+{\n+\treturn static_cast<uint32_t>(1024 - 1024 / gain);\n+}\n+\n+double CamHelperImx519::Gain(uint32_t gain_code) const\n+{\n+\treturn 1024.0 / (1024 - gain_code);\n+}\n+\n+void CamHelperImx519::Prepare(libcamera::Span<const uint8_t> buffer, Metadata &metadata)\n+{\n+\tMdParser::RegisterMap registers;\n+\tDeviceStatus deviceStatus;\n+\n+\tif (metadata.Get(\"device.status\", deviceStatus)) {\n+\t\tLOG(IPARPI, Error) << \"DeviceStatus not found from DelayedControls\";\n+\t\treturn;\n+\t}\n+\n+\tparseEmbeddedData(buffer, metadata);\n+\n+\t/*\n+\t * The DeviceStatus struct is first populated with values obtained from\n+\t * DelayedControls. If this reports frame length is > frameLengthMax,\n+\t * it means we are using a long exposure mode. Since the long exposure\n+\t * scale factor is not returned back through embedded data, we must rely\n+\t * on the existing exposure lines and frame length values returned by\n+\t * DelayedControls.\n+\t *\n+\t * Otherwise, all values are updated with what is reported in the\n+\t * embedded data.\n+\t */\n+\tif (deviceStatus.frame_length > frameLengthMax) {\n+\t\tDeviceStatus parsedDeviceStatus;\n+\n+\t\tmetadata.Get(\"device.status\", parsedDeviceStatus);\n+\t\tparsedDeviceStatus.shutter_speed = deviceStatus.shutter_speed;\n+\t\tparsedDeviceStatus.frame_length = deviceStatus.frame_length;\n+\t\tmetadata.Set(\"device.status\", parsedDeviceStatus);\n+\n+\t\tLOG(IPARPI, Debug) << \"Metadata updated for long exposure: \"\n+\t\t\t\t   << parsedDeviceStatus;\n+\t}\n+}\n+\n+uint32_t CamHelperImx519::GetVBlanking(Duration &exposure,\n+\t\t\t\t       Duration minFrameDuration,\n+\t\t\t\t       Duration maxFrameDuration) const\n+{\n+\tuint32_t frameLength, exposureLines;\n+\tunsigned int shift = 0;\n+\n+\tframeLength = mode_.height + CamHelper::GetVBlanking(exposure, minFrameDuration,\n+\t\t\t\t\t\t\t     maxFrameDuration);\n+\t/*\n+\t * Check if the frame length calculated needs to be setup for long\n+\t * exposure mode. This will require us to use a long exposure scale\n+\t * factor provided by a shift operation in the sensor.\n+\t */\n+\twhile (frameLength > frameLengthMax) {\n+\t\tif (++shift > longExposureShiftMax) {\n+\t\t\tshift = longExposureShiftMax;\n+\t\t\tframeLength = frameLengthMax;\n+\t\t\tbreak;\n+\t\t}\n+\t\tframeLength >>= 1;\n+\t}\n+\n+\tif (shift) {\n+\t\t/* Account for any rounding in the scaled frame length value. */\n+\t\tframeLength <<= shift;\n+\t\texposureLines = ExposureLines(exposure);\n+\t\texposureLines = std::min(exposureLines, frameLength - frameIntegrationDiff);\n+\t\texposure = Exposure(exposureLines);\n+\t}\n+\n+\treturn frameLength - mode_.height;\n+}\n+\n+void CamHelperImx519::GetDelays(int &exposure_delay, int &gain_delay,\n+\t\t\t\tint &vblank_delay) const\n+{\n+\texposure_delay = 2;\n+\tgain_delay = 2;\n+\tvblank_delay = 3;\n+}\n+\n+bool CamHelperImx519::SensorEmbeddedDataPresent() const\n+{\n+\treturn true;\n+}\n+\n+void CamHelperImx519::PopulateMetadata(const MdParser::RegisterMap &registers,\n+\t\t\t\t       Metadata &metadata) const\n+{\n+\tDeviceStatus deviceStatus;\n+\n+\tdeviceStatus.shutter_speed = Exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg));\n+\tdeviceStatus.analogue_gain = Gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg));\n+\tdeviceStatus.frame_length = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);\n+\n+\tmetadata.Set(\"device.status\", deviceStatus);\n+}\n+\n+static CamHelper *Create()\n+{\n+\treturn new CamHelperImx519();\n+}\n+\n+static RegisterCamHelper reg(\"imx519\", &Create);\ndiff --git a/src/ipa/raspberrypi/data/imx519.json b/src/ipa/raspberrypi/data/imx519.json\nnew file mode 100644\nindex 00000000..39e788ad\n--- /dev/null\n+++ b/src/ipa/raspberrypi/data/imx519.json\n@@ -0,0 +1,272 @@\n+{\n+    \"rpi.black_level\":\n+    {\n+        \"black_level\": 4096\n+    },\n+    \"rpi.dpc\":\n+    {\n+    },\n+    \"rpi.lux\":\n+    {\n+        \"reference_shutter_speed\": 10812,\n+        \"reference_gain\": 2.0,\n+        \"reference_aperture\": 1.0,\n+        \"reference_lux\": 1250,\n+        \"reference_Y\": 12737\n+    },\n+    \"rpi.noise\":\n+    {\n+        \"reference_constant\": 0,\n+        \"reference_slope\": 2.91\n+    },\n+    \"rpi.geq\":\n+    {\n+        \"offset\": 444,\n+        \"slope\": 0.00731\n+    },\n+    \"rpi.sdn\":\n+    {\n+        \"deviation\":3.7,\n+        \"strength\":0.75\t\n+    },\n+    \"rpi.awb\":\n+    {\n+        \"priors\":\n+        [\n+            {\n+                \"lux\": 0, \"prior\":\n+                [\n+                    2000, 1.0, 3000, 0.0, 13000, 0.0\n+                ]\n+            },\n+            {\n+                \"lux\": 800, \"prior\":\n+                [\n+                    2000, 0.0, 6000, 2.0, 13000, 2.0\n+                ]\n+            },\n+            {\n+                \"lux\": 1500, \"prior\":\n+                [\n+                    2000, 0.0, 4000, 1.0, 6000, 6.0, 6500, 7.0, 7000, 1.0, 13000, 1.0\n+                ]\n+            }\n+        ],\n+        \"modes\":\n+        {\n+            \"auto\":\n+            {\n+                \"lo\": 2500,\n+                \"hi\": 8000\n+            },\n+            \"incandescent\":\n+            {\n+                \"lo\": 2500,\n+                \"hi\": 3000\n+            },\n+            \"tungsten\":\n+            {\n+                \"lo\": 3000,\n+                \"hi\": 3500\n+            },\n+            \"fluorescent\":\n+            {\n+                \"lo\": 4000,\n+                \"hi\": 4700\n+            },\n+            \"indoor\":\n+            {\n+                \"lo\": 3000,\n+                \"hi\": 5000\n+            },\n+            \"daylight\":\n+            {\n+                \"lo\": 5500,\n+                \"hi\": 6500\n+            },\n+            \"cloudy\":\n+            {\n+                \"lo\": 7000,\n+                \"hi\": 8600\n+            }\n+        },\n+        \"bayes\": 0\n+        \n+    },\n+    \"rpi.agc\":\n+    {\n+        \"metering_modes\":\n+        {\n+            \"centre-weighted\":\n+            {\n+                \"weights\":\n+                [\n+                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                ]\n+            },\n+            \"spot\":\n+            {\n+                \"weights\":\n+                [\n+                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                ]\n+            },\n+            \"matrix\":\n+            {\n+                \"weights\":\n+                [\n+                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                ]\n+            }\n+        },\n+        \"exposure_modes\":\n+        {\n+            \"normal\":\n+            {\n+                \"shutter\":\n+                [\n+                    100, 10000, 30000, 60000, 120000\n+                ],\n+                \"gain\":\n+                [\n+                    1.0, 2.0, 4.0, 6.0, 12.0\n+                ]\n+            },\n+            \"short\":\n+            {\n+                \"shutter\":\n+                [\n+                    100, 5000, 10000, 20000, 120000\n+                ],\n+                \"gain\":\n+                [\n+                    1.0, 2.0, 4.0, 6.0, 12.0\n+                ]\n+            }\n+        },\n+        \"constraint_modes\":\n+        {\n+            \"normal\":\n+            [\n+                {\n+                    \"bound\": \"LOWER\", \"q_lo\": 0.98, \"q_hi\": 1.0, \"y_target\":\n+                    [\n+                        0, 0.5, 1000, 0.5\n+                    ]\n+                }\n+            ],\n+            \"highlight\":\n+            [\n+                {\n+                    \"bound\": \"LOWER\", \"q_lo\": 0.98, \"q_hi\": 1.0, \"y_target\":\n+                    [\n+                        0, 0.5, 1000, 0.5\n+                    ]\n+                },\n+                {\n+                    \"bound\": \"UPPER\", \"q_lo\": 0.98, \"q_hi\": 1.0, \"y_target\":\n+                    [\n+                        0, 0.8, 1000, 0.8\n+                    ]\n+                }\n+            ]\n+        },\n+        \"y_target\":\n+        [\n+            0, 0.16, 1000, 0.165, 10000, 0.17\n+        ]\n+    },\n+    \"rpi.alsc\":\n+    {\n+        \"omega\": 1.3,\n+        \"n_iter\": 100,\n+        \"luminance_strength\": 0.5,\n+        \"calibrations_Cr\":\n+        [\n+            {\n+                \"ct\": 6500, \"table\":\n+                [\n+                    2.544, 2.541, 2.531, 2.518, 2.506, 2.495, 2.489, 2.489, 2.489, 2.491, 2.502, 2.511, 2.524, 2.534, 2.542, 2.547,\n+                    2.541, 2.532, 2.521, 2.506, 2.493, 2.479, 2.469, 2.462, 2.462, 2.473, 2.488, 2.502, 2.511, 2.527, 2.536, 2.542,\n+                    2.531, 2.523, 2.506, 2.492, 2.474, 2.458, 2.444, 2.435, 2.435, 2.446, 2.466, 2.481, 2.498, 2.511, 2.526, 2.536,\n+                    2.523, 2.513, 2.492, 2.474, 2.458, 2.438, 2.418, 2.408, 2.408, 2.421, 2.443, 2.463, 2.481, 2.498, 2.517, 2.526,\n+                    2.513, 2.502, 2.481, 2.459, 2.438, 2.418, 2.397, 2.379, 2.379, 2.399, 2.421, 2.443, 2.463, 2.486, 2.506, 2.517,\n+                    2.506, 2.492, 2.469, 2.445, 2.423, 2.397, 2.377, 2.368, 2.369, 2.379, 2.399, 2.427, 2.451, 2.474, 2.495, 2.511,\n+                    2.506, 2.492, 2.469, 2.445, 2.423, 2.397, 2.372, 2.364, 2.364, 2.374, 2.399, 2.427, 2.449, 2.474, 2.495, 2.511,\n+                    2.506, 2.493, 2.474, 2.451, 2.426, 2.401, 2.382, 2.368, 2.369, 2.382, 2.405, 2.431, 2.449, 2.476, 2.497, 2.509,\n+                    2.504, 2.493, 2.475, 2.452, 2.431, 2.412, 2.401, 2.382, 2.382, 2.403, 2.416, 2.438, 2.457, 2.477, 2.497, 2.505,\n+                    2.499, 2.492, 2.474, 2.457, 2.441, 2.431, 2.412, 2.404, 2.404, 2.416, 2.432, 2.447, 2.459, 2.478, 2.495, 2.501,\n+                    2.499, 2.488, 2.473, 2.463, 2.453, 2.441, 2.431, 2.425, 2.425, 2.432, 2.445, 2.459, 2.466, 2.478, 2.491, 2.495,\n+                    2.499, 2.481, 2.472, 2.466, 2.458, 2.449, 2.441, 2.439, 2.439, 2.444, 2.454, 2.464, 2.469, 2.477, 2.484, 2.491\n+                ]\n+            }\n+        ],\n+        \"calibrations_Cb\":\n+        [\n+            {\n+                \"ct\": 6500, \"table\":\n+                [\n+                    1.352, 1.352, 1.349, 1.348, 1.347, 1.346, 1.347, 1.349, 1.351, 1.351, 1.352, 1.353, 1.353, 1.355, 1.358, 1.359,\n+                    1.359, 1.355, 1.352, 1.349, 1.348, 1.348, 1.348, 1.351, 1.352, 1.352, 1.352, 1.354, 1.356, 1.358, 1.361, 1.366,\n+                    1.364, 1.359, 1.355, 1.352, 1.349, 1.349, 1.351, 1.353, 1.353, 1.353, 1.355, 1.356, 1.358, 1.362, 1.366, 1.371,\n+                    1.371, 1.365, 1.359, 1.355, 1.352, 1.352, 1.353, 1.357, 1.357, 1.356, 1.356, 1.359, 1.362, 1.366, 1.371, 1.377,\n+                    1.375, 1.371, 1.365, 1.362, 1.359, 1.359, 1.359, 1.364, 1.364, 1.364, 1.364, 1.365, 1.367, 1.371, 1.377, 1.382,\n+                    1.379, 1.375, 1.371, 1.367, 1.367, 1.367, 1.369, 1.373, 1.374, 1.374, 1.373, 1.373, 1.374, 1.377, 1.382, 1.386,\n+                    1.383, 1.378, 1.374, 1.372, 1.372, 1.372, 1.373, 1.375, 1.378, 1.379, 1.379, 1.379, 1.379, 1.381, 1.386, 1.389,\n+                    1.384, 1.379, 1.376, 1.374, 1.373, 1.373, 1.374, 1.379, 1.379, 1.379, 1.379, 1.379, 1.381, 1.382, 1.386, 1.394,\n+                    1.386, 1.379, 1.376, 1.375, 1.374, 1.374, 1.374, 1.378, 1.378, 1.378, 1.378, 1.379, 1.381, 1.383, 1.386, 1.394,\n+                    1.385, 1.379, 1.376, 1.375, 1.374, 1.374, 1.375, 1.378, 1.378, 1.378, 1.378, 1.379, 1.381, 1.383, 1.387, 1.393,\n+                    1.379, 1.378, 1.375, 1.374, 1.373, 1.374, 1.375, 1.377, 1.378, 1.378, 1.378, 1.379, 1.381, 1.382, 1.386, 1.388,\n+                    1.379, 1.376, 1.374, 1.372, 1.372, 1.374, 1.375, 1.377, 1.378, 1.378, 1.377, 1.378, 1.379, 1.382, 1.384, 1.387\n+                ]\n+            }\n+        ],\n+        \"luminance_lut\":\n+        [\n+            3.257, 3.091, 2.639, 2.301, 2.009, 1.795, 1.742, 1.742, 1.742, 1.742, 1.798, 2.011, 2.309, 2.649, 3.109, 3.251,\n+            3.091, 2.703, 2.311, 2.059, 1.791, 1.631, 1.529, 1.482, 1.482, 1.533, 1.635, 1.791, 2.068, 2.313, 2.719, 3.109,\n+            2.707, 2.424, 2.059, 1.791, 1.626, 1.429, 1.329, 1.282, 1.282, 1.333, 1.433, 1.629, 1.791, 2.068, 2.438, 2.719,\n+            2.555, 2.233, 1.889, 1.626, 1.429, 1.321, 1.176, 1.126, 1.126, 1.181, 1.327, 1.433, 1.629, 1.894, 2.241, 2.538,\n+            2.482, 2.108, 1.775, 1.518, 1.321, 1.176, 1.112, 1.011, 1.012, 1.122, 1.181, 1.327, 1.523, 1.779, 2.113, 2.462,\n+            2.478, 2.048, 1.719, 1.465, 1.266, 1.112, 1.009, 1.001, 1.007, 1.012, 1.122, 1.274, 1.469, 1.722, 2.051, 2.454,\n+            2.478, 2.048, 1.719, 1.465, 1.266, 1.112, 1.004, 1.001, 1.001, 1.011, 1.122, 1.274, 1.469, 1.722, 2.051, 2.454,\n+            2.478, 2.099, 1.768, 1.511, 1.312, 1.163, 1.108, 1.004, 1.008, 1.112, 1.171, 1.321, 1.515, 1.767, 2.097, 2.454,\n+            2.541, 2.217, 1.877, 1.614, 1.417, 1.312, 1.163, 1.112, 1.112, 1.171, 1.317, 1.421, 1.616, 1.874, 2.214, 2.516,\n+            2.686, 2.404, 2.046, 1.779, 1.614, 1.417, 1.317, 1.267, 1.267, 1.319, 1.421, 1.614, 1.773, 2.039, 2.399, 2.669,\n+            3.063, 2.678, 2.292, 2.046, 1.779, 1.622, 1.521, 1.469, 1.469, 1.519, 1.622, 1.773, 2.038, 2.277, 2.669, 3.049,\n+            3.224, 3.063, 2.616, 2.285, 1.995, 1.781, 1.725, 1.723, 1.723, 1.723, 1.777, 1.984, 2.271, 2.598, 3.049, 3.187\n+        ],\n+        \"sigma\": 0.005,\n+        \"sigma_Cb\": 0.005\n+    },\n+    \"rpi.contrast\":\n+    {\n+        \"ce_enable\": 1,\n+        \"gamma_curve\":\n+        [\n+            0, 0, 1024, 5040, 2048, 9338, 3072, 12356, 4096, 15312, 5120, 18051, 6144, 20790, 7168, 23193,\n+            8192, 25744, 9216, 27942, 10240, 30035, 11264, 32005, 12288, 33975, 13312, 35815, 14336, 37600, 15360, 39168,\n+            16384, 40642, 18432, 43379, 20480, 45749, 22528, 47753, 24576, 49621, 26624, 51253, 28672, 52698, 30720, 53796,\n+            32768, 54876, 36864, 57012, 40960, 58656, 45056, 59954, 49152, 61183, 53248, 62355, 57344, 63419, 61440, 64476,\n+            65535, 65535\n+        ]\n+    },\n+    \"rpi.ccm\":\n+    {\n+        \"ccms\":\n+        [\n+            {\n+                \"ct\": 5500, \"ccm\":\n+                [\n+                    1.40348, -0.45861, 0.05512, -0.24419, 1.25488, -0.01068, -0.08564, -0.31571, 1.40135\n+                ]\n+            }\n+        ]\n+    },\n+    \"rpi.sharpen\":\n+    {\n+\t\t\"threshold\":1.5,\n+\t\t\"strength\":0.5,\n+\t\t\"limit\":0.2\t\n+    }\n+}\ndiff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build\nindex 2def75cb..e84cd099 100644\n--- a/src/ipa/raspberrypi/data/meson.build\n+++ b/src/ipa/raspberrypi/data/meson.build\n@@ -7,6 +7,7 @@ conf_files = files([\n     'imx378.json',\n     'imx477.json',\n     'imx477_noir.json',\n+    'imx519.json',\n     'ov5647.json',\n     'ov5647_noir.json',\n     'ov9281.json',\ndiff --git a/src/ipa/raspberrypi/meson.build b/src/ipa/raspberrypi/meson.build\nindex 1af31e4a..176055f4 100644\n--- a/src/ipa/raspberrypi/meson.build\n+++ b/src/ipa/raspberrypi/meson.build\n@@ -22,6 +22,7 @@ rpi_ipa_sources = files([\n     'cam_helper_imx219.cpp',\n     'cam_helper_imx290.cpp',\n     'cam_helper_imx477.cpp',\n+    'cam_helper_imx519.cpp',\n     'cam_helper_ov9281.cpp',\n     'controller/controller.cpp',\n     'controller/histogram.cpp',\n",
    "prefixes": [
        "libcamera-devel"
    ]
}