From patchwork Fri Jun 30 12:03:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 18774 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 0E162C3295 for ; Fri, 30 Jun 2023 12:03:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 94216628C8; Fri, 30 Jun 2023 14:03:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1688126594; bh=v1XEwTx8XIC3TLzFQZnBpaCqyNfZFOmH3b6GltBv8QA=; 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=Foit8WsoRNivigYFE4gYIUcoFoGj30ebjlazQNw6OyjM5JIaxjyzi7eAJeSu3S0L5 hvKRyD2JnMhqW6O+O0FPPqes3o+NZuoQq0C061lmtKydtpAmPITMkt3rAmrqxuv5dI Y/rCRoTdh9d/K8XsLnzUJvE1ch+CmVOPFbfE2EgRz0emurNTQDz2W2mlPUsOvdZMco wbGQM1sLMS4+CiqVdZD/ZWoJ1zGhKznX0nIr6LlTp79OJx1GoLDSIwmlx1eC8iZXfT c20T9hpv34MkjS402GvwK2JgaZcIb/ADTmDjJTHPYHOfbyDWyD1OxiPMbNIvbopuq1 LF/d+p0QVPB/g== 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 04452628C1 for ; Fri, 30 Jun 2023 14:03:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hyqn+PmB"; dkim-atps=neutral Received: from umang.jainideasonboard.com.praguecc.cz (unknown [193.85.242.128]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 81CB73320; Fri, 30 Jun 2023 14:02:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1688126548; bh=v1XEwTx8XIC3TLzFQZnBpaCqyNfZFOmH3b6GltBv8QA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hyqn+PmBxyBKzf6+DB8bTI1HLbRSQUorw/pB5UFfTmH4sD0h/kzvD2Nb9y7lKHHLK SU6imDX7xnjYWzcOcVHlKK+kyI4YahHuY7/IKRmhf7gdYJ1hyH83rqBFpfD4iQkJQ5 79UuHfT9eTMl/LK/TktSp8L+PHbnbZ6rYzgpIl/c= To: libcamera-devel@lists.libcamera.org Date: Fri, 30 Jun 2023 14:03:03 +0200 Message-Id: <20230630120303.33023-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230630120303.33023-1-umang.jain@ideasonboard.com> References: <20230630120303.33023-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 5/5] ipa: rpi: cam_helper_imx519: Only pass embedded buffer in parseEmbeddedData() 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: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Only the embedded data section should be passed while parsing the embedded data through parseEmbeddedData(). Signed-off-by: Umang Jain --- src/ipa/rpi/cam_helper/cam_helper_imx519.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx519.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx519.cpp index c7262aa0..77fb1f03 100644 --- a/src/ipa/rpi/cam_helper/cam_helper_imx519.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper_imx519.cpp @@ -42,6 +42,9 @@ constexpr std::initializer_list registerList = { expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg, lineLengthHiReg, lineLengthLoReg }; +/* No. of lines of embedded data on IMX519. */ +constexpr uint32_t embeddedDataLinesImx519 = 2; + class CamHelperImx519 : public CamHelper { public: @@ -95,7 +98,10 @@ void CamHelperImx519::prepare(libcamera::Span buffer, Metadata &m return; } - parseEmbeddedData(buffer, metadata); + size_t bytesPerLine = (mode_.width * mode_.bitdepth) >> 3; + libcamera::Span embeddedData{ buffer.data(), + embeddedDataLinesImx519 * bytesPerLine }; + parseEmbeddedData(embeddedData, metadata); /* * The DeviceStatus struct is first populated with values obtained from