diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-03-29 17:20:07 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-02 17:24:41 +0300 |
commit | 80e236e19b61a1267948433fd6855da138d6f527 (patch) | |
tree | f2ff6a8311b5c4d4cef65e4a7260e75c84aee6ec /src/qcam/format_converter.h | |
parent | 29f323eea84c5bf5037658b0042478124ed58ff1 (diff) |
qcam: Add JPEG format support
When the camera provides MJPEG, use the QImage JPEG decompression code
to convert that to RGB.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam/format_converter.h')
-rw-r--r-- | src/qcam/format_converter.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h index 196064c7..396d0bea 100644 --- a/src/qcam/format_converter.h +++ b/src/qcam/format_converter.h @@ -7,15 +7,22 @@ #ifndef __QCAM_FORMAT_CONVERTER_H__ #define __QCAM_FORMAT_CONVERTER_H__ +#include <stddef.h> + +class QImage; + class FormatConverter { public: int configure(unsigned int format, unsigned int width, unsigned int height); - void convert(const unsigned char *src, unsigned char *dst); + void convert(const unsigned char *src, size_t size, QImage *dst); private: + void convertYUV(const unsigned char *src, unsigned char *dst); + + unsigned int format_; unsigned int width_; unsigned int height_; unsigned int y_pos_; |