Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153957
b: refs/heads/master
c: 9bd0e8d
h: refs/heads/master
i:
  153955: 4357ab9
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jun 23, 2009
1 parent 5ec90b8 commit d10c651
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 653dc59b6468c2ba51f3b4aee609daa8f67d3e3a
refs/heads/master: 9bd0e8d7d1bf0dc586bad905c7878b611da3acdc
16 changes: 3 additions & 13 deletions trunk/drivers/media/video/cx231xx/cx231xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
{
struct cx231xx_fh *fh = priv;
struct cx231xx *dev = fh->dev;
int width = f->fmt.pix.width;
int height = f->fmt.pix.height;
unsigned int width = f->fmt.pix.width;
unsigned int height = f->fmt.pix.height;
unsigned int maxw = norm_maxw(dev);
unsigned int maxh = norm_maxh(dev);
unsigned int hscale, vscale;
Expand All @@ -971,17 +971,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,

/* width must even because of the YUYV format
height must be even because of interlacing */
height &= 0xfffe;
width &= 0xfffe;

if (unlikely(height < 32))
height = 32;
if (unlikely(height > maxh))
height = maxh;
if (unlikely(width < 48))
width = 48;
if (unlikely(width > maxw))
width = maxw;
v4l_bound_align_image(&width, 48, maxw, 1, &height, 32, maxh, 1, 0);

get_scale(dev, width, height, &hscale, &vscale);

Expand Down

0 comments on commit d10c651

Please sign in to comment.