diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-05-30 20:45:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 02:21:18 -0400 |
commit | bc52d6eb44de8f19934768d4d10d19fdbdc99950 (patch) | |
tree | 0cee3c74e1cea55962dbb6dedd6dec5fd2368950 /drivers/media/video | |
parent | 3adbbb8e2a87d58401466c825e9ff191e3b5a7b6 (diff) |
V4L/DVB (11906): saa7134: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index e305c1674cee..ba87128542e0 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1640,15 +1640,8 @@ static int saa7134_try_fmt_vid_cap(struct file *file, void *priv, | |||
1640 | } | 1640 | } |
1641 | 1641 | ||
1642 | f->fmt.pix.field = field; | 1642 | f->fmt.pix.field = field; |
1643 | if (f->fmt.pix.width < 48) | 1643 | v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, |
1644 | f->fmt.pix.width = 48; | 1644 | &f->fmt.pix.height, 32, maxh, 0, 0); |
1645 | if (f->fmt.pix.height < 32) | ||
1646 | f->fmt.pix.height = 32; | ||
1647 | if (f->fmt.pix.width > maxw) | ||
1648 | f->fmt.pix.width = maxw; | ||
1649 | if (f->fmt.pix.height > maxh) | ||
1650 | f->fmt.pix.height = maxh; | ||
1651 | f->fmt.pix.width &= ~0x03; | ||
1652 | f->fmt.pix.bytesperline = | 1645 | f->fmt.pix.bytesperline = |
1653 | (f->fmt.pix.width * fmt->depth) >> 3; | 1646 | (f->fmt.pix.width * fmt->depth) >> 3; |
1654 | f->fmt.pix.sizeimage = | 1647 | f->fmt.pix.sizeimage = |