summaryrefslogtreecommitdiff
path: root/src/qcam/format_converter.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-06 01:43:36 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:54 +0300
commita339d055cc7ebd92b89adadd3044f69f8f9653b8 (patch)
tree82015eaf6aa67ac9d4e542a1ee7bc91af4b6f609 /src/qcam/format_converter.h
parentc20ad98c2a96d31847b0ef4b500e1e7a221b67c0 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/format_converter.h')
-rw-r--r--src/qcam/format_converter.h9
1 files changed, 5 insertions, 4 deletions
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 <libcamera/pixel_format.h>
+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_;