[FFmpeg-devel] [PATCH] Move MLP's dot product to DSPContext

Ramiro Polla ramiro.polla
Mon Apr 20 03:10:05 CEST 2009


Hi,

Attached file move MLP's dot product to DSPContext. The filter order
is a maximum of 8, and in the rematrix stage it's a maximum of 5+2
channels for MLP and 7+0 channels for TrueHD, so it all fits in 8
(hopefully) optimized functions.

The patch allows gcc to be creative and optimize the function once for
each order.

On a core2 the speeds for decoding 7.1.thd are:
current  : ~3700 ms
optimized: ~3300 ms
speedup ~10.8%

Unfortunately, we all know that letting gcc be creative is not a good
idea. If it tries to vectorize the code (as it does by default on
x86_64), we get (tested on a q6600):
current   : ~2070 ms
vectorized: ~2600 ms
slowdown ~25.6

But with -fno-tree-vectorize, we get:
optimized : ~1920 ms
speedup ~7.2

I've filed a bug report at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39821

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlpdsp.c
Type: text/x-csrc
Size: 1843 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090419/05e2a6dd/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlpdsp_2.diff
Type: text/x-patch
Size: 7013 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090419/05e2a6dd/attachment.bin>



More information about the ffmpeg-devel mailing list