All of lore.kernel.org
 help / color / mirror / Atom feed
* video capture driver interlacing question (easycap)
@ 2012-04-26 20:33 Ezequiel García
  2012-04-28 13:51 ` Ezequiel García
  0 siblings, 1 reply; 4+ messages in thread
From: Ezequiel García @ 2012-04-26 20:33 UTC (permalink / raw)
  To: linux-media

Hi everyone,

As you may know I'm re-writing from scratch the staging/easycap driver.

Finally, after digging through the labyrinthic staging/easycap code,
I've reached a point where I'm able to understand isoc packets.
Despite not having any documentation (I asked several times) from chip vendor,
I can separate packets in odd and even.

So, instead of receiving frames the device is sending me fields, right?

My doubt now is this:
* Do I have to *merge* this pair of fields for each frame, or can I
give it to v4l?
If affirmative: how should I *merge* them?
* Is this related to multiplanar buffers (should I use vb2_plane_addr)?

Currently, staging/easycap does some strange and complex conversion,
from the pair of fields buffers, to get a "frame" buffer (!) but I'm
not sure if it's the correct way to do it?

I guess I can keep staring at em28xx (together with vivi/uvc/pwc) driver,
but if someone cares to give me a small hint or point me at a small portion
of code I'll be grateful.

Thanks,
Ezequiel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: video capture driver interlacing question (easycap)
  2012-04-26 20:33 video capture driver interlacing question (easycap) Ezequiel García
@ 2012-04-28 13:51 ` Ezequiel García
  2012-04-28 21:37   ` Guennadi Liakhovetski
  0 siblings, 1 reply; 4+ messages in thread
From: Ezequiel García @ 2012-04-28 13:51 UTC (permalink / raw)
  To: linux-media

On Thu, Apr 26, 2012 at 5:33 PM, Ezequiel García <elezegarcia@gmail.com> wrote:
> Hi everyone,
>
> As you may know I'm re-writing from scratch the staging/easycap driver.
>
> Finally, after digging through the labyrinthic staging/easycap code,
> I've reached a point where I'm able to understand isoc packets.
> Despite not having any documentation (I asked several times) from chip vendor,
> I can separate packets in odd and even.
>
> So, instead of receiving frames the device is sending me fields, right?
>
> My doubt now is this:
> * Do I have to *merge* this pair of fields for each frame, or can I
> give it to v4l?
> If affirmative: how should I *merge* them?
> * Is this related to multiplanar buffers (should I use vb2_plane_addr)?
>
> Currently, staging/easycap does some strange and complex conversion,
> from the pair of fields buffers, to get a "frame" buffer (!) but I'm
> not sure if it's the correct way to do it?
>
> I guess I can keep staring at em28xx (together with vivi/uvc/pwc) driver,
> but if someone cares to give me a small hint or point me at a small portion
> of code I'll be grateful.
>
> Thanks,
> Ezequiel.

Anyone?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: video capture driver interlacing question (easycap)
  2012-04-28 13:51 ` Ezequiel García
@ 2012-04-28 21:37   ` Guennadi Liakhovetski
  2012-04-29 21:04     ` Ezequiel García
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-28 21:37 UTC (permalink / raw)
  To: Ezequiel García; +Cc: linux-media

Hi Ezequiel

On Sat, 28 Apr 2012, Ezequiel García wrote:

> On Thu, Apr 26, 2012 at 5:33 PM, Ezequiel García <elezegarcia@gmail.com> wrote:
> > Hi everyone,
> >
> > As you may know I'm re-writing from scratch the staging/easycap driver.
> >
> > Finally, after digging through the labyrinthic staging/easycap code,
> > I've reached a point where I'm able to understand isoc packets.
> > Despite not having any documentation (I asked several times) from chip vendor,
> > I can separate packets in odd and even.
> >
> > So, instead of receiving frames the device is sending me fields, right?
> >
> > My doubt now is this:
> > * Do I have to *merge* this pair of fields for each frame, or can I
> > give it to v4l?
> > If affirmative: how should I *merge* them?
> > * Is this related to multiplanar buffers (should I use vb2_plane_addr)?
> >
> > Currently, staging/easycap does some strange and complex conversion,
> > from the pair of fields buffers, to get a "frame" buffer (!) but I'm
> > not sure if it's the correct way to do it?
> >
> > I guess I can keep staring at em28xx (together with vivi/uvc/pwc) driver,
> > but if someone cares to give me a small hint or point me at a small portion
> > of code I'll be grateful.
> >
> > Thanks,
> > Ezequiel.
> 
> Anyone?

This might help:

http://linuxtv.org/downloads/v4l-dvb-apis/field-order.html

i.e., no, you should not merge fields in the driver, IIRC, you just hand 
them over to the user in separate buffers.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: video capture driver interlacing question (easycap)
  2012-04-28 21:37   ` Guennadi Liakhovetski
@ 2012-04-29 21:04     ` Ezequiel García
  0 siblings, 0 replies; 4+ messages in thread
From: Ezequiel García @ 2012-04-29 21:04 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-media

Hi,

>
> i.e., no, you should not merge fields in the driver, IIRC, you just hand
> them over to the user in separate buffers.
>

Thanks a lot for your answer. However, in that case I'm a little
confused by the fact that em28xx driver merges both fields by copying
one line from each into a buffer before handing it back to user.

I'd love if someone could clarify this issue.

Thanks a lot again,
Ezequiel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-29 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 20:33 video capture driver interlacing question (easycap) Ezequiel García
2012-04-28 13:51 ` Ezequiel García
2012-04-28 21:37   ` Guennadi Liakhovetski
2012-04-29 21:04     ` Ezequiel García

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.