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/format_converter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qcam/format_converter.h') diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h index 2220a62b..bb04aa95 100644 --- a/src/qcam/format_converter.h +++ b/src/qcam/format_converter.h @@ -19,7 +19,8 @@ class QImage; class FormatConverter { public: - int configure(const libcamera::PixelFormat &format, const QSize &size); + int configure(const libcamera::PixelFormat &format, const QSize &size, + unsigned int stride); void convert(const Image *src, size_t size, QImage *dst); @@ -38,6 +39,7 @@ private: libcamera::PixelFormat format_; unsigned int width_; unsigned int height_; + unsigned int stride_; enum FormatFamily formatFamily_; -- cgit v1.2.1