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:18 -0400 |
commit | bc44fc061ea1f2b7918ec0bb55013b8054c81752 (patch) | |
tree | c67d9a369fb716235ef01665070ba264d29ced45 /drivers/media | |
parent | 4a6b8df2133c1f218a503e0432a9e6cc3d461a30 (diff) |
V4L/DVB (11903): sh_mobile_ceu_camera: 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')
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index d369e8409ab8..0db88a53d92c 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -689,16 +689,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, | |||
689 | 689 | ||
690 | /* FIXME: calculate using depth and bus width */ | 690 | /* FIXME: calculate using depth and bus width */ |
691 | 691 | ||
692 | if (f->fmt.pix.height < 4) | 692 | v4l_bound_align_image(&f->fmt.pix.width, 2, 2560, 1, |
693 | f->fmt.pix.height = 4; | 693 | &f->fmt.pix.height, 4, 1920, 2, 0); |
694 | if (f->fmt.pix.height > 1920) | ||
695 | f->fmt.pix.height = 1920; | ||
696 | if (f->fmt.pix.width < 2) | ||
697 | f->fmt.pix.width = 2; | ||
698 | if (f->fmt.pix.width > 2560) | ||
699 | f->fmt.pix.width = 2560; | ||
700 | f->fmt.pix.width &= ~0x01; | ||
701 | f->fmt.pix.height &= ~0x03; | ||
702 | 694 | ||
703 | f->fmt.pix.bytesperline = f->fmt.pix.width * | 695 | f->fmt.pix.bytesperline = f->fmt.pix.width * |
704 | DIV_ROUND_UP(xlate->host_fmt->depth, 8); | 696 | DIV_ROUND_UP(xlate->host_fmt->depth, 8); |