[FFmpeg-devel] [PATCH] Some IWMMXT functions for libavcodec #2

Dmitry Antipov dmantipov
Thu May 15 14:15:28 CEST 2008

Hello again,

here are some more efforts on IWMMXT stuff for libavcodec - all inner
loops are rewritten in assembly and a few more functions added.

The performance measurement is not so simple because:
  1) gprof doesn't provide reliable results for small (20-30 instructions)
  2) the hardware provides the fast, low-overhead clock source (similar
     to x86 TSC), but it may be accessed from the privileged mode (i.e. kernel)
  3) although 2) may be done via oprofile, there is no oprofile support for
     my hardware yet :-(.

So, the only benchmark I'm using for now is the simple 'synthetic' benchmark
which measures 'all C' vs. 'all IWMMXT' stuff with plain gettimeofday() (see
speedrun() functions within; it's 24K, so
not attached here). There are some results from it:

64       8        100   40     2.5
128      16       560   190    2.95
256      32       2120  660    3.21
512      64       6670  1970   3.39
1024     128      19090 5360   3.56

(GCC 3.4.3, '-fomit-frame-pointer -O3', XScale Core3 at 312 MHz and 622 BogoMIPS).

According to these results, I suppose that IWMMXT functions are ~2-3 times faster
in general, but the mileage may vary from function to function - I didn't perform
per-function measurements yet.

It would be nice if someone proposes a real video processing task which loads these
functions heavily.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iwmmxt.patch
Type: text/x-patch
Size: 15876 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080515/f79f760f/attachment.bin>

More information about the ffmpeg-devel mailing list