[libcamera-devel] [RFC PATCH 00/10] Add offset to FrameBuffer::Plane

Hirokazu Honda hiroh at chromium.org
Mon Aug 16 06:31:28 CEST 2021


Since FrameBuffer::Plane doesn't have an offset variable, it is
impossible to map the FrameBuffer::Plane correctly. This series fixes
the issue by adding an offset and alignes some code of mapping and
creating FrameBuffer::Plane with the new offset.

I probably miss some code of using FrameBuffer::Plane. To detect the
bug, I add the assertion to FrameBuffer.

Hirokazu Honda (10):
  libcamera: framebuffer: Add offset to FrameBuffer::Plane
  libcamera: ipa_data_serializer: Modify (de)serialization for offset
  libcamera: mapped_framebuffer: Return plane begin address by
    MappedBuffer::maps()
  cam: file_sink: Use offset in mapping FrameBuffer
  ipa: rkisp1: Use offset in mapping IPABuffer
  qcam: main_window: Use offset mapping FrameBuffer
  gstreamer: gstlibcameraallocator: Use offset in creating a buffer
  libcamera: v4l2_videodevice: Create color-format planes in
    CreateBuffer()
  android: camera_device: Fill offset and right length in
    CreateFrameBuffer()
  libcamera: framebuffer: Add assertion to detect offset is unfilled

 include/libcamera/framebuffer.h               | 12 ++++-
 .../libcamera/internal/mapped_framebuffer.h   |  4 +-
 include/libcamera/internal/v4l2_videodevice.h |  4 +-
 src/android/camera_device.cpp                 | 38 +++++++-------
 src/cam/file_sink.cpp                         |  5 +-
 src/cam/file_sink.h                           |  1 +
 src/gstreamer/gstlibcameraallocator.cpp       |  3 +-
 src/ipa/rkisp1/rkisp1.cpp                     |  4 +-
 src/libcamera/framebuffer.cpp                 | 11 ++--
 src/libcamera/ipa_data_serializer.cpp         |  5 +-
 src/libcamera/mapped_framebuffer.cpp          | 51 +++++++++++++++----
 src/libcamera/v4l2_videodevice.cpp            | 28 +++++++++-
 src/qcam/main_window.cpp                      | 15 ++++--
 src/qcam/main_window.h                        |  1 +
 14 files changed, 136 insertions(+), 46 deletions(-)

--
2.33.0.rc1.237.g0d66db33f3-goog


More information about the libcamera-devel mailing list