diff options
Diffstat (limited to 'apps/codecs/libspc/spc_dsp.c')
-rw-r--r-- | apps/codecs/libspc/spc_dsp.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c index 28e05425fb..6350c4c331 100644 --- a/apps/codecs/libspc/spc_dsp.c +++ b/apps/codecs/libspc/spc_dsp.c | |||
@@ -57,25 +57,7 @@ void DSP_write( struct Spc_Dsp* this, int i, int data ) | |||
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
60 | #if ARM_ARCH >= 6 | 60 | #define CLAMP16( n ) clip_sample_16( n ) |
61 | /* if ( n < -32768 ) out = -32768; */ | ||
62 | /* if ( n > 32767 ) out = 32767; */ | ||
63 | #define CLAMP16( n ) \ | ||
64 | ({ \ | ||
65 | asm ("ssat %0, #16, %1" \ | ||
66 | : "=r" ( n ) : "r"( n ) ); \ | ||
67 | n; \ | ||
68 | }) | ||
69 | #else | ||
70 | /* if ( n < -32768 ) out = -32768; */ | ||
71 | /* if ( n > 32767 ) out = 32767; */ | ||
72 | #define CLAMP16( n ) \ | ||
73 | ({ \ | ||
74 | if ( (int16_t) n != n ) \ | ||
75 | n = 0x7FFF ^ (n >> 31); \ | ||
76 | n; \ | ||
77 | }) | ||
78 | #endif | ||
79 | 61 | ||
80 | #if SPC_BRRCACHE | 62 | #if SPC_BRRCACHE |
81 | static void decode_brr( struct Spc_Dsp* this, unsigned start_addr, | 63 | static void decode_brr( struct Spc_Dsp* this, unsigned start_addr, |