From patchwork Sun Dec 19 23:27:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15167 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 992DAC3258 for ; Sun, 19 Dec 2021 23:27:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3FF7D608E7; Mon, 20 Dec 2021 00:27:23 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="b5waGzmi"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 22EB3605A7 for ; Mon, 20 Dec 2021 00:27:21 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AFB30FEF; Mon, 20 Dec 2021 00:27:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639956440; bh=VA+9qQ6iBYoks1gJ5q/0E5yUgm3zy/A88w5Lt1eRNqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b5waGzmiTyRCdccG2OyMbxMBO4wWWKv692H+31EiCohJvB7cC6l6TfS1k8h/bBWSr AQVYHSf2Nl/HOXZzXInjoVJ5pI2AEANXfa3AnaoybCVlT1tXXvVTzt/emayL7ThgBi 05Fyiz6idaatH3uDnkd3MBCujI+JQTJqucYKLlJU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 01:27:11 +0200 Message-Id: <20211219232714.11427-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> References: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/4] libcamera: camera_sensor: Add IMX296 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Sony IMX296 is a global shutter sensor with a 1456x1088 pixel array size, with a recommended resolution after CFA interpolation of 1440x1080. Signed-off-by: Laurent Pinchart Reviewed-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Kieran Bingham --- 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 48305ac481ed..e0086691a61e 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -90,6 +90,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModePn9, 4 }, }, } }, + { "imx296", { + .unitCellSize = { 3450, 3450 }, + .testPatternModes = {}, + } }, { "ov5647", { .unitCellSize = { 1400, 1400 }, .testPatternModes = {}, From patchwork Sun Dec 19 23:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15168 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 DF380BE080 for ; Sun, 19 Dec 2021 23:27:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 94478608ED; Mon, 20 Dec 2021 00:27:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fccFNGah"; dkim-atps=neutral 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 AC871605A7 for ; Mon, 20 Dec 2021 00:27:21 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2198E10DD; Mon, 20 Dec 2021 00:27:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639956441; bh=A4QhqVh6gjw1VyoZDlLNJ0o9h1Axn08jKOl0FGIL2CU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fccFNGah23la0RfmTytJfhQS8ojfTyO088V1nhGPm2tSluNACBa7G/Lbb/HbCiYQU 1vj2rJWA/BWvEEhqNT39F2EGajGd5mduATLJ2NNsKI+4laF7yZ97Ickxuus/i/O1zk TLMKBlDFQVNsPuXaxuaAtI+pfFSpmsaidhaL3OXo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 01:27:12 +0200 Message-Id: <20211219232714.11427-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> References: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: cam_helper: Make exposure conversion functions virtual 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Naushir Patuck Some sensors (namely the Sony IMX296, whose support will be added shortly) require different conversion formulas between exposure time and exposure lines. Make the Exposure() and ExposureLines() functions virtual to allow this. Signed-off-by: Laurent Pinchart Signed-off-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Kieran Bingham Signed-off-by: Naushir Patuck --- src/ipa/raspberrypi/cam_helper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp index a776153fcb84..300f8f8a2d3b 100644 --- a/src/ipa/raspberrypi/cam_helper.hpp +++ b/src/ipa/raspberrypi/cam_helper.hpp @@ -76,8 +76,8 @@ public: virtual void Prepare(libcamera::Span buffer, Metadata &metadata); virtual void Process(StatisticsPtr &stats, Metadata &metadata); - uint32_t ExposureLines(libcamera::utils::Duration exposure) const; - libcamera::utils::Duration Exposure(uint32_t exposure_lines) const; + virtual uint32_t ExposureLines(libcamera::utils::Duration exposure) const; + virtual libcamera::utils::Duration Exposure(uint32_t exposure_lines) const; virtual uint32_t GetVBlanking(libcamera::utils::Duration &exposure, libcamera::utils::Duration minFrameDuration, libcamera::utils::Duration maxFrameDuration) const; From patchwork Sun Dec 19 23:27:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15169 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 5CF1DC3258 for ; Sun, 19 Dec 2021 23:27:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00221608A2; Mon, 20 Dec 2021 00:27:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="F0EO+E/Y"; dkim-atps=neutral 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 11702605A7 for ; Mon, 20 Dec 2021 00:27:22 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 869F011CD; Mon, 20 Dec 2021 00:27:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639956441; bh=pBmnSKjSwQVS3Fek/2ep4ISkZFRrg0Z6zru5iYxIUWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0EO+E/YWXKnOv7r+SjsIWP7OmmSEzQvGBWvMRHhxBue35ubnv+/NDhhsleYNrnZB /ZQLhZbyyOXj4fkFBTOWODjoKtqKbK663XgAsdGw9U7mGKNKgSsy2Oi5Wk9D6ACTHY DDZzOBz99NUOxi13IgO0+8NHF3WQC8pJ2uCQ1ytg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 01:27:13 +0200 Message-Id: <20211219232714.11427-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> References: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] ipa: raspberrypi: Add camera helper for Sony IMX296 sensor 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Naushir Patuck The Sony IMX296 sensor has an exponential gain model, and adds a fixed 14.26µs offset to the exposure time expressed in line units. Signed-off-by: Laurent Pinchart Signed-off-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Naushir Patuck @raspberrypi.com> --- src/ipa/raspberrypi/cam_helper_imx296.cpp | 126 ++++++++++++++++++++++ src/ipa/raspberrypi/meson.build | 1 + 2 files changed, 127 insertions(+) create mode 100644 src/ipa/raspberrypi/cam_helper_imx296.cpp diff --git a/src/ipa/raspberrypi/cam_helper_imx296.cpp b/src/ipa/raspberrypi/cam_helper_imx296.cpp new file mode 100644 index 000000000000..9c34582861f1 --- /dev/null +++ b/src/ipa/raspberrypi/cam_helper_imx296.cpp @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2020, Raspberry Pi (Trading) Limited + * + * cam_helper_imx296.cpp - camera helper for imx296 sensor + */ + +#include +#include +#include +#include +#include + +/* + * We have observed the imx296 embedded data stream randomly return junk + * reister values. Do not rely on embedded data until this has been resolved. + */ +#define ENABLE_EMBEDDED_DATA 0 + +#include "cam_helper.hpp" +#if ENABLE_EMBEDDED_DATA +#include "md_parser.hpp" +#endif + +//#include "imx296_gain_table.hpp" + +using namespace RPiController; +using libcamera::utils::Duration; +using namespace std::literals::chrono_literals; + +/* + * We care about one gain register and a pair of exposure registers. Their I2C + * addresses from the Sony IMX296 datasheet: + */ +constexpr uint32_t gainReg = 0x157; +constexpr uint32_t expHiReg = 0x15a; +constexpr uint32_t expLoReg = 0x15b; +constexpr std::initializer_list registerList [[maybe_unused]] = { expHiReg, expLoReg, gainReg }; + +class CamHelperImx296 : public CamHelper +{ +public: + CamHelperImx296(); + uint32_t GainCode(double gain) const override; + double Gain(uint32_t gain_code) const override; + uint32_t ExposureLines(Duration exposure) const override; + Duration Exposure(uint32_t exposure_lines) const override; + unsigned int MistrustFramesModeSwitch() const override; + bool SensorEmbeddedDataPresent() const override; + +private: + static constexpr uint32_t maxGainCode = 239; + static constexpr Duration timePerLine = 550.0 / 37.125e6 * 1.0s; + + /* + * Smallest difference between the frame length and integration time, + * in units of lines. + */ + static constexpr int frameIntegrationDiff = 4; + + void PopulateMetadata(const MdParser::RegisterMap ®isters, + Metadata &metadata) const override; +}; + +CamHelperImx296::CamHelperImx296() +#if ENABLE_EMBEDDED_DATA + : CamHelper(std::make_unique(registerList), frameIntegrationDiff) +#else + : CamHelper(nullptr, frameIntegrationDiff) +#endif +{ +} + +uint32_t CamHelperImx296::GainCode(double gain) const +{ + uint32_t code = 20 * std::log10(gain) * 10; + return std::min(code, maxGainCode); +} + +double CamHelperImx296::Gain(uint32_t gain_code) const +{ + return std::pow(10.0, gain_code / 200.0); +} + +uint32_t CamHelperImx296::ExposureLines(Duration exposure) const +{ + return (exposure - 14.26us) / timePerLine; +} + +Duration CamHelperImx296::Exposure(uint32_t exposure_lines) const +{ + return exposure_lines * timePerLine + 14.26us; +} + +unsigned int CamHelperImx296::MistrustFramesModeSwitch() const +{ + /* + * For reasons unknown, we do occasionally get a bogus metadata frame + * at a mode switch (though not at start-up). Possibly warrants some + * investigation, though not a big deal. + */ + return 1; +} + +bool CamHelperImx296::SensorEmbeddedDataPresent() const +{ + return ENABLE_EMBEDDED_DATA; +} + +void CamHelperImx296::PopulateMetadata(const MdParser::RegisterMap ®isters, + Metadata &metadata) const +{ + DeviceStatus deviceStatus; + + deviceStatus.shutter_speed = Exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg)); + deviceStatus.analogue_gain = Gain(registers.at(gainReg)); + + metadata.Set("device.status", deviceStatus); +} + +static CamHelper *Create() +{ + return new CamHelperImx296(); +} + +static RegisterCamHelper reg("imx296", &Create); diff --git a/src/ipa/raspberrypi/meson.build b/src/ipa/raspberrypi/meson.build index 176055f42248..32897e07dad9 100644 --- a/src/ipa/raspberrypi/meson.build +++ b/src/ipa/raspberrypi/meson.build @@ -21,6 +21,7 @@ rpi_ipa_sources = files([ 'cam_helper_ov5647.cpp', 'cam_helper_imx219.cpp', 'cam_helper_imx290.cpp', + 'cam_helper_imx296.cpp', 'cam_helper_imx477.cpp', 'cam_helper_imx519.cpp', 'cam_helper_ov9281.cpp', From patchwork Sun Dec 19 23:27:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15170 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 E9059C3259 for ; Sun, 19 Dec 2021 23:27:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 70DD6605A8; Mon, 20 Dec 2021 00:27:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YCInglku"; dkim-atps=neutral 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 720AE605A7 for ; Mon, 20 Dec 2021 00:27:22 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A295FD2; Mon, 20 Dec 2021 00:27:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1639956442; bh=3vW9OqXs2n9d0mOcc478fn+Bm5AAigZtkSwpCyKubd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YCInglkuC2aix/U8rYTz/DOoDyawv4g6KS1qSJ6xj8ONkrNUytwt8knpkmfJMh69D E5Cj5OlX3+8NQ3n2nK8KLumVcfiQuA1zqbw1bFxWygEgsRZXWNAHwGP7EkNCJMPMjW qQJ1w/qTuYR3fbb8ghdw4s0mjqL61jPuR4Jerny4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 01:27:14 +0200 Message-Id: <20211219232714.11427-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> References: <20211219232714.11427-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/4] ipa: raspberrypi: Add tuning file for IMX296 sensor 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Naushir Patuck The Sony IMX296 exists in two versions, colour (Bayer) and monochrome. The tuning file corresponds to the colour version. Signed-off-by: Laurent Pinchart Signed-off-by: Naushir Patuck @raspberrypi.com> Reviewed-by: Naushir Patuck @raspberrypi.com> Reviewed-by: David Plowman --- src/ipa/raspberrypi/data/imx296.json | 305 +++++++++++++++++++++++++++ src/ipa/raspberrypi/data/meson.build | 1 + 2 files changed, 306 insertions(+) create mode 100644 src/ipa/raspberrypi/data/imx296.json diff --git a/src/ipa/raspberrypi/data/imx296.json b/src/ipa/raspberrypi/data/imx296.json new file mode 100644 index 000000000000..2444bd2eb940 --- /dev/null +++ b/src/ipa/raspberrypi/data/imx296.json @@ -0,0 +1,305 @@ +{ + "rpi.black_level": + { + "black_level": 4096 + }, + "rpi.dpc": + { + }, + "rpi.lux": + { + "reference_shutter_speed": 19184, + "reference_gain": 1.0, + "reference_aperture": 1.0, + "reference_lux": 432, + "reference_Y": 13773 + }, + "rpi.noise": + { + "reference_constant": 0, + "reference_slope": 2.957 + }, + "rpi.geq": + { + "offset": 185, + "slope": 0.0105 + }, + "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 + }, + "cloudy": + { + "lo": 7000, + "hi": 8600 + } + }, + "bayes": 1, + "ct_curve": + [ + 2960.0, 0.5114, 0.3294, 3720.0, 0.4222, 0.4164, 3770.0, 0.4194, 0.4194, 6040.0, 0.2871, 0.5702, 8450.0, + 0.2285, 0.6454 + ], + "sensitivity_r": 1.0, + "sensitivity_b": 1.0, + "transverse_pos": 0.01, + "transverse_neg": 0.01157 + }, + "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.5, + "calibrations_Cr": + [ + { + "ct": 4000, "table": + [ + 2.554, 2.554, 2.541, 2.534, 2.495, 2.506, 2.516, 2.517, 2.518, 2.515, 2.513, 2.495, 2.481, 2.533, 2.533, 2.521, + 2.522, 2.534, 2.539, 2.531, 2.531, 2.506, 2.506, 2.513, 2.513, 2.509, 2.498, 2.496, 2.508, 2.517, 2.521, 2.521, + 2.509, 2.517, 2.534, 2.529, 2.531, 2.521, 2.517, 2.517, 2.515, 2.514, 2.506, 2.499, 2.508, 2.508, 2.521, 2.537, + 2.507, 2.508, 2.517, 2.516, 2.495, 2.487, 2.519, 2.534, 2.535, 2.531, 2.499, 2.494, 2.501, 2.511, 2.526, 2.526, + 2.509, 2.517, 2.507, 2.501, 2.494, 2.519, 2.539, 2.539, 2.537, 2.537, 2.533, 2.499, 2.503, 2.511, 2.529, 2.525, + 2.521, 2.522, 2.476, 2.501, 2.501, 2.539, 2.546, 2.538, 2.531, 2.538, 2.541, 2.531, 2.529, 2.526, 2.529, 2.525, + 2.516, 2.519, 2.469, 2.499, 2.499, 2.543, 2.543, 2.531, 2.528, 2.534, 2.541, 2.535, 2.531, 2.526, 2.531, 2.528, + 2.509, 2.515, 2.465, 2.487, 2.487, 2.539, 2.543, 2.539, 2.533, 2.549, 2.542, 2.531, 2.529, 2.524, 2.532, 2.533, + 2.499, 2.499, 2.475, 2.482, 2.471, 2.509, 2.539, 2.544, 2.543, 2.545, 2.533, 2.498, 2.521, 2.521, 2.537, 2.536, + 2.499, 2.488, 2.488, 2.488, 2.471, 2.462, 2.509, 2.539, 2.539, 2.532, 2.498, 2.498, 2.518, 2.518, 2.539, 2.539, + 2.483, 2.484, 2.488, 2.488, 2.502, 2.496, 2.508, 2.514, 2.518, 2.517, 2.521, 2.518, 2.518, 2.518, 2.525, 2.539, + 2.483, 2.487, 2.478, 2.478, 2.507, 2.509, 2.514, 2.513, 2.514, 2.517, 2.536, 2.559, 2.501, 2.501, 2.503, 2.525 + ] + } + ], + "calibrations_Cb": + [ + { + "ct": 4000, "table": + [ + 2.619, 2.603, 2.599, 2.597, 2.595, 2.594, 2.589, 2.587, 2.586, 2.589, 2.592, 2.597, 2.601, 2.608, 2.621, 2.621, + 2.619, 2.615, 2.603, 2.601, 2.596, 2.595, 2.591, 2.589, 2.589, 2.592, 2.599, 2.593, 2.601, 2.613, 2.622, 2.631, + 2.617, 2.617, 2.612, 2.611, 2.604, 2.598, 2.593, 2.591, 2.592, 2.591, 2.593, 2.595, 2.599, 2.614, 2.623, 2.631, + 2.624, 2.619, 2.615, 2.612, 2.605, 2.602, 2.597, 2.596, 2.592, 2.592, 2.595, 2.599, 2.602, 2.606, 2.619, 2.624, + 2.629, 2.627, 2.627, 2.617, 2.609, 2.598, 2.612, 2.623, 2.615, 2.604, 2.589, 2.595, 2.599, 2.608, 2.611, 2.614, + 2.629, 2.632, 2.637, 2.627, 2.612, 2.612, 2.629, 2.631, 2.628, 2.621, 2.604, 2.597, 2.598, 2.604, 2.609, 2.609, + 2.635, 2.636, 2.642, 2.628, 2.623, 2.623, 2.636, 2.636, 2.634, 2.628, 2.616, 2.599, 2.597, 2.601, 2.603, 2.601, + 2.641, 2.639, 2.646, 2.632, 2.627, 2.625, 2.632, 2.635, 2.634, 2.627, 2.614, 2.596, 2.595, 2.599, 2.599, 2.598, + 2.643, 2.644, 2.651, 2.649, 2.629, 2.617, 2.624, 2.629, 2.625, 2.614, 2.586, 2.599, 2.595, 2.597, 2.592, 2.595, + 2.645, 2.646, 2.649, 2.649, 2.638, 2.624, 2.616, 2.617, 2.609, 2.604, 2.603, 2.603, 2.595, 2.589, 2.587, 2.592, + 2.641, 2.643, 2.649, 2.647, 2.638, 2.618, 2.615, 2.608, 2.602, 2.595, 2.596, 2.595, 2.593, 2.584, 2.581, 2.583, + 2.638, 2.637, 2.647, 2.634, 2.634, 2.618, 2.621, 2.621, 2.611, 2.602, 2.596, 2.583, 2.581, 2.581, 2.576, 2.574 + ] + } + ], + "luminance_lut": + [ + 1.308, 1.293, 1.228, 1.175, 1.139, 1.108, 1.092, 1.082, 1.082, 1.086, 1.097, 1.114, 1.149, 1.199, 1.279, 1.303, + 1.293, 1.249, 1.199, 1.162, 1.136, 1.109, 1.087, 1.077, 1.072, 1.081, 1.095, 1.103, 1.133, 1.172, 1.225, 1.282, + 1.251, 1.212, 1.186, 1.159, 1.129, 1.114, 1.102, 1.088, 1.088, 1.088, 1.095, 1.117, 1.123, 1.158, 1.198, 1.249, + 1.223, 1.192, 1.177, 1.163, 1.147, 1.139, 1.132, 1.112, 1.111, 1.107, 1.113, 1.118, 1.139, 1.155, 1.186, 1.232, + 1.207, 1.186, 1.171, 1.162, 1.168, 1.163, 1.153, 1.138, 1.129, 1.128, 1.132, 1.136, 1.149, 1.167, 1.189, 1.216, + 1.198, 1.186, 1.176, 1.176, 1.177, 1.185, 1.171, 1.157, 1.146, 1.144, 1.146, 1.149, 1.161, 1.181, 1.201, 1.221, + 1.203, 1.181, 1.176, 1.178, 1.191, 1.189, 1.188, 1.174, 1.159, 1.153, 1.158, 1.161, 1.169, 1.185, 1.211, 1.227, + 1.211, 1.179, 1.177, 1.187, 1.194, 1.196, 1.194, 1.187, 1.176, 1.169, 1.171, 1.171, 1.175, 1.189, 1.214, 1.226, + 1.219, 1.182, 1.184, 1.191, 1.195, 1.199, 1.197, 1.194, 1.188, 1.185, 1.179, 1.179, 1.182, 1.194, 1.212, 1.227, + 1.237, 1.192, 1.194, 1.194, 1.198, 1.199, 1.198, 1.197, 1.196, 1.193, 1.189, 1.189, 1.192, 1.203, 1.214, 1.231, + 1.282, 1.199, 1.199, 1.197, 1.199, 1.199, 1.192, 1.193, 1.193, 1.194, 1.196, 1.197, 1.206, 1.216, 1.228, 1.244, + 1.309, 1.236, 1.204, 1.203, 1.202, 1.194, 1.194, 1.188, 1.192, 1.192, 1.199, 1.201, 1.212, 1.221, 1.235, 1.247 + ], + "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": 2960, "ccm": + [ + 1.61465, -0.49757, -0.11708, -0.30813, 1.53862, -0.23049, 0.04267, -0.76988, 1.72721 + ] + }, + { + "ct": 3720, "ccm": + [ + 1.63316, -0.55061, -0.08255, -0.27238, 1.54441, -0.27203, 0.01948, -0.66461, 1.64513 + ] + }, + { + "ct": 3770, "ccm": + [ + 1.62378, -0.54465, -0.07913, -0.26849, 1.54674, -0.27825, 0.01751, -0.64966, 1.63214 + ] + }, + { + "ct": 6000, "ccm": + [ + 1.56877, -0.55713, -0.01164, -0.13524, 1.48494, -0.34969, 0.01184, -0.59069, 1.57885 + ] + }, + { + "ct": 6040, "ccm": + [ + 1.58628, -0.57451, -0.01177, -0.13959, 1.48858, -0.34898, 0.01138, -0.58747, 1.57609 + ] + }, + { + "ct": 8450, "ccm": + [ + 1.51714, -0.33619, -0.18094, -0.16148, 2.03049, -0.86901, 0.00999, -0.92095, 1.91096 + ] + } + ] + }, + "rpi.sharpen": + { + } +} diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build index e84cd0990c31..211811cfa915 100644 --- a/src/ipa/raspberrypi/data/meson.build +++ b/src/ipa/raspberrypi/data/meson.build @@ -4,6 +4,7 @@ conf_files = files([ 'imx219.json', 'imx219_noir.json', 'imx290.json', + 'imx296.json', 'imx378.json', 'imx477.json', 'imx477_noir.json',