[libcamera-devel] [PATCH v3 07/22] libcamera: pipeline: rkisp1: Export stream formats to applications

Jacopo Mondi jacopo at jmondi.org
Fri Sep 25 16:27:01 CEST 2020


Hi Niklas,

On Fri, Sep 25, 2020 at 03:41:52AM +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>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> * Changes since v1
> - Fix s/applicaitons/applications/ in subject
> - Cap the max resolution reported to the sensor resolution.
> ---
>  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 e52aadcfdb9870a3..27191b18c989aa5e 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -582,7 +582,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)

Do the supported formats differ between main and self path ?
Probably with the introduction of different roles support, I'll find
it out later ?

For now
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
   j


> +		streamFormats[format] =
> +			{ { RKISP1_RSZ_MP_SRC_MIN, data->sensor_->resolution() } };
> +
> +	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