[libcamera-devel] [PATCH 5/7] libcamera: ipu3: imgu: Fix BSD height size comparison

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Apr 13 01:59:46 CEST 2021


Hi Jacopo,

Thank you for the patch.

On Thu, Mar 18, 2021 at 11:39:39AM +0100, Jacopo Mondi wrote:
> Fix a size comparison when iterating on the BDS sizes to align it with
> the python scritp implementation.

The change seems to be correct, but it would be best to explain why in
the commit message, not just mention the python script.

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  src/libcamera/pipeline/ipu3/imgu.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
> index 89a01bddbed2..ccc85864fc39 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
> @@ -182,7 +182,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc
>  		}
>  	} else {
>  		ifHeight = utils::alignUp(iif.height, IF_ALIGN_H);
> -		while (ifHeight > minIFHeight && ifHeight / bdsSF >= minBDSHeight) {
> +		while (ifHeight >= minIFHeight && ifHeight / bdsSF >= minBDSHeight) {
>  
>  			bdsHeight = ifHeight / bdsSF;
>  			if (std::fmod(ifHeight, 1.0) == 0 && std::fmod(bdsHeight, 1.0) == 0) {

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list