Show a patch.

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

{
    "id": 15574,
    "url": "https://patchwork.libcamera.org/api/patches/15574/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15574/",
    "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": "<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>",
    "date": "2022-03-28T12:03:35",
    "name": "[libcamera-devel,3/4] libipa: camera_sensor_helper: Add IMX290 helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "25d1550fc3f5053e46eec5c2989076674c11b081",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15574/mbox/",
    "series": [
        {
            "id": 3008,
            "url": "https://patchwork.libcamera.org/api/series/3008/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3008",
            "date": "2022-03-28T12:03:32",
            "name": "IPA sensor helpers for IMX290 and IMX296",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3008/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15574/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15574/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 9B3E2C3266\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Mar 2022 12:03:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 372D665641;\n\tMon, 28 Mar 2022 14:03:46 +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 E3ACE601F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 14:03:42 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A46EE0A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 14:03:42 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648469026;\n\tbh=+d6kCB2e1hteA+xpyl+y3/U0IOD1WIQchvxBLbIwORg=;\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=HPydSr1dR4bY2VsdTYNc5Sh/vFc81WF1hA858NeHddLD9Joq0fZNbyj8GOa0YGhTE\n\tuJUqEqmG60UtdnzXIIw7fs2j0y7lRsVBQQnXvTKN9oJs9pyzqX+SBzNkgLKBcHFJvZ\n\t/NZ6Jj7yUZzk9pB3WOw/AzC7XP+IEXf7PPmFZ9n+gyT8sVroXLWX9VMc2B4pYk88n0\n\t/w4jjqqTzkHJBuHV9rBVQbghv91n6X4nd5mzv16Km/IAqVwD3MOaDgg4an6VHq3hX/\n\t+yKgfYUQeJg2hMPtM6h/xfHV9bELNugwpYdcKX7T86Dgxexa7bWs6zKXrteBJH8S0w\n\tSm0N+47SYtFiQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648469022;\n\tbh=+d6kCB2e1hteA+xpyl+y3/U0IOD1WIQchvxBLbIwORg=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Zh/EU+e7mWOr22MPn4Bv8px+4pKkGvn4Q0xqX5W3YonzpaFnT7AFYqzqcr0HEn3bO\n\t60HVDiT++yiV49OEBTRTKZGj2WusrZ7BNqFgq2lY2W8C67D4e92SXNexU0IQIFpGyj\n\t/BXnrNdRMkXW7mYx0IN90NjzpCUumxgDitXAVb0A="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Zh/EU+e7\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 28 Mar 2022 15:03:35 +0300",
        "Message-Id": "<20220328120336.10834-4-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220328120336.10834-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/4] libipa: camera_sensor_helper: Add\n\tIMX290 helper",
        "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": "The IMX290 is a Sony sensor that expresses its gain in 0.3dB units. It\nthus maps to the exponential gain model.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/libipa/camera_sensor_helper.cpp | 31 +++++++++++++++++++++++++\n 1 file changed, 31 insertions(+)",
    "diff": "diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\nindex 7bb999e19102..136b9f6bc3c5 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -332,6 +332,26 @@ std::vector<CameraSensorHelperFactory *> &CameraSensorHelperFactory::factories()\n \n #ifndef __DOXYGEN__\n \n+/*\n+ * Helper function to compute the m parameter of the exponential gain model\n+ * when the gain code is expressed in dB.\n+ */\n+static constexpr double expGainDb(double step)\n+{\n+\tconstexpr double log2_10 = 3.321928094887362;\n+\n+\t/*\n+\t * The gain code is expressed in step * dB (e.g. in 0.1 dB steps):\n+\t *\n+\t * G_code = G_dB/step = 20/step*log10(G_linear)\n+\t *\n+\t * Inverting the formula, we get\n+\t *\n+\t * G_linear = 10^(step/20*G_code) = 2^(log2(10)*step/20*G_code)\n+\t */\n+\treturn log2_10 * step / 20;\n+}\n+\n class CameraSensorHelperImx219 : public CameraSensorHelper\n {\n public:\n@@ -354,6 +374,17 @@ public:\n };\n REGISTER_CAMERA_SENSOR_HELPER(\"imx258\", CameraSensorHelperImx258)\n \n+class CameraSensorHelperImx290 : public CameraSensorHelper\n+{\n+public:\n+\tCameraSensorHelperImx290()\n+\t{\n+\t\tgainType_ = AnalogueGainExponential;\n+\t\tgainConstants_.exp = { 1.0, expGainDb(0.3) };\n+\t}\n+};\n+REGISTER_CAMERA_SENSOR_HELPER(\"imx290\", CameraSensorHelperImx290)\n+\n class CameraSensorHelperOv2740 : public CameraSensorHelper\n {\n public:\n",
    "prefixes": [
        "libcamera-devel",
        "3/4"
    ]
}