FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/dec_main.c @ 98:18866c0354ef
libgsmefr/dec_main.c: need to use official shl() function
in order to get correct saturation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 26 Nov 2022 21:31:58 +0000 |
parents | d80e9f12a1d1 |
children |
comparison
equal
deleted
inserted
replaced
97:e5ee684c6d29 | 98:18866c0354ef |
---|---|
5 */ | 5 */ |
6 | 6 |
7 #include "gsm_efr.h" | 7 #include "gsm_efr.h" |
8 #include "typedef.h" | 8 #include "typedef.h" |
9 #include "namespace.h" | 9 #include "namespace.h" |
10 #include "basic_op.h" | |
10 #include "cnst.h" | 11 #include "cnst.h" |
11 #include "codec.h" | 12 #include "codec.h" |
12 #include "sig_proc.h" | 13 #include "sig_proc.h" |
13 #include "memops.h" | 14 #include "memops.h" |
14 #include "dec_state.h" | 15 #include "dec_state.h" |
65 | 66 |
66 for (i = 0; i < L_FRAME; i++) | 67 for (i = 0; i < L_FRAME; i++) |
67 /* Upscale the 15 bit linear PCM to 16 bits, | 68 /* Upscale the 15 bit linear PCM to 16 bits, |
68 then truncate to 13 bits */ | 69 then truncate to 13 bits */ |
69 { | 70 { |
70 temp = synth[i] << 1; | 71 temp = shl (synth[i], 1); |
71 synth[i] = temp & 0xfff8; | 72 synth[i] = temp & 0xfff8; |
72 } | 73 } |
73 } /* else */ | 74 } /* else */ |
74 | 75 |
75 Copy (synth, pcm_out, L_FRAME); | 76 Copy (synth, pcm_out, L_FRAME); |