[FFmpeg-devel] [RFC/PATCH] Add mode to enable disable deinterlacing based on input interlaced flag to yadif

elupus elupus at ecce.se
Wed Jun 29 00:03:03 CEST 2011

On Tue, 28 Jun 2011 22:45:07 +0200, Michael Niedermayer wrote:

> On Tue, Jun 28, 2011 at 09:04:57PM +0200, elupus wrote:
>> [6 quoted lines suppressed]
> Content-Description: Attached file: 0001-Add-mode-to-enable-disable-based-on-input-interlaced.patch
>> [25 quoted lines suppressed]
> why dont you just use parity=-1 ?

That could probably be used I suppose. Seem logical that if there is
no interlace flag, top_field_first will be invalid anyway. If you
prefer that feels like an okey change. 

>> [58 quoted lines suppressed]
> This doesnt look entirely correct.
> consider that every second frame is interlaced. these frames should
> be deinterlaced using the non interlaced frames as prev/next

I couldn't decide if that was the best approach, but it probably is.
The point was to release early to avoid holding on to buffers. But
it should be enough to just release prev and do a ref copy on

>> [26 quoted lines suppressed]
> please elaborate on why this change is needed

Due to the releas and nulling of cur above. If not
then this hunk is not needed.

>> [6 quoted lines suppressed]
> please elaborate on why this change is needed
> [...]

Otherwise poll would return 2. But can probably be written like:
if(yadif->next && !yadif->next->video->interlaced && yadif->parity == -1)

to avoid the skip variable. It's probably more correct too. Since poll is
run before start_frame() has set skip.


More information about the ffmpeg-devel mailing list