[Libav-user] using avpicture_deinterlace

YIRAN LI mrfun.china at gmail.com
Mon Sep 22 09:00:46 CEST 2014


Hi there,

I have some questions for the deprecated  avpicture_deinterlace function in
ffmpeg.

Our program is using avpicture_deinterlace to deinterlace frames. For every
video packet, avcodec_decode_video2 is called to get a complete frame, and
if it's interlaced_frame field is true, we can avpicture_deinterlace to
deinterlace it.

I'm not very familiar with frame interlacing/deinterlacing. But I double
will it be possible that even for an interlaced streams, some frames read
out are not interlaced and some others are. And for those interlaced
frames, they may contain first field only, second field only or both
fields.

I mean avpicture_deinterlace is simple, it just reads an interlaced frame
and outputs a deinterlaced one. I checked the code, seems its
implementation doesn't handle those different cases I mentioned.

So does avpicture_deinterlace always assume that input frame for example
always contains 2 fields and avcodec_decode_video2 internally guarantees it
(so that every frame decoded always contains 2 fields)

Thanks for any information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140922/ed85910f/attachment.html>


More information about the Libav-user mailing list