projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
728f5b9
)
V4L/DVB (11905): vivi: Use v4l bounding/alignment function
author
Trent Piepho
<xyzzy@speakeasy.org>
Sun, 31 May 2009 00:45:46 +0000
(21:45 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Tue, 23 Jun 2009 06:21:18 +0000
(
03:21
-0300)
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>
drivers/media/video/vivi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/video/vivi.c
b/drivers/media/video/vivi.c
index fbfefae7886fac4cfc337a9d66b591ed9880fa11..cd72668584626974a4c59b2bc0c739c09d2a3360 100644
(file)
--- a/
drivers/media/video/vivi.c
+++ b/
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 =