Skip to content

Commit

Permalink
staging: Solo6x10: accept WxH >= screen dimentions.
Browse files Browse the repository at this point in the history
This makes it possible to request full resolution (704x576 or 704x480)
independently of the color system used (PAL or NTSC).

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Krzysztof Hałasa authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent 97a6688 commit 98ab1c9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/staging/solo6x10/solo6010-v4l2-enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,13 +1034,17 @@ static int solo_enc_try_fmt_cap(struct file *file, void *priv,
if (pix->width != solo_enc->width ||
pix->height != solo_enc->height)
return -EBUSY;
} else if (!(pix->width == solo_dev->video_hsize &&
pix->height == solo_dev->video_vsize << 1) &&
!(pix->width == solo_dev->video_hsize >> 1 &&
pix->height == solo_dev->video_vsize)) {
}

if (pix->width < solo_dev->video_hsize ||
pix->height < solo_dev->video_vsize << 1) {
/* Default to CIF 1/2 size */
pix->width = solo_dev->video_hsize >> 1;
pix->height = solo_dev->video_vsize;
} else {
/* Full frame */
pix->width = solo_dev->video_hsize;
pix->height = solo_dev->video_vsize << 1;
}

if (pix->field == V4L2_FIELD_ANY)
Expand Down

0 comments on commit 98ab1c9

Please sign in to comment.