[libcamera-devel] [PATCH 0/7] libcamera: Map multiple V4L2 formats to a single libcamera::format
Jacopo Mondi
jacopo at jmondi.org
Fri Jul 15 15:50:00 CEST 2022
This series addresses the requirement of mapping multiple V4L2 pixel formats
to a single libcamera format. Specifically, it allows to map V4L2_PIX_FMT_JPEG
and V4L2_PIX_FMT_MJPEG to libcamera::formats::MJPEG.
The series starts by allowing to associate mulitple V4L2 FourCC in
PixelFormatInfo and re-introduces toV4L2PixelFormat() in V4L2VideoDevice in
order to select among from the list of V4L2 formats the first one supported
from the video device.
Patch [7/8] adds a multiplanar flag to V4L2VideoDevice::toV4L2PixelFormat() to
allow selection of the contiguous or non-contiguous format versions.
Finally, the last patch associates V4L2_PIX_FMT_JPEG to formats::MJPEG.
Tested with a UVC camera.
Pavel, could you please test on the pinephone please ?
Thanks
j
Jacopo Mondi (7):
libcamera: formats: Support multiple V4L2 pixel formats
libcamera: formats: Search PixelFormatInfo on multiple formats
libcamera: v4l2_pixelformat: Return a format list in fromPixelFormat()
libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()
libcamera: v4l2_videodevice: Match formats supported by the device
libcamera: v4l2_videodevice: Add multiplanar argument to
toV4L2PixelFormat
libcamera: formats: Map V4L2_PIX_FMT_JPEG to formats::MJPEG
Documentation/guides/pipeline-handler.rst | 7 +-
include/libcamera/internal/formats.h | 4 +-
include/libcamera/internal/v4l2_device.h | 1 +
include/libcamera/internal/v4l2_pixelformat.h | 6 +-
include/libcamera/internal/v4l2_videodevice.h | 9 +-
src/libcamera/formats.cpp | 262 +++++++++---------
src/libcamera/pipeline/ipu3/cio2.cpp | 2 +-
src/libcamera/pipeline/ipu3/imgu.cpp | 2 +-
.../pipeline/raspberrypi/raspberrypi.cpp | 34 ++-
src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 6 +-
src/libcamera/pipeline/simple/converter.cpp | 8 +-
src/libcamera/pipeline/simple/simple.cpp | 4 +-
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 6 +-
src/libcamera/pipeline/vimc/vimc.cpp | 8 +-
src/libcamera/v4l2_device.cpp | 15 +
src/libcamera/v4l2_pixelformat.cpp | 18 +-
src/libcamera/v4l2_videodevice.cpp | 41 ++-
src/v4l2/v4l2_camera_proxy.cpp | 6 +-
test/libtest/buffer_source.cpp | 2 +-
19 files changed, 258 insertions(+), 183 deletions(-)
--
2.36.1
More information about the libcamera-devel
mailing list