summaryrefslogtreecommitdiff
path: root/src/android/jpeg/encoder_libjpeg.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-01-23 14:08:35 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-01-27 12:07:21 +0900
commitab72e6641c56e876f91edee57a8969982a3ab9b7 (patch)
treedac370e8b2f56bf97578864302cc3b71b5415a44 /src/android/jpeg/encoder_libjpeg.h
parenta6de3f0203c5d338a2a86ff049d55907a12e04c5 (diff)
android: jpeg: Set thumbnail and JPEG quality based on request
Set the thumbnail quality and the JPEG quality based on the android request metadata. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/jpeg/encoder_libjpeg.h')
-rw-r--r--src/android/jpeg/encoder_libjpeg.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/android/jpeg/encoder_libjpeg.h b/src/android/jpeg/encoder_libjpeg.h
index 070f56f8..838da772 100644
--- a/src/android/jpeg/encoder_libjpeg.h
+++ b/src/android/jpeg/encoder_libjpeg.h
@@ -23,10 +23,12 @@ public:
int configure(const libcamera::StreamConfiguration &cfg) override;
int encode(const libcamera::FrameBuffer &source,
libcamera::Span<uint8_t> destination,
- libcamera::Span<const uint8_t> exifData) override;
+ libcamera::Span<const uint8_t> exifData,
+ unsigned int quality) override;
int encode(libcamera::Span<const uint8_t> source,
libcamera::Span<uint8_t> destination,
- libcamera::Span<const uint8_t> exifData);
+ libcamera::Span<const uint8_t> exifData,
+ unsigned int quality);
private:
void compressRGB(libcamera::Span<const uint8_t> frame);
@@ -35,8 +37,6 @@ private:
struct jpeg_compress_struct compress_;
struct jpeg_error_mgr jerr_;
- unsigned int quality_;
-
const libcamera::PixelFormatInfo *pixelFormatInfo_;
bool nv_;