Patch Detail
Show a patch.
GET /api/1.1/patches/22458/?format=api
{ "id": 22458, "url": "https://patchwork.libcamera.org/api/1.1/patches/22458/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22458/", "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": "<20250108090329.3185026-2-naush@raspberrypi.com>", "date": "2025-01-08T09:03:21", "name": "[v1,2/3] ipa: rpi: Add cam_helper for imx415", "commit_ref": "07be807dc74c55bf3109f83714d504a97e5f2f1a", "pull_url": null, "state": "accepted", "archived": false, "hash": "8afe4ffc43f3792f488237d782865afb341669bb", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22458/mbox/", "series": [ { "id": 4932, "url": "https://patchwork.libcamera.org/api/1.1/series/4932/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4932", "date": "2025-01-08T09:03:20", "name": "[v1,1/3] libcamera: camera_sensor_properties: Add delays for imx415", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4932/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22458/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22458/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 6F39CBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 8 Jan 2025 09:03:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F93568500;\n\tWed, 8 Jan 2025 10:03:38 +0100 (CET)", "from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54A3361891\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 8 Jan 2025 10:03:35 +0100 (CET)", "by mail-wm1-x336.google.com with SMTP id\n\t5b1f17b1804b1-43658c452f5so23368385e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Jan 2025 01:03:35 -0800 (PST)", "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-436e2da6271sm13624475e9.9.2025.01.08.01.03.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 08 Jan 2025 01:03:33 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"D53KJnuW\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1736327014; x=1736931814;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Q/rAkgB4C+3aKWnizj9Q0Giz/Otf49vHp4xQ/IR4WzQ=;\n\tb=D53KJnuWn34Pj693jBY3g0IPAFEuKOEqX1DvITIijdqubaTxMN6irgfDgazMIkHaJz\n\tZ81+bPiLiUfRcKlJb2uHHYSSBL2ynd6kIQ/RoPKHjgai0vpgImYzFMYi0EyCAggfyvhg\n\t3mnPqKSTHU1akWJw2mRy+/MhcIYUBnn8WluSEh8wsthTB6BZ9UdifqSOdZY18FqmTkSl\n\tZTenkOcDnNG8x3yAtPluwwZubq9jMDCjW0PQWHVwS9Ub9+ybJqxF7DphDBXoa4yGX2/L\n\txU3KWO+0hwtsi6xK7YNbTDmaxKgM+7c/ZbbliYh53J0gtqwgWqQPzJSf9let3jUIvFnN\n\txh+A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1736327014; x=1736931814;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=Q/rAkgB4C+3aKWnizj9Q0Giz/Otf49vHp4xQ/IR4WzQ=;\n\tb=Y1mQnqcVeFRHL/9LIUWjub0qIYBry2AgpaSJhCwayOgSo/rc3JF3rNujPJ9fBptaUG\n\tB3Dg0xKDjfPIIh7KzR6tuYrPvD7L3VqOnpIL7JuRaB+UEzroCJEuAMQKxCKvJPUjfAC9\n\tzjWHNKPLTJQjL2LWx/oTJSnagk3E8tuR1btTHiVmFDHTxND3ovocTataxhhy9PsWnZU5\n\tr2s9O9nSut6qM8lpfOPKjb8L3dGlPwW3KSWHyx9EJi3rdJqb+SpPAhDTa06EdGebfjeF\n\t7M+GYhWkz+Jl8ZhGfmvjSFy+twq3f+yTZqN1Ekn6QoyNv5DdqCYfXhJrnsQ8MsKW0aY7\n\tvseg==", "X-Gm-Message-State": "AOJu0Yy7xiwS9YezycJ6saN4daEY7Fv1BAVd9K++ZGVZ8eHksyfDOWM4\n\t0Ayi7/T6sT5yzJkO42NEwUxJoyBMffUDN5NdT21bm+MlbVed/zx5TfxZJyMCsOPBfezwvMkEhV/\n\tgGkk=", "X-Gm-Gg": "ASbGncutwyzFpuQj3IN9wGQMcsRFvChm/YirFpzS4d/lUxItinL/WipKHyfql43QIYz\n\t8aYChbU//26Pp79JhJpxkom2Dcxms6XqX2TidxaonbIyriQW0B7uM/0f8QoHNGmnZGb4eFzkXBD\n\tPta9buXxIj2o+yAVWEMgKT7WrxTH9yxLu3wMMMQr3tkFMlBKKpkgoVBW+u65PqqQB7FQ1YLovt2\n\tS3HIokmX2QTea54b86eCW55vsTLRyq2Iaut8Wlnt1PIrbv6h4AJ0tyrI6SWsgIkuJMrlS1h3GGE", "X-Google-Smtp-Source": "AGHT+IG32tmglQxlRCHo/SKfdIybwYsHO0d9YNGwljCL0SZcPBpnIeLu4vPnPGtWAkAG7cimK4MOsg==", "X-Received": "by 2002:a5d:64ac:0:b0:385:e8e7:d0ac with SMTP id\n\tffacd0b85a97d-38a8731f78fmr520609f8f.13.1736327013869; \n\tWed, 08 Jan 2025 01:03:33 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Dave Stevenson <dave.stevenson@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH v1 2/3] ipa: rpi: Add cam_helper for imx415", "Date": "Wed, 8 Jan 2025 09:03:21 +0000", "Message-ID": "<20250108090329.3185026-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20250108090329.3185026-1-naush@raspberrypi.com>", "References": "<20250108090329.3185026-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Dave Stevenson <dave.stevenson@raspberrypi.com>\n\nAs another Starvis sensor, it is near identical to imx290/327.\n\nSigned-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/cam_helper/cam_helper_imx415.cpp | 64 ++++++++++++++++++++\n src/ipa/rpi/cam_helper/meson.build | 1 +\n 2 files changed, 65 insertions(+)\n create mode 100644 src/ipa/rpi/cam_helper/cam_helper_imx415.cpp", "diff": "diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp\nnew file mode 100644\nindex 000000000000..c0a09eee3dee\n--- /dev/null\n+++ b/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp\n@@ -0,0 +1,64 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) 2025, Raspberry Pi Ltd\n+ *\n+ * camera helper for imx415 sensor\n+ */\n+\n+#include <cmath>\n+\n+#include \"cam_helper.h\"\n+\n+using namespace RPiController;\n+\n+class CamHelperImx415 : public CamHelper\n+{\n+public:\n+\tCamHelperImx415();\n+\tuint32_t gainCode(double gain) const override;\n+\tdouble gain(uint32_t gainCode) const override;\n+\tunsigned int hideFramesStartup() const override;\n+\tunsigned int hideFramesModeSwitch() 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 = 8;\n+};\n+\n+CamHelperImx415::CamHelperImx415()\n+\t: CamHelper({}, frameIntegrationDiff)\n+{\n+}\n+\n+uint32_t CamHelperImx415::gainCode(double gain) const\n+{\n+\tint code = 66.6667 * std::log10(gain);\n+\treturn std::max(0, std::min(code, 0xf0));\n+}\n+\n+double CamHelperImx415::gain(uint32_t gainCode) const\n+{\n+\treturn std::pow(10, 0.015 * gainCode);\n+}\n+\n+unsigned int CamHelperImx415::hideFramesStartup() const\n+{\n+\t/* On startup, we seem to get 1 bad frame. */\n+\treturn 1;\n+}\n+\n+unsigned int CamHelperImx415::hideFramesModeSwitch() const\n+{\n+\t/* After a mode switch, we seem to get 1 bad frame. */\n+\treturn 1;\n+}\n+\n+static CamHelper *create()\n+{\n+\treturn new CamHelperImx415();\n+}\n+\n+static RegisterCamHelper reg(\"imx415\", &create);\ndiff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build\nindex 03e88fe082e2..abf021474b5c 100644\n--- a/src/ipa/rpi/cam_helper/meson.build\n+++ b/src/ipa/rpi/cam_helper/meson.build\n@@ -7,6 +7,7 @@ rpi_ipa_cam_helper_sources = files([\n 'cam_helper_imx283.cpp',\n 'cam_helper_imx290.cpp',\n 'cam_helper_imx296.cpp',\n+ 'cam_helper_imx415.cpp',\n 'cam_helper_imx477.cpp',\n 'cam_helper_imx519.cpp',\n 'cam_helper_imx708.cpp',\n", "prefixes": [ "v1", "2/3" ] }