From 4abbd832feb9999824c8b7d1ba8bd5319e8d640a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 6 Sep 2021 22:15:35 +0300 Subject: qcam: format_converter: Add configurable stride support Make the stride configurable to support conversion of images with padding at the end of lines. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/qcam/viewfinder_qt.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qcam/viewfinder_qt.cpp') diff --git a/src/qcam/viewfinder_qt.cpp b/src/qcam/viewfinder_qt.cpp index cd051760..a05c75ed 100644 --- a/src/qcam/viewfinder_qt.cpp +++ b/src/qcam/viewfinder_qt.cpp @@ -52,8 +52,7 @@ const QList &ViewFinderQt::nativeFormats() const } int ViewFinderQt::setFormat(const libcamera::PixelFormat &format, - const QSize &size, - [[maybe_unused]] unsigned int stride) + const QSize &size, unsigned int stride) { image_ = QImage(); @@ -62,7 +61,7 @@ int ViewFinderQt::setFormat(const libcamera::PixelFormat &format, * the destination image. */ if (!::nativeFormats.contains(format)) { - int ret = converter_.configure(format, size); + int ret = converter_.configure(format, size, stride); if (ret < 0) return ret; -- cgit v1.2.1