提交 bc52d6eb 编写于 作者: T Trent Piepho 提交者: Mauro Carvalho Chehab

V4L/DVB (11906): saa7134: Use v4l bounding/alignment function

The v4l function has a better algorithm for aligning image size.
Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 3adbbb8e
...@@ -1640,15 +1640,8 @@ static int saa7134_try_fmt_vid_cap(struct file *file, void *priv, ...@@ -1640,15 +1640,8 @@ static int saa7134_try_fmt_vid_cap(struct file *file, void *priv,
} }
f->fmt.pix.field = field; f->fmt.pix.field = field;
if (f->fmt.pix.width < 48) v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2,
f->fmt.pix.width = 48; &f->fmt.pix.height, 32, maxh, 0, 0);
if (f->fmt.pix.height < 32)
f->fmt.pix.height = 32;
if (f->fmt.pix.width > maxw)
f->fmt.pix.width = maxw;
if (f->fmt.pix.height > maxh)
f->fmt.pix.height = maxh;
f->fmt.pix.width &= ~0x03;
f->fmt.pix.bytesperline = f->fmt.pix.bytesperline =
(f->fmt.pix.width * fmt->depth) >> 3; (f->fmt.pix.width * fmt->depth) >> 3;
f->fmt.pix.sizeimage = f->fmt.pix.sizeimage =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册