[FFmpeg-devel] [patch] yadif code dump

Jason Garrett-Glaser jason
Fri Dec 3 16:59:08 CET 2010


On Fri, Dec 3, 2010 at 7:47 AM, James Darnley <james.darnley at gmail.com> wrote:
> 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
> Without:
> 1920573 dezicycles in filter_line, 260438 runs, 1706 skips
> Per pixel, with:
> 2811 dezicycles in filter_line, 268356284 runs, 79172 skips
> Without:
> 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.

Keep in mind that ffmpeg's START/STOP_TIMER macros do not by default
subtract the timing overhead, which will make small times incomparable
to bench.h.

Jason



More information about the ffmpeg-devel mailing list