[libcamera-devel] [PATCH v4 0/4] Camera3RequestDescriptors std::map => std::queue

Umang Jain umang.jain at ideasonboard.com
Wed Sep 29 15:30:26 CEST 2021


As per the extended design discussion for libcamera HAL, this series
addresses the part I of the design that will lead to new iterations
for async post-processor eventually.

The series mainly ports storage of Camera3RequestDescriptor from
std::map => queue while fixing out-of-order request completion from
abortRequest(). The series also accounts for a singular location to
send back capture results to the framework (find sendCaptureResults()).

The series has been validated on CTS: 230 / 231
(carrying [PATCH v3 0/1] android: Wait on acquisition fences in
CameraStream)

Changes in v4:
- New patch 3/4, makes abortRequest() and notifyError() as const
- Pop descriptor even on Fatal logging
- Fix a missing mutex lock
- spacing around sendCaptureResults() 
- add a \todo on measuring perf impact on grain-vs-coarse locking

Changes in v3:
- Change abortRequest to accept a descriptor only, in 3/3
- Fix wrong logic around abortRequest() descriptor selection
  - Last request descriptor was selected instead of current one
- Use of `auto` whereever applicable
- simplify descriptors_ clearance on stop()

Changes in v2:
- Use queue instead of deque
- Fix a race between abortRequest() and queuing a descriptor in 2/3
- address general comments in v1 review.


Umang Jain (4):
  android: camera_worker: Use Camera3RequestDescriptor as cookie
  android: camera_device: Transform descriptors_ map to queue
  android: camera_device: Mark abortRequest() and notifyError() as const
  android: camera_device: Send capture results by inspecting the queue

 src/android/camera_device.cpp | 149 +++++++++++++++++++++-------------
 src/android/camera_device.h   |  19 ++++-
 src/android/camera_worker.cpp |   4 +-
 src/android/camera_worker.h   |   3 +-
 4 files changed, 111 insertions(+), 64 deletions(-)

-- 
2.31.0



More information about the libcamera-devel mailing list