[Libav-user] Reading field by field of an interlaced video

Hector Alonso halonso at vpod.tv
Mon Jul 2 08:03:36 CEST 2012


Interlaced frames are decoded by libav into the same way a capture card
would do.
I supose, you're not using CRTs anymore, so you can use
"avpicture_deinterlace" (from avcodec) as first approach, the YADIF filter
(wich is included into ffmpeg libraries) or a shader into the GPU (I think
this should be the best option) to do the transformation.

Be aware that avpicture_deinterlace doesn't work with every pixel format! I
use PIX_FMT_YUV422P for using this function.

On Sun, Jul 1, 2012 at 8:23 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Sampath Subasinghe <susiriss at ...> writes:
>
> > > libavcodec does no de-interlacing by default ...
> > >
> > > ... but it usually outputs the two fields of interlaced
> > > video in one frame.
> > >
> > Thanks Carl for the valuable input. So I see that libavcodec does field
> > combination to make up the full frame.
>
> As said, I suspect every conforming decoder (you did not say
> which encoding you used, but I guess that is not only true for
> h264) has to do this.
>
> > In this case, I can separate the two fields by going through the frame
> > and grouping odd lines (each line is 1-pixel thick ?) and even lines
> > separately. Is this assumption correct ?
>
> This should give you rawvideo fields which may be what you want.
>
> Carl Eugen
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120702/65011142/attachment.html>


More information about the Libav-user mailing list