[libcamera-devel] libcamera: pipeline: ipu3: change IF_CROP_MAX to 40
diff mbox series

Message ID 20210220100608.14267-1-dave@bewaar.me
State New
Headers show
Series
  • [libcamera-devel] libcamera: pipeline: ipu3: change IF_CROP_MAX to 40
Related show

Commit Message

Dave Olsthoorn Feb. 20, 2021, 10:06 a.m. UTC
The value of IF_CROP_MAX seems to be a typo. A resolution of 40x540 seems
unlikely and excludes camera's with a 640x480 resolution, like the OV7251
in several Microsoft Surface products, from working.

This patch corrects the value to 40 since a minimal resolution of 40x40
seems more logical.
---
 src/libcamera/pipeline/ipu3/imgu.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi March 17, 2021, 4:24 p.m. UTC | #1
Hi Dave,

On Sat, Feb 20, 2021 at 11:06:08AM +0100, Dave Olsthoorn wrote:
> The value of IF_CROP_MAX seems to be a typo. A resolution of 40x540 seems
> unlikely and excludes camera's with a 640x480 resolution, like the OV7251
> in several Microsoft Surface products, from working.
>
> This patch corrects the value to 40 since a minimal resolution of 40x40
> seems more logical.

I'm working on the ImgU pipe configuration and I would like to collect
this patch, but it's missing your Signed-off-by.

If you're ok I can add it and send the patch as part of a larger
series.

Thanks
  j

> ---
>  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 d5cf05b0..fb995008 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
> @@ -42,7 +42,7 @@ static constexpr unsigned int BDS_ALIGN_W = 2;
>  static constexpr unsigned int BDS_ALIGN_H = 4;
>
>  static constexpr unsigned int IF_CROP_MAX_W = 40;
> -static constexpr unsigned int IF_CROP_MAX_H = 540;
> +static constexpr unsigned int IF_CROP_MAX_H = 40;
>
>  static constexpr float BDS_SF_MAX = 2.5;
>  static constexpr float BDS_SF_MIN = 1.0;
> --
> 2.29.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Dave Olsthoorn March 17, 2021, 5:58 p.m. UTC | #2
Hi Jacopo,

On 2021-03-17 17:24, Jacopo Mondi wrote:
> Hi Dave,
> 
> On Sat, Feb 20, 2021 at 11:06:08AM +0100, Dave Olsthoorn wrote:
>> The value of IF_CROP_MAX seems to be a typo. A resolution of 40x540 
>> seems
>> unlikely and excludes camera's with a 640x480 resolution, like the 
>> OV7251
>> in several Microsoft Surface products, from working.
>> 
>> This patch corrects the value to 40 since a minimal resolution of 
>> 40x40
>> seems more logical.
> 
> I'm working on the ImgU pipe configuration and I would like to collect
> this patch, but it's missing your Signed-off-by.
> 
> If you're ok I can add it and send the patch as part of a larger
> series.
> 
You can add my Signed-off-by

Signed-off-by: Dave Olsthoorn <dave@bewaar.me>

> Thanks
>   j
> 
>> ---
>>  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 d5cf05b0..fb995008 100644
>> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
>> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
>> @@ -42,7 +42,7 @@ static constexpr unsigned int BDS_ALIGN_W = 2;
>>  static constexpr unsigned int BDS_ALIGN_H = 4;
>> 
>>  static constexpr unsigned int IF_CROP_MAX_W = 40;
>> -static constexpr unsigned int IF_CROP_MAX_H = 540;
>> +static constexpr unsigned int IF_CROP_MAX_H = 40;
>> 
>>  static constexpr float BDS_SF_MAX = 2.5;
>>  static constexpr float BDS_SF_MIN = 1.0;
>> --
>> 2.29.2
>> 
>> _______________________________________________
>> libcamera-devel mailing list
>> libcamera-devel@lists.libcamera.org
>> https://lists.libcamera.org/listinfo/libcamera-devel

Kind Regards,
Dave Olsthoorn

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index d5cf05b0..fb995008 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -42,7 +42,7 @@  static constexpr unsigned int BDS_ALIGN_W = 2;
 static constexpr unsigned int BDS_ALIGN_H = 4;
 
 static constexpr unsigned int IF_CROP_MAX_W = 40;
-static constexpr unsigned int IF_CROP_MAX_H = 540;
+static constexpr unsigned int IF_CROP_MAX_H = 40;
 
 static constexpr float BDS_SF_MAX = 2.5;
 static constexpr float BDS_SF_MIN = 1.0;