[libcamera-devel,v2,0/6] libcamera: Improve conversion between DRM and V4L2 formats
mbox series

Message ID 20200430030723.8908-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Improve conversion between DRM and V4L2 formats
Related show

Message

Laurent Pinchart April 30, 2020, 3:07 a.m. UTC
Hello,

This small series improves conversion between DRM and V4L2 formats, and
adds initial support for format information in the libcamera core shared
between pipeline handlers.

Patch 1/6 starts by moving the V4L2PixelFormat class to a separate file,
without modifying the code. Patch 2/6 then moves format conversion from
V4L2VideoDevice to V4L2PixelFormat, and patch 3/6 replaces the big
switch-case's with std::map.

Patch 4/6 further rework V4L2PixelFormat by splitting the
PixelFormatInfo class out and exposing it as an internal API. Patch 5/6
adds Bayer formats support to both PixelFormatInfo and V4L2PixelFormat.
Path 6/6 finally adds additional data to PixelFormatInfo.

Laurent Pinchart (6):
  libcamera: v4l2_pixelformat: Move V4L2PixelFormat to a new file
  libcamera: v4l2_pixelformat: Move DRM/V4L2 format conversion
  libcamera: v4l2_pixelformat: Use maps to convert between DRM and V4L2
  libcamera: formats: Expose PixelFormatInfo as an internal API
  libcamera: formats: Add support for 8-, 10- and 12-bit Bayer formats
  libcamera: formats: Add additional data to PixelFormatInfo

 src/libcamera/formats.cpp                    | 335 +++++++++++++++++++
 src/libcamera/include/formats.h              |  24 ++
 src/libcamera/include/meson.build            |   1 +
 src/libcamera/include/v4l2_pixelformat.h     |  49 +++
 src/libcamera/include/v4l2_videodevice.h     |  27 +-
 src/libcamera/meson.build                    |   1 +
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp |   2 +-
 src/libcamera/v4l2_pixelformat.cpp           | 209 ++++++++++++
 src/libcamera/v4l2_videodevice.cpp           | 224 +------------
 test/libtest/buffer_source.cpp               |   4 +-
 10 files changed, 625 insertions(+), 251 deletions(-)
 create mode 100644 src/libcamera/include/v4l2_pixelformat.h
 create mode 100644 src/libcamera/v4l2_pixelformat.cpp