All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch
@ 2012-09-09 18:36 Frank Schäfer
  2012-09-09 18:36 ` [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB Frank Schäfer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Frank Schäfer @ 2012-09-09 18:36 UTC (permalink / raw)
  To: hdegoede; +Cc: linux-media, Frank Schäfer

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 lib/libv4lconvert/jpeg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libv4lconvert/jpeg.c b/lib/libv4lconvert/jpeg.c
index e088a90..aa9cace 100644
--- a/lib/libv4lconvert/jpeg.c
+++ b/lib/libv4lconvert/jpeg.c
@@ -56,7 +56,7 @@ int v4lconvert_decode_jpeg_tinyjpeg(struct v4lconvert_data *data,
 	}
 
 	if (header_width != width || header_height != height) {
-		V4LCONVERT_ERR("unexpected width / height in JPEG header"
+		V4LCONVERT_ERR("unexpected width / height in JPEG header: "
 			       "expected: %ux%u, header: %ux%u\n",
 			       width, height, header_width, header_height);
 		errno = EIO;
@@ -288,7 +288,7 @@ int v4lconvert_decode_jpeg_libjpeg(struct v4lconvert_data *data,
 
 	if (data->cinfo.image_width  != width ||
 	    data->cinfo.image_height != height) {
-		V4LCONVERT_ERR("unexpected width / height in JPEG header"
+		V4LCONVERT_ERR("unexpected width / height in JPEG header: "
 			       "expected: %ux%u, header: %ux%u\n", width,
 			       height, data->cinfo.image_width,
 			       data->cinfo.image_height);
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-09 18:36 [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Frank Schäfer
@ 2012-09-09 18:36 ` Frank Schäfer
  2012-09-09 21:24   ` Hans de Goede
  2012-09-09 18:36 ` [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams Frank Schäfer
  2012-09-09 21:21 ` [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Hans de Goede
  2 siblings, 1 reply; 11+ messages in thread
From: Frank Schäfer @ 2012-09-09 18:36 UTC (permalink / raw)
  To: hdegoede; +Cc: linux-media, Frank Schäfer

The gspca_pac7302 driver already provides this control.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 lib/libv4lconvert/control/libv4lcontrol.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
index 1272256..3d7a816 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -202,14 +202,10 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = {
 	{ 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
 	{ 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
 	/* Pac7302 based devices */
-	{ 0x093a, 0x2620, 0x0f, NULL, NULL,
-		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
-	{ 0x06f8, 0x3009, 0,    NULL, NULL,
-		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
-	{ 0x06f8, 0x301b, 0,    NULL, NULL,
-		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
-	{ 0x145f, 0x013c, 0,    NULL, NULL,
-		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
+	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
 	/* Pac7311 based devices */
 	{ 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
 	/* sq905 devices */
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams
  2012-09-09 18:36 [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Frank Schäfer
  2012-09-09 18:36 ` [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB Frank Schäfer
@ 2012-09-09 18:36 ` Frank Schäfer
  2012-09-09 21:26   ` Hans de Goede
  2012-09-09 21:21 ` [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Hans de Goede
  2 siblings, 1 reply; 11+ messages in thread
From: Frank Schäfer @ 2012-09-09 18:36 UTC (permalink / raw)
  To: hdegoede; +Cc: linux-media, Frank Schäfer

All pac7302 webcams need image rotation, so synchronize the list with the driver.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 lib/libv4lconvert/control/libv4lcontrol.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
index 3d7a816..6eea121 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -202,10 +202,21 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = {
 	{ 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
 	{ 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
 	/* Pac7302 based devices */
-	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
 	{ 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
 	{ 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2611, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2622, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2624, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2625, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2626, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2627, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2628, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x2629, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x262a, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x093a, 0x262c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
 	{ 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
+	{ 0x1ae7, 0x2001, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
 	/* Pac7311 based devices */
 	{ 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
 	/* sq905 devices */
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch
  2012-09-09 18:36 [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Frank Schäfer
  2012-09-09 18:36 ` [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB Frank Schäfer
  2012-09-09 18:36 ` [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams Frank Schäfer
@ 2012-09-09 21:21 ` Hans de Goede
  2 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-09-09 21:21 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: linux-media

Thanks, applied (and will be pushed to the official repo soon).

On 09/09/2012 08:36 PM, Frank Schäfer wrote:
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>   lib/libv4lconvert/jpeg.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/libv4lconvert/jpeg.c b/lib/libv4lconvert/jpeg.c
> index e088a90..aa9cace 100644
> --- a/lib/libv4lconvert/jpeg.c
> +++ b/lib/libv4lconvert/jpeg.c
> @@ -56,7 +56,7 @@ int v4lconvert_decode_jpeg_tinyjpeg(struct v4lconvert_data *data,
>   	}
>
>   	if (header_width != width || header_height != height) {
> -		V4LCONVERT_ERR("unexpected width / height in JPEG header"
> +		V4LCONVERT_ERR("unexpected width / height in JPEG header: "
>   			       "expected: %ux%u, header: %ux%u\n",
>   			       width, height, header_width, header_height);
>   		errno = EIO;
> @@ -288,7 +288,7 @@ int v4lconvert_decode_jpeg_libjpeg(struct v4lconvert_data *data,
>
>   	if (data->cinfo.image_width  != width ||
>   	    data->cinfo.image_height != height) {
> -		V4LCONVERT_ERR("unexpected width / height in JPEG header"
> +		V4LCONVERT_ERR("unexpected width / height in JPEG header: "
>   			       "expected: %ux%u, header: %ux%u\n", width,
>   			       height, data->cinfo.image_width,
>   			       data->cinfo.image_height);
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-09 18:36 ` [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB Frank Schäfer
@ 2012-09-09 21:24   ` Hans de Goede
  2012-09-10 15:41     ` Frank Schäfer
  0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2012-09-09 21:24 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: linux-media

Hi,

On 09/09/2012 08:36 PM, Frank Schäfer wrote:
> The gspca_pac7302 driver already provides this control.
>
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>   lib/libv4lconvert/control/libv4lcontrol.c |   12 ++++--------
>   1 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
> index 1272256..3d7a816 100644
> --- a/lib/libv4lconvert/control/libv4lcontrol.c
> +++ b/lib/libv4lconvert/control/libv4lcontrol.c
> @@ -202,14 +202,10 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = {
>   	{ 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>   	{ 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>   	/* Pac7302 based devices */
> -	{ 0x093a, 0x2620, 0x0f, NULL, NULL,
> -		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
> -	{ 0x06f8, 0x3009, 0,    NULL, NULL,
> -		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
> -	{ 0x06f8, 0x301b, 0,    NULL, NULL,
> -		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
> -	{ 0x145f, 0x013c, 0,    NULL, NULL,
> -		V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
> +	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>   	/* Pac7311 based devices */
>   	{ 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
>   	/* sq905 devices */
>

WANTS_WB does not add a whitebalance control, which these cameras indeed
already have, it adds a (software) autowhitebalance control, which enables
libv4lconvert doing software whitebalance correction. Although your
kernel patch for the pac7302 driver to pick a better default whitebalance
value, probably helps a lot to get the colors less screwed up, in the end
we still need some sort of awb to adjust to changing lightning conditions,
that is what this flag adds, as the pac7302 driver lacks awb.

Regards,

Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams
  2012-09-09 18:36 ` [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams Frank Schäfer
@ 2012-09-09 21:26   ` Hans de Goede
  2012-10-09 21:33     ` Robert Abel
  0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2012-09-09 21:26 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: linux-media

Hi,

On 09/09/2012 08:36 PM, Frank Schäfer wrote:
> All pac7302 webcams need image rotation, so synchronize the list with the driver.
>
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>   lib/libv4lconvert/control/libv4lcontrol.c |   13 ++++++++++++-
>   1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
> index 3d7a816..6eea121 100644
> --- a/lib/libv4lconvert/control/libv4lcontrol.c
> +++ b/lib/libv4lconvert/control/libv4lcontrol.c
> @@ -202,10 +202,21 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = {
>   	{ 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>   	{ 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>   	/* Pac7302 based devices */
> -	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },

The 0x0f here is a mask, so this one entry covers all device ids from
0x2620 - 0x262f, so...

>   	{ 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>   	{ 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2611, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2622, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2624, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2625, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2626, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2627, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2628, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x2629, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x262a, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x093a, 0x262c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },

The addition of all these is not necessary.

>   	{ 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
> +	{ 0x1ae7, 0x2001, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },

This one is necessary, I'll go and add it right away.

Regards,

Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-09 21:24   ` Hans de Goede
@ 2012-09-10 15:41     ` Frank Schäfer
  2012-09-10 18:33       ` Hans de Goede
  0 siblings, 1 reply; 11+ messages in thread
From: Frank Schäfer @ 2012-09-10 15:41 UTC (permalink / raw)
  To: hdegoede; +Cc: linux-media

Am 09.09.2012 23:24, schrieb Hans de Goede:
> Hi,
>
> On 09/09/2012 08:36 PM, Frank Schäfer wrote:
>> The gspca_pac7302 driver already provides this control.
>>
>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>> ---
>>   lib/libv4lconvert/control/libv4lcontrol.c |   12 ++++--------
>>   1 files changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/lib/libv4lconvert/control/libv4lcontrol.c
>> b/lib/libv4lconvert/control/libv4lcontrol.c
>> index 1272256..3d7a816 100644
>> --- a/lib/libv4lconvert/control/libv4lcontrol.c
>> +++ b/lib/libv4lconvert/control/libv4lcontrol.c
>> @@ -202,14 +202,10 @@ static const struct v4lcontrol_flags_info
>> v4lcontrol_flags[] = {
>>       { 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>>       { 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>>       /* Pac7302 based devices */
>> -    { 0x093a, 0x2620, 0x0f, NULL, NULL,
>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>> -    { 0x06f8, 0x3009, 0,    NULL, NULL,
>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>> -    { 0x06f8, 0x301b, 0,    NULL, NULL,
>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>> -    { 0x145f, 0x013c, 0,    NULL, NULL,
>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>> +    { 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>       /* Pac7311 based devices */
>>       { 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
>>       /* sq905 devices */
>>
>
> WANTS_WB does not add a whitebalance control, which these cameras indeed
> already have, it adds a (software) autowhitebalance control, which
> enables
> libv4lconvert doing software whitebalance correction. Although your
> kernel patch for the pac7302 driver to pick a better default whitebalance
> value, probably helps a lot to get the colors less screwed up, in the end
> we still need some sort of awb to adjust to changing lightning
> conditions,
> that is what this flag adds, as the pac7302 driver lacks awb.

Ok, so WANTS_WB is actually WANTS_AUTOWB. ;)
But... IIRC... the software AWB control is always there, even without
this flag !?
Or is it just about switching AWB on by default ?

And if AWB is on, the WB control should be disabled, right ?

Regards,
Frank

>
> Regards,
>
> Hans



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-10 15:41     ` Frank Schäfer
@ 2012-09-10 18:33       ` Hans de Goede
  2012-09-10 20:33         ` Frank Schäfer
  0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2012-09-10 18:33 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: linux-media

Hi,

On 09/10/2012 05:41 PM, Frank Schäfer wrote:
> Am 09.09.2012 23:24, schrieb Hans de Goede:
>> Hi,
>>
>> On 09/09/2012 08:36 PM, Frank Schäfer wrote:
>>> The gspca_pac7302 driver already provides this control.
>>>
>>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>>> ---
>>>    lib/libv4lconvert/control/libv4lcontrol.c |   12 ++++--------
>>>    1 files changed, 4 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/lib/libv4lconvert/control/libv4lcontrol.c
>>> b/lib/libv4lconvert/control/libv4lcontrol.c
>>> index 1272256..3d7a816 100644
>>> --- a/lib/libv4lconvert/control/libv4lcontrol.c
>>> +++ b/lib/libv4lconvert/control/libv4lcontrol.c
>>> @@ -202,14 +202,10 @@ static const struct v4lcontrol_flags_info
>>> v4lcontrol_flags[] = {
>>>        { 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>>>        { 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB, 1500 },
>>>        /* Pac7302 based devices */
>>> -    { 0x093a, 0x2620, 0x0f, NULL, NULL,
>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>> -    { 0x06f8, 0x3009, 0,    NULL, NULL,
>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>> -    { 0x06f8, 0x301b, 0,    NULL, NULL,
>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>> -    { 0x145f, 0x013c, 0,    NULL, NULL,
>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>> +    { 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>> +    { 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>> +    { 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>> +    { 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>>        /* Pac7311 based devices */
>>>        { 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
>>>        /* sq905 devices */
>>>
>>
>> WANTS_WB does not add a whitebalance control, which these cameras indeed
>> already have, it adds a (software) autowhitebalance control, which
>> enables
>> libv4lconvert doing software whitebalance correction. Although your
>> kernel patch for the pac7302 driver to pick a better default whitebalance
>> value, probably helps a lot to get the colors less screwed up, in the end
>> we still need some sort of awb to adjust to changing lightning
>> conditions,
>> that is what this flag adds, as the pac7302 driver lacks awb.
>
> Ok, so WANTS_WB is actually WANTS_AUTOWB. ;)
> But... IIRC... the software AWB control is always there, even without
> this flag !?
> Or is it just about switching AWB on by default ?

Correct, also note that the awb control will only show up for devices which
have non standard formats, since those need to always go through libv4lconvert
anyways, it does not get added to standard cams unless specifically enabled
through a quirk list entry.

> And if AWB is on, the WB control should be disabled, right ?

No, the software AWB works by applying software rgb gains, so the hardware
control is still useful, as the better the color balance of the input,
the better the end-result will be.

Regards,

Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-10 18:33       ` Hans de Goede
@ 2012-09-10 20:33         ` Frank Schäfer
  2012-09-11  7:33           ` Hans de Goede
  0 siblings, 1 reply; 11+ messages in thread
From: Frank Schäfer @ 2012-09-10 20:33 UTC (permalink / raw)
  To: Hans de Goede; +Cc: linux-media

Am 10.09.2012 20:33, schrieb Hans de Goede:
> Hi,
>
> On 09/10/2012 05:41 PM, Frank Schäfer wrote:
>> Am 09.09.2012 23:24, schrieb Hans de Goede:
>>> Hi,
>>>
>>> On 09/09/2012 08:36 PM, Frank Schäfer wrote:
>>>> The gspca_pac7302 driver already provides this control.
>>>>
>>>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>>>> ---
>>>>    lib/libv4lconvert/control/libv4lcontrol.c |   12 ++++--------
>>>>    1 files changed, 4 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/lib/libv4lconvert/control/libv4lcontrol.c
>>>> b/lib/libv4lconvert/control/libv4lcontrol.c
>>>> index 1272256..3d7a816 100644
>>>> --- a/lib/libv4lconvert/control/libv4lcontrol.c
>>>> +++ b/lib/libv4lconvert/control/libv4lcontrol.c
>>>> @@ -202,14 +202,10 @@ static const struct v4lcontrol_flags_info
>>>> v4lcontrol_flags[] = {
>>>>        { 0x145f, 0x013a, 0,    NULL, NULL, V4LCONTROL_WANTS_WB,
>>>> 1500 },
>>>>        { 0x2001, 0xf115, 0,    NULL, NULL, V4LCONTROL_WANTS_WB,
>>>> 1500 },
>>>>        /* Pac7302 based devices */
>>>> -    { 0x093a, 0x2620, 0x0f, NULL, NULL,
>>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>>> -    { 0x06f8, 0x3009, 0,    NULL, NULL,
>>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>>> -    { 0x06f8, 0x301b, 0,    NULL, NULL,
>>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>>> -    { 0x145f, 0x013c, 0,    NULL, NULL,
>>>> -        V4LCONTROL_ROTATED_90_JPEG | V4LCONTROL_WANTS_WB, 1500 },
>>>> +    { 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>>> +    { 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>>> +    { 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>>> +    { 0x145f, 0x013c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>>>        /* Pac7311 based devices */
>>>>        { 0x093a, 0x2600, 0x0f, NULL, NULL, V4LCONTROL_WANTS_WB },
>>>>        /* sq905 devices */
>>>>
>>>
>>> WANTS_WB does not add a whitebalance control, which these cameras
>>> indeed
>>> already have, it adds a (software) autowhitebalance control, which
>>> enables
>>> libv4lconvert doing software whitebalance correction. Although your
>>> kernel patch for the pac7302 driver to pick a better default
>>> whitebalance
>>> value, probably helps a lot to get the colors less screwed up, in
>>> the end
>>> we still need some sort of awb to adjust to changing lightning
>>> conditions,
>>> that is what this flag adds, as the pac7302 driver lacks awb.
>>
>> Ok, so WANTS_WB is actually WANTS_AUTOWB. ;)
>> But... IIRC... the software AWB control is always there, even without
>> this flag !?
>> Or is it just about switching AWB on by default ?
>
> Correct, also note that the awb control will only show up for devices
> which
> have non standard formats, since those need to always go through
> libv4lconvert
> anyways, it does not get added to standard cams unless specifically
> enabled
> through a quirk list entry.

Good to know that, thanks !

>
>> And if AWB is on, the WB control should be disabled, right ?
>
> No, the software AWB works by applying software rgb gains, so the
> hardware
> control is still useful, as the better the color balance of the input,
> the better the end-result will be.

Hmm... auto-whitebalance should compensate the setting made with the
manual hardware controlled whitebalance.
But I guess they are working too differenty.

Regards,
Frank

>
> Regards,
>
> Hans


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB
  2012-09-10 20:33         ` Frank Schäfer
@ 2012-09-11  7:33           ` Hans de Goede
  0 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2012-09-11  7:33 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: linux-media

Hi,

On 09/10/2012 10:33 PM, Frank Schäfer wrote:

<snip>

>>> And if AWB is on, the WB control should be disabled, right ?
>>
>> No, the software AWB works by applying software rgb gains, so the
>> hardware
>> control is still useful, as the better the color balance of the input,
>> the better the end-result will be.
>
> Hmm... auto-whitebalance should compensate the setting made with the
> manual hardware controlled whitebalance.

In an ideal world, yes. But that would only work if we know the exact
units in which the controls operate, and we don't. Also notice that even
if we had some sort of feedback looped software awb algorithm to get
over the units issue, the pac7302 is really funky in that it has both
blue / red balance controls and a color temperature control, so which
of those should such a software awb control ?

> But I guess they are working too differenty.

Right, the advantage of doing software whitebalance using software rgb
gains, is that we know the units of the software gains, so we don't need
a feedback loop, instead we just measure which correction we think we
should apply, and then apply it "blindly" (so without any feedback loop).

Regards,

Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams
  2012-09-09 21:26   ` Hans de Goede
@ 2012-10-09 21:33     ` Robert Abel
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Abel @ 2012-10-09 21:33 UTC (permalink / raw)
  To: Hans de Goede; +Cc: linux-media

Hi,

sorry for digging this up.

On 09.09.2012 23:26, Hans de Goede wrote:
> The 0x0f here is a mask, so this one entry covers all device ids from
> 0x2620 - 0x262f, so...
>
>>       { 0x06f8, 0x3009, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>>       { 0x06f8, 0x301b, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2620, 0x0f, NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2611, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2622, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2624, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2625, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2626, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2627, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2628, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x2629, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x262a, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>> +    { 0x093a, 0x262c, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG },
>
> The addition of all these is not necessary.
Actually
> { 0x093a, 0x2611, 0,    NULL, NULL, V4LCONTROL_ROTATED_90_JPEG }, 
is not covered by the bitmask and it's not in the current HEAD tree, either.

Regards,

Robert


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-10-09 21:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-09 18:36 [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Frank Schäfer
2012-09-09 18:36 ` [PATCH 2/3] libv4lconvert: pac7302-devices: remove unneeded flag V4LCONTROL_WANTS_WB Frank Schäfer
2012-09-09 21:24   ` Hans de Goede
2012-09-10 15:41     ` Frank Schäfer
2012-09-10 18:33       ` Hans de Goede
2012-09-10 20:33         ` Frank Schäfer
2012-09-11  7:33           ` Hans de Goede
2012-09-09 18:36 ` [PATCH 3/3] libv4lconvert: update the list of pac7302 webcams Frank Schäfer
2012-09-09 21:26   ` Hans de Goede
2012-10-09 21:33     ` Robert Abel
2012-09-09 21:21 ` [PATCH 1/3] libv4lconvert: fix format of the error messages concerning jpeg frame size mismatch Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.