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

Reimar Döffinger Reimar.Doeffinger
Mon Apr 20 10:03:17 CEST 2009


On Mon, Apr 20, 2009 at 02:29:09AM -0300, Ramiro Polla wrote:
> > also state[i] * coeffs[i]; i++
> > could be tried
> 
> 8.1% faster than current code, but a bit slower then the
> while(order--) code, which gives 10.8%.
> 
> I also tried putting the while(order--) function direcly in mlpdec.c,
> which gave only 2.7%. The switch code was about the same.

How common is the order == 0 case?
> do {
> } while (--order);

Might well be faster.
Partial unrolling like
> if (order >= 4)
>    4 times...
>   order -= 4;
> }
> switch (order), while (order--) etc...
Might be an option as well.
It will all depend a lot on the value distribution of "order".



More information about the ffmpeg-devel mailing list