[FFmpeg-devel] [PATCH] Altivec vector_fmul_scalar

David Conrad lessen42
Tue Jan 6 17:31:30 CET 2009


On Jan 6, 2009, at 8:19 AM, Guillaume Poirier wrote:

> Hello,
>
> David Conrad wrote:
>> Hi,
>>
>> ~7-9% faster vorbis, aac, and ac3.
> Nice!
>
>>
>> I have no clue why it's not bitexact to the C version; I tried not
>> using the add of madd, and even enabling denormal handling to match
>> the C version. The differences are only a very occasional +/- 1  
>> however.
>
> Actually, the more you use madd, the better the precision since
> intermediate computations are made with a greater precision.
>
> I somehow thought that this code
>
>> +        t0 = vec_madd(s0, wj, vadd_bias);
>> +        t1 = vec_madd(s1, wi, zero);
>> +        t0 = vec_sub(t0, t1);
> could be reduced to 2 instructions using vec_nmsub(), but I guess
> not.... right?

Forgot about vec_nmsub. It works perfectly here.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: altivec-fmul-window.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090106/a084bb48/attachment.txt>
-------------- next part --------------




More information about the ffmpeg-devel mailing list