Linux Media Controller development
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] Add interlace support to sh_mobile_ceu_camera.c
Date: Tue, 13 Jul 2010 16:35:14 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1007131622010.26727@axis700.grange> (raw)
In-Reply-To: <w3pd3uskwpw.wl%kuninori.morimoto.gx@renesas.com>

On Tue, 13 Jul 2010, Kuninori Morimoto wrote:

> 
> Dear Guennadi
> 
> > I've got a question to you, regarding your interlaced support 
> > implementation for the CEU: do I understand it right, that the kind of 
> > support you actually have implemented is, that if an interlaced format is 
> > now requested from the CEU, it will interpret incoming data as interlaced 
> > and deinterlace it internally? 
> 
> It is correct excluding "interlaced format is now requested from the CEU". 
> Now, the device which request interlace format is video device.
> If you use Ecovec, it is tw9910.

That's one part of the equation, yes.

> > If this is really the case, then, I think, 
> > it is a wrong way to implement this functionality. If a user requests 
> > interlaced data, it means, (s)he wants it interlaced in memory. Whereas 
> > deinterlacing should happen transparently - if the user requested 
> > progressive data and your source provides interlaced, you can decide to 
> > deinterlace it internally. Or am I misunderstanding your implementation?
> 
> Hmm...
> Now only "CEU + tw9910" pair use interlace mode in CEU.
> But it doesn't support interlace mode from "user space".
> (I don't know how to request it from user space)

The S_FMT ioctl() has a field "fmt.pix.field," which carries exactly this 
information. So, by executing this ioctl() with different field values you 
request progressive or one of interlaced formats. And returning 
"interlaced," when you actually supply progressive data to the user is not 
a good idea, and this is what's currently happening, I think. It's just 
our luck, that mplayer (and gstreamer?) ignore returned field value. But 
we'll have to fix this in sh_mobile_ceu_camera.

> Now interlace mode is used internally.
> This mean, it seems as "progressive mode" from user space.

Exactly, we return progressive data, but give "interlaced" back in reply 
to S_FMT. Or at least we do not differentiate between "user field setting" 
and "driver field setting," which we really should.

> > Regardless of theoretical correctness - does your patch still work? Have 
> > you been able back then to get CEU to deinterlace data, and when have you 
> > last tested it?
> 
> I tested CEU interlace mode by using Ecovec board.
> I can watch correct video image on at least v2.6.34.
> 
> I used this command.
> 
> VIDIX="-vo fbdev:vidix:sh_veu"
> SIZE="-tv width=1280:height=720"
> NTSC="-tv norm=NTSC"
> OUT="tv:// -tv outfmt=nv12"
> DEVICE="-tv device=/dev/video0"
> mplayer ${VIDIX} ${SIZE} ${NTSC} ${OUT} ${DEVICE}

Well, I think, 720p is a little too optimistic for tw9910;) tw9910 works 
on migor for me, but not on ecovec, although the chip can be detected. Are 
there any modifications necessary to the kernel or to the board to get it 
to work? Maybe a jumper or something? I plug in a video signal source in 
the "video in" connector, next to the "viceo out" one, using the same 
cable, so, cabling should work too. But I'm only getting select timeouts 
and no interrupts on the CEU.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2010-07-13 14:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11  0:02 [PATCH] Add interlace support to sh_mobile_ceu_camera.c Kuninori Morimoto
2008-12-12  7:17 ` morimoto.kuninori
2010-07-12  7:08 ` Guennadi Liakhovetski
2010-07-13  1:16   ` Kuninori Morimoto
2010-07-13 14:35     ` Guennadi Liakhovetski [this message]
2010-07-14  0:12       ` Kuninori Morimoto
2010-07-14  2:35         ` hermann pitton
2010-07-14  5:18           ` Kuninori Morimoto
2010-07-15  2:48             ` hermann pitton
2010-07-15  5:37               ` Kuninori Morimoto
2010-07-16  3:25                 ` hermann pitton
  -- strict thread matches above, loose matches on Subject: below --
2008-12-16  1:41 Kuninori Morimoto
2008-12-16  2:04 ` morimoto.kuninori

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=Pine.LNX.4.64.1007131622010.26727@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-media@vger.kernel.org \
    /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