[libcamera-devel] [PATCH v2 12/20] libcamera: ipu3: Always use the maximum frame size

Niklas Söderlund niklas.soderlund at ragnatech.se
Thu Jul 9 15:46:54 CEST 2020


Hi Jacopo,

Thanks for your work.

On 2020-07-09 10:41:20 +0200, Jacopo Mondi wrote:
> The requirement of having the ImgU output height 32 pixels smaller
> than the input frame produced by the CIO2 makes it complicated to
> re-adjust the sensor produced size after the alignement has been
> applied.
> 
> To simplify the procedure, always ask for the full frame size from the
> CIO2 unit.
> 
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index d07f1a7b5ae8..feabffe641e1 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -156,8 +156,6 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
>  	unsigned int rawCount = 0;
>  	unsigned int outCount = 0;
>  	Size yuvSize;
> -	Size size;
> -
>  	for (const StreamConfiguration &cfg : config_) {
>  		const PixelFormatInfo &info =
>  			PixelFormatInfo::info(cfg.pixelFormat);
> @@ -174,11 +172,6 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
>  			if (cfg.size > yuvSize)
>  				yuvSize = cfg.size;
>  		}
> -
> -		if (cfg.size.width > size.width)
> -			size.width = cfg.size.width;
> -		if (cfg.size.height > size.height)
> -			size.height = cfg.size.height;
>  	}
>  	if (rawCount > 1 || outCount > 2) {
>  		LOG(IPU3, Error)
> @@ -189,10 +182,13 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()
>  	}
>  
>  	/* Generate raw configuration from CIO2. */
> -	cio2Configuration_ = data_->cio2_.generateConfiguration(size);
> +	Size sensorSize = data_->cio2_.sensor()->resolution();
> +	cio2Configuration_ = data_->cio2_.generateConfiguration(sensorSize);

Could this not impact framerate for the CIO2 if we always request the 
largest sensor size? Would it be possible instead to increase the size 
passed to CIO2Device::generateConfiguration() by 32?

>  	if (!cio2Configuration_.pixelFormat.isValid())
>  		return Invalid;
>  
> +	LOG(IPU3, Debug) << "CIO2 configuration: " << cio2Configuration_.toString();
> +
>  	/*
>  	 * Adjust the configurations if needed and assign streams while
>  	 * iterating them.
> -- 
> 2.27.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list