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 | 2449afcbcc654dbaa9dabeda9daecb69719b0aaa (patch) | |
tree | 6f4cac4c6b395520610f292dba7b48547c25e840 /drivers/media/video/cx23885/cx23885-video.c | |
parent | 1c657a99fd655c0daa7450854a914d21c1da805c (diff) |
V4L/DVB (11909): cx23885: 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/cx23885/cx23885-video.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 66bbd2e71105..70836af3ab48 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -963,15 +963,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
963 | } | 963 | } |
964 | 964 | ||
965 | f->fmt.pix.field = field; | 965 | f->fmt.pix.field = field; |
966 | if (f->fmt.pix.height < 32) | 966 | v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, |
967 | f->fmt.pix.height = 32; | 967 | &f->fmt.pix.height, 32, maxh, 0, 0); |
968 | if (f->fmt.pix.height > maxh) | ||
969 | f->fmt.pix.height = maxh; | ||
970 | if (f->fmt.pix.width < 48) | ||
971 | f->fmt.pix.width = 48; | ||
972 | if (f->fmt.pix.width > maxw) | ||
973 | f->fmt.pix.width = maxw; | ||
974 | f->fmt.pix.width &= ~0x03; | ||
975 | f->fmt.pix.bytesperline = | 968 | f->fmt.pix.bytesperline = |
976 | (f->fmt.pix.width * fmt->depth) >> 3; | 969 | (f->fmt.pix.width * fmt->depth) >> 3; |
977 | f->fmt.pix.sizeimage = | 970 | f->fmt.pix.sizeimage = |