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:19 -0400 |
commit | 4b89945e590f94e82a6e7f33e21cbd0d83774b9e (patch) | |
tree | a8e7a39c7df30555a117dc126ee567a9770fbb97 /drivers/media/video/cx88 | |
parent | bc52d6eb44de8f19934768d4d10d19fdbdc99950 (diff) |
V4L/DVB (11907): cx88: 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/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 0ccac702bea4..b12770848c00 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1111,15 +1111,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | f->fmt.pix.field = field; | 1113 | f->fmt.pix.field = field; |
1114 | if (f->fmt.pix.height < 32) | 1114 | v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, |
1115 | f->fmt.pix.height = 32; | 1115 | &f->fmt.pix.height, 32, maxh, 0, 0); |
1116 | if (f->fmt.pix.height > maxh) | ||
1117 | f->fmt.pix.height = maxh; | ||
1118 | if (f->fmt.pix.width < 48) | ||
1119 | f->fmt.pix.width = 48; | ||
1120 | if (f->fmt.pix.width > maxw) | ||
1121 | f->fmt.pix.width = maxw; | ||
1122 | f->fmt.pix.width &= ~0x03; | ||
1123 | f->fmt.pix.bytesperline = | 1116 | f->fmt.pix.bytesperline = |
1124 | (f->fmt.pix.width * fmt->depth) >> 3; | 1117 | (f->fmt.pix.width * fmt->depth) >> 3; |
1125 | f->fmt.pix.sizeimage = | 1118 | f->fmt.pix.sizeimage = |