[libcamera-devel] [PATCH 3/3] libcamera: pipeline: ipu3: Use parameterized StreamConfiguration

Kaaira Gupta kgupta at es.iitr.ac.in
Sat Apr 18 14:54:19 CEST 2020


On Tue, Mar 24, 2020 at 04:59:01AM +0530, Kaaira Gupta wrote:
> Replace default constructor StreamConfiguration() by it's parameterized
> counterpart  by using StreamFormats in generateConfiguration() in
> ipu3.
> 
> Signed-off-by: Kaaira Gupta <kgupta at es.iitr.ac.in>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 7feb44c..fe25cab 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -400,9 +400,17 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,
>  	};
>  
>  	config = new IPU3CameraConfiguration(camera, data);
> +	std::map<PixelFormat, std::vector<SizeRange>> pixelformats;
> +
> +	/*
> +	 * The driver supports only one pixel format.
> +	 * Size range is kept maximum.

I did not get the reply in my mailbox, hence I'll ask the question in
reply to this :D
jmondi: I passed a single size because the validate() uses a single size
as well..which is the maximum height and width..as ipu3 can only
downscale.

Also, if this isn't the maximum, how do I find out what is?

> +	 */
> +	pixelformats[PixelFormat(DRM_FORMAT_NV12)] = {SizeRange{{ 2560, 1920 }}};
>  
>  	for (const StreamRole role : roles) {
> -		StreamConfiguration cfg = {};
> +		StreamFormats format(pixelformats);
> +		StreamConfiguration cfg(format);
>  		IPU3Stream *stream = nullptr;
>  
>  		cfg.pixelFormat = PixelFormat(DRM_FORMAT_NV12);
> -- 
> 2.17.1
> 


More information about the libcamera-devel mailing list