diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-05-30 17:45:46 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2009-05-30 17:45:46 -0700 |
commit | 6c671f37ed7cd5bbe5c041761851f903361f8687 (patch) | |
tree | db45123529eacdc4be7f007f38b215a2127f8990 /linux/drivers/media/video/cx88 | |
parent | 6ebc4db113b06e0a7390faa61f891ef23d3a483a (diff) | |
download | mediapointer-dvb-s2-6c671f37ed7cd5bbe5c041761851f903361f8687.tar.gz mediapointer-dvb-s2-6c671f37ed7cd5bbe5c041761851f903361f8687.tar.bz2 |
cx88: Use v4l bounding/alignment function
From: Trent Piepho <xyzzy@speakeasy.org>
The v4l function has a better algorithm for aligning image size.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 2dfa4c9c3..70b086fb7 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1339,15 +1339,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, } f->fmt.pix.field = field; - if (f->fmt.pix.height < 32) - f->fmt.pix.height = 32; - if (f->fmt.pix.height > maxh) - f->fmt.pix.height = maxh; - if (f->fmt.pix.width < 48) - f->fmt.pix.width = 48; - if (f->fmt.pix.width > maxw) - f->fmt.pix.width = maxw; - f->fmt.pix.width &= ~0x03; + v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, + &f->fmt.pix.height, 32, maxh, 0, 0); f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3; f->fmt.pix.sizeimage = |