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

Michael Niedermayer michaelni
Fri Jan 15 22:00:25 CET 2010


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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100115/91d8aa62/attachment-0001.pgp>



More information about the ffmpeg-cvslog mailing list