From patchwork Mon Feb 27 20:42:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18313 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 03388C3257 for ; Mon, 27 Feb 2023 20:43:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C08FA6268D; Mon, 27 Feb 2023 21:43:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1677530580; bh=p9t84BALirKeBElcV7UuoghAqipTaLglocLXAmVT7h0=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=S/LBEgsjvtovXIEXEY3yaGHmA+u3aUkXRQgJIxeyoj3V5FIRebu9aeauDLp+8JQJF wJgtg0sicDGyvuT7Ln0c8h9+M0UZB4aoaPxCg8oNKHREAKvBr3d+NtM0SU/9dFszK3 DS1764mZy/UX6HQN+9PRkbZqMW/9aHqpR8m/75dYeq6e5Di4ClPx9OP8vM/BnS4l5d XsGB7ODHE5W+0gabvrWgWUZnfloCsM09DDNR3uzFcQoj56KSmQIYmeAEsxFR1QH0Bc fbRrOz8cuFNBRpkzur21pb4fmaMbkYFN7uMmDSXpMy5vRy60rRZGK0PUjYFnyYjCZT Jhg4JGbRvHm0g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 669156267E for ; Mon, 27 Feb 2023 21:42:58 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wXmEt4V2"; dkim-atps=neutral Received: from Monstersaurus.tail69b4.ts.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E30221257; Mon, 27 Feb 2023 21:42:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1677530578; bh=p9t84BALirKeBElcV7UuoghAqipTaLglocLXAmVT7h0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wXmEt4V2QZkp8i0OF6iHVV9EvYtXFOWLMZLcTTiaKOssJ3O8PGn890rbiMNUQT2Qv RLG6xFQ1ozZ8RP9sTNZMTzcbrzjpCdcjlK0H2DtP/D+hU+h8wYh4ksZU73H/DDARCo F+smwoNkVSxrkvHU07Q6y31O4g3pCzz/aOsBdqBk= To: libcamera devel Date: Mon, 27 Feb 2023 20:42:53 +0000 Message-Id: <20230227204254.3965883-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227204254.3965883-1-kieran.bingham@ideasonboard.com> References: <20230227204254.3965883-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: libipa: Add OV2685 Camera Sensor 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: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Provide a CameraSensorHelper for the OV2685, along with the corresponding camera sensor properties. Signed-off-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 7977d7eb6c07..d1051cc25656 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -450,6 +450,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477) +class CameraSensorHelperOv2685 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv2685() + { + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov2685", CameraSensorHelperOv2685) + class CameraSensorHelperOv2740 : public CameraSensorHelper { public: diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index b8c532699684..7652c5f3e24c 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -133,6 +133,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModePn9, 4 }, }, } }, + { "ov2685", { + .unitCellSize = { 1750, 1750 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1}, + { controls::draft::TestPatternModeColorBarsFadeToGray, 2 }, + /* + * Also exposed by the driver: + * - OV2685_TEST_PATTERN_RANDOM, + * - OV2685_TEST_PATTERN_BW_SQUARE, + * - OV2685_TEST_PATTERN_COLOR_SQUARE, + */ + }, + } }, { "ov2740", { .unitCellSize = { 1400, 1400 }, .testPatternModes = {