[libcamera-devel] [PATCH 06/13] libcamera: pipeline: rkisp1: Export stream formats to applicaitons

Jacopo Mondi jacopo at jmondi.org
Thu Aug 20 10:46:13 CEST 2020


Hi Niklas,
   a few questions

On Thu, Aug 13, 2020 at 02:52:39AM +0200, Niklas Söderlund wrote:
> The information about stream format is available but not exported to
> applications, fix this.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 9d5a52d352aefabc..8e0f6db5faa96928 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -585,7 +585,13 @@ CameraConfiguration *PipelineHandlerRkISP1::generateConfiguration(Camera *camera
>  	if (roles.empty())
>  		return config;
>
> -	StreamConfiguration cfg{};
> +	std::map<PixelFormat, std::vector<SizeRange>> streamFormats;
> +	for (const PixelFormat &format : RKISP1_RSZ_MP_FORMATS)
> +		streamFormats[format] =
> +			{ { RKISP1_RSZ_MP_SRC_MIN, RKISP1_RSZ_MP_SRC_MAX } };
> +

Can the ISP freely up-scale? Otherwise the size should be capped to
the max sensor size

Can all formats be produced from all input formats ? Otherwise the
formats that can be produced should be matched with the ones produced
by the sensor.

As a general note, should we try to report the available stream
formats by inspeting the ones that can be produced by the video device
or can we live with a static enumeration in the pipeline handler ?

Thanks
  j

> +	StreamFormats formats(streamFormats);
> +	StreamConfiguration cfg(formats);
>  	cfg.pixelFormat = formats::NV12;
>  	cfg.size = data->sensor_->resolution();
>
> --
> 2.28.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list