[libcamera-devel] [PATCH v8 00/12] Zero-copy RAW stream work

Naushir Patuck naush at raspberrypi.com
Fri Sep 18 11:42:21 CEST 2020


Hi all,

Here is patch v8 for the zero-copy work.  The only difference between this and v7 is how the stream internally generates ids for buffers.  To keep things modular, i've added a IdGenerator class in patch 10/12.  This simply uses an incrementing counter and stores a queue of retuned ids for reuse.  If we decide that something more efficient may be needed (e.g. Laurent's idea of using a bitfield, assuming we can ensure we have limited set of buffers in flight), then it should be easy enough just to change the class implementation.  However, for now, I think this implementation provides a good compromise between simplicity and performance.

Thanks,
Naush


Naushir Patuck (12):
  libcamera: pipeline: raspberrypi: Move RPiStream into a separate file
  libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling
  libcamera: pipeline: raspberrypi: Add some debug logging
  libcamera: pipeline: raspberrypi: Increase the number of RAW buffers
  libcamera: pipeline: raspberrypi: Remove const qualifier from
    RPiStream
  libcamera: pipeline: raspberrypi: Rework stream buffer logic for
    zero-copy
  libcamera: pipeline: raspberrypi: Fix bug in passing configuration to
    IPA
  libcamera: pipeline: raspberrypi: Add more robust stream buffer logic
  libcamera: pipeline: ipa: raspberrypi: Remove use of FrameBuffer
    cookie
  pipeline: raspberrypi: Use an unordered_map for the stream buffer list
  pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids
  pipeline: ipa: raspberrypi: Handle any externally allocated
    FrameBuffer

 include/libcamera/ipa/raspberrypi.h           |  13 +-
 src/ipa/raspberrypi/raspberrypi.cpp           |  26 +-
 .../pipeline/raspberrypi/meson.build          |   1 +
 .../pipeline/raspberrypi/raspberrypi.cpp      | 575 ++++++++----------
 .../pipeline/raspberrypi/rpi_stream.cpp       | 236 +++++++
 .../pipeline/raspberrypi/rpi_stream.h         | 180 ++++++
 6 files changed, 681 insertions(+), 350 deletions(-)
 create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
 create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h

-- 
2.25.1



More information about the libcamera-devel mailing list