[libcamera-devel] [PATCH 1/4] pipeline: rkisp1: Add output support for YUV420 and YVU420

Paul Elder paul.elder at ideasonboard.com
Thu Jul 7 17:03:07 CEST 2022


YUV420 and YVU420 are already supported as output formats by the rkisp1
driver. Add them to the pipeline handler to support them in libcamera as
well.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index 6f175758..c34e4147 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -130,6 +130,8 @@ int RkISP1Path::configure(const StreamConfiguration &config,
 	switch (config.pixelFormat) {
 	case formats::NV12:
 	case formats::NV21:
+	case formats::YUV420:
+	case formats::YVU420:
 		ispFormat.mbus_code = MEDIA_BUS_FMT_YUYV8_1_5X8;
 		break;
 	default:
@@ -207,8 +209,10 @@ 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, 6> RKISP1_RSZ_MP_FORMATS{
+constexpr std::array<PixelFormat, 8> RKISP1_RSZ_MP_FORMATS{
 	formats::YUYV,
+	formats::YUV420,
+	formats::YVU420,
 	formats::NV16,
 	formats::NV61,
 	formats::NV21,
-- 
2.30.2



More information about the libcamera-devel mailing list