libcamera/test/libtest
Jacopo Mondi 45736468c8 libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()
This is a partial revert of commit 395d43d6d7 ("libcamera:
v4l2_videodevice: Drop toV4L2PixelFormat()")

The function was removed because it incorrectly maps non-contiguous V4L2
format variants (ie V4L2_PIX_FMT_YUV420M) to the API version supported
by the video device (singleplanar API and multiplanar API).  It was
decided at the time to remove the function and let its users call
directly V4L2PixelFormat::fromPixelFormat() which accepts a
'multiplanar' flags.

As we aim to associate multiple V4L2PixelFormat to a single libcamera
format, the next patches will verify which of them is actually supported
by the video device. For now, return the contiguous version
unconditionally.

Re-introduce V4L2VideoDevice::toV4L2PixelFormat() and convert all
the V4L2PixelFormat::fromPixelFormat() users to use it.

The V4L2 compatibility layer is the only outlier as it doesn't have a
video device to poke, hence it still uses
V4L2PixelFormat::fromPixelFormat().

Next patches will implement the device format matching logic and handle
the non-contiguous plane issue in V4L2VideoDevice::toV4L2PixelFormat().

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
2022-08-03 15:07:20 +02:00
..
buffer_source.cpp libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat() 2022-08-03 15:07:20 +02:00
buffer_source.h test: Convert to pragma once 2021-11-24 12:19:00 +00:00
camera_test.cpp libtest: camera_test: Plumb constructor to set LIBCAMERA_IPA_FORCE_ISOLATION 2021-08-19 12:54:03 +05:30
camera_test.h test: Convert to pragma once 2021-11-24 12:19:00 +00:00
meson.build libcamera/base: Validate internal headers as private 2021-06-25 16:11:11 +01:00
test.cpp test: Store path to the test executable in Test class 2021-12-01 08:54:12 +02:00
test.h test: Store path to the test executable in Test class 2021-12-01 08:54:12 +02:00