[libcamera-devel] [PATCH v2 0/9] Async Post Processor
Umang Jain
umang.jain at ideasonboard.com
Fri Sep 10 09:06:29 CEST 2021
This series aims to enable async post-processing of streams
in the HAL layer.
Patch [1-5]/9 introduces basic plumbing preparation to run
post-processing async. The idea here is to send enough information
for the post-processor and retrieve it back(via signal mechanism)
to complete capture results and sending it back to framework.
Patch 6/9 adds a queue.
When a request requires post-processing it is first added to a queue.
Before queueing, a lot of context information is saved in form of
Camera3RequestDescriptor struct. The struct is then pushed to the queue.
When the post-processing is completed,
CameraDevice::streamProcessingComplete() is called and the status of
corresponding Camera3RequestDescriptor is updated(failed/succeeded).
After that sendQueuedCaptureResults() inspects the queue to check if
any capture results are ready to be sent to the framework. If yes, it
shall send it and de-queue it from the queue.
Patch 7/9 is a simple move of buffer mapping from CameraStream to
CameraDevice.
Patch 8/9 adds a worker class and a thread. The worker will be used to
PostProcessor::process() in that thread.
Patch 9/9 is a really a RFC which temporarily address one of \todo
in 8/9.
--
Changes in v2:
- Move Camera3RequestDescriptor struct out of CameraDevice private(2/9)
- Pass Camera3RequestDescriptor pointer as a context to PostProcessor
class and emit it back via processComplete signal.
- RFC patch (needs some discussion)
---
Umang Jain (9):
android: camera_stream: Pass FrameBuffer pointer instead of reference
camera_device: Remove private scope of Camera3RequestDescriptor
android: post_processor: Plumb down the process() with context
android: post_processor: Notify post processing completion status
android: camera_stream: Query post-processing status
android: camera_device: Add a queue for sending capture results
android: camera_device: Move buffer mapping for post processing
android: camera_stream: Run post-processor in a separate thread
RFC: Stop PostProcessor when camera is stopped
src/android/camera_device.cpp | 146 +++++++++++++++++++++--
src/android/camera_device.h | 56 ++++++---
src/android/camera_stream.cpp | 47 +++++---
src/android/camera_stream.h | 57 ++++++++-
src/android/jpeg/encoder.h | 2 +-
src/android/jpeg/encoder_libjpeg.cpp | 4 +-
src/android/jpeg/encoder_libjpeg.h | 2 +-
src/android/jpeg/post_processor_jpeg.cpp | 14 ++-
src/android/jpeg/post_processor_jpeg.h | 7 +-
src/android/jpeg/thumbnailer.cpp | 4 +-
src/android/jpeg/thumbnailer.h | 2 +-
src/android/post_processor.h | 15 ++-
src/android/yuv/post_processor_yuv.cpp | 25 ++--
src/android/yuv/post_processor_yuv.h | 7 +-
14 files changed, 314 insertions(+), 74 deletions(-)
--
2.31.1
More information about the libcamera-devel
mailing list