From patchwork Wed Oct 21 14:41:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 28546 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 504EFC3261 for ; Wed, 21 Oct 2026 14:41:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 977D568F2B; Wed, 21 Oct 2026 16:41:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="gT9hRVsA"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E86D368E07 for ; Wed, 21 Oct 2026 16:41:42 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-49d04e4a943so1138885e9.2 for ; Wed, 21 Oct 2026 07:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1792593702; x=1793198502; 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:content-type; bh=nVG2mqx6lDqxPU7Ae54Ye6oeCreXHyMSlxypD4fer5Y=; b=gT9hRVsArHteyHZW38P4piFPTqsToOb885ARXLoO2sV6XK8VqIzSeypRDIla0q9rbk q3LuQzfGUHhvP/TV+/cvYcN19q0TFOfViutR4YL8qMNXLQnYZY1InF88aejyz9qY/fwa Mycv7BNT8zEffIl8KTZFJQ+YRCRJKCTJrhQVXrUpFRtGl+el7r7hi8wKFwKWLVQUZVJr RQEE2SlWI4yRhjOO7/mEWXtbR3yZtAoZoThHroR6UZw1YHWVTogOECTEEGhv6hz79jK6 bWtc3YB1FpYhUlbRe+PpiSggGmXWp3W5qLa1umqmnXHEatAWw4tlpicRLlMtHmF2KSf4 mIsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792593702; x=1793198502; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nVG2mqx6lDqxPU7Ae54Ye6oeCreXHyMSlxypD4fer5Y=; b=Fdi5PND2ptLJYxwGY2e3jClosFdPVNn0ZVNWEil1/pPO4Mg0O6lSkPItEUUbPQ//CG tbyF/zpGnxIEiUozmohRup06xo0mraQ5OyVWdB6TxwPcA5fJXMo0xiV1tlT/avuam0eY gJ6ccjr8qgUteQ+uEp2SUiRVXrAOUTl8Sg/VsNdcpb7Q+VL4D0pPYt/LfDioYxPXFy5F A39iMSYrCbgs5A9Mn6qXB/N+mEUmkIPGPq2yPJoRpWQlaBaGMFhapJlfFNbeDuY/AdXh 7CdZzntWxs4PL/mTxdkDAEEULiYILKtKAIrMcOMLyaea/alJspl1g8z13/1T7DzALUoS 7xtg== X-Gm-Message-State: AFq9FYIc1GzGAqSV+qFsjTU7OEeRkH3YAWAt33kVx8n/PjGIx3kcKVvJ VujR0GFAQd+dDwMuJLZC9z3+gsl6Ms8juNospMbkoB8ChPQiIN0oAiLwTZuWpgdQk8jcU9M1upq Em3wXZJc= X-Gm-Gg: AYBFou2uogqQqOQM1fMZKTK3g793t1oFi8tWw4d1jWb6sNxy+6deTUL0xCAkwkt6uM3 9vTTblZjGqaN95eMtTq7YhDV6NF01SAi701/et9WGycCRbImkxR9at9FUWoQNw+qI/k3+emNlsx aEncYQZLAOem8a775NWCVGFS7cDuuXtmSrMNy9ygmUKMnkWoqJC9mDpJNdSaFlzyg19shw+1AKK zG/pk+kmEjKcHqvZmue/kgBWesIVdJ7tzZMfP674FICLykdyzIqqd+yWDPNMVv29Ou90IOp4i6/ PkMdQMTbjiF+TQDQhCfd1VtPmEkRtE7PYXnXT9RVanhJh/6m8AxHwJ72ZDqbBWwzb9am3KvvOww nGvoeOYvARHgYVCrByRHltIy6GdjrBrg6uAojW3DVMq1irEAeGm5Pxka38iMm51kn5vSC4SB9Ed zW8k0OyHPPnTrZnsnye2lVfMRsU0np+vdfqF0n6XhSHzgoGE2UTM1qL1ZtRPCkwHDR8bEbWDT4g sfirMuTCsRjl8oGpZbM/tOwPwIm6n/Tn1rY+kaw/8r6p8wFJ18CnEzlFdAr8Dfnp/MiI91KL83X RimPW872Tmmz2UBb5xtjFRK44psuaCs4AuyidTkADrOstIbEACl0tIT6QyxP6/EeqY4HMjnacWP LVuiElEk3ZUexvIJbdQkF+mGggVOZEke4d8D6N3p3ABdE6poPZZl3IaBN35YGPwoQDk3YPvvX3C AeMZqSUuI7tGvv/JD2 X-Received: by 2002:a05:600d:8051:b0:4a1:7dcf:be1f with SMTP id 5b1f17b1804b1-4a1fdada1c1mr40721645e9.1.1792593702293; Wed, 21 Oct 2026 07:41:42 -0700 (PDT) Received: from naush-dell.pitowers.org ([2a00:1098:3142:1f:7c61:6240:f131:9a44]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1fc10de99sm52515785e9.1.2026.10.21.07.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2026 07:41:41 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: dave.stevenson@raspberrypi.com, Naushir Patuck Subject: [PATCH 1/3] ipa: rpi: Rename cam_helper_imx678 to cam_helper_starvis2 Date: Wed, 21 Oct 2026 15:41:00 +0100 Message-ID: <20261021144139.3366988-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.53.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" This rename is in preparation for adding more Starvis 2 sensors to the helper. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham --- ...per_imx678.cpp => cam_helper_starvis2.cpp} | 19 +++++++------------ src/ipa/rpi/cam_helper/meson.build | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) rename src/ipa/rpi/cam_helper/{cam_helper_imx678.cpp => cam_helper_starvis2.cpp} (61%) diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx678.cpp b/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp similarity index 61% rename from src/ipa/rpi/cam_helper/cam_helper_imx678.cpp rename to src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp index 5be1fa795370..0a0f75e19c01 100644 --- a/src/ipa/rpi/cam_helper/cam_helper_imx678.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper_starvis2.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2026, Will Whang * - * cam_helper_imx678.cpp - camera information for Sony IMX678 sensor + * cam_helper_starvis2.cpp - camera information for Sony Starvis 2 family of sensors */ #include @@ -14,10 +14,10 @@ namespace { using namespace RPiController; -class CamHelperImx678 : public CamHelper +class CamHelperStarvis2 : public CamHelper { public: - CamHelperImx678(); + CamHelperStarvis2(); uint32_t gainCode(double gain) const override; double gain(uint32_t gainCode) const override; @@ -29,30 +29,25 @@ private: static constexpr int frameIntegrationDiff = 4; }; -/* - * IMX678 driver currently doesn't expose a metadata stream, so we have to use - * the "unicam parser" which works by counting frames. - */ - -CamHelperImx678::CamHelperImx678() +CamHelperStarvis2::CamHelperStarvis2() : CamHelper({}, frameIntegrationDiff) { } -uint32_t CamHelperImx678::gainCode(double gain) const +uint32_t CamHelperStarvis2::gainCode(double gain) const { int code = 66.6667 * log10(gain); return std::max(0, std::min(code, 0xf0)); } -double CamHelperImx678::gain(uint32_t gainCode) const +double CamHelperStarvis2::gain(uint32_t gainCode) const { return std::pow(10, 0.015 * gainCode); } CamHelper *create() { - return new CamHelperImx678(); + return new CamHelperStarvis2(); } RegisterCamHelper reg("imx678", &create); diff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build index cc71bacb2c6a..6935cecf885f 100644 --- a/src/ipa/rpi/cam_helper/meson.build +++ b/src/ipa/rpi/cam_helper/meson.build @@ -11,12 +11,12 @@ rpi_ipa_cam_helper_sources = files([ 'cam_helper_imx415.cpp', 'cam_helper_imx477.cpp', 'cam_helper_imx519.cpp', - 'cam_helper_imx678.cpp', 'cam_helper_imx708.cpp', 'cam_helper_mira220.cpp', 'cam_helper_ov64a40.cpp', 'cam_helper_ov7251.cpp', 'cam_helper_ov9281.cpp', + 'cam_helper_starvis2.cpp', 'cam_helper_vd55g1.cpp', 'cam_helper_vd56g3.cpp', 'md_parser_smia.cpp',