[libcamera-devel] [RFC PATCH v2 00/10] Add offset to FrameBuffer::Plane
Hirokazu Honda
hiroh at chromium.org
Mon Aug 23 15:12:11 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 aligns some code of mapping and
creating FrameBuffer::Plane with the new offset.
One of the pateches fixes V4L2Device to make a returned FrameBuffer
color format planes from v4l2 format planes. However, V4L2 API doesn't
provide a way of getting a dmabuf plane offset, so a multi planar
format e.g. V4L2_PIX_FMT_NV12M is not supported with this patch series.
This series must be applied on top of the pacth series whose id is 2384.
cf.) https://patchwork.libcamera.org/project/libcamera/list/?series=2384
Change in v2:
- adress review comments to v1
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 | 5 +-
include/libcamera/internal/v4l2_videodevice.h | 9 +-
src/android/camera_device.cpp | 47 +++---
src/android/camera_device.h | 6 +-
src/android/mm/generic_camera_buffer.cpp | 2 -
src/cam/file_sink.cpp | 22 ++-
src/cam/file_sink.h | 1 +
src/gstreamer/gstlibcameraallocator.cpp | 4 +-
src/ipa/rkisp1/rkisp1.cpp | 31 ++--
src/libcamera/framebuffer.cpp | 31 ++--
src/libcamera/ipa_data_serializer.cpp | 5 +-
src/libcamera/mapped_framebuffer.cpp | 76 +++++++--
src/libcamera/v4l2_videodevice.cpp | 147 ++++++++++++++----
src/qcam/main_window.cpp | 16 +-
src/qcam/main_window.h | 1 +
test/v4l2_videodevice/buffer_cache.cpp | 6 +-
17 files changed, 309 insertions(+), 112 deletions(-)
--
2.33.0.rc2.250.ged5fa647cd-goog
More information about the libcamera-devel
mailing list