[libcamera-devel] [PATCH v4 0/7] Async Post Processor

Umang Jain umang.jain at ideasonboard.com
Mon Oct 11 09:34:58 CEST 2021


This series now entirely focuses on making the post-processor run
async. The std::map=>queue rework of Camera3RequestDescriptor has
been reworked separately and already merged in master:
https://patchwork.libcamera.org/project/libcamera/list/?series=2586&state=*

The v4 brings new design decisions from v3. Specifically:
- We have a Post Processor request queue
- The queue processes post-processor's requsts in FIFO manner
- The queue is specifically maintained separately so that it can be
  purged on demand (think of flush()) rather than using thread's
  message-queue + ::invokeMethod() path, as we can't have any control
  over thread's queue from outside
- Handle flush / stop scenarios


Patch 1-4 brings up groundwork to make post-processor async.
Patch 5 introduces a thread worker class and a post-processing queue.
Patch 5 is the one where the post-processing starts happening
asynchronously.

Patch 6 fixes a small window of race on descriptor's status setting

Patch 7 is geared towards understanding and handling stop()/flush()
cases of the camera.

Testing:
- Series is functional and works as expected

- CTS is regressed quite a bit. This will remain blocker for the merge
  Many "Multiple calls to OpenDevice()" fails the tests (~46-64 on
  average). I will be continuing to work towards fixing CTS complicance.

Laurent Pinchart (1):
  android: camera_device: Protect descriptor status_ with lock

Umang Jain (6):
  camera_device: Remove private scope of Camera3RequestDescriptor
  android: camera_stream: Plumb process() with Camera3RequestDescriptor
  android: Notify post processing completion via a signal
  android: camera_stream: Drop return value for process()
  android: post_processor: Make post processing async
  android: camera_device: Synchronise completion and cleanup of requests

 src/android/camera_device.cpp            | 136 +++++++++++++++--------
 src/android/camera_device.h              |  65 ++++++-----
 src/android/camera_stream.cpp            | 126 ++++++++++++++++++---
 src/android/camera_stream.h              |  48 +++++++-
 src/android/jpeg/post_processor_jpeg.cpp |  17 +--
 src/android/jpeg/post_processor_jpeg.h   |   7 +-
 src/android/post_processor.h             |  18 ++-
 src/android/yuv/post_processor_yuv.cpp   |  23 ++--
 src/android/yuv/post_processor_yuv.h     |   7 +-
 9 files changed, 323 insertions(+), 124 deletions(-)

-- 
2.31.1



More information about the libcamera-devel mailing list