All of lore.kernel.org
 help / color / mirror / Atom feed
* libv4lconvert: remove broken ALTERNATE handling
@ 2014-03-14 12:39 Hans Verkuil
  2014-03-14 18:53 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2014-03-14 12:39 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: hdegoede

The V4L2 specification used to say that if field == V4L2_FIELD_ALTERNATE, the
height would have to be divided by two. This is incorrect, the height is that of
a single field. This has been corrected in the spec, now this code in libv4lconvert
needs to be removed as well.

Tested with both bttv and saa7146, the only two drivers supporting FIELD_ALTERNATE
today.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 lib/libv4lconvert/libv4lconvert.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
index e2afc27..df06b75 100644
--- a/lib/libv4lconvert/libv4lconvert.c
+++ b/lib/libv4lconvert/libv4lconvert.c
@@ -1328,13 +1328,6 @@ int v4lconvert_convert(struct v4lconvert_data *data,
 		return to_copy;
 	}
 
-	/* When field is V4L2_FIELD_ALTERNATE, each buffer only contains half the
-	   lines */
-	if (my_src_fmt.fmt.pix.field == V4L2_FIELD_ALTERNATE) {
-		my_src_fmt.fmt.pix.height /= 2;
-		my_dest_fmt.fmt.pix.height /= 2;
-	}
-
 	/* sanity check, is the dest buffer large enough? */
 	switch (my_dest_fmt.fmt.pix.pixelformat) {
 	case V4L2_PIX_FMT_RGB24:
-- 
1.9.0


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

* Re: libv4lconvert: remove broken ALTERNATE handling
  2014-03-14 12:39 libv4lconvert: remove broken ALTERNATE handling Hans Verkuil
@ 2014-03-14 18:53 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2014-03-14 18:53 UTC (permalink / raw)
  To: Hans Verkuil, Linux Media Mailing List

Hi,

On 03/14/2014 01:39 PM, Hans Verkuil wrote:
> The V4L2 specification used to say that if field == V4L2_FIELD_ALTERNATE, the
> height would have to be divided by two. This is incorrect, the height is that of
> a single field. This has been corrected in the spec, now this code in libv4lconvert
> needs to be removed as well.
> 
> Tested with both bttv and saa7146, the only two drivers supporting FIELD_ALTERNATE
> today.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  lib/libv4lconvert/libv4lconvert.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
> index e2afc27..df06b75 100644
> --- a/lib/libv4lconvert/libv4lconvert.c
> +++ b/lib/libv4lconvert/libv4lconvert.c
> @@ -1328,13 +1328,6 @@ int v4lconvert_convert(struct v4lconvert_data *data,
>  		return to_copy;
>  	}
>  
> -	/* When field is V4L2_FIELD_ALTERNATE, each buffer only contains half the
> -	   lines */
> -	if (my_src_fmt.fmt.pix.field == V4L2_FIELD_ALTERNATE) {
> -		my_src_fmt.fmt.pix.height /= 2;
> -		my_dest_fmt.fmt.pix.height /= 2;
> -	}
> -
>  	/* sanity check, is the dest buffer large enough? */
>  	switch (my_dest_fmt.fmt.pix.pixelformat) {
>  	case V4L2_PIX_FMT_RGB24:
> 

Looks good, feel free to pish this.

Regards,

Hans

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

end of thread, other threads:[~2014-03-14 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 12:39 libv4lconvert: remove broken ALTERNATE handling Hans Verkuil
2014-03-14 18:53 ` 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.