Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153950
b: refs/heads/master
c: 728f5b9
h: refs/heads/master
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jun 23, 2009
1 parent 8b29438 commit 8cfbb34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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: bc44fc061ea1f2b7918ec0bb55013b8054c81752
refs/heads/master: 728f5b93f48cbfebd8e939bec2be1252fce7dae1
14 changes: 4 additions & 10 deletions trunk/drivers/media/video/zoran/zoran_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,16 +2088,10 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh,
return -EINVAL;
}

bpp = (zoran_formats[i].depth + 7) / 8;
fmt->fmt.pix.width &= ~((bpp == 2) ? 1 : 3);
if (fmt->fmt.pix.width > BUZ_MAX_WIDTH)
fmt->fmt.pix.width = BUZ_MAX_WIDTH;
if (fmt->fmt.pix.width < BUZ_MIN_WIDTH)
fmt->fmt.pix.width = BUZ_MIN_WIDTH;
if (fmt->fmt.pix.height > BUZ_MAX_HEIGHT)
fmt->fmt.pix.height = BUZ_MAX_HEIGHT;
if (fmt->fmt.pix.height < BUZ_MIN_HEIGHT)
fmt->fmt.pix.height = BUZ_MIN_HEIGHT;
bpp = DIV_ROUND_UP(zoran_formats[i].depth, 8);
v4l_bound_align_image(
&fmt->fmt.pix.width, BUZ_MIN_WIDTH, BUZ_MAX_WIDTH, bpp == 2 ? 1 : 2,
&fmt->fmt.pix.height, BUZ_MIN_HEIGHT, BUZ_MAX_HEIGHT, 0, 0);
mutex_unlock(&zr->resource_lock);

return 0;
Expand Down

0 comments on commit 8cfbb34

Please sign in to comment.