From a339d055cc7ebd92b89adadd3044f69f8f9653b8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 6 Sep 2021 01:43:36 +0300 Subject: qcam: viewfinder_qt: Support multi-planar buffers Now that the ViewFinderQt receives an Image, move the Converter API to take an Image as well, and enable multi-planar buffer support. Signed-off-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham --- src/qcam/format_converter.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/qcam/format_converter.h') diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h index e389b24a..2220a62b 100644 --- a/src/qcam/format_converter.h +++ b/src/qcam/format_converter.h @@ -13,6 +13,7 @@ #include +class Image; class QImage; class FormatConverter @@ -20,7 +21,7 @@ class FormatConverter public: int configure(const libcamera::PixelFormat &format, const QSize &size); - void convert(const unsigned char *src, size_t size, QImage *dst); + void convert(const Image *src, size_t size, QImage *dst); private: enum FormatFamily { @@ -30,9 +31,9 @@ private: YUV, }; - void convertNV(const unsigned char *src, unsigned char *dst); - void convertRGB(const unsigned char *src, unsigned char *dst); - void convertYUV(const unsigned char *src, unsigned char *dst); + void convertNV(const Image *src, unsigned char *dst); + void convertRGB(const Image *src, unsigned char *dst); + void convertYUV(const Image *src, unsigned char *dst); libcamera::PixelFormat format_; unsigned int width_; -- cgit v1.2.1