Message ID | 1432139980-12619-18-git-send-email-william.towle@codethink.co.uk (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1YvMNb-0002hn-Ua; Thu, 21 May 2015 11:03:03 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-5) with esmtp id 1YvMNa-0000HI-74; Thu, 21 May 2015 11:03:03 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932134AbbEUJC6 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Thu, 21 May 2015 05:02:58 -0400 Received: from 82-70-136-246.dsl.in-addr.zen.co.uk ([82.70.136.246]:56249 "EHLO xk120.dyn.ducie.codethink.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753677AbbEUJCp (ORCPT <rfc822;linux-media@vger.kernel.org>); Thu, 21 May 2015 05:02:45 -0400 Received: from william by xk120.dyn.ducie.codethink.co.uk with local (Exim 4.80) (envelope-from <william.towle@codethink.co.uk>) id 1Yv72I-0004DA-MI; Wed, 20 May 2015 17:40:02 +0100 From: William Towle <william.towle@codethink.co.uk> To: linux-kernel@lists.codethink.co.uk, linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sergei.shtylyov@cogentembedded.com, hverkuil@xs4all.nl, rob.taylor@codethink.co.uk Subject: [PATCH 17/20] media: adv7604: Support V4L_FIELD_INTERLACED Date: Wed, 20 May 2015 17:39:37 +0100 Message-Id: <1432139980-12619-18-git-send-email-william.towle@codethink.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432139980-12619-1-git-send-email-william.towle@codethink.co.uk> References: <1432139980-12619-1-git-send-email-william.towle@codethink.co.uk> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.5.21.85416 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __REFERENCES 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
William Towle
May 20, 2015, 4:39 p.m. UTC
When hardware reports interlaced input, correctly set field to V4L_FIELD_INTERLACED ini adv76xx_fill_format. Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> Reviewed-by: William Towle <william.towle@codethink.co.uk> --- drivers/media/i2c/adv7604.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Comments
On 21/05/15 07:10, Hans Verkuil wrote: > On 05/20/2015 06:39 PM, William Towle wrote: >> When hardware reports interlaced input, correctly set field to >> V4L_FIELD_INTERLACED ini adv76xx_fill_format. >> >> Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> >> Reviewed-by: William Towle <william.towle@codethink.co.uk> >> --- >> drivers/media/i2c/adv7604.c | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c >> index 4bde3e1..d77ee1f 100644 >> --- a/drivers/media/i2c/adv7604.c >> +++ b/drivers/media/i2c/adv7604.c >> @@ -1791,7 +1791,12 @@ static void adv76xx_fill_format(struct adv76xx_state *state, >> >> format->width = state->timings.bt.width; >> format->height = state->timings.bt.height; >> - format->field = V4L2_FIELD_NONE; >> + >> + if (state->timings.bt.interlaced) >> + format->field= V4L2_FIELD_INTERLACED; > > No, this should be FIELD_ALTERNATE. FIELD_INTERLACED means that the two fields > are interlaced into a single frame buffer, with FIELD_ALTERNATE each buffer > contains one field. And when capturing v4l2_buffer should return which field > (TOP/BOTTOM) the buffer contains. It also complicates cropping/composing: the > crop rectangle is in frame coordinates, composing uses field coordinates. > The vivid driver handles this correctly and can be used as a reference. > > OK, that makes sense. I think for now we'll just drop this patch from the series until we can test this properly - its a bit undercooked.. > Also, no space before the '='. Please add. > > You might be interested in this patch series as well: > > http://permalink.gmane.org/gmane.linux.drivers.video-input-infrastructure/90578 Ah yes, this does look useful. > I'm thinking of doing some interlaced tests myself, possibly this weekend, > using the adv7604. That would be great, happy to test anything on our side. Thanks Rob > Regards, > > Hans > >> + else >> + format->field= V4L2_FIELD_NONE; >> + >> format->colorspace = V4L2_COLORSPACE_SRGB; >> >> if (state->timings.bt.flags & V4L2_DV_FL_IS_CE_VIDEO) >> > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 20 May 2015, William Towle wrote: > When hardware reports interlaced input, correctly set field to > V4L_FIELD_INTERLACED ini adv76xx_fill_format. > > Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> > Reviewed-by: William Towle <william.towle@codethink.co.uk> > --- > drivers/media/i2c/adv7604.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c > index 4bde3e1..d77ee1f 100644 > --- a/drivers/media/i2c/adv7604.c > +++ b/drivers/media/i2c/adv7604.c > @@ -1791,7 +1791,12 @@ static void adv76xx_fill_format(struct adv76xx_state *state, > > format->width = state->timings.bt.width; > format->height = state->timings.bt.height; > - format->field = V4L2_FIELD_NONE; > + > + if (state->timings.bt.interlaced) > + format->field= V4L2_FIELD_INTERLACED; > + else > + format->field= V4L2_FIELD_NONE; > + A space before "=" please. Thanks Guennadi > format->colorspace = V4L2_COLORSPACE_SRGB; > > if (state->timings.bt.flags & V4L2_DV_FL_IS_CE_VIDEO) > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 4bde3e1..d77ee1f 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -1791,7 +1791,12 @@ static void adv76xx_fill_format(struct adv76xx_state *state, format->width = state->timings.bt.width; format->height = state->timings.bt.height; - format->field = V4L2_FIELD_NONE; + + if (state->timings.bt.interlaced) + format->field= V4L2_FIELD_INTERLACED; + else + format->field= V4L2_FIELD_NONE; + format->colorspace = V4L2_COLORSPACE_SRGB; if (state->timings.bt.flags & V4L2_DV_FL_IS_CE_VIDEO)