[libcamera-devel] libcamera: pipeline: ipu3: Fix minCrop indentation
diff mbox series

Message ID 20211110233341.2147832-1-kieran.bingham@ideasonboard.com
State Accepted
Commit 6b288f8f4f53edf90cc7ab22fc41c7edaa69e123
Headers show
Series
  • [libcamera-devel] libcamera: pipeline: ipu3: Fix minCrop indentation
Related show

Commit Message

Kieran Bingham Nov. 10, 2021, 11:33 p.m. UTC
When updating the controls the calculation for minCrop incorrectly
indents the parameters to scaledBy().

Fix it.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Umang Jain Nov. 11, 2021, 3:54 a.m. UTC | #1
Hi Kieran,

Thank you for the patch

On 11/11/21 5:03 AM, Kieran Bingham wrote:
> When updating the controls the calculation for minCrop incorrectly
> indents the parameters to scaledBy().
>
> Fix it.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index eb714aa61099..3cd7383f0e40 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1039,7 +1039,7 @@ int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)
>   	 * top-left corner as we allow application to freely pan the crop area.
>   	 */
>   	Rectangle minCrop = Rectangle(minSize).scaledBy(analogueCrop.size(),
> -					       sensorInfo.outputSize);
> +							sensorInfo.outputSize);
>   
>   	controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop);
>
Jacopo Mondi Nov. 11, 2021, 8:05 a.m. UTC | #2
Hi Kieran,

On Wed, Nov 10, 2021 at 11:33:41PM +0000, Kieran Bingham wrote:
> When updating the controls the calculation for minCrop incorrectly
> indents the parameters to scaledBy().
>
> Fix it.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Ups,
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index eb714aa61099..3cd7383f0e40 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1039,7 +1039,7 @@ int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)
>  	 * top-left corner as we allow application to freely pan the crop area.
>  	 */
>  	Rectangle minCrop = Rectangle(minSize).scaledBy(analogueCrop.size(),
> -					       sensorInfo.outputSize);
> +							sensorInfo.outputSize);
>
>  	controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop);
>
> --
> 2.30.2
>
Paul Elder Nov. 11, 2021, 9:33 a.m. UTC | #3
Hi Kieran,

On Wed, Nov 10, 2021 at 11:33:41PM +0000, Kieran Bingham wrote:
> When updating the controls the calculation for minCrop incorrectly
> indents the parameters to scaledBy().
> 
> Fix it.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index eb714aa61099..3cd7383f0e40 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1039,7 +1039,7 @@ int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)
>  	 * top-left corner as we allow application to freely pan the crop area.
>  	 */
>  	Rectangle minCrop = Rectangle(minSize).scaledBy(analogueCrop.size(),
> -					       sensorInfo.outputSize);
> +							sensorInfo.outputSize);
>  
>  	controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop);
>  
> -- 
> 2.30.2
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index eb714aa61099..3cd7383f0e40 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1039,7 +1039,7 @@  int PipelineHandlerIPU3::updateControls(IPU3CameraData *data)
 	 * top-left corner as we allow application to freely pan the crop area.
 	 */
 	Rectangle minCrop = Rectangle(minSize).scaledBy(analogueCrop.size(),
-					       sensorInfo.outputSize);
+							sensorInfo.outputSize);
 
 	controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop);