diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 8696527ab134..208fb54842f2 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/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_ | |||
509 | static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) | 509 | static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) |
510 | { | 510 | { |
511 | struct ivtv_open_id *id = fh; | 511 | struct ivtv_open_id *id = fh; |
512 | struct ivtv *itv = id->itv; | ||
513 | s32 w = fmt->fmt.pix.width; | 512 | s32 w = fmt->fmt.pix.width; |
514 | s32 h = fmt->fmt.pix.height; | 513 | s32 h = fmt->fmt.pix.height; |
515 | int field = fmt->fmt.pix.field; | 514 | 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 | |||
517 | 516 | ||
518 | w = min(w, 720); | 517 | w = min(w, 720); |
519 | w = max(w, 2); | 518 | w = max(w, 2); |
520 | h = min(h, itv->is_out_50hz ? 576 : 480); | 519 | /* Why can the height be 576 even when the output is NTSC? |
520 | |||
521 | Internally the buffers of the PVR350 are always set to 720x576. The | ||
522 | decoded video frame will always be placed in the top left corner of | ||
523 | this buffer. For any video which is not 720x576, the buffer will | ||
524 | then be cropped to remove the unused right and lower areas, with | ||
525 | the remaining image being scaled by the hardware to fit the display | ||
526 | area. The video can be scaled both up and down, so a 720x480 video | ||
527 | can be displayed full-screen on PAL and a 720x576 video can be | ||
528 | displayed without cropping on NTSC. | ||
529 | |||
530 | Note that the scaling only occurs on the video stream, the osd | ||
531 | resolution is locked to the broadcast standard and not scaled. | ||
532 | |||
533 | Thanks to Ian Armstrong for this explanation. */ | ||
534 | h = min(h, 576); | ||
521 | h = max(h, 2); | 535 | h = max(h, 2); |
522 | if (id->type == IVTV_DEC_STREAM_TYPE_YUV) | 536 | if (id->type == IVTV_DEC_STREAM_TYPE_YUV) |
523 | fmt->fmt.pix.field = field; | 537 | fmt->fmt.pix.field = field; |