diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-06 22:15:35 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-22 10:58:38 +0300 |
commit | 4abbd832feb9999824c8b7d1ba8bd5319e8d640a (patch) | |
tree | 8a3d45cf7347340528de204637434e5d01801edd /src/qcam/viewfinder_qt.cpp | |
parent | f3671b33d90cf2bb13ee59ac83822a3294689b22 (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/qcam/viewfinder_qt.cpp')
-rw-r--r-- | src/qcam/viewfinder_qt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<libcamera::PixelFormat> &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; |