[libcamera-devel] [RFC PATCH 4/4] pipeline: rkisp1: Add support for UYVY

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Jul 7 23:38:07 CEST 2022


Hi Paul,

Thank you for the patch.

On Fri, Jul 08, 2022 at 12:03:10AM +0900, Paul Elder via libcamera-devel wrote:
> Support for UYVY will be added soon in the rkisp1 driver. Add it to the
> pipeline handler to support it in libcamera as well.
> 
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> 
> ---
> Besides the fact that support hasn't been merged (or sent yet, for that
> matter) in the rkisp1 driver, how do we deal with older versions of the
> driver that won't have UYVY support? Should we enumerate the formats and
> check if it's available? Just for UYVY or for all formats?

Filtering the formats based on what the device supports sounds good
(you'll have to turn RkISP1Path::formats_ into a vector). I'd do it for
all formats, that's more future-proof, and should produce cleaner code
too.

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> index 24ff62e1..6b4c4ed5 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
> @@ -209,8 +209,9 @@ 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, 10> RKISP1_RSZ_MP_FORMATS{
> +constexpr std::array<PixelFormat, 11> RKISP1_RSZ_MP_FORMATS{
>  	formats::YUYV,
> +	formats::UYVY,
>  	formats::YUV420,
>  	formats::YVU420,
>  	formats::YUV422,

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list