aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/zoran/zoran_driver.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index a3a6f61187b0..611fc7f18e16 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -2131,8 +2131,6 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
2131 if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) 2131 if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
2132 return -EINVAL; 2132 return -EINVAL;
2133 2133
2134 fmt->fmt.pix.bytesperline = 0;
2135
2136 mutex_lock(&zr->resource_lock); 2134 mutex_lock(&zr->resource_lock);
2137 settings = fh->jpg_settings; 2135 settings = fh->jpg_settings;
2138 2136
@@ -2157,6 +2155,14 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
2157 else 2155 else
2158 settings.field_per_buff = 1; 2156 settings.field_per_buff = 1;
2159 2157
2158 if (settings.HorDcm > 1) {
2159 settings.img_x = (BUZ_MAX_WIDTH == 720) ? 8 : 0;
2160 settings.img_width = (BUZ_MAX_WIDTH == 720) ? 704 : BUZ_MAX_WIDTH;
2161 } else {
2162 settings.img_x = 0;
2163 settings.img_width = BUZ_MAX_WIDTH;
2164 }
2165
2160 /* check */ 2166 /* check */
2161 res = zoran_check_jpg_settings(zr, &settings, 1); 2167 res = zoran_check_jpg_settings(zr, &settings, 1);
2162 if (res) 2168 if (res)
@@ -2174,6 +2180,8 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
2174 V4L2_FIELD_TOP : V4L2_FIELD_BOTTOM); 2180 V4L2_FIELD_TOP : V4L2_FIELD_BOTTOM);
2175 2181
2176 fmt->fmt.pix.sizeimage = zoran_v4l2_calc_bufsize(&settings); 2182 fmt->fmt.pix.sizeimage = zoran_v4l2_calc_bufsize(&settings);
2183 fmt->fmt.pix.bytesperline = 0;
2184 fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
2177tryfmt_unlock_and_return: 2185tryfmt_unlock_and_return:
2178 mutex_unlock(&zr->resource_lock); 2186 mutex_unlock(&zr->resource_lock);
2179 return res; 2187 return res;