[libcamera-devel] [RFC PATCH 5/5] ipa: rpi: cam_helper_imx519: Only pass embedded buffer in parseEmbeddedData()
Umang Jain
umang.jain at ideasonboard.com
Fri Jun 30 14:03:03 CEST 2023
Only the embedded data section should be passed while parsing the
embedded data through parseEmbeddedData().
Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
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<uint32_t> 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<const uint8_t> buffer, Metadata &m
return;
}
- parseEmbeddedData(buffer, metadata);
+ size_t bytesPerLine = (mode_.width * mode_.bitdepth) >> 3;
+ libcamera::Span<const uint8_t> embeddedData{ buffer.data(),
+ embeddedDataLinesImx519 * bytesPerLine };
+ parseEmbeddedData(embeddedData, metadata);
/*
* The DeviceStatus struct is first populated with values obtained from
--
2.39.1
More information about the libcamera-devel
mailing list