diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-18 22:34:55 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-18 22:34:55 +0100 |
commit | bb9189ca522bccdf0c7d76b92a5860b074bc0c02 (patch) | |
tree | f0dde6837086b10bc67e9a3b2d8ac1a1f20e09af /linux | |
parent | a9e2b393853fab732f68350caf74d3f8057ed8f1 (diff) | |
download | mediapointer-dvb-s2-bb9189ca522bccdf0c7d76b92a5860b074bc0c02.tar.gz mediapointer-dvb-s2-bb9189ca522bccdf0c7d76b92a5860b074bc0c02.tar.bz2 |
zoran: TRY_FMT and S_FMT now do the same parameter checks.
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/zoran/zoran_driver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linux/drivers/media/video/zoran/zoran_driver.c b/linux/drivers/media/video/zoran/zoran_driver.c index 96085b123..66659d479 100644 --- a/linux/drivers/media/video/zoran/zoran_driver.c +++ b/linux/drivers/media/video/zoran/zoran_driver.c @@ -2132,8 +2132,6 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh, if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) return -EINVAL; - fmt->fmt.pix.bytesperline = 0; - mutex_lock(&zr->resource_lock); settings = fh->jpg_settings; @@ -2158,6 +2156,14 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh, else settings.field_per_buff = 1; + if (settings.HorDcm > 1) { + settings.img_x = (BUZ_MAX_WIDTH == 720) ? 8 : 0; + settings.img_width = (BUZ_MAX_WIDTH == 720) ? 704 : BUZ_MAX_WIDTH; + } else { + settings.img_x = 0; + settings.img_width = BUZ_MAX_WIDTH; + } + /* check */ res = zoran_check_jpg_settings(zr, &settings, 1); if (res) @@ -2175,6 +2181,8 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh, V4L2_FIELD_TOP : V4L2_FIELD_BOTTOM); fmt->fmt.pix.sizeimage = zoran_v4l2_calc_bufsize(&settings); + fmt->fmt.pix.bytesperline = 0; + fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; tryfmt_unlock_and_return: mutex_unlock(&zr->resource_lock); return res; |