Index: sbc.c =================================================================== RCS file: /cvsroot/bluez/utils/sbc/sbc.c,v retrieving revision 1.55 diff -u -p -r1.55 sbc.c --- sbc.c 28 Jan 2008 18:00:51 -0000 1.55 +++ sbc.c 29 Jan 2008 14:42:29 -0000 @@ -708,10 +708,15 @@ static void sbc_encoder_init(struct sbc_ state->position[0] = state->position[1] = 9 * frame->subbands; } - +#ifdef __arm__ +void _sbc_analyze_four(const int16_t *in, int32_t *out) +{ + sbc_extended_t register res asm("r4"); +#else static inline void _sbc_analyze_four(const int16_t *in, int32_t *out) { sbc_extended_t res; +#endif sbc_fixed_t t[8]; sbc_extended_t s[5]; @@ -794,9 +799,15 @@ static inline void sbc_analyze_four(stru state->position[ch] = 36; } +#ifdef __arm__ +void _sbc_analyze_eight(const int16_t *in, int32_t *out) +{ + sbc_extended_t register res asm("r4"); +#else static inline void _sbc_analyze_eight(const int16_t *in, int32_t *out) { sbc_extended_t res; +#endif sbc_fixed_t t[8]; sbc_extended_t s[8]; Index: sbc_math.h =================================================================== RCS file: /cvsroot/bluez/utils/sbc/sbc_math.h,v retrieving revision 1.12 diff -u -p -r1.12 sbc_math.h --- sbc_math.h 28 Jan 2008 18:00:51 -0000 1.12 +++ sbc_math.h 29 Jan 2008 14:42:29 -0000 @@ -66,4 +66,12 @@ typedef long long sbc_extended_t; #define SUB(dst, src) { dst -= src; } #define MUL(dst, a, b) { dst = (sbc_extended_t) (a) * (b); } #define DIV2(dst, src) { dst = ASR(src, 1); } + +#ifdef __arm__ +#define MULA(res, a, b) __asm__( \ + "smlal %Q0, %R0, %2, %3" \ + : "=&r" (res) \ + : "0" (res), "r" (a), "r" (b)); +#else #define MULA(dst, a, b) { dst += (sbc_extended_t) (a) * (b); } +#endif