summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-10-11 14:00:39 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-10-11 14:00:39 +0200
commit4e6db6ddd7c8fdc8a475973e2df9bf6c09a4e538 (patch)
tree6d51132da8dcc4a0c08b460d92872ece8914190b
parentc289e1f52dba91a87e71568b1be8552abf3b1b14 (diff)
downloadmediapointer-dvb-s2-4e6db6ddd7c8fdc8a475973e2df9bf6c09a4e538.tar.gz
mediapointer-dvb-s2-4e6db6ddd7c8fdc8a475973e2df9bf6c09a4e538.tar.bz2
ivtv: partially revert an earlier patch that checks the max image height
From: Hans Verkuil <hverkuil@xs4all.nl> Ian Armstrong pointed out to me that it is perfectly valid to have a 576 lines YUV video with NTSC output in this particular case. In fact, without this the X driver for ivtv does not function properly. Reverted my earlier change that restrictred the height to 480 for NTSC and add the comments provided by Ian to explain what is happening here. Priority: normal Thanks-to: Ian Armstrong <ian@iarmst.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-ioctl.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
index 8696527ab..208fb5484 100644
--- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -509,7 +509,6 @@ static int ivtv_try_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_
static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt)
{
struct ivtv_open_id *id = fh;
- struct ivtv *itv = id->itv;
s32 w = fmt->fmt.pix.width;
s32 h = fmt->fmt.pix.height;
int field = fmt->fmt.pix.field;
@@ -517,7 +516,22 @@ static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format
w = min(w, 720);
w = max(w, 2);
- h = min(h, itv->is_out_50hz ? 576 : 480);
+ /* Why can the height be 576 even when the output is NTSC?
+
+ Internally the buffers of the PVR350 are always set to 720x576. The
+ decoded video frame will always be placed in the top left corner of
+ this buffer. For any video which is not 720x576, the buffer will
+ then be cropped to remove the unused right and lower areas, with
+ the remaining image being scaled by the hardware to fit the display
+ area. The video can be scaled both up and down, so a 720x480 video
+ can be displayed full-screen on PAL and a 720x576 video can be
+ displayed without cropping on NTSC.
+
+ Note that the scaling only occurs on the video stream, the osd
+ resolution is locked to the broadcast standard and not scaled.
+
+ Thanks to Ian Armstrong for this explanation. */
+ h = min(h, 576);
h = max(h, 2);
if (id->type == IVTV_DEC_STREAM_TYPE_YUV)
fmt->fmt.pix.field = field;