summaryrefslogtreecommitdiff
path: root/silk/decoder_set_fs.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-02-17 16:09:21 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-02-17 16:18:08 -0500
commit17c5966045b463fde45418000b03c95eb5cd7e09 (patch)
tree531ef169caf43a0421cf785f9e0e173e8fcbb4a0 /silk/decoder_set_fs.c
parentc4ff3a0423060761d4587fef214fa231d252ed90 (diff)
downloadopus-17c5966045b463fde45418000b03c95eb5cd7e09.tar.gz
Last updates for draft -11v0.9.9
- Draft updates - Updated code to produce and check test vectors - Making sure that the test vectors pass at all rates as well as for mono and stereo
Diffstat (limited to 'silk/decoder_set_fs.c')
-rw-r--r--silk/decoder_set_fs.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/silk/decoder_set_fs.c b/silk/decoder_set_fs.c
index e0a343f8..c0bf352b 100644
--- a/silk/decoder_set_fs.c
+++ b/silk/decoder_set_fs.c
@@ -49,25 +49,9 @@ opus_int silk_decoder_set_fs(
/* Initialize resampler when switching internal or external sampling frequency */
if( psDec->fs_kHz != fs_kHz || psDec->fs_API_hz != fs_API_Hz ) {
- /* Allocate worst case space for temporary upsampling, 8 to 48 kHz, so a factor 6 */
- opus_int16 temp_buf[ MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ ];
- silk_resampler_state_struct temp_resampler_state;
-
- if( psDec->fs_kHz != fs_kHz && psDec->fs_kHz > 0 ) {
- /* Initialize resampler for temporary resampling of outBuf data to the new internal sampling rate */
- ret += silk_resampler_init( &temp_resampler_state, silk_SMULBB( psDec->fs_kHz, 1000 ), silk_SMULBB( fs_kHz, 1000 ), 0 );
-
- /* Temporary resampling of outBuf data to the new internal sampling rate */
- silk_memcpy( temp_buf, psDec->outBuf, psDec->frame_length * sizeof( opus_int16 ) );
- ret += silk_resampler( &temp_resampler_state, psDec->outBuf, temp_buf, psDec->frame_length );
- }
-
/* Initialize the resampler for dec_API.c preparing resampling from fs_kHz to API_fs_Hz */
ret += silk_resampler_init( &psDec->resampler_state, silk_SMULBB( fs_kHz, 1000 ), fs_API_Hz, 0 );
- /* Correct resampler state by resampling buffered data from fs_kHz to API_fs_Hz */
- ret += silk_resampler( &psDec->resampler_state, temp_buf, psDec->outBuf, frame_length );
-
psDec->fs_API_hz = fs_API_Hz;
}