[libcamera-devel] [PATCH] libcamera: ipa: Pass the sensor name and selected mode to the ipa

Naushir Patuck naush at raspberrypi.com
Mon Feb 17 16:17:46 CET 2020


The ipa needs to know the sensor name to choose the per-camera tuning
settings. It also needs the sensor mode which can be, and is usually
different to the user configured mode. This is required to set any table
based parameters which rely on the sensor programmed mode.

Signed-off-by: Naushir Patuck <naush at raspberrypi.org>
---
 include/ipa/ipa_interface.h              | 3 +++
 src/ipa/libipa/ipa_interface_wrapper.cpp | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h
index 229d112..6e4b3ef 100644
--- a/include/ipa/ipa_interface.h
+++ b/include/ipa/ipa_interface.h
@@ -95,12 +95,15 @@ struct ipa_context *ipaCreate();
 #include <libcamera/signal.h>
 
 #include "v4l2_controls.h"
+#include "v4l2_videodevice.h"
 
 namespace libcamera {
 
 struct IPAStream {
 	unsigned int pixelFormat;
 	Size size;
+	V4L2DeviceFormat deviceFormat;
+	const char *cameraName;
 };
 
 struct IPABuffer {
diff --git a/src/ipa/libipa/ipa_interface_wrapper.cpp b/src/ipa/libipa/ipa_interface_wrapper.cpp
index b93c1c1..58da86d 100644
--- a/src/ipa/libipa/ipa_interface_wrapper.cpp
+++ b/src/ipa/libipa/ipa_interface_wrapper.cpp
@@ -115,6 +115,14 @@ void IPAInterfaceWrapper::configure(struct ipa_context *_ctx,
 		ipaStreams[stream.id] = {
 			stream.pixel_format,
 			Size(stream.width, stream.height),
+			/*
+			 * The below two fields:
+			 *	V4L2DeviceFormat deviceFormat;
+			 *	const char *cameraName;
+			 * must be filled by the pipeline handlers.
+			 */
+			{},
+			""
 		};
 	}
 
-- 
2.17.1



More information about the libcamera-devel mailing list