Patch Detail
Show a patch.
GET /api/patches/19273/?format=api
{ "id": 19273, "url": "https://patchwork.libcamera.org/api/patches/19273/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19273/", "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": "<20231204091053.22807-3-jacopo.mondi@ideasonboard.com>", "date": "2023-12-04T09:10:51", "name": "[libcamera-devel,v2,2/4] ipa: rpi: Provide a Camera Helper for the OV64A40", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a4f73ba49dce427abc084fa0e4f80ae3676f5e23", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19273/mbox/", "series": [ { "id": 4098, "url": "https://patchwork.libcamera.org/api/series/4098/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4098", "date": "2023-12-04T09:10:49", "name": "ipa: Add support for Arducam OV64A40", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4098/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19273/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19273/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 F3ACCC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 4 Dec 2023 09:11:10 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09A8A629D3;\n\tMon, 4 Dec 2023 10:11:09 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 61B4A629C2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 4 Dec 2023 10:11:06 +0100 (CET)", "from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 04579158A;\n\tMon, 4 Dec 2023 10:10:26 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701681069;\n\tbh=pvbbnQN/XZIgOeooF+nqntnF161gGgEGppgXFvXA9/4=;\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:Cc:\n\tFrom;\n\tb=OfmgplZiUXZILNy4NQqynNMK1Nqf/NbEPpuOYq9aymLgTjwk1WkEIP508dojJIsiJ\n\tCHvcOR2GBy7DUq55LW+6+474WhiqgQ2kcPVkhDD6icC5WakQmsQcOwq/hygQXonhsX\n\tcH2T+TcVm9INtrSXFv2DeHUXAw7p3+es14/Y18n7Ch2Kty0KxEMs7qjD3kLFVeW7x+\n\t9eMQIFekOVCrurYmDmUPzkv0hYFLsrzF3VorkYjfWU7/0cIJzpmX669IkpSoZNHIxd\n\tZLekk+jpE91KCawKoq34Xq/RBbZe3JUvS4iZgZ/gXo1Jev8dwd+3EOL4Pv5WcMZa9R\n\tafPIaojpkrYVw==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1701681027;\n\tbh=pvbbnQN/XZIgOeooF+nqntnF161gGgEGppgXFvXA9/4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=GydT02sQTF4+2t8Jaia+XCBvdYBavr+TmSyYt1w/bMVMn6jOdxqQsY4S6rv5o6dSh\n\t7+ypr0GHFutZTJG6ffaha20Bo1Z1+ByttG0z7EpnEw3K9U79290ofyYeCGZu2mYmar\n\t+KmqH6xIqa2MUWeZRhB6FPGkvRwLsWmjYpjOT4ao=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GydT02sQ\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 4 Dec 2023 10:10:51 +0100", "Message-ID": "<20231204091053.22807-3-jacopo.mondi@ideasonboard.com>", "X-Mailer": "git-send-email 2.41.0", "In-Reply-To": "<20231204091053.22807-1-jacopo.mondi@ideasonboard.com>", "References": "<20231204091053.22807-1-jacopo.mondi@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 2/4] ipa: rpi: Provide a Camera Helper\n\tfor the OV64A40", "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": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, lee.jackson@arducam.com", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Support the OV64A40 sensor with a camera helper to manage the gain\nmodel, light sensitivity, and control delays.\n\nSigned-off-by: Lee Jackson <lee.jackson@arducam.com>\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp | 73 +++++++++++++++++++\n src/ipa/rpi/cam_helper/meson.build | 1 +\n 2 files changed, 74 insertions(+)\n create mode 100644 src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp", "diff": "diff --git a/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp b/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp\nnew file mode 100644\nindex 000000000000..041c32dd9222\n--- /dev/null\n+++ b/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp\n@@ -0,0 +1,73 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) 2021, Raspberry Pi Ltd\n+ *\n+ * cam_helper_ov64a40.cpp - camera information for ov64a40 sensor\n+ */\n+\n+#include <assert.h>\n+\n+#include \"cam_helper.h\"\n+\n+using namespace RPiController;\n+\n+class CamHelperOv64a40 : public CamHelper\n+{\n+public:\n+\tCamHelperOv64a40();\n+\tuint32_t gainCode(double gain) const override;\n+\tdouble gain(uint32_t gainCode) const override;\n+\tvoid getDelays(int &exposureDelay, int &gainDelay,\n+\t\t int &vblankDelay, int &hblankDelay) const override;\n+\tdouble getModeSensitivity(const CameraMode &mode) 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 = 4;\n+};\n+\n+CamHelperOv64a40::CamHelperOv64a40()\n+\t: CamHelper({}, frameIntegrationDiff)\n+{\n+}\n+\n+uint32_t CamHelperOv64a40::gainCode(double gain) const\n+{\n+\treturn static_cast<uint32_t>(gain * 128.0);\n+}\n+\n+double CamHelperOv64a40::gain(uint32_t gainCode) const\n+{\n+\treturn static_cast<double>(gainCode) / 128.0;\n+}\n+\n+void CamHelperOv64a40::getDelays(int &exposureDelay, int &gainDelay,\n+\t\t\t\t int &vblankDelay, int &hblankDelay) const\n+{\n+\t/* The driver appears to behave as follows: */\n+\texposureDelay = 2;\n+\tgainDelay = 2;\n+\tvblankDelay = 2;\n+\thblankDelay = 2;\n+}\n+\n+double CamHelperOv64a40::getModeSensitivity(const CameraMode &mode) const\n+{\n+\tif (mode.binX >= 2 && mode.scaleX >= 4) {\n+\t\treturn 4.0;\n+\t} else if (mode.binX >= 2 && mode.scaleX >= 2) {\n+\t\treturn 2.0;\n+\t} else {\n+\t\treturn 1.0;\n+\t}\n+}\n+\n+static CamHelper *create()\n+{\n+\treturn new CamHelperOv64a40();\n+}\n+\n+static RegisterCamHelper reg(\"ov64a40\", &create);\ndiff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build\nindex bdf2db8eb742..7262505742f3 100644\n--- a/src/ipa/rpi/cam_helper/meson.build\n+++ b/src/ipa/rpi/cam_helper/meson.build\n@@ -9,6 +9,7 @@ rpi_ipa_cam_helper_sources = files([\n 'cam_helper_imx477.cpp',\n 'cam_helper_imx519.cpp',\n 'cam_helper_imx708.cpp',\n+ 'cam_helper_ov64a40.cpp',\n 'cam_helper_ov9281.cpp',\n 'md_parser_smia.cpp',\n ])\n", "prefixes": [ "libcamera-devel", "v2", "2/4" ] }