Index: apps/codecs/wmapro.c =================================================================== --- apps/codecs/wmapro.c (revision 27630) +++ apps/codecs/wmapro.c (working copy) @@ -44,7 +44,7 @@ int size; /* Size of the input frame to the decoder */ /* Generic codec initialisation */ - ci->configure(DSP_SET_SAMPLE_DEPTH, WMAPRO_FRACT); + ci->configure(DSP_SET_SAMPLE_DEPTH, WMAPRO_FRACT+8); next_track: Index: apps/codecs/libwmapro/wmaprodec.c =================================================================== --- apps/codecs/libwmapro/wmaprodec.c (revision 27644) +++ apps/codecs/libwmapro/wmaprodec.c (working copy) @@ -126,6 +126,7 @@ /* Define some multiple used constants */ #define SQRT2_FRACT24 0x016A09E6 /* 0x016A09E6 = (sqrt(2)*(1<<24)) */ +#define SQRT2_FRACT16 (SQRT2_FRACT24>>8) #define COS_PI4_FRACT16 0x0000B505 /* 0x0000B505 = (cos(pi/4)<<16) */ #define ONE_FRACT16 0x00010000 /* 0x00010000 = (1<<16) */ @@ -1051,10 +1052,10 @@ int len = FFMIN(sfb[1], s->subframe_len) - sfb[0]; vector_fixmul_scalar(ch_data[0] + sfb[0], ch_data[0] + sfb[0], - SQRT2_FRACT24, len); + SQRT2_FRACT16, len); vector_fixmul_scalar(ch_data[1] + sfb[0], ch_data[1] + sfb[0], - SQRT2_FRACT24, len); + SQRT2_FRACT16, len); } } Index: apps/codecs/libwmapro/wmapro_math.h =================================================================== --- apps/codecs/libwmapro/wmapro_math.h (revision 27630) +++ apps/codecs/libwmapro/wmapro_math.h (working copy) @@ -223,17 +223,17 @@ asm volatile ( \ "ldmia %[src]!, {r1-r4} \n\t" \ "smull r0, r5, r1, %[mul] \n\t" \ - "mov r0, r0, lsr #24 \n\t" \ - "orr r0, r0, r5, lsl #8 \n\t" \ + "mov r0, r0, lsr #16 \n\t" \ + "orr r0, r0, r5, lsl #16\n\t" \ "smull r1, r5, r2, %[mul] \n\t" \ - "mov r1, r1, lsr #24 \n\t" \ - "orr r1, r1, r5, lsl #8 \n\t" \ + "mov r1, r1, lsr #16 \n\t" \ + "orr r1, r1, r5, lsl #16\n\t" \ "smull r2, r5, r3, %[mul] \n\t" \ - "mov r2, r2, lsr #24 \n\t" \ - "orr r2, r2, r5, lsl #8 \n\t" \ + "mov r2, r2, lsr #16 \n\t" \ + "orr r2, r2, r5, lsl #16\n\t" \ "smull r3, r5, r4, %[mul] \n\t" \ - "mov r3, r3, lsr #24 \n\t" \ - "orr r3, r3, r5, lsl #8 \n\t" \ + "mov r3, r3, lsr #16 \n\t" \ + "orr r3, r3, r5, lsl #16\n\t" \ "stmia %[dst]!, {r0-r3} \n" \ : [dst]"+r"(dst), [src]"+r"(src) \ : [mul]"r"(mul) \ @@ -272,10 +272,10 @@ : "d0", "d1", "d2", "d3", "memory", "cc"); #else #define VECT_MUL_SCALAR_KERNEL(dst, src, mul) \ - dst[i ] = fixmul24(src[i ], mul); \ - dst[i+1] = fixmul24(src[i+1], mul); \ - dst[i+2] = fixmul24(src[i+2], mul); \ - dst[i+3] = fixmul24(src[i+3], mul); + dst[i ] = fixmul16(src[i ], mul); \ + dst[i+1] = fixmul16(src[i+1], mul); \ + dst[i+2] = fixmul16(src[i+2], mul); \ + dst[i+3] = fixmul16(src[i+3], mul); #endif /* CPU_ARM, CPU_COLDFIRE */ static inline void vector_fixmul_scalar(int32_t *dst, const int32_t *src,