[FFmpeg-cvslog] r14897 - trunk/libavcodec/acelp_filters.c

Måns Rullgård mans
Fri Aug 22 15:13:23 CEST 2008


Michael Niedermayer wrote:
> On Fri, Aug 22, 2008 at 12:42:04AM +0100, M?ns Rullg?rd wrote:
>> michael <subversion at mplayerhq.hu> writes:
>>
>> > Author: michael
>> > Date: Fri Aug 22 01:25:41 2008
>> > New Revision: 14897
>> >
>> > Log:
>> > Remove mathops.h dependancy.
>>
>> The purpose of mathops.h is to allow CPU-specific instructions to be
>> used for common operations.  Not using it when possible is similar to
>> not using dsputil.  Is there a specific reason the optimised macros
>> are unsuitable in this file?
>
> Several points
>   the first line can be simplified to
>   tmp = (hpf_f[0]* 3959LL)>>11;
>   but the shift is fixed per file when mathops.h is used

We could easily add a shift argument to the macro.

>   vladimirs comments indicated that the hpf variables need 26 bits
>   in which case the code can be simplified to
>   tmp  = ( 31*hpf_f[0] + ((hpf_f[0]*-9)>>7))>>4
>   tmp += (-15*hpf_f[1] + ((hpf_f[1]*13)>>9))>>4;
>   which avoids the 64bit ops ...

Is it faster though?  It still has multiplications.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list