[libcamera-devel] [PATCH v8 0/7] Async Post Processor
Umang Jain
umang.jain at ideasonboard.com
Tue Oct 26 09:21:41 CEST 2021
This series primarily introduces a Thread worker class along
with a queue, in which request for post-process of streams
are queued and processed ansychronously. All the context information
is carried via Camera3RequestDescriptor.
1/7 and 2/7 are improved !nullptr checks that were spotted in previous
review.
3/7 under takes a refactor of splitting Camera3RequestDescriptor::Status
to denote only status(success/error). The "pending" status is de-coupled
into a separate variable now.
4/7 Consolidates all the information we need to run the post-processor
into Camera3RequestDescriptor::Stream. Now use this structure only and
update signature of PostProcessor::process() vfunc.
5/7 Introduces a post-processing request tracking std::map and a signal
of completion. The tracking map will help us to know if there are
multiple post-processing streams per descriptor (i.e. capture request).
If so, we need to wait, track until all streams are processed. Only
then we can mark descriptor for completion.
6/7 is a small inherent patch based on 5/7's change
7/7 is where a post-processor's worker class is introduced. At this
point, the post-processor will run asynchronously.
---------------------------------------------------------------------
Changes v7 -> v8:
- No functionality/logic change from v7
- Fix few typos in commit & \todo message on streamsProcessMutex_
- Forward declare alphabetical order fix
- Use { } in 7/7 for streamProcessMutex_ instead of calling .unlock()
Changes v6 -> v7:
- Remove all local boolean flags, hasPostProcessingErrors and
needPostProcessing.
- Code out internal buffer placing back into camera-stream from
setBufferStatus
- Use map.empty() instead of map.size() == 0
- Make CameraStream::process() and PostProcessor::process() coherent
- Few minor code migration from patch 5/7 to 7/7.
Umang Jain (7):
android: camera_stream: Replace post-processor nullptr check
android: post_processor_jpeg: Replace encoder_ nullptr check
android: camera_device: Refactor descriptor status and
sendCaptureResults()
android: post_processor: Consolidate contextual information
android: Track and notify post processing of streams
android: post_processor: Drop return value for process()
android: post_processor: Make post processing async
src/android/camera_device.cpp | 143 +++++++++++++---------
src/android/camera_device.h | 5 +
src/android/camera_request.cpp | 5 +-
src/android/camera_request.h | 17 ++-
src/android/camera_stream.cpp | 144 ++++++++++++++++++++---
src/android/camera_stream.h | 42 ++++++-
src/android/jpeg/post_processor_jpeg.cpp | 20 ++--
src/android/jpeg/post_processor_jpeg.h | 4 +-
src/android/post_processor.h | 16 ++-
src/android/yuv/post_processor_yuv.cpp | 21 ++--
src/android/yuv/post_processor_yuv.h | 4 +-
11 files changed, 310 insertions(+), 111 deletions(-)
--
2.31.1
More information about the libcamera-devel
mailing list