[libcamera-devel] [PATCH v4 0/9] libcamera: ipu3: Allow zero-copy RAW stream

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Jun 26 00:38:51 CEST 2020


Hi,

This series removes the need to copy the buffer when capturing RAW
buffers from the IPU3 pipeline. This is made possible by allocating an
internal queue of buffers in the pipeline handler which is used when the
application does not provide an buffer for the RAW stream.

There is on issue with this series. If the camera is configured to
supply the application with more then one stream and one of them is a
RAW stream. Then the sequence number of the RAW buffers in all requests
are set to 0 before the request completes. This is due to that if two or
more streams are used the RAW buffer is always queued to the ImgU input
to serve as input to the vf and/or output buffers. When the RAW buffers
is dequeued from the ImgU input device the kernel sets the sequence
number to zero. This should either be solved in the kernel or by
reworking how sequence numbers handled going out of libcamera, does it
make sens to have seq numbers on the buffer level ?

As the RPi pipeline handler already started using the copy approach we
can not yet rename to role nor remove the copyFrom() helper. I aim to
work on that next.

Niklas Söderlund (9):
  libcamera: ipu3: Fold mediaBusToFormat() into only caller
  libcamera: ipu3: Breakout stream assignment to new function
  libcamera: ipu3: Calculate number of buffers for ImgU
  libcamera: ipu3: cio2: Move the CIO2Device class to separate files
  libcamera: ipu3: cio2: Consolidate information about formats
  libcamera: ipu3: cio2: Add function to generate configuration
  libcamera: ipu3: cio2: Make the V4L2 devices private
  libcamera: ipu3: cio2: Hide buffer allocation and freeing from users
  libcamera: ipu3: Allow zero-copy RAW stream capture

 src/libcamera/pipeline/ipu3/cio2.cpp    | 297 ++++++++++++++
 src/libcamera/pipeline/ipu3/cio2.h      |  68 ++++
 src/libcamera/pipeline/ipu3/ipu3.cpp    | 497 +++++-------------------
 src/libcamera/pipeline/ipu3/meson.build |   1 +
 4 files changed, 469 insertions(+), 394 deletions(-)
 create mode 100644 src/libcamera/pipeline/ipu3/cio2.cpp
 create mode 100644 src/libcamera/pipeline/ipu3/cio2.h

-- 
2.27.0



More information about the libcamera-devel mailing list