public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Philipp Zabel <pza@pengutronix.de>
Cc: "Krzysztof Hałasa" <khalasa@piap.pl>,
	linux-media@vger.kernel.org, "Tim Harvey" <tharvey@gateworks.com>
Subject: Re: i.MX6 IPU CSI analog video input on Ventana
Date: Sat, 2 Jun 2018 10:33:03 -0700	[thread overview]
Message-ID: <3db739a8-8482-688c-e26d-69095087444a@gmail.com> (raw)
In-Reply-To: <20180531062911.pkl2pracmyvhsldz@pengutronix.de>



On 05/30/2018 11:29 PM, Philipp Zabel wrote:
> On Wed, May 30, 2018 at 01:56:34PM -0700, Steve Longerbeam wrote:
>>
>> On 05/30/2018 11:46 AM, Krzysztof Hałasa wrote:
>>> Steve Longerbeam <slongerbeam@gmail.com> writes:
>>>
>>>>> but it should be possible for the user to explicitly request the field
>>>>> order on CSI output (I can make a patch I guess).
>>>> If you think that is the correct behavior, I will remove the override
>>>> code. I suppose it makes sense to allow user to select field order even
>>>> if that order does not make sense given the input standard. I'm fine
>>>> either way, Philipp what is your opinion? I'll go with the popular vote :)
>>> I think it should be up to the user.
>>> Actually, PAL and NTSC aren't valid names in the digital world. Their
>>> meaning ends in the ADV7180 (or equivalent). I don't know if PAL and/or
>>> NTSC specify the field order in the analog frame (meaningful when
>>> someone hooks a camera with progressive sensor and analog, interlaced
>>> output), but the digital YUV422 from ADV to CSI isn't NTSC/PAL anymore.
>>> It's just WxH @ framerate + possible interlacing, sequential fields,
>>> top-bottom or otherwise, etc. The analog standard names could be used
>>> here but just as defaults.
>>>
>>> If we were strict (and we don't want to force it), then we should set
>>> NTSC/PAL thing on ADV7180 input, 720x480@29.97i (or 720x576@50i, or
>>> 704x... etc) on the input parts of the CSI/IPU (where there are no video
>>> frames yet), and 720x480@29.97i B-T or T-B (or default, or separate
>>> fields - whatever suits the user) on the output from CSI.
>>>
>>> I remember the reversed field order was sometimes needed - for example,
>>> PAL DV (the casette camcorder thing) produced B-T frames (same as NTSC),
>>> and to avoid (slight) additional quality loss one had to process it
>>> (up to e.g. .MP4, DVD, and then to HDMI, SCART etc) as B-T.
>>> It wasn't a problem in otherwise-PAL-centric environment.
>> I tend to agree, I've found conflicting info out there regarding
>> PAL vs. NTSC field order. And I've never liked having to guess
>> at input analog standard based on input # lines. I will go ahead
>> and remove the field order override code.
> Note that the code in ipu_csi_init_interface currently hard-codes field
> order depending on frame size. It could be that selecting opposite field
> order is as easy as switching the relevant parts of writes to registers
> CCIR_CODE_2 and _3, but we'd have to pass the desired output field order
> to this function. I'd welcome if somebody would verify that this works.

As I said in the other thread, I think we should put this off to some
other time, and remove the code in ipu_csi_init_interface() that
inverts field order according to frame size. This way, CSI will not
be lying to userspace when we tell it the order is BT but the CSI
has actually inverted that to TB.

Also I have concerns about the CSI capturing field 1 _before_ field
0 for NTSC. Doesn't that mean the CSI will drop the B-field in the
first captured frame on stream on, and thereafter mix fields from
different adjacent frames?

Steve

  parent reply	other threads:[~2018-06-02 17:33 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  8:19 i.MX6 IPU CSI analog video input on Ventana Krzysztof Hałasa
2018-05-10 16:32 ` Steve Longerbeam
2018-05-11  5:37   ` Krzysztof Hałasa
2018-05-11 17:35     ` Steve Longerbeam
2018-05-18 17:28       ` Krzysztof Hałasa
2018-05-18 17:56         ` Tim Harvey
2018-05-21  5:51           ` Krzysztof Hałasa
2018-05-21  8:09         ` Krzysztof Hałasa
2018-05-21 15:55           ` Tim Harvey
2018-05-21 21:25           ` Steve Longerbeam
2018-05-22 10:48             ` Krzysztof Hałasa
2018-05-24 15:56             ` Krzysztof Hałasa
2018-05-24 18:12               ` Steve Longerbeam
2018-05-24 20:48                 ` Steve Longerbeam
2018-05-24 21:33                   ` Steve Longerbeam
2018-05-25  6:34                     ` Philipp Zabel
2018-05-25  5:21                   ` Krzysztof Hałasa
2018-05-25  6:32                 ` Philipp Zabel
2018-05-25  7:18                   ` Krzysztof Hałasa
2018-05-25 23:39                     ` Steve Longerbeam
2018-05-29  7:26                       ` Krzysztof Hałasa
2018-05-29 14:00                         ` Steve Longerbeam
2018-05-30  8:53                           ` Krzysztof Hałasa
2018-05-30 17:57                             ` Steve Longerbeam
2018-05-30 18:46                               ` Krzysztof Hałasa
2018-05-30 20:56                                 ` Steve Longerbeam
2018-05-31  6:29                                   ` Philipp Zabel
2018-06-01  5:23                                     ` Krzysztof Hałasa
2018-06-02 17:33                                     ` Steve Longerbeam [this message]
2018-06-04  8:38                                       ` Philipp Zabel
2018-06-01 10:02                                   ` Krzysztof Hałasa
2018-06-01 13:13                                     ` Philipp Zabel
2018-06-02 17:45                                       ` Steve Longerbeam
2018-06-04  7:33                                         ` Krzysztof Hałasa
2018-06-04  8:47                                         ` Philipp Zabel
2018-06-04  8:58                                           ` Krzysztof Hałasa
2018-10-17 20:38                                             ` Tim Harvey
     [not found]                                               ` <57dfdc0b-5f04-e10a-2ffd-c7ba561fe7ce@gmail.com>
2018-10-17 23:05                                                 ` Tim Harvey
2018-10-17 23:37                                                   ` Steve Longerbeam
2018-10-18 17:56                                                     ` Tim Harvey
2018-10-19 20:06                                                       ` Steve Longerbeam
2018-10-19  9:45                                                 ` Philipp Zabel
2018-06-04  7:06                                       ` Krzysztof Hałasa
2018-05-25 23:21                   ` Steve Longerbeam
2018-06-01 13:52                     ` Philipp Zabel
2018-05-25  7:07                 ` Krzysztof Hałasa
2018-05-22  9:41           ` Franz Melchior
2018-05-11  6:11 ` Franz Melchior

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=3db739a8-8482-688c-e26d-69095087444a@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=khalasa@piap.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=pza@pengutronix.de \
    --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