From patchwork Wed Jan 8 09:03:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22457 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 2FE0DBD80A for ; Wed, 8 Jan 2025 09:03:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D5B09684E4; Wed, 8 Jan 2025 10:03:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="fOtUSmdW"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 097DC61884 for ; Wed, 8 Jan 2025 10:03:34 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-434f398a171so15531515e9.2 for ; Wed, 08 Jan 2025 01:03:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736327013; x=1736931813; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RoJdN5G4kxQ7jBSUifcbHqgXdvi1EsKphWHPwQQGQrw=; b=fOtUSmdWO4zN7oYz5rgHd/ohzDhXm5sNBJxDaK4NNAGIhbhY+sWoTRbARSPm87I3Ny C2Xscmn0Fx2w4l/1oBS0obxFDddMUdHFweB3gKGhBQ9TZpznp98kUKKFQdxfPq2iPn6/ CL5JBpMZo6pF66JYAhHHsGSoFXLlMSEtt8SGjFIWk/NwhXhhY9yTtOw6R7oSlUas1TN9 m3uw4gFlLD/ezx6VLvQUY0rM+j11qsbhPsRZQKwGQTKXTR/YTlfEP86pIvCNbC7vD8fY szc1Ppm6Sg6Ae0SxFOofXR9Abw0SJ7IWKlfekHz7USnd732LXiRy11FU2urBpGor9xqo vPiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736327013; x=1736931813; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RoJdN5G4kxQ7jBSUifcbHqgXdvi1EsKphWHPwQQGQrw=; b=xTwir12O4c+zJ3TGhurnIHWR9cF8pfGahsWQYQebHA9yYfEikv7ykddLEKozMmPj8J 69nnfVPEPpBK3aMmzke2Zp+lqZPKmvcD9NY93stTXtAxxyQ/Wrhko5mC9X8eooNTxi7y 7Yp7Lf2SQx4U59VECUMgGNqyE3AXofhIT4pl6yCaxI3MVU/fV9uqOWQNa6CGfj5rvk24 FTy9M8YtpLKvz9wHv74GnqYBnuGaR6hUQsUK8rlTkpTBPMo5YVL8AI48Qdzs/sjz2NzZ aRYiif/OGzDKoPeazALJfAxFvFLJpurVwhPO1Es4r3gxW4WIu6conaAuJiqJCwZ+vt/a 7hQw== X-Gm-Message-State: AOJu0YwryvU2pJAvaUT+8lsqh6yUGy6Lc8Zg1b+RzPX26/SEajoe53hn cA8t/wnv6dMctxpiFYwPdaWPIR/Iwza4jlBEsGix+m/cWzgCyqgH3OJAIhOVcgGW9AD3ja53nwO O/dc= X-Gm-Gg: ASbGncuNrh42x9whJB6DBnbBqVP/hF//Yhd4cPXk7GZUYqqCk0DPZPPpmzZw3J4MBX+ oAQKrMjdzc0NzbRhn1nksHFqRsNx/M75PO2i0Nf6ks14nUMcRnnZmkcEOchQBOn561ePlfKY3SN DbVj2BbuLItN6nTT2MrIzezsunCqBXejT0igcAgf/m/AHGK/SuPyos+suCm3vkapS/BTCLUgUGM Cb5hwYWoUlyYKtkyNZJ9CXeohsAQDt4mDcvIajv/gyAYeMwWkWvVCAt5iP/PkeOcrm0LXDzv+LE X-Google-Smtp-Source: AGHT+IGAEU487yMxArBiLgTpCLfITz5rbqrAOgeHOkrPpO3Igy636L2FQH7M7vMoMAo/8p4fdlLwKQ== X-Received: by 2002:a05:600c:1d07:b0:434:f335:aa0d with SMTP id 5b1f17b1804b1-436e26924e8mr5827545e9.2.1736327013194; Wed, 08 Jan 2025 01:03:33 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2da6271sm13624475e9.9.2025.01.08.01.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 01:03:32 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Dave Stevenson , Naushir Patuck Subject: [PATCH v1 1/3] libcamera: camera_sensor_properties: Add delays for imx415 Date: Wed, 8 Jan 2025 09:03:20 +0000 Message-ID: <20250108090329.3185026-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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: Dave Stevenson Believed correct based on imx290. Signed-off-by: Dave Stevenson Signed-off-by: Naushir Patuck --- src/libcamera/sensor/camera_sensor_properties.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index bd1fc86977ce..e2f518f9ea62 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -232,7 +232,12 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { "imx415", { .unitCellSize = { 1450, 1450 }, .testPatternModes = {}, - .sensorDelays = { }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, } }, { "imx462", { .unitCellSize = { 2900, 2900 }, From patchwork Wed Jan 8 09:03:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22458 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 6F39CBD80A for ; Wed, 8 Jan 2025 09:03:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1F93568500; Wed, 8 Jan 2025 10:03:38 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="D53KJnuW"; dkim-atps=neutral Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54A3361891 for ; Wed, 8 Jan 2025 10:03:35 +0100 (CET) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43658c452f5so23368385e9.0 for ; Wed, 08 Jan 2025 01:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736327014; x=1736931814; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q/rAkgB4C+3aKWnizj9Q0Giz/Otf49vHp4xQ/IR4WzQ=; b=D53KJnuWn34Pj693jBY3g0IPAFEuKOEqX1DvITIijdqubaTxMN6irgfDgazMIkHaJz Z81+bPiLiUfRcKlJb2uHHYSSBL2ynd6kIQ/RoPKHjgai0vpgImYzFMYi0EyCAggfyvhg 3mnPqKSTHU1akWJw2mRy+/MhcIYUBnn8WluSEh8wsthTB6BZ9UdifqSOdZY18FqmTkSl ZTenkOcDnNG8x3yAtPluwwZubq9jMDCjW0PQWHVwS9Ub9+ybJqxF7DphDBXoa4yGX2/L xU3KWO+0hwtsi6xK7YNbTDmaxKgM+7c/ZbbliYh53J0gtqwgWqQPzJSf9let3jUIvFnN xh+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736327014; x=1736931814; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/rAkgB4C+3aKWnizj9Q0Giz/Otf49vHp4xQ/IR4WzQ=; b=Y1mQnqcVeFRHL/9LIUWjub0qIYBry2AgpaSJhCwayOgSo/rc3JF3rNujPJ9fBptaUG B3Dg0xKDjfPIIh7KzR6tuYrPvD7L3VqOnpIL7JuRaB+UEzroCJEuAMQKxCKvJPUjfAC9 zjWHNKPLTJQjL2LWx/oTJSnagk3E8tuR1btTHiVmFDHTxND3ovocTataxhhy9PsWnZU5 r2s9O9nSut6qM8lpfOPKjb8L3dGlPwW3KSWHyx9EJi3rdJqb+SpPAhDTa06EdGebfjeF 7M+GYhWkz+Jl8ZhGfmvjSFy+twq3f+yTZqN1Ekn6QoyNv5DdqCYfXhJrnsQ8MsKW0aY7 vseg== X-Gm-Message-State: AOJu0Yy7xiwS9YezycJ6saN4daEY7Fv1BAVd9K++ZGVZ8eHksyfDOWM4 0Ayi7/T6sT5yzJkO42NEwUxJoyBMffUDN5NdT21bm+MlbVed/zx5TfxZJyMCsOPBfezwvMkEhV/ gGkk= X-Gm-Gg: ASbGncutwyzFpuQj3IN9wGQMcsRFvChm/YirFpzS4d/lUxItinL/WipKHyfql43QIYz 8aYChbU//26Pp79JhJpxkom2Dcxms6XqX2TidxaonbIyriQW0B7uM/0f8QoHNGmnZGb4eFzkXBD Pta9buXxIj2o+yAVWEMgKT7WrxTH9yxLu3wMMMQr3tkFMlBKKpkgoVBW+u65PqqQB7FQ1YLovt2 S3HIokmX2QTea54b86eCW55vsTLRyq2Iaut8Wlnt1PIrbv6h4AJ0tyrI6SWsgIkuJMrlS1h3GGE X-Google-Smtp-Source: AGHT+IG32tmglQxlRCHo/SKfdIybwYsHO0d9YNGwljCL0SZcPBpnIeLu4vPnPGtWAkAG7cimK4MOsg== X-Received: by 2002:a5d:64ac:0:b0:385:e8e7:d0ac with SMTP id ffacd0b85a97d-38a8731f78fmr520609f8f.13.1736327013869; Wed, 08 Jan 2025 01:03:33 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2da6271sm13624475e9.9.2025.01.08.01.03.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 01:03:33 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Dave Stevenson , Naushir Patuck 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 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: Dave Stevenson As another Starvis sensor, it is near identical to imx290/327. Signed-off-by: Dave Stevenson Signed-off-by: Naushir Patuck Reviewed-by: David Plowman --- src/ipa/rpi/cam_helper/cam_helper_imx415.cpp | 64 ++++++++++++++++++++ src/ipa/rpi/cam_helper/meson.build | 1 + 2 files changed, 65 insertions(+) create mode 100644 src/ipa/rpi/cam_helper/cam_helper_imx415.cpp diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp new file mode 100644 index 000000000000..c0a09eee3dee --- /dev/null +++ b/src/ipa/rpi/cam_helper/cam_helper_imx415.cpp @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2025, Raspberry Pi Ltd + * + * camera helper for imx415 sensor + */ + +#include + +#include "cam_helper.h" + +using namespace RPiController; + +class CamHelperImx415 : public CamHelper +{ +public: + CamHelperImx415(); + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + unsigned int hideFramesStartup() const override; + unsigned int hideFramesModeSwitch() const override; + +private: + /* + * Smallest difference between the frame length and integration time, + * in units of lines. + */ + static constexpr int frameIntegrationDiff = 8; +}; + +CamHelperImx415::CamHelperImx415() + : CamHelper({}, frameIntegrationDiff) +{ +} + +uint32_t CamHelperImx415::gainCode(double gain) const +{ + int code = 66.6667 * std::log10(gain); + return std::max(0, std::min(code, 0xf0)); +} + +double CamHelperImx415::gain(uint32_t gainCode) const +{ + return std::pow(10, 0.015 * gainCode); +} + +unsigned int CamHelperImx415::hideFramesStartup() const +{ + /* On startup, we seem to get 1 bad frame. */ + return 1; +} + +unsigned int CamHelperImx415::hideFramesModeSwitch() const +{ + /* After a mode switch, we seem to get 1 bad frame. */ + return 1; +} + +static CamHelper *create() +{ + return new CamHelperImx415(); +} + +static RegisterCamHelper reg("imx415", &create); diff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build index 03e88fe082e2..abf021474b5c 100644 --- a/src/ipa/rpi/cam_helper/meson.build +++ b/src/ipa/rpi/cam_helper/meson.build @@ -7,6 +7,7 @@ rpi_ipa_cam_helper_sources = files([ 'cam_helper_imx283.cpp', 'cam_helper_imx290.cpp', 'cam_helper_imx296.cpp', + 'cam_helper_imx415.cpp', 'cam_helper_imx477.cpp', 'cam_helper_imx519.cpp', 'cam_helper_imx708.cpp', From patchwork Wed Jan 8 09:03:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22459 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 108C7C32E7 for ; Wed, 8 Jan 2025 09:03:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 400C0684E4; Wed, 8 Jan 2025 10:03:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="MTtD1T9t"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CF2AA684EA for ; Wed, 8 Jan 2025 10:03:35 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3862a999594so681894f8f.0 for ; Wed, 08 Jan 2025 01:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736327015; x=1736931815; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I63yHLHpivKwMpTaQ0zTw42Om8OoNP2kxcgsLcR5VLM=; b=MTtD1T9tJ731sNbor8bdgF3ZfatXmVxwfIFYmSL2XQIWLRF41/tD/dx43ewuwe7pnT WmhAhQoe46VHxegWfOc9y0uOUxlq/UOd/w0gPMAeSJ0UGVLkyiP3lVF0y1NUo8Ugb5F6 JZWL3uuZDZOD8kKFuwAw1cWc+aKY338sEGoEFh9n58LfCCir3I5nNK9126ivCNQkW1Km PV+jj1BuG2IifC1A80HkE4DrC4cOGLO4hg+Q9iLtZ50DWtRgn5E6FRlIywBzx+lUxE2I wUgL3Fy3eqIMgbc8jedlhchwCEXlzUKru7DmXe8SN9oJ0xxXvEvITLdypDfwEztsh+2P gphg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736327015; x=1736931815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I63yHLHpivKwMpTaQ0zTw42Om8OoNP2kxcgsLcR5VLM=; b=SOgZbFsk33uc+gOQ9ZkEFzFBSMz69Fbc9OY16rgnvXK9Y8a4GwiFLAYPeakN47NqDL v3BVu18jJkfLYYJIvJsQIC5gW/yhzB+8u45e+bvDyVmCHaOb+0gFUHUAZq8klZF9y3VA 6RmiMpPne9ZBTxoJqLHOBLXcO44h6TOfXuyE0T3u11XU4liFhuGXLAPhSxMf8YXx1TWg TbhjTaGZ9VjELmkQ43Azw1/cZGhWtpych8gItmViYFA94dEZLSz6xr7G1ky9scKAh+mo xJyLy1safkVp0sbXsB5jfUz2Sz1GvcNtTlfHv0VKjjMZrISSx8WCUvmrxeaEZKIBkL1h eljg== X-Gm-Message-State: AOJu0Yz1QprbXnVu6gISGE0QDkRTk0ZY5qnVNkToy4SQucVTCPAb5GrH +vbWpL+i22550FpOjTmPGwpOLiYfPv7VE0csefHTX1HaHUkLvmer5+7qHNp8P9m+YDD/xHspgcz t0I4= X-Gm-Gg: ASbGncu+cKPX5znJFRK+fGwq5H1JGs+kWmw0Hy8ywCneuo/RjK45kxhLoC2ML9dlGxn tcBsPn+1tEmCmFA+du1z4COYlEnt6snqt8/iDQyF086srHd3099SwTtlhVL8m3KIIiP44QLo3wP UE9U5cnTe42Gqi+WWg3vC7vdKL3NZGfQaXY60rkgYANiy4Y7np412p8f0slQz1Mt1ph9MWxpdaC M1FHy3SpW/N+S8MnLBfn66qtlxz3/HKk5m5oRSQjmQP4F6Z90+sQVv64IEh/nmEldlg2ptP0ZaA X-Google-Smtp-Source: AGHT+IGvYNGZM5T0ephXRNqweHCS4rgQK2Gm9OHT2CQb3SvQLEspHY6CEGE/KVGuPZq1HEy5OfUGnQ== X-Received: by 2002:a5d:6dae:0:b0:385:df17:214f with SMTP id ffacd0b85a97d-38a87312154mr499337f8f.9.1736327014522; Wed, 08 Jan 2025 01:03:34 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2da6271sm13624475e9.9.2025.01.08.01.03.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 01:03:34 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Dave Stevenson Subject: [PATCH v1 3/3] ipa: rpi: Add vc4 tuning files for imx415 Date: Wed, 8 Jan 2025 09:03:22 +0000 Message-ID: <20250108090329.3185026-3-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 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: Dave Stevenson Basic tuning done by David Plowman using a Waveshare SKU 28524 "IMX415-98 IR-CUT Camera" module. Signed-off-by: Dave Stevenson Acked-by: Kieran Bingham Reviewed-by: Naushir Patuck Reviewed-by: David Plowman --- src/ipa/rpi/vc4/data/imx415.json | 413 +++++++++++++++++++++++++++++++ src/ipa/rpi/vc4/data/meson.build | 1 + 2 files changed, 414 insertions(+) create mode 100755 src/ipa/rpi/vc4/data/imx415.json diff --git a/src/ipa/rpi/vc4/data/imx415.json b/src/ipa/rpi/vc4/data/imx415.json new file mode 100755 index 000000000000..6ed16b173074 --- /dev/null +++ b/src/ipa/rpi/vc4/data/imx415.json @@ -0,0 +1,413 @@ +{ + "version": 2.0, + "target": "bcm2835", + "algorithms": [ + { + "rpi.black_level": + { + "black_level": 3840 + } + }, + { + "rpi.dpc": { } + }, + { + "rpi.lux": + { + "reference_shutter_speed": 19230, + "reference_gain": 1.0, + "reference_aperture": 1.0, + "reference_lux": 1198, + "reference_Y": 14876 + } + }, + { + "rpi.noise": + { + "reference_constant": 17, + "reference_slope": 3.439 + } + }, + { + "rpi.geq": + { + "offset": 193, + "slope": 0.00902 + } + }, + { + "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": + [ + 2698.0, 0.7681, 0.2026, + 2930.0, 0.7515, 0.2116, + 3643.0, 0.6355, 0.2858, + 4605.0, 0.4992, 0.4041, + 5658.0, 0.4498, 0.4574 + ], + "sensitivity_r": 1.0, + "sensitivity_b": 1.0, + "transverse_pos": 0.0112, + "transverse_neg": 0.01424 + } + }, + { + "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": 3000, + "table": + [ + 1.025, 1.016, 1.013, 1.011, 1.008, 1.005, 1.003, 1.001, 1.003, 1.005, 1.008, 1.011, 1.014, 1.019, 1.027, 1.035, + 1.025, 1.017, 1.013, 1.011, 1.008, 1.005, 1.003, 1.003, 1.004, 1.005, 1.009, 1.012, 1.017, 1.023, 1.029, 1.035, + 1.022, 1.017, 1.013, 1.009, 1.007, 1.005, 1.003, 1.003, 1.004, 1.006, 1.009, 1.012, 1.017, 1.023, 1.029, 1.035, + 1.019, 1.015, 1.011, 1.007, 1.005, 1.003, 1.001, 1.001, 1.003, 1.004, 1.007, 1.009, 1.015, 1.022, 1.028, 1.035, + 1.018, 1.014, 1.009, 1.006, 1.004, 1.002, 1.001, 1.001, 1.001, 1.003, 1.006, 1.009, 1.015, 1.021, 1.028, 1.035, + 1.018, 1.013, 1.011, 1.006, 1.003, 1.002, 1.001, 1.001, 1.001, 1.003, 1.006, 1.009, 1.015, 1.022, 1.028, 1.036, + 1.018, 1.014, 1.011, 1.007, 1.004, 1.002, 1.001, 1.001, 1.001, 1.004, 1.007, 1.009, 1.015, 1.023, 1.029, 1.036, + 1.019, 1.014, 1.012, 1.008, 1.005, 1.003, 1.002, 1.001, 1.003, 1.005, 1.008, 1.012, 1.016, 1.024, 1.031, 1.037, + 1.021, 1.016, 1.013, 1.009, 1.008, 1.005, 1.003, 1.003, 1.005, 1.008, 1.011, 1.014, 1.019, 1.026, 1.033, 1.039, + 1.025, 1.021, 1.016, 1.013, 1.009, 1.008, 1.006, 1.006, 1.008, 1.011, 1.014, 1.019, 1.024, 1.031, 1.038, 1.046, + 1.029, 1.025, 1.021, 1.018, 1.014, 1.013, 1.011, 1.011, 1.012, 1.015, 1.019, 1.023, 1.028, 1.035, 1.046, 1.051, + 1.032, 1.029, 1.023, 1.021, 1.018, 1.015, 1.014, 1.014, 1.015, 1.018, 1.022, 1.027, 1.033, 1.041, 1.051, 1.054 + ] + }, + { + "ct": 5000, + "table": + [ + 1.025, 1.011, 1.009, 1.005, 1.004, 1.003, 1.001, 1.001, 1.002, 1.006, 1.009, 1.012, 1.016, 1.021, 1.031, 1.041, + 1.025, 1.014, 1.009, 1.007, 1.005, 1.004, 1.003, 1.003, 1.004, 1.007, 1.009, 1.013, 1.021, 1.028, 1.037, 1.041, + 1.023, 1.014, 1.009, 1.007, 1.005, 1.004, 1.003, 1.003, 1.005, 1.007, 1.011, 1.014, 1.021, 1.028, 1.037, 1.048, + 1.022, 1.012, 1.007, 1.005, 1.002, 1.001, 1.001, 1.001, 1.003, 1.005, 1.009, 1.014, 1.019, 1.028, 1.039, 1.048, + 1.022, 1.011, 1.006, 1.003, 1.001, 1.001, 1.001, 1.001, 1.002, 1.005, 1.009, 1.014, 1.021, 1.029, 1.039, 1.051, + 1.022, 1.012, 1.007, 1.003, 1.002, 1.001, 1.001, 1.001, 1.002, 1.005, 1.009, 1.015, 1.021, 1.031, 1.041, 1.053, + 1.023, 1.013, 1.009, 1.005, 1.003, 1.003, 1.001, 1.002, 1.004, 1.006, 1.011, 1.015, 1.022, 1.031, 1.042, 1.056, + 1.024, 1.015, 1.012, 1.008, 1.005, 1.004, 1.004, 1.004, 1.006, 1.009, 1.013, 1.018, 1.024, 1.034, 1.045, 1.057, + 1.027, 1.017, 1.015, 1.012, 1.009, 1.007, 1.007, 1.008, 1.009, 1.013, 1.018, 1.023, 1.029, 1.038, 1.051, 1.061, + 1.029, 1.023, 1.017, 1.015, 1.014, 1.012, 1.011, 1.011, 1.014, 1.018, 1.024, 1.029, 1.036, 1.044, 1.056, 1.066, + 1.034, 1.028, 1.023, 1.022, 1.019, 1.019, 1.018, 1.018, 1.021, 1.025, 1.031, 1.035, 1.042, 1.053, 1.066, 1.074, + 1.041, 1.034, 1.027, 1.025, 1.025, 1.023, 1.023, 1.023, 1.025, 1.031, 1.035, 1.041, 1.049, 1.059, 1.074, 1.079 + ] + } + ], + "calibrations_Cb": [ + { + "ct": 3000, + "table": + [ + 1.001, 1.001, 1.007, 1.015, 1.027, 1.034, 1.038, 1.041, 1.042, 1.043, 1.043, 1.043, 1.041, 1.039, 1.049, 1.054, + 1.011, 1.011, 1.013, 1.023, 1.032, 1.039, 1.044, 1.047, 1.052, 1.056, 1.059, 1.059, 1.055, 1.051, 1.054, 1.056, + 1.015, 1.015, 1.019, 1.032, 1.039, 1.044, 1.047, 1.052, 1.055, 1.059, 1.061, 1.066, 1.063, 1.058, 1.061, 1.064, + 1.016, 1.017, 1.023, 1.032, 1.041, 1.045, 1.048, 1.053, 1.056, 1.061, 1.066, 1.069, 1.067, 1.064, 1.065, 1.068, + 1.018, 1.019, 1.025, 1.033, 1.042, 1.045, 1.049, 1.054, 1.058, 1.063, 1.071, 1.072, 1.071, 1.068, 1.069, 1.071, + 1.023, 1.024, 1.029, 1.035, 1.043, 1.048, 1.052, 1.057, 1.061, 1.065, 1.074, 1.075, 1.075, 1.072, 1.072, 1.075, + 1.027, 1.028, 1.031, 1.038, 1.045, 1.051, 1.054, 1.059, 1.064, 1.068, 1.075, 1.079, 1.078, 1.075, 1.076, 1.081, + 1.029, 1.031, 1.033, 1.044, 1.048, 1.054, 1.059, 1.064, 1.067, 1.073, 1.079, 1.082, 1.082, 1.079, 1.081, 1.085, + 1.033, 1.033, 1.035, 1.047, 1.053, 1.058, 1.064, 1.067, 1.073, 1.079, 1.084, 1.086, 1.086, 1.084, 1.089, 1.091, + 1.037, 1.037, 1.038, 1.049, 1.057, 1.062, 1.068, 1.073, 1.079, 1.084, 1.089, 1.092, 1.092, 1.092, 1.096, 1.104, + 1.041, 1.041, 1.043, 1.051, 1.061, 1.068, 1.073, 1.079, 1.083, 1.089, 1.092, 1.094, 1.097, 1.099, 1.105, 1.115, + 1.048, 1.044, 1.044, 1.051, 1.063, 1.071, 1.076, 1.082, 1.088, 1.091, 1.094, 1.097, 1.099, 1.104, 1.115, 1.126 + ] + }, + { + "ct": 5000, + "table": + [ + 1.001, 1.001, 1.005, 1.011, 1.014, 1.018, 1.019, 1.019, 1.019, 1.021, 1.021, 1.021, 1.019, 1.017, 1.014, 1.014, + 1.009, 1.009, 1.011, 1.014, 1.019, 1.024, 1.026, 1.029, 1.031, 1.032, 1.032, 1.031, 1.027, 1.023, 1.022, 1.022, + 1.011, 1.012, 1.015, 1.018, 1.024, 1.026, 1.029, 1.032, 1.035, 1.036, 1.036, 1.034, 1.031, 1.027, 1.025, 1.025, + 1.012, 1.013, 1.015, 1.019, 1.025, 1.029, 1.032, 1.035, 1.036, 1.038, 1.038, 1.036, 1.034, 1.029, 1.026, 1.026, + 1.013, 1.014, 1.016, 1.019, 1.027, 1.031, 1.034, 1.037, 1.039, 1.039, 1.041, 1.039, 1.036, 1.031, 1.028, 1.027, + 1.014, 1.014, 1.017, 1.021, 1.027, 1.033, 1.037, 1.039, 1.041, 1.041, 1.042, 1.042, 1.039, 1.033, 1.029, 1.028, + 1.015, 1.015, 1.018, 1.021, 1.027, 1.033, 1.037, 1.041, 1.041, 1.042, 1.042, 1.042, 1.039, 1.034, 1.029, 1.029, + 1.015, 1.016, 1.018, 1.022, 1.027, 1.033, 1.037, 1.041, 1.041, 1.042, 1.043, 1.043, 1.041, 1.035, 1.031, 1.031, + 1.015, 1.016, 1.018, 1.022, 1.027, 1.032, 1.037, 1.041, 1.042, 1.042, 1.044, 1.043, 1.041, 1.036, 1.034, 1.033, + 1.016, 1.017, 1.017, 1.022, 1.027, 1.032, 1.036, 1.039, 1.042, 1.042, 1.043, 1.043, 1.041, 1.039, 1.036, 1.034, + 1.017, 1.017, 1.018, 1.022, 1.027, 1.031, 1.035, 1.039, 1.041, 1.042, 1.042, 1.042, 1.042, 1.039, 1.039, 1.039, + 1.018, 1.017, 1.017, 1.021, 1.027, 1.031, 1.033, 1.038, 1.041, 1.041, 1.042, 1.042, 1.041, 1.041, 1.041, 1.041 + ] + } + ], + "luminance_lut": + [ + 2.102, 1.903, 1.658, 1.483, 1.358, 1.267, 1.202, 1.202, 1.202, 1.242, 1.323, 1.431, 1.585, 1.797, 2.096, 2.351, + 1.996, 1.776, 1.549, 1.385, 1.273, 1.204, 1.138, 1.133, 1.133, 1.185, 1.252, 1.343, 1.484, 1.679, 1.954, 2.228, + 1.923, 1.689, 1.474, 1.318, 1.204, 1.138, 1.079, 1.071, 1.071, 1.133, 1.185, 1.284, 1.415, 1.597, 1.854, 2.146, + 1.881, 1.631, 1.423, 1.272, 1.159, 1.079, 1.051, 1.026, 1.046, 1.071, 1.144, 1.245, 1.369, 1.543, 1.801, 2.095, + 1.867, 1.595, 1.391, 1.242, 1.131, 1.051, 1.013, 1.002, 1.013, 1.046, 1.121, 1.219, 1.343, 1.511, 1.752, 2.079, + 1.867, 1.589, 1.385, 1.236, 1.125, 1.048, 1.001, 1.001, 1.003, 1.045, 1.118, 1.217, 1.342, 1.511, 1.746, 2.079, + 1.867, 1.589, 1.385, 1.236, 1.125, 1.048, 1.011, 1.003, 1.011, 1.046, 1.118, 1.217, 1.343, 1.511, 1.746, 2.079, + 1.884, 1.621, 1.411, 1.261, 1.149, 1.071, 1.048, 1.024, 1.046, 1.069, 1.141, 1.239, 1.369, 1.541, 1.781, 2.093, + 1.913, 1.675, 1.459, 1.304, 1.191, 1.125, 1.071, 1.065, 1.069, 1.124, 1.181, 1.278, 1.413, 1.592, 1.842, 2.133, + 1.981, 1.755, 1.529, 1.368, 1.251, 1.191, 1.125, 1.124, 1.124, 1.181, 1.242, 1.337, 1.479, 1.669, 1.935, 2.207, + 2.078, 1.867, 1.625, 1.453, 1.344, 1.251, 1.202, 1.201, 1.201, 1.242, 1.333, 1.418, 1.571, 1.776, 2.063, 2.321, + 2.217, 2.011, 1.747, 1.562, 1.431, 1.331, 1.278, 1.278, 1.278, 1.313, 1.407, 1.523, 1.686, 1.911, 2.226, 2.484 + ], + "sigma": 0.00135, + "sigma_Cb": 0.00279 + } + }, + { + "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": 2698, + "ccm": + [ + 1.57227, -0.32596, -0.24631, + -0.61264, 1.70791, -0.09526, + -0.43254, 0.48489, 0.94765 + ] + }, + { + "ct": 2930, + "ccm": + [ + 1.69455, -0.52724, -0.16731, + -0.67131, 1.78468, -0.11338, + -0.41609, 0.54693, 0.86916 + ] + }, + { + "ct": 3643, + "ccm": + [ + 1.74041, -0.77553, 0.03512, + -0.44073, 1.34131, 0.09943, + -0.11035, -0.93919, 2.04954 + ] + }, + { + "ct": 4605, + "ccm": + [ + 1.49865, -0.41638, -0.08227, + -0.39445, 1.70114, -0.30669, + 0.01319, -0.88009, 1.86689 + ] + }, + { + "ct": 5658, + "ccm": + [ + 1.38601, -0.23128, -0.15472, + -0.37641, 1.70444, -0.32803, + -0.01575, -0.71466, 1.73041 + ] + } + ] + } + }, + { + "rpi.sharpen": { } + } + ] +} diff --git a/src/ipa/rpi/vc4/data/meson.build b/src/ipa/rpi/vc4/data/meson.build index 94c0ee6e6b7b..7a8001ee4817 100644 --- a/src/ipa/rpi/vc4/data/meson.build +++ b/src/ipa/rpi/vc4/data/meson.build @@ -9,6 +9,7 @@ conf_files = files([ 'imx296_mono.json', 'imx327.json', 'imx378.json', + 'imx415.json', 'imx462.json', 'imx477.json', 'imx477_noir.json',