libv4lconvert: remove broken ALTERNATE handling
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.
--- lib/libv4lconvert/libv4lconvert.c | 7 ------- 1 file changed, 7 deletions(-)
lib/libv4lconvert/libv4lconvert.c +0 -7
@@ -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 :
Signature · 1 line
1.9.0
Hi,
Quoted 22 lines · Hans Verkuil
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_ALTERNATEtoday.Signed-off-by Hans Verkuil <[email protected]>--- lib/libv4lconvert/libv4lconvert.c | 7 ------- 1 file changed, 7 deletions(-)lib/libv4lconvert/libv4lconvert.c +0
-0@@ -1328,13 +1328,6 @@ int v4lconvert_convert(struct v4lconvert_data *data,return to_copy; }
lib/libv4lconvert/libv4lconvert.c int v4lconvert_convert(struct v4lconvert_data *data, · line 1333
Quoted 10 lines
lib/libv4lconvert/libv4lconvert.c +0
-7-/* 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