[libcamera-devel] [PATCH v2 2/2] pipeline: rkisp1: Add support for YUV422

Paul Elder paul.elder at ideasonboard.com
Tue Jul 19 09:40:13 CEST 2022


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.

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