diff options
Diffstat (limited to 'apps/codecs/libmusepack/synth_filter.c')
-rw-r--r-- | apps/codecs/libmusepack/synth_filter.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c index 9a79328106..94c57eb213 100644 --- a/apps/codecs/libmusepack/synth_filter.c +++ b/apps/codecs/libmusepack/synth_filter.c | |||
@@ -46,10 +46,16 @@ | |||
46 | 46 | ||
47 | #if defined(MPC_FIXED_POINT) | 47 | #if defined(MPC_FIXED_POINT) |
48 | #if defined(CPU_ARM) | 48 | #if defined(CPU_ARM) |
49 | // do not up-scale D-values to achieve higher speed in smull/mlal | 49 | #if ARM_ARCH >= 6 |
50 | // operations. saves ~14/8 = 1.75 cycles per multiplication | 50 | // on ARMv6 we use 32*32=64>>32 multiplies (smmul/smmla) so we need to scale up the D coefficients |
51 | #define D(value) (value) | 51 | // the ARM11 multiplier doesn't have early termination so the magnitude of the multiplicands does not |
52 | 52 | // matter for speed. | |
53 | #define D(value) (value << (14)) | ||
54 | #else | ||
55 | // do not up-scale D-values to achieve higher speed in smull/mlal | ||
56 | // operations. saves ~14/8 = 1.75 cycles per multiplication | ||
57 | #define D(value) (value) | ||
58 | #endif | ||
53 | // in this configuration a post-shift by >>16 is needed after synthesis | 59 | // in this configuration a post-shift by >>16 is needed after synthesis |
54 | #else | 60 | #else |
55 | // saturate to +/- 2^31 (= value << (31-17)), D-values are +/- 2^17 | 61 | // saturate to +/- 2^31 (= value << (31-17)), D-values are +/- 2^17 |