From 63356c2f09dd70981e4a67758a84259cc9af61d6 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 30 May 2009 21:45:46 -0300 Subject: [PATCH] --- yaml --- r: 153951 b: refs/heads/master c: 3adbbb8e2a87d58401466c825e9ff191e3b5a7b6 h: refs/heads/master i: 153949: 8b294385fb393c8d1305cb680e5a71ce82b33208 153947: 305f3105a0db18190b4bd05acc23a3305e28b0f7 153943: 184a3a06b10a7dd98f060436f3baad6d4413941a 153935: 1e44cb3d13f93c67ad44ee869483b949b30fe623 153919: e375809073b8cd3fc0f9bc4f9065cffe7ccdbf9e v: v3 --- [refs] | 2 +- trunk/drivers/media/video/vivi.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index ade00123eaae..36ac295700a9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 728f5b93f48cbfebd8e939bec2be1252fce7dae1 +refs/heads/master: 3adbbb8e2a87d58401466c825e9ff191e3b5a7b6 diff --git a/trunk/drivers/media/video/vivi.c b/trunk/drivers/media/video/vivi.c index fbfefae7886f..cd7266858462 100644 --- a/trunk/drivers/media/video/vivi.c +++ b/trunk/drivers/media/video/vivi.c @@ -883,15 +883,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, maxh = norm_maxh(); 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 =