[libcamera-devel] [PATCH] qcam: viewfinder: Print message to report format converter usage

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Mar 24 10:41:12 CET 2020


Print an info message when initializing the viewfinder to report if the
format converter is used or if zero-copy is enabled. This is useful to
notify of a possible impact on performances.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/qcam/viewfinder.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index c7c6d099dfba..df5ee5ee7b83 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -56,6 +56,11 @@ int ViewFinder::setFormat(const libcamera::PixelFormat &format,
 			return ret;
 
 		image_ = QImage(size, QImage::Format_RGB32);
+
+		qInfo() << "Using software format conversion from"
+			<< format.toString().c_str();
+	} else {
+		qInfo() << "Zero-copy enabled";
 	}
 
 	format_ = format;
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list