[libcamera-devel] [PATCH v2 00/12] android: jpeg

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Aug 3 18:18:04 CEST 2020


Hi all,

Here is my current 'work-in-progres' for JPEG.

With just these patches applied, the CCA application runs and can
capture an image successfully.

There is still plenty to do on top however (and still some untidy code
left in these patches, which I'm aware of but posting regardless):

 - The JPEG compression does not run in a separate thread
 - Added streams do not have buffering
    - (I think I'll remove 'adding streams' and only support compressing
      existing streams initially)
 - RAW API could be used for JPEG compression
    - This could be a performance improvement, but it will be difficult
      to handle NV swap generically, so we may want to further limit the
      input formats for that.
 - EXIF tag support is started but not included in this series.
 - No rescaler is supported yet

Kieran Bingham (12):
  libcamera: FrameBuffer: Correct Buffer references
  libcamera: formats: add planeCount helper
  libcamera: buffer: Create a MappedBuffer
  libcamera: buffer: Convert copyFrom to use MappedFrameBuffer
  android: camera_device: Fix trivial spelling
  android: camera_device: Report an error in notifyError()
  android: camera_device: Only construct required planes
  android: camera_device: Query plane length
  android: camera_device: Report configuration changes from validate()
  android: camera_device: Generate ResultMetadata earlier
  android: Introduce JPEG compression
  android: camera_device: Support MJPEG stream construction

 include/libcamera/internal/buffer.h  |  46 +++++
 include/libcamera/internal/formats.h |   2 +
 src/android/camera_device.cpp        | 268 ++++++++++++++++++++++++---
 src/android/camera_device.h          |   8 +
 src/android/jpeg/compressor.h        |  28 +++
 src/android/jpeg/compressor_jpeg.cpp | 215 +++++++++++++++++++++
 src/android/jpeg/compressor_jpeg.h   |  46 +++++
 src/android/meson.build              |   1 +
 src/libcamera/buffer.cpp             | 177 +++++++++++++++---
 src/libcamera/formats.cpp            |  18 ++
 src/libcamera/meson.build            |   2 +
 11 files changed, 759 insertions(+), 52 deletions(-)
 create mode 100644 include/libcamera/internal/buffer.h
 create mode 100644 src/android/jpeg/compressor.h
 create mode 100644 src/android/jpeg/compressor_jpeg.cpp
 create mode 100644 src/android/jpeg/compressor_jpeg.h

-- 
2.25.1



More information about the libcamera-devel mailing list