[libcamera-devel] [PATCH v2 2/2] pipeline: rkisp1: Add support for YUV422
Jacopo Mondi
jacopo at jmondi.org
Tue Jul 19 12:05:00 CEST 2022
Hi Paul,
On Tue, Jul 19, 2022 at 04:40:13PM +0900, Paul Elder via libcamera-devel wrote:
> YUV422 is already supported as an output format by the rkisp1 driver.
> Add them to the pipeline handler to support them in libcamera as well.
>
> YVU422 is also supported by the driver, but there only exists a
> multiplanar V4L2 format, which libcamera is currently unable to map to
> from the libcamera YVU422 format. This will be fixed later.
That's peculiar!
The driver supports (for both the main and self path)
V4L2_PIX_FMT_YUV422P,
V4L2_PIX_FMT_YVU422M,
so the YUV component ordering is supported throught the contiguous planes
variant, while the YVU permutation goes through non-contiguous one.
Is there a reason ? Is the driver correct I wonder ?
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
>
> ---
> Changes in v2:
> - remove YVU422
> - reorder formats
> ---
> src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> index c070929d..856554b3 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> @@ -209,7 +209,7 @@ void RkISP1Path::stop()
> namespace {
> constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 };
> constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 };
> -constexpr std::array<PixelFormat, 8> RKISP1_RSZ_MP_FORMATS{
> +constexpr std::array<PixelFormat, 9> RKISP1_RSZ_MP_FORMATS{
> formats::YUYV,
> formats::NV16,
> formats::NV61,
> @@ -217,13 +217,14 @@ constexpr std::array<PixelFormat, 8> RKISP1_RSZ_MP_FORMATS{
> formats::NV12,
> formats::YUV420,
> formats::YVU420,
> + formats::YUV422,
> formats::R8,
> /* \todo Add support for RAW formats. */
> };
>
> constexpr Size RKISP1_RSZ_SP_SRC_MIN{ 32, 16 };
> constexpr Size RKISP1_RSZ_SP_SRC_MAX{ 1920, 1920 };
> -constexpr std::array<PixelFormat, 10> RKISP1_RSZ_SP_FORMATS{
> +constexpr std::array<PixelFormat, 11> RKISP1_RSZ_SP_FORMATS{
> formats::YUYV,
> formats::NV16,
> formats::NV61,
> @@ -231,6 +232,7 @@ constexpr std::array<PixelFormat, 10> RKISP1_RSZ_SP_FORMATS{
> formats::NV12,
> formats::YUV420,
> formats::YVU420,
> + formats::YUV422,
> formats::R8,
> formats::RGB565,
> formats::XRGB8888,
> --
> 2.30.2
>
More information about the libcamera-devel
mailing list