[libcamera-devel] [PATCH v2 0/7] libcamera: Introduce a PixelFormat type
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Oct 28 12:02:01 CET 2019
Hello,
This series is a second version of Jacopo's work on pixel format support
in libcamera.
The goal is to consistently use a dedicated PixelFormat type to describe
image pixel formats in the libcamera public API and, by extension,
through the code. This increases type safety and will ease extending
format descriptions.
The series starts by importing a new version of the kernel headers, and
adding a (for now) local DRM_FORMAT_MJPEG FourCC. Patch 4/7 and 5/7 then
introduce the new PixelFormat type and use it through the code. Patches
6/7 and 7/7 finally switch the PixelFormat numerical value to use DRM
FourCC instead of V4L2 FourCC.
Thank you Jacopo for your initial work.
Jacopo Mondi (7):
include: linux: Update headers to Linux v5.2
include: linux: Import DRM/KMS headers from Linux v5.2
include: drm_fourcc: Add Motion-JPEG FourCC
libcamera: Define a PixelFormat type for application-facing formats
libcamera: stream: Use the newly defined PixelFormat
libcamera: v4l2_videodevice: Add PixelFormat conversion
libcamera: Switch PixelFormat to DRM FourCC values
include/libcamera/meson.build | 1 +
include/libcamera/pixelformats.h | 18 +
include/libcamera/stream.h | 13 +-
include/linux/drm.h | 1042 ++++++++++++++++++++++
include/linux/drm_fourcc.h | 765 ++++++++++++++++
include/linux/drm_mode.h | 1032 +++++++++++++++++++++
include/linux/media-bus-format.h | 4 +-
include/linux/media.h | 27 +-
include/linux/v4l2-controls.h | 29 +
include/linux/videodev2.h | 31 +-
src/libcamera/include/v4l2_videodevice.h | 5 +
src/libcamera/meson.build | 1 +
src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +-
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 25 +-
src/libcamera/pipeline/uvcvideo.cpp | 4 +-
src/libcamera/pipeline/vimc.cpp | 15 +-
src/libcamera/pixelformats.cpp | 28 +
src/libcamera/stream.cpp | 17 +-
src/libcamera/v4l2_videodevice.cpp | 141 +++
src/qcam/format_converter.cpp | 30 +-
test/camera/buffer_import.cpp | 17 +-
21 files changed, 3177 insertions(+), 75 deletions(-)
create mode 100644 include/libcamera/pixelformats.h
create mode 100644 include/linux/drm.h
create mode 100644 include/linux/drm_fourcc.h
create mode 100644 include/linux/drm_mode.h
create mode 100644 src/libcamera/pixelformats.cpp
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list