From 47f33e81d2edcc0831401db7170606b1ba9390f3 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 28 Feb 2009 14:51:47 -0300 Subject: [PATCH] --- yaml --- r: 138070 b: refs/heads/master c: 72401b7a37c6f0132ea2d0c3236ec706a9e5759e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx18/cx18-av-core.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2f978b1a8ee4..d049efc451e1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 098003d8e21c490c104b543918dea12b7608a173 +refs/heads/master: 72401b7a37c6f0132ea2d0c3236ec706a9e5759e diff --git a/trunk/drivers/media/video/cx18/cx18-av-core.c b/trunk/drivers/media/video/cx18/cx18-av-core.c index cf256a999bd4..aeeb3cfa3390 100644 --- a/trunk/drivers/media/video/cx18/cx18-av-core.c +++ b/trunk/drivers/media/video/cx18/cx18-av-core.c @@ -867,8 +867,22 @@ static int cx18_av_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) Hsrc = (cx18_av_read(cx, 0x472) & 0x3f) << 4; Hsrc |= (cx18_av_read(cx, 0x471) & 0xf0) >> 4; - Vlines = pix->height + (is_50Hz ? 4 : 7); + /* + * This adjustment reflects the excess of vactive, set in + * cx18_av_std_setup(), above standard values: + * + * 480 + 1 for 60 Hz systems + * 576 + 4 for 50 Hz systems + */ + Vlines = pix->height + (is_50Hz ? 4 : 1); + /* + * Invalid height and width scaling requests are: + * 1. width less than 1/16 of the source width + * 2. width greater than the source width + * 3. height less than 1/8 of the source height + * 4. height greater than the source height + */ if ((pix->width * 16 < Hsrc) || (Hsrc < pix->width) || (Vlines * 8 < Vsrc) || (Vsrc < Vlines)) { CX18_ERR_DEV(sd, "%dx%d is not a valid size!\n",