[FFmpeg-cvslog] r21219 - in trunk/libavcodec: aac.c arm/aac.h

Måns Rullgård mans
Fri Jan 15 22:17:24 CET 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Fri, Jan 15, 2010 at 08:28:10PM +0000, M?ns Rullg?rd wrote:
>> Alex Converse <alex.converse at gmail.com> writes:
>> 
>> > On Thu, Jan 14, 2010 at 9:58 PM, mru <subversion at mplayerhq.hu> wrote:
>> >> Author: mru
>> >> Date: Fri Jan 15 03:58:24 2010
>> >> New Revision: 21219
>> >>
>> >> Log:
>> >> AAC: ARM/NEON asm for VMUL2/4 functions
>> >>
>> >> Added:
>> >> ? trunk/libavcodec/arm/aac.h
>> >> Modified:
>> >> ? trunk/libavcodec/aac.c
>> >>
>> >> Modified: trunk/libavcodec/aac.c
>> >> ==============================================================================
>> >> --- trunk/libavcodec/aac.c ? ? ?Fri Jan 15 01:45:47 2010 ? ? ? ?(r21218)
>> >> +++ trunk/libavcodec/aac.c ? ? ?Fri Jan 15 03:58:24 2010 ? ? ? ?(r21219)
>> >> @@ -93,6 +93,10 @@
>> >> ?#include <math.h>
>> >> ?#include <string.h>
>> >>
>> >> +#if ARCH_ARM
>> >> +# ? include "arm/aac.h"
>> >> +#endif
>> >> +
>> >> ?union float754 {
>> >> ? ? float f;
>> >> ? ? uint32_t i;
>> >> @@ -862,6 +866,7 @@ static void decode_mid_side_stereo(Chann
>> >> ? ? }
>> >> ?}
>> >>
>> >> +#ifndef VMUL2
>> >> ?static inline float *VMUL2(float *dst, const float *v, unsigned idx,
>> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?const float *scale)
>> >> ?{
>> >> @@ -870,7 +875,9 @@ static inline float *VMUL2(float *dst, c
>> >> ? ? *dst++ = v[idx>>4 & 15] * s;
>> >> ? ? return dst;
>> >> ?}
>> >> +#endif
>> 
>> [...]
>> 
>> > I certainly like the speed up associated with these changes but there
>> > has to be a cleaner way of organizing them as not to litter aac.c with
>> > ifdefs.
>> 
>> Like what?
>
> maybe a header that describes in english what the functions do and contains
> ISO C implementations named like VMUL2_C.
> And a seperate header for each arch that contains a full set of these
> implementations using "#define VMUL2 VMUL2_C" where no better is available.
> Also there would then be a ISO C only header that contained a 
> #define VMUL2 VMUL2_C
> for every function.
> That way there would be no ifdefs except for including the right header

That would require creating and maintaining dummy headers for every
arch.  I consider that for more of a burden than looking at 4 simple
ifdefs from time to time.

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



More information about the ffmpeg-cvslog mailing list