From: Ian Arkver <ian.arkver.dev@gmail.com>
To: Steve Longerbeam <slongerbeam@gmail.com>,
Tim Harvey <tharvey@gateworks.com>,
Fabio Estevam <festevam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
linux-media <linux-media@vger.kernel.org>,
Nicolas Dufresne <nicolas@ndufresne.ca>
Subject: Re: ADV7180 Capture with i.MX53
Date: Tue, 8 Oct 2019 18:20:44 +0100 [thread overview]
Message-ID: <bc7968aa-5719-bc70-09b4-b0cc79f06924@gmail.com> (raw)
In-Reply-To: <8bcd8085-c1a1-0b6c-8470-cf77e5047a7a@gmail.com>
On 08/10/2019 18:14, Steve Longerbeam wrote:
>
>
> On 10/8/19 9:55 AM, Tim Harvey wrote:
>> On Tue, Oct 8, 2019 at 4:21 AM Fabio Estevam <festevam@gmail.com> wrote:
>>> On Mon, Oct 7, 2019 at 10:07 PM Fabio Estevam <festevam@gmail.com>
>>> wrote:
>>>
>>>> So now I need to see if I can get Gstreamer to accept a pipeline like:
>>>>
>>>> gst-lauch-1.0 v4l2src ! kmssink
>>> Ok, so now I decided use the hardware video deinterlacer:
>>>
>>> media-ctl -l "'adv7180 1-0021':0 -> 'ipu1_csi0':0[1]"
>>> media-ctl -l "'ipu1_csi0':1 -> 'ipu1_vdic':0[1]"
>>> media-ctl -l "'ipu1_vdic':2 -> 'ipu1_ic_prp':0[1]"
>>> media-ctl -l "'ipu1_ic_prp':2 -> 'ipu1_ic_prpvf':0[1]"
>>> media-ctl -l "'ipu1_ic_prpvf':1 -> 'ipu1_ic_prpvf capture':0[1]"
>>>
>>> media-ctl -V "'adv7180 1-0021':0 [fmt:UYVY2X8/720x480 field:alternate]"
>>> media-ctl -V "'ipu1_csi0':1 [fmt:AYUV32/720x480]"
>>> media-ctl -V "'ipu1_vdic':2 [fmt:AYUV32/720x480 field:none]"
>>> media-ctl -V "'ipu1_ic_prp':2 [fmt:AYUV32/720x480 field:none]"
>>> media-ctl -V "'ipu1_ic_prpvf':1 [fmt:AYUV32/720x480field:none]"
>>>
>>> And then Gstreamer can be launched:
>>>
>>> # gst-launch-1.0 v4l2src device=/dev/video2 ! kmssink --verbose
>>> Setting pipeline to PAUSED ...
>>> Pipeline is live and does not need PREROLL ...
>>> /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 800
>>> /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 480
>>> Setting pipeline to PLAYING ...
>>> New clock: GstSystemClock
>>> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
>>> video/x-raw, format=(string)YUY2, width=(int)720, height=(int)480,
>>> framerate=(fraction)25/1, colorimetry=(string)bt601,
>>> interlace-mode=(string)progressive
>>> /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps =
>>> video/x-raw, format=(string)YUY2, width=(int)720, height=(int)480,
>>> framerate=(fraction)25/1, colorimetry=(string)bt601,
>>> interlace-mode=(string)progressive
>>>
>> Fabio,
>>
>> Yes, you need to use the vdic to capture from adv7180 with gstreamer
>> as it can't handle alternate.
>>
>>> However the video looks like a broken old TV scrolling the image
>>> horizontally:
>>> https://www.dropbox.com/s/2yef8egn6s8z7ff/mx53_adv7180_capture.mp4?dl=0
>>>
>> This would be because of the initial corrupt frames that this and many
>> other decoders produce while waiting for proper sync. I added
>> 'g_skip_frames' support in 9483a3f8e1b58ba1d7cd21687d8d0a63a015c36b
>> but I'm not sure how to get gstreamer to use it?
>>
>> I still carry around a patch from Steve for imx-csi that drops first
>> few frames from BT656 sources:
>> https://github.com/Gateworks/linux-imx6/commit/959fbd42ee6433f49ef4a04fb1abe8f8c78db5ad
>>
>> to deal with this.
>
> Yes, that's likely the issue, from a look at Fabio's video. The patch
> referenced by Tim hard-codes the number of frames to skip, instead of
> calling the adv7180's g_skip_frames op. I still don't have an answer as
> to how to call the adv7180 from the CSI subdev.
Seems to me initial corrupt frames would produce a fixed offset of some
kind. A rolling video like that looks more like the number of lines
being captured is wrong.
Regards,
Ian.
>
> Steve
>
>
next prev parent reply other threads:[~2019-10-08 17:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 0:15 ADV7180 Capture with i.MX53 Fabio Estevam
2019-10-08 0:37 ` Steve Longerbeam
2019-10-08 0:46 ` Fabio Estevam
2019-10-08 0:51 ` Steve Longerbeam
2019-10-08 1:07 ` Fabio Estevam
2019-10-08 1:40 ` Fabio Estevam
2019-10-08 11:21 ` Fabio Estevam
2019-10-08 16:55 ` Tim Harvey
2019-10-08 17:14 ` Steve Longerbeam
2019-10-08 17:20 ` Ian Arkver [this message]
2019-10-08 17:30 ` Steve Longerbeam
2019-10-08 17:33 ` Ian Arkver
2019-10-08 20:34 ` Fabio Estevam
2019-10-08 21:01 ` Tim Harvey
2019-10-08 23:48 ` Fabio Estevam
2019-10-09 15:40 ` Tim Harvey
2019-10-09 17:22 ` Steve Longerbeam
2019-10-18 22:33 ` Matthew Starr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc7968aa-5719-bc70-09b4-b0cc79f06924@gmail.com \
--to=ian.arkver.dev@gmail.com \
--cc=festevam@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=nicolas@ndufresne.ca \
--cc=p.zabel@pengutronix.de \
--cc=slongerbeam@gmail.com \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox