From patchwork Tue Jul 9 14:25:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Neuhaus X-Patchwork-Id: 19192 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UwYsr-00013M-1c; Tue, 09 Jul 2013 16:27:13 +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.72/mailfrontend-5) with esmtp id 1UwYso-0005Js-8B; Tue, 09 Jul 2013 16:27:12 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753985Ab3GIO0s (ORCPT + 1 other); Tue, 9 Jul 2013 10:26:48 -0400 Received: from co9ehsobe004.messaging.microsoft.com ([207.46.163.27]:10921 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955Ab3GIO0H convert rfc822-to-8bit (ORCPT ); Tue, 9 Jul 2013 10:26:07 -0400 Received: from mail154-co9-R.bigfish.com (10.236.132.244) by CO9EHSOBE012.bigfish.com (10.236.130.75) with Microsoft SMTP Server id 14.1.225.22; Tue, 9 Jul 2013 14:26:05 +0000 Received: from mail154-co9 (localhost [127.0.0.1]) by mail154-co9-R.bigfish.com (Postfix) with ESMTP id BA80C42029A; Tue, 9 Jul 2013 14:26:05 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.250.181; KIP:(null); UIP:(null); IPV:NLI; H:AMSPRD0711HT004.eurprd07.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: -1 X-BigFish: PS-1(zz936eIzz1f42h1ee6h1de0h1d18h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzzz2dh2a8h668h839h947hd25hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh1155h) Received: from mail154-co9 (localhost.localdomain [127.0.0.1]) by mail154-co9 (MessageSwitch) id 1373379963690334_14221; Tue, 9 Jul 2013 14:26:03 +0000 (UTC) Received: from CO9EHSMHS032.bigfish.com (unknown [10.236.132.238]) by mail154-co9.bigfish.com (Postfix) with ESMTP id A4EAA2C005F; Tue, 9 Jul 2013 14:26:03 +0000 (UTC) Received: from AMSPRD0711HT004.eurprd07.prod.outlook.com (157.56.250.181) by CO9EHSMHS032.bigfish.com (10.236.130.42) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 9 Jul 2013 14:26:02 +0000 Received: from AMSPRD0711MB532.eurprd07.prod.outlook.com ([169.254.4.80]) by AMSPRD0711HT004.eurprd07.prod.outlook.com ([10.242.14.165]) with mapi id 14.16.0329.000; Tue, 9 Jul 2013 14:25:48 +0000 From: Florian Neuhaus To: Laurent Pinchart CC: "linux-media@vger.kernel.org" Subject: omap_vout: rotation issue on the first start Thread-Topic: omap_vout: rotation issue on the first start Thread-Index: Ac58rgJ/YFJwVr1ARCWj30C70p2XRA== Date: Tue, 9 Jul 2013 14:25:48 +0000 Message-ID: <6EE9CD707FBED24483D4CB0162E8546745F4BAAA@AMSPRD0711MB532.eurprd07.prod.outlook.com> Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [188.61.151.119] MIME-Version: 1.0 X-OriginatorOrg: reberinformatik.ch Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.7.9.141823 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' RCVD_FROM_IP_DATE 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, WEBMAIL_XOIP 0, WEBMAIL_X_IP_HDR 0, __ANY_URI 0, __C230066_P2 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOIP 0, __HAS_X_MAILING_LIST 0, __IMS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' Hi Laurent, Sorry to insist on this, but for you it's probably peanuts to see a possible error. Any hints/workarounds are welcome... From the mail with subject AW: AW: mt9p031 shows purple coloured capture Florian Neuhaus wrote onĀ 2013-06-24: >> Have you tested the unmodified omap3-is-live ? > I did today and indeed, with the unmodified app there is no green taint on > the first start. I have now tracked down the issue to my implemented > rotation on the video-out: > It would be very nice if you could test the above patch with one of your omap-devices. > I do a rotation by 90 or 270 degrees. So there seems to be an issue with the > vrfb-rotation in omap_vout? > I am already rotating the omapfb - is this a problem? > omapfb.rotate=1 omapfb.vrfb=y > Another possibility to rotate the captured stream? I noticed, that it happens only with 90 or 270 degree rotation and not with 0 and 180 degree. Also only on the first start of the stream. All following streamings are correct. I have a 480x800 Portrait display. I try to rotate the output to 800x480 landscape. Regards, Florian --- 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/videoout.c b/videoout.c index 51bed8b..6fd8a16 100644 --- a/videoout.c +++ b/videoout.c @@ -60,6 +60,7 @@ struct videoout *vo_init(const char *devname, struct v4l2_format fmt; struct videoout *vo; int ret; + int rotation = 90; /* rotate for testing purposes */ /* Allocate the video output object. */ vo = malloc(sizeof *vo); @@ -76,6 +77,14 @@ struct videoout *vo_init(const char *devname, goto error; } + /* setup the rotation here, we have to do it BEFORE + * setting the format. */ + ret = v4l2_set_control(vo->dev, V4L2_CID_ROTATE, &rotation); + if (ret < 0){ + perror("Failed to setup rotation\n"); + goto error; + } + pixfmt.pixelformat = format->pixelformat; pixfmt.width = format->width; pixfmt.height = format->height;