[FFmpeg-devel] [PATCH] WMA Voice decoder

Uoti Urpala uoti.urpala
Fri Jan 22 18:30:57 CET 2010


On Fri, 2010-01-22 at 11:19 -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Fri, Jan 22, 2010 at 11:15 AM, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> > x*49995 / 41 = x*(1219*41 + 16) / 41 = 1219*x + x * 16 / 41
> > In the last form x*16 is at most 1048544.
> 
> In fastdiv form, this'd be 3 muls, an add and a shift. Is that still
> faster than 1 mul + 1 div?

You can premultiply the *16*INV(41) into one table value, so two
multiplications. Also if the processor can directly calculate "upper 32
bits of multiply" then there's no need for an actual shift operation.





More information about the ffmpeg-devel mailing list