From patchwork Mon Dec 4 09:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19272 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D41A9C322E for ; Mon, 4 Dec 2023 09:11:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A0C3D629D2; Mon, 4 Dec 2023 10:11:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701681067; bh=bN9vLP2jiai/wKqpjmEc57wTEdJTRNby4L4dxEqIihE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OxOjjGyqE/aeK15AuX89Gdf+QCf1Wf0j1ILHVqAtyVg/3XFM4LMDCcc6/7TYE2Hg2 rujWTFDpSCcm/HY2Lm5ktDjEAGBjgz4TEx9CJSXZlbH+cDf9FJDiFtJiHTKBJZ/rYj CqfPmzKH2RlBvsU0Iz7p7WuAPJlzU3btd6PQIwBfqdlJwFW1v+EYK06mNjXhNC9iUe AWB8oBjkcrg6pY/v2fafaXhj62vNJwrVa8NScsZtpQlfVIczDXwq+oYPPhCy6fljKo xO3mZh2/EDd6+yiwcepfUXbn2ZMY7ZiFNsUXGN6JGWTYBMdsnArzNGvDSGTOO+uQrt MYaS26cSRxBAg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 28F00629BC for ; Mon, 4 Dec 2023 10:11:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="di+ECb5O"; dkim-atps=neutral Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 919BD1571; Mon, 4 Dec 2023 10:10:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701681026; bh=bN9vLP2jiai/wKqpjmEc57wTEdJTRNby4L4dxEqIihE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=di+ECb5OTJEBddcwyHYddkzMBUGJlD/uR03nvI6lYS0fZlPND9eMIFKJf27PeuI3k 4sUtDJNpt7nVZELRCHE+V6LzYSKxAVN/VVUTyzeRQSGUpho02jHFMHhLBaw3hnDl7y lslCdt4L7spK5uw9GBm7w4C+FYmPpmrgZZmNSPVM= To: libcamera-devel@lists.libcamera.org Date: Mon, 4 Dec 2023 10:10:50 +0100 Message-ID: <20231204091053.22807-2-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 Subject: [libcamera-devel] [PATCH v2 1/4] libcamera: camera_sensor: Add OV64A40 sensor properties X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , lee.jackson@arducam.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Kieran Bingham Add an entry for the Omnivision OV64A40 Sensor which has a square pixel size of 1.008ยต. Signed-off-by: Kieran Bingham Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Naushir Patuck --- src/libcamera/camera_sensor_properties.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index 27d6799a2686..2ba2d9818c7f 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -208,6 +208,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen */ }, } }, + { "ov64a40", { + .unitCellSize = { 1008, 1008 }, + .testPatternModes = {}, + } }, { "ov8858", { .unitCellSize = { 1120, 1120 }, .testPatternModes = { From patchwork Mon Dec 4 09:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19273 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F3ACCC3226 for ; Mon, 4 Dec 2023 09:11:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 09A8A629D3; Mon, 4 Dec 2023 10:11:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701681069; bh=pvbbnQN/XZIgOeooF+nqntnF161gGgEGppgXFvXA9/4=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OfmgplZiUXZILNy4NQqynNMK1Nqf/NbEPpuOYq9aymLgTjwk1WkEIP508dojJIsiJ CHvcOR2GBy7DUq55LW+6+474WhiqgQ2kcPVkhDD6icC5WakQmsQcOwq/hygQXonhsX cH2T+TcVm9INtrSXFv2DeHUXAw7p3+es14/Y18n7Ch2Kty0KxEMs7qjD3kLFVeW7x+ 9eMQIFekOVCrurYmDmUPzkv0hYFLsrzF3VorkYjfWU7/0cIJzpmX669IkpSoZNHIxd ZLekk+jpE91KCawKoq34Xq/RBbZe3JUvS4iZgZ/gXo1Jev8dwd+3EOL4Pv5WcMZa9R afPIaojpkrYVw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 61B4A629C2 for ; Mon, 4 Dec 2023 10:11:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GydT02sQ"; dkim-atps=neutral Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 04579158A; Mon, 4 Dec 2023 10:10:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701681027; bh=pvbbnQN/XZIgOeooF+nqntnF161gGgEGppgXFvXA9/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GydT02sQTF4+2t8Jaia+XCBvdYBavr+TmSyYt1w/bMVMn6jOdxqQsY4S6rv5o6dSh 7+ypr0GHFutZTJG6ffaha20Bo1Z1+ByttG0z7EpnEw3K9U79290ofyYeCGZu2mYmar +KmqH6xIqa2MUWeZRhB6FPGkvRwLsWmjYpjOT4ao= 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 Subject: [libcamera-devel] [PATCH v2 2/4] ipa: rpi: Provide a Camera Helper for the OV64A40 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , lee.jackson@arducam.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Support the OV64A40 sensor with a camera helper to manage the gain model, light sensitivity, and control delays. Signed-off-by: Lee Jackson Signed-off-by: Jacopo Mondi Reviewed-by: Naushir Patuck --- src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp | 73 +++++++++++++++++++ src/ipa/rpi/cam_helper/meson.build | 1 + 2 files changed, 74 insertions(+) create mode 100644 src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp diff --git a/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp b/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp new file mode 100644 index 000000000000..041c32dd9222 --- /dev/null +++ b/src/ipa/rpi/cam_helper/cam_helper_ov64a40.cpp @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2021, Raspberry Pi Ltd + * + * cam_helper_ov64a40.cpp - camera information for ov64a40 sensor + */ + +#include + +#include "cam_helper.h" + +using namespace RPiController; + +class CamHelperOv64a40 : public CamHelper +{ +public: + CamHelperOv64a40(); + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + void getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay, int &hblankDelay) const override; + double getModeSensitivity(const CameraMode &mode) const override; + +private: + /* + * Smallest difference between the frame length and integration time, + * in units of lines. + */ + static constexpr int frameIntegrationDiff = 4; +}; + +CamHelperOv64a40::CamHelperOv64a40() + : CamHelper({}, frameIntegrationDiff) +{ +} + +uint32_t CamHelperOv64a40::gainCode(double gain) const +{ + return static_cast(gain * 128.0); +} + +double CamHelperOv64a40::gain(uint32_t gainCode) const +{ + return static_cast(gainCode) / 128.0; +} + +void CamHelperOv64a40::getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay, int &hblankDelay) const +{ + /* The driver appears to behave as follows: */ + exposureDelay = 2; + gainDelay = 2; + vblankDelay = 2; + hblankDelay = 2; +} + +double CamHelperOv64a40::getModeSensitivity(const CameraMode &mode) const +{ + if (mode.binX >= 2 && mode.scaleX >= 4) { + return 4.0; + } else if (mode.binX >= 2 && mode.scaleX >= 2) { + return 2.0; + } else { + return 1.0; + } +} + +static CamHelper *create() +{ + return new CamHelperOv64a40(); +} + +static RegisterCamHelper reg("ov64a40", &create); diff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build index bdf2db8eb742..7262505742f3 100644 --- a/src/ipa/rpi/cam_helper/meson.build +++ b/src/ipa/rpi/cam_helper/meson.build @@ -9,6 +9,7 @@ rpi_ipa_cam_helper_sources = files([ 'cam_helper_imx477.cpp', 'cam_helper_imx519.cpp', 'cam_helper_imx708.cpp', + 'cam_helper_ov64a40.cpp', 'cam_helper_ov9281.cpp', 'md_parser_smia.cpp', ]) From patchwork Mon Dec 4 09:10:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19274 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id AAABEC32BC for ; Mon, 4 Dec 2023 09:11:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B7541629CF; Mon, 4 Dec 2023 10:11:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701681070; bh=XagWTYN9JuEtPfDr2V6DQjXHi+Qc27TKpL21sBUwvks=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iA9XIrAAMDdwEAX/hEnqSBmWBUxjE08EqWLPf6LKKlQN+naVYmnEeGmnehSiatkFX 9yVrPrK355uOAGy1x6wkGSIGYn5N2DLz+i36Rkv4ROzgtMyeH7BJ8e3ViGWAfrD3OB f6UxeHpaB3bYhdWA1yGTpRDC1D209/+cRRieBtzsxrdMCrbo4RqEHBb+1U5pY5jkFn EvmkxZiYKszlzo7lwfY93D1U+1EVGoh4e8JodKMn5qC2g5VllxH6M6UsTAMDHozBir XoMIM4jjL32Yjoy47VSQFTJ1jY8mLKe1jloj7i5VU/0mc3bkO9u9UiJS94RPjPQJmM 2U1iKeugOwADA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A154A629D1 for ; Mon, 4 Dec 2023 10:11:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mo+Olux8"; dkim-atps=neutral Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 57B8018A2; Mon, 4 Dec 2023 10:10:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701681027; bh=XagWTYN9JuEtPfDr2V6DQjXHi+Qc27TKpL21sBUwvks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mo+Olux8hcyAyFAplPybIQxZZr4MNcB/K6msy8ROFN1b0dX/uaNpBZDa0TYK1Gkh+ 2Tz6BPRrApWU+AreQSVchfZtYeM0G3IvxQkBzc1NulZ5YW/pTWKxn4MANBQQG7Z8l6 6qbTYvWdnVcfVWY5i8h1CyLiDOmcdBMcKNyiDfE4= To: libcamera-devel@lists.libcamera.org Date: Mon, 4 Dec 2023 10:10:52 +0100 Message-ID: <20231204091053.22807-4-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 Subject: [libcamera-devel] [PATCH v2 3/4] libipa: camera_sensor_helper: Add OV64A40 helper X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , lee.jackson@arducam.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a CameraSensorHelper for the OV64A40 camera sensor. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index f0ecc3830115..ce29f423e712 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -547,6 +547,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693) +class CameraSensorHelperOv64a40 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv64a40() + { + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov64a40", CameraSensorHelperOv64a40) + class CameraSensorHelperOv8858 : public CameraSensorHelper { public: From patchwork Mon Dec 4 09:10:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19275 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5EE93C322E for ; Mon, 4 Dec 2023 09:11:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8188C629D9; Mon, 4 Dec 2023 10:11:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701681071; bh=Nc7dEGyZrgt54JYuCNThx2x3pJ532IiPOo7Yg3L81/c=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ruoyUm8MjReUhCKxD94lxOVc0nKT6+KjjYZ6LiTB93jlQb4Clqkppkt2YlroE5+FF mwjNmTH7pY5/B4LRGFMTFWF1OszkoBidDmmQDXykpDLG1ZXurUqCLf0Si9vvD/PZX/ 49eHd/pEu/vfiFQQ1SgvGNm9B5lzsi/rT+FH/C7ZyhOiSkbcTQfbD2d9BwbOlO3u8w fWbhfx9+iKoU58vsYB7jUMzpAAxNcBegMQd/O7t4rUaOwJTeMpQGr483dPyB22aTLg eQIDyPZk/2czMF/775a71UukuSWxAykI4E9tbrB8ajL7NKPCnwVx1dZfORUii7Dx2C 864o7dLDo+E4g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 09F5C629D3 for ; Mon, 4 Dec 2023 10:11:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="B4gXOU8e"; dkim-atps=neutral Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A4A7E1F73; Mon, 4 Dec 2023 10:10:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701681027; bh=Nc7dEGyZrgt54JYuCNThx2x3pJ532IiPOo7Yg3L81/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4gXOU8ehJpbEL+sBRkH7vDdeP2myXemreokle8qfbsiqwFGvKv2CJ1Mr56zv9JSd MpUSuP2C1Ywx19ipTAQ1DfxYop7YLA8uGbunam1bkLj/HuRVhQN9urG2mdl3qaD0eC HiK8xxWgnhnGiEjyvqPC5x2/FHiMU9f58Q65KehU= To: libcamera-devel@lists.libcamera.org Date: Mon, 4 Dec 2023 10:10:53 +0100 Message-ID: <20231204091053.22807-5-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 Subject: [libcamera-devel] [PATCH v2 4/4] ipa: rpi: vc4: Add OV64A40 tuning files X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , lee.jackson@arducam.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Kieran Bingham Provide the OV64A40 tuning files for the Arducam Omnivision camera module to operate on the VC4 ISP architecture on Raspberry Pi 4 and below. Signed-off-by: Lee Jackson Signed-off-by: Kieran Bingham Signed-off-by: Jacopo Mondi Reviewed-by: David Plowman --- src/ipa/rpi/vc4/data/meson.build | 1 + src/ipa/rpi/vc4/data/ov64a40.json | 422 ++++++++++++++++++++++++++++++ 2 files changed, 423 insertions(+) create mode 100644 src/ipa/rpi/vc4/data/ov64a40.json diff --git a/src/ipa/rpi/vc4/data/meson.build b/src/ipa/rpi/vc4/data/meson.build index bcf5658ba5d2..0bc79c43772f 100644 --- a/src/ipa/rpi/vc4/data/meson.build +++ b/src/ipa/rpi/vc4/data/meson.build @@ -17,6 +17,7 @@ conf_files = files([ 'imx708_wide_noir.json', 'ov5647.json', 'ov5647_noir.json', + 'ov64a40.json', 'ov9281_mono.json', 'se327m12.json', 'uncalibrated.json', diff --git a/src/ipa/rpi/vc4/data/ov64a40.json b/src/ipa/rpi/vc4/data/ov64a40.json new file mode 100644 index 000000000000..096f0b1e698f --- /dev/null +++ b/src/ipa/rpi/vc4/data/ov64a40.json @@ -0,0 +1,422 @@ +{ + "version": 2.0, + "target": "bcm2835", + "algorithms": [ + { + "rpi.black_level": + { + "black_level": 4096 + } + }, + { + "rpi.dpc": { } + }, + { + "rpi.lux": + { + "reference_shutter_speed": 17861, + "reference_gain": 2.0, + "reference_aperture": 1.0, + "reference_lux": 1073, + "reference_Y": 9022 + } + }, + { + "rpi.noise": + { + "reference_constant": 0, + "reference_slope": 2.984 + } + }, + { + "rpi.geq": + { + "offset": 215, + "slope": 0.01121 + } + }, + { + "rpi.sdn": { } + }, + { + "rpi.awb": + { + "priors": [ + { + "lux": 0, + "prior": + [ + 2000, 1.0, + 3000, 0.0, + 13000, 0.0 + ] + }, + { + "lux": 800, + "prior": + [ + 2000, 0.0, + 6000, 2.0, + 13000, 2.0 + ] + }, + { + "lux": 1500, + "prior": + [ + 2000, 0.0, + 4000, 1.0, + 6000, 6.0, + 6500, 7.0, + 7000, 1.0, + 13000, 1.0 + ] + } + ], + "modes": + { + "auto": + { + "lo": 2500, + "hi": 8000 + }, + "incandescent": + { + "lo": 2500, + "hi": 3000 + }, + "tungsten": + { + "lo": 3000, + "hi": 3500 + }, + "fluorescent": + { + "lo": 4000, + "hi": 4700 + }, + "indoor": + { + "lo": 3000, + "hi": 5000 + }, + "daylight": + { + "lo": 5500, + "hi": 6500 + }, + }, + "bayes": 1, + "ct_curve": + [ + 2300.0, 1.0522, 0.4091, + 2700.0, 0.7884, 0.4327, + 3000.0, 0.7597, 0.4421, + 4000.0, 0.5972, 0.5404, + 4150.0, 0.5598, 0.5779, + 6500.0, 0.4388, 0.7582 + ], + "sensitivity_r": 1.0, + "sensitivity_b": 1.0, + "transverse_pos": 0.0558, + "transverse_neg": 0.04278 + } + }, + { + "rpi.agc": + { + "metering_modes": + { + "centre-weighted": + { + "weights": + [ + 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 + ] + }, + "spot": + { + "weights": + [ + 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + ] + }, + "matrix": + { + "weights": + [ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + ] + } + }, + "exposure_modes": + { + "normal": + { + "shutter": [ 100, 10000, 30000, 60000, 120000 ], + "gain": [ 1.0, 2.0, 4.0, 6.0, 6.0 ] + }, + "short": + { + "shutter": [ 100, 5000, 10000, 20000, 120000 ], + "gain": [ 1.0, 2.0, 4.0, 6.0, 6.0 ] + } + }, + "constraint_modes": + { + "normal": [ + { + "bound": "LOWER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.5, + 1000, 0.5 + ] + } + ], + "highlight": [ + { + "bound": "LOWER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.5, + 1000, 0.5 + ] + }, + { + "bound": "UPPER", + "q_lo": 0.98, + "q_hi": 1.0, + "y_target": + [ + 0, 0.8, + 1000, 0.8 + ] + } + ] + }, + "y_target": + [ + 0, 0.16, + 1000, 0.165, + 10000, 0.17 + ] + } + }, + { + "rpi.alsc": + { + "omega": 1.3, + "n_iter": 100, + "luminance_strength": 0.8, + "calibrations_Cr": [ + { + "ct": 6500, + "table": + [ + 2.437, 2.415, 2.392, 2.378, 2.369, 2.353, 2.344, 2.336, 2.329, 2.325, 2.325, 2.325, 2.333, 2.344, 2.366, 2.381, + 2.434, 2.405, 2.386, 2.369, 2.361, 2.334, 2.314, 2.302, 2.295, 2.289, 2.289, 2.303, 2.327, 2.334, 2.356, 2.378, + 2.434, 2.405, 2.385, 2.363, 2.334, 2.314, 2.289, 2.277, 2.269, 2.262, 2.262, 2.283, 2.303, 2.328, 2.352, 2.375, + 2.434, 2.405, 2.385, 2.348, 2.315, 2.289, 2.277, 2.258, 2.251, 2.242, 2.249, 2.258, 2.283, 2.321, 2.352, 2.375, + 2.434, 2.413, 2.385, 2.343, 2.311, 2.282, 2.258, 2.251, 2.229, 2.233, 2.242, 2.251, 2.281, 2.321, 2.356, 2.375, + 2.437, 2.418, 2.388, 2.343, 2.311, 2.282, 2.251, 2.229, 2.221, 2.226, 2.233, 2.251, 2.281, 2.322, 2.361, 2.381, + 2.444, 2.422, 2.393, 2.351, 2.314, 2.284, 2.251, 2.227, 2.221, 2.227, 2.234, 2.256, 2.287, 2.326, 2.366, 2.389, + 2.445, 2.424, 2.395, 2.353, 2.316, 2.287, 2.266, 2.251, 2.228, 2.234, 2.251, 2.259, 2.289, 2.331, 2.371, 2.395, + 2.445, 2.424, 2.399, 2.364, 2.329, 2.308, 2.287, 2.266, 2.259, 2.254, 2.259, 2.283, 2.304, 2.343, 2.375, 2.395, + 2.445, 2.425, 2.407, 2.385, 2.364, 2.329, 2.308, 2.299, 2.291, 2.284, 2.284, 2.304, 2.335, 2.354, 2.381, 2.399, + 2.449, 2.427, 2.418, 2.407, 2.385, 2.364, 2.349, 2.338, 2.333, 2.326, 2.326, 2.335, 2.354, 2.374, 2.389, 2.408, + 2.458, 2.441, 2.427, 2.411, 2.403, 2.395, 2.391, 2.383, 2.375, 2.369, 2.369, 2.369, 2.369, 2.385, 2.408, 2.418 + ] + } + ], + "calibrations_Cb": [ + { + "ct": 6500, + "table": + [ + 1.297, 1.297, 1.289, 1.289, 1.289, 1.291, 1.293, 1.294, 1.294, 1.294, 1.294, 1.296, 1.298, 1.304, 1.312, 1.313, + 1.297, 1.289, 1.286, 1.286, 1.287, 1.289, 1.292, 1.294, 1.294, 1.294, 1.294, 1.294, 1.296, 1.298, 1.306, 1.312, + 1.289, 1.286, 1.283, 1.283, 1.285, 1.287, 1.291, 1.294, 1.294, 1.292, 1.291, 1.289, 1.293, 1.294, 1.298, 1.304, + 1.283, 1.282, 1.279, 1.281, 1.282, 1.285, 1.287, 1.294, 1.294, 1.291, 1.289, 1.289, 1.289, 1.293, 1.294, 1.298, + 1.281, 1.279, 1.279, 1.279, 1.281, 1.283, 1.287, 1.292, 1.292, 1.291, 1.291, 1.289, 1.289, 1.291, 1.294, 1.297, + 1.279, 1.277, 1.277, 1.279, 1.281, 1.282, 1.286, 1.289, 1.291, 1.291, 1.291, 1.291, 1.289, 1.291, 1.293, 1.297, + 1.277, 1.275, 1.275, 1.278, 1.279, 1.281, 1.284, 1.287, 1.289, 1.291, 1.291, 1.291, 1.289, 1.289, 1.292, 1.297, + 1.277, 1.275, 1.274, 1.275, 1.277, 1.278, 1.279, 1.284, 1.285, 1.285, 1.286, 1.288, 1.289, 1.289, 1.292, 1.297, + 1.277, 1.272, 1.272, 1.274, 1.274, 1.277, 1.279, 1.282, 1.284, 1.284, 1.285, 1.286, 1.288, 1.289, 1.292, 1.297, + 1.277, 1.272, 1.272, 1.273, 1.274, 1.276, 1.279, 1.282, 1.284, 1.284, 1.286, 1.286, 1.288, 1.289, 1.293, 1.297, + 1.279, 1.272, 1.271, 1.272, 1.274, 1.276, 1.279, 1.283, 1.284, 1.284, 1.285, 1.286, 1.288, 1.291, 1.294, 1.299, + 1.281, 1.274, 1.271, 1.271, 1.273, 1.276, 1.278, 1.282, 1.284, 1.284, 1.285, 1.286, 1.286, 1.291, 1.295, 1.302 + ] + } + ], + "luminance_lut": + [ + 3.811, 3.611, 3.038, 2.632, 2.291, 2.044, 1.967, 1.957, 1.957, 1.957, 2.009, 2.222, 2.541, 2.926, 3.455, 3.652, + 3.611, 3.135, 2.636, 2.343, 2.044, 1.846, 1.703, 1.626, 1.626, 1.671, 1.796, 1.983, 2.266, 2.549, 3.007, 3.455, + 3.135, 2.781, 2.343, 2.044, 1.831, 1.554, 1.411, 1.337, 1.337, 1.379, 1.502, 1.749, 1.983, 2.266, 2.671, 3.007, + 2.903, 2.538, 2.149, 1.831, 1.554, 1.401, 1.208, 1.145, 1.145, 1.183, 1.339, 1.502, 1.749, 2.072, 2.446, 2.801, + 2.812, 2.389, 2.018, 1.684, 1.401, 1.208, 1.139, 1.028, 1.028, 1.109, 1.183, 1.339, 1.604, 1.939, 2.309, 2.723, + 2.799, 2.317, 1.948, 1.606, 1.327, 1.139, 1.028, 1.019, 1.001, 1.021, 1.109, 1.272, 1.531, 1.869, 2.246, 2.717, + 2.799, 2.317, 1.948, 1.606, 1.327, 1.139, 1.027, 1.006, 1.001, 1.007, 1.109, 1.272, 1.531, 1.869, 2.246, 2.717, + 2.799, 2.372, 1.997, 1.661, 1.378, 1.184, 1.118, 1.019, 1.012, 1.103, 1.158, 1.326, 1.589, 1.926, 2.302, 2.717, + 2.884, 2.507, 2.116, 1.795, 1.511, 1.361, 1.184, 1.118, 1.118, 1.158, 1.326, 1.461, 1.726, 2.056, 2.434, 2.799, + 3.083, 2.738, 2.303, 1.989, 1.783, 1.511, 1.361, 1.291, 1.291, 1.337, 1.461, 1.726, 1.942, 2.251, 2.657, 2.999, + 3.578, 3.083, 2.589, 2.303, 1.989, 1.783, 1.637, 1.563, 1.563, 1.613, 1.743, 1.942, 2.251, 2.537, 2.999, 3.492, + 3.764, 3.578, 2.999, 2.583, 2.237, 1.986, 1.913, 1.905, 1.905, 1.905, 1.962, 2.196, 2.525, 2.932, 3.492, 3.659 + ], + "sigma": 0.005, + "sigma_Cb": 0.005 + } + }, + { + "rpi.contrast": + { + "ce_enable": 1, + "gamma_curve": + [ + 0, 0, + 1024, 5040, + 2048, 9338, + 3072, 12356, + 4096, 15312, + 5120, 18051, + 6144, 20790, + 7168, 23193, + 8192, 25744, + 9216, 27942, + 10240, 30035, + 11264, 32005, + 12288, 33975, + 13312, 35815, + 14336, 37600, + 15360, 39168, + 16384, 40642, + 18432, 43379, + 20480, 45749, + 22528, 47753, + 24576, 49621, + 26624, 51253, + 28672, 52698, + 30720, 53796, + 32768, 54876, + 36864, 57012, + 40960, 58656, + 45056, 59954, + 49152, 61183, + 53248, 62355, + 57344, 63419, + 61440, 64476, + 65535, 65535 + ] + } + }, + { + "rpi.ccm": + { + "ccms": [ + { + "ct": 2300, + "ccm": + [ + 1.77644, -0.14825, -0.62819, + -0.25816, 1.66348, -0.40532, + -0.21633, -1.95132, 3.16765 + ] + }, + { + "ct": 2700, + "ccm": + [ + 1.53605, 0.03047, -0.56652, + -0.27159, 1.78525, -0.51366, + -0.13581, -1.22128, 2.35709 + ] + }, + { + "ct": 3000, + "ccm": + [ + 1.72928, -0.18819, -0.54108, + -0.44398, 2.04756, -0.60358, + -0.13203, -0.94711, 2.07913 + ] + }, + { + "ct": 4000, + "ccm": + [ + 1.69895, -0.23055, -0.46841, + -0.33934, 1.80391, -0.46456, + -0.13902, -0.75385, 1.89287 + ] + }, + { + "ct": 4150, + "ccm": + [ + 2.08494, -0.68698, -0.39796, + -0.37928, 1.78795, -0.40867, + -0.11537, -0.74686, 1.86223 + ] + }, + { + "ct": 6500, + "ccm": + [ + 1.69813, -0.27304, -0.42509, + -0.23364, 1.87586, -0.64221, + -0.07587, -0.62348, 1.69935 + ] + } + ] + } + }, + { + "rpi.sharpen": { } + }, + { + "rpi.af": + { + "ranges": + { + "normal": + { + "min": 0.0, + "max": 12.0, + "default": 1.0 + }, + "macro": + { + "min": 3.0, + "max": 15.0, + "default": 4.0 + } + }, + "speeds": + { + "normal": + { + "step_coarse": 1.0, + "step_fine": 0.25, + "contrast_ratio": 0.75, + "pdaf_gain": -0.02, + "pdaf_squelch": 0.125, + "max_slew": 2.0, + "pdaf_frames": 0, + "dropout_frames": 0, + "step_frames": 4 + } + }, + "conf_epsilon": 8, + "conf_thresh": 16, + "conf_clip": 512, + "skip_frames": 5, + "map": [ 0.0, 0, 15.0, 1023 ] + } + } + ] +} \ No newline at end of file