[FFmpeg-devel] [patch] yadif code dump

James Darnley james.darnley
Fri Dec 3 16:47:07 CET 2010

On 01/12/2010, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Nov 27, 2010 at 09:58:06PM +0100, James Darnley wrote:
>> Subject: [PATCH 4/6] Remove unnecessary shadowed variable in yadif
> This could have performance effects and should be benchmarked

Good point.  I benched it and got the following for a 704 pixel line (luma only)
With the shadowing:
1912237 dezicycles in filter_line, 260884 runs, 1260 skips
1920573 dezicycles in filter_line, 260438 runs, 1706 skips
Per pixel, with:
2811 dezicycles in filter_line, 268356284 runs, 79172 skips
2812 dezicycles in filter_line, 268356237 runs, 79219 skips

What is more worrying is that this function takes twice as long as the
same code in x264.  It's just ~880000 dezicycles.  What have you
people done?  The slowdown looks to start on the second filtered frame
(single-rate) or the third (double-rate).  That is when yadif should
be requesting/using frames 0, 1 and 2.

Something else, is it ffmpeg's fault can't I bob?  I can use mode=1
and yadif filters twice as many frames but ffmpeg says it drops every
other frame.  But that's another topic.

More information about the ffmpeg-devel mailing list