<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 22, 2014 at 9:00 AM, YIRAN LI <span dir="ltr"><<a href="mailto:mrfun.china@gmail.com" target="_blank">mrfun.china@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:georgia,serif">Hi there,</div><div style="font-family:georgia,serif"><br></div><div style="font-family:georgia,serif">I have some questions for the deprecated  avpicture_deinterlace function in ffmpeg.<br></div><div style="font-family:georgia,serif"><br></div><div style="font-family:georgia,serif">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.<br></div><div style="font-family:georgia,serif"><br></div><div style="font-family:georgia,serif">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. </div><div style="font-family:georgia,serif"><br></div><div style="font-family:georgia,serif">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. </div><div style="font-family:georgia,serif"><br></div><div style="font-family:georgia,serif">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)</div><div style="font-family:georgia,serif"><br></div></div></blockquote><div><br></div><div>Anything in ffmpeg assumes that a frame contains both interlaced fields, and all decoders will always output decoded video like this.</div><div><br></div><div>- Hendrik </div></div></div></div>