[FFmpeg-devel] [PATCH] WMA Voice decoder

Ronald S. Bultje rsbultje
Fri Jan 22 18:36:02 CET 2010


Hi,

On Fri, Jan 22, 2010 at 12:30 PM, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> On Fri, 2010-01-22 at 11:19 -0500, Ronald S. Bultje wrote:
>> 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.

Good point. Does MULL take care of that automatically if supported?

Ronald



More information about the ffmpeg-devel mailing list