Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153905
b: refs/heads/master
c: 124cc9c
h: refs/heads/master
i:
  153903: a5a9697
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jun 23, 2009
1 parent 54e88f3 commit 1e3fe6e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 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: 7d9713735d7537baf2b00be806a8de08a5c9f11b
refs/heads/master: 124cc9c0c8acc77ac2f1114ee7eea961334020ba
33 changes: 30 additions & 3 deletions trunk/drivers/media/video/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,21 @@ static const struct v4l2_pix_format ov519_vga_mode[] = {
.priv = 0},
};
static const struct v4l2_pix_format ov519_sif_mode[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 3},
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 2},
{352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288 * 3 / 8 + 590,
Expand All @@ -266,11 +276,21 @@ static const struct v4l2_pix_format ov518_vga_mode[] = {
.priv = 0},
};
static const struct v4l2_pix_format ov518_sif_mode[] = {
{160, 120, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE,
.bytesperline = 160,
.sizeimage = 40000,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 3},
{176, 144, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 40000,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
{320, 240, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 2},
{352, 288, V4L2_PIX_FMT_OV518, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288 * 3 / 8 + 590,
Expand Down Expand Up @@ -2039,7 +2059,7 @@ static int mode_init_ov_sensor_regs(struct sd *sd)
int qvga;

gspca_dev = &sd->gspca_dev;
qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv & 1;

/******** Mode (VGA/QVGA) and sensor specific regs ********/
switch (sd->sensor) {
Expand Down Expand Up @@ -2168,13 +2188,14 @@ static void sethvflip(struct sd *sd)
static int set_ov_sensor_window(struct sd *sd)
{
struct gspca_dev *gspca_dev;
int qvga;
int qvga, crop;
int hwsbase, hwebase, vwsbase, vwebase, hwscale, vwscale;
int ret, hstart, hstop, vstop, vstart;
__u8 v;

gspca_dev = &sd->gspca_dev;
qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv & 1;
crop = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv & 2;

/* The different sensor ICs handle setting up of window differently.
* IF YOU SET IT WRONG, YOU WILL GET ALL ZERO ISOC DATA FROM OV51x!! */
Expand All @@ -2201,6 +2222,12 @@ static int set_ov_sensor_window(struct sd *sd)
if (sd->sensor == SEN_OV66308AF && qvga)
/* HDG: this fixes U and V getting swapped */
hwsbase++;
if (crop) {
hwsbase += 8;
hwebase += 8;
vwsbase += 11;
vwebase += 11;
}
break;
case SEN_OV7620:
hwsbase = 0x2f; /* From 7620.SET (spec is wrong) */
Expand Down

0 comments on commit 1e3fe6e

Please sign in to comment.