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 = { From patchwork Mon Feb 27 20:42:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18314 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 8CC5DC329C for ; Mon, 27 Feb 2023 20:43:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4480362692; Mon, 27 Feb 2023 21:43:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1677530582; bh=UZbDX1UgcqC90UJdAetxSyPDDwamFJvbrf32tOcTvSo=; 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=sUw/2iZQ3lQjj2j97yLPqafF8Xnq7z9bix4W720htJRXVTdfaRy0U41Q9u+8Q48LV vVq+hbaZd7f3eDHn4zkP0R02YD2orQJtd8L/72YjgFkVnaHtnO9Y+TxFc+NQhYyT4H kBqleGypPgyI8uy9wUAXoqaDDFyiVS1PgPAm00IdLBsB2e2uUF6+XiBj7Lopbs8Co3 9EDAp1r2MYUQ/BtUbzX3DDd7Ov7JCmO3brfHWGZvrkrpSLv5K47LyesnGpM+m1gLEX XnmPWeDv+ER0GlnVZC5XCJOEEpE7fh3EHuYJA5J/W7wBxCkAcVdfhz8AtKTV0GEq0S VVLkkR3WgWP7Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 94F0362682 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="QHVDSRTn"; 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 366601288; Mon, 27 Feb 2023 21:42:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1677530578; bh=UZbDX1UgcqC90UJdAetxSyPDDwamFJvbrf32tOcTvSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QHVDSRTnMrgHKJXT3Ovl9ILqhT+nv9t2n98kj2SvgEF+Zbb3d+rLUncZTrYoQg7m4 iUkNMnxLU0J/rvVobnmCOZIkjDNZdQd8DeXZFOckt7CS72RBOmLeU8oP2JX2iz2m6Y bSOg0xZkJQm2/svvcutwnas8s2iJN2odgvVm81Oc= To: libcamera devel Date: Mon, 27 Feb 2023 20:42:54 +0000 Message-Id: <20230227204254.3965883-3-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 2/2] ipa: libipa: Add OV5695 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 OV5695, along with the corresponding camera sensor properties. Signed-off-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/camera_sensor_properties.cpp | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index d1051cc25656..a38fefc75372 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -527,6 +527,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693) +class CameraSensorHelperOv5695 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv5695() + { + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov5695", CameraSensorHelperOv5695) + class CameraSensorHelperOv8858 : public CameraSensorHelper { public: diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index 7652c5f3e24c..a92c13b87b7f 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -204,6 +204,14 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen */ }, } }, + { "ov5695", { + .unitCellSize = { 1400, 1400 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 4}, + }, + } }, { "ov8858", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {