[libcamera-devel,3/4] pipeline: rkisp1: Add support for YUV422 and YVU422
diff mbox series

Message ID 20220707150310.3645858-4-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • Add more formats to rkisp1
Related show

Commit Message

Paul Elder July 7, 2022, 3:03 p.m. UTC
YUV422 and YVU422 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@ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart July 7, 2022, 9:33 p.m. UTC | #1
Hi Paul,

Thank you for the patch.

On Fri, Jul 08, 2022 at 12:03:09AM +0900, Paul Elder via libcamera-devel wrote:
> YUV422 and YVU422 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@ideasonboard.com>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> index c34e4147..24ff62e1 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> @@ -209,10 +209,12 @@ 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, 10> RKISP1_RSZ_MP_FORMATS{
>  	formats::YUYV,
>  	formats::YUV420,
>  	formats::YVU420,
> +	formats::YUV422,
> +	formats::YVU422,
>  	formats::NV16,
>  	formats::NV61,
>  	formats::NV21,

As for patch 1/4, I think you need to add these to the selfpath too.

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index c34e4147..24ff62e1 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -209,10 +209,12 @@  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, 10> RKISP1_RSZ_MP_FORMATS{
 	formats::YUYV,
 	formats::YUV420,
 	formats::YVU420,
+	formats::YUV422,
+	formats::YVU422,
 	formats::NV16,
 	formats::NV61,
 	formats::NV21,