diff options
author | Koen Vos <koen.vos@skype.net> | 2011-12-13 14:47:31 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-12-13 14:47:31 -0500 |
commit | bf75c8ec4d0dded188bc7793de6da56c7ff0be1c (patch) | |
tree | c21bb05faf0a203b73e8f8aae90fc63dac27625d /silk/decoder_set_fs.c | |
parent | 6619a736376221f2782cecff55d051c3ecfc2ff7 (diff) | |
download | opus-bf75c8ec4d0dded188bc7793de6da56c7ff0be1c.tar.gz |
SILK fixes following last codec WG meeting
decoder:
- fixed incorrect scaling of filter states for the smallest quantization
step sizes
- NLSF2A now limits the prediction gain of LPC filters
encoder:
- increased damping of LTP coefficients in LTP analysis
- increased white noise fraction in noise shaping LPC analysis
- introduced maximum total prediction gain. Used by Burg's method to
exit early if prediction gain is exceeded. This improves packet
loss robustness and numerical robustness in Burg's method
- Prefiltered signal is now in int32 Q10 domain, from int16 Q0
- Increased max number of iterations in CBR gain control loop from 5 to 6
- Removed useless code from LTP scaling control
- Optimization: smarter LPC loop unrolling
- Switched default win32 compile mode to be floating-point
resampler:
- made resampler have constant delay of 0.75 ms; removed delay
compensation from silk code.
- removed obsolete table entries (~850 Bytes)
- increased downsampling filter order from 16 to 18/24/36 (depending on
frequency ratio)
- reoptimized filter coefficients
Diffstat (limited to 'silk/decoder_set_fs.c')
-rw-r--r-- | silk/decoder_set_fs.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/silk/decoder_set_fs.c b/silk/decoder_set_fs.c index 5579b20e..8c012d35 100644 --- a/silk/decoder_set_fs.c +++ b/silk/decoder_set_fs.c @@ -31,13 +31,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "main.h" -static const int dec_delay_matrix[3][5] = { -/*SILK API 8 12 16 24 48 */ -/* 8 */ {3, 0, 2, 0, 0}, -/*12 */ {0, 8, 5, 7, 5}, -/*16 */ {0, 0, 8, 5, 5} -}; - /* Set decoder sampling rate */ opus_int silk_decoder_set_fs( silk_decoder_state *psDec, /* I/O Decoder state pointer */ @@ -60,13 +53,9 @@ opus_int silk_decoder_set_fs( opus_int16 temp_buf[ MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ ]; silk_resampler_state_struct temp_resampler_state; - /* New delay value */ - psDec->delay = dec_delay_matrix[ rateID( silk_SMULBB( fs_kHz, 1000 ) ) ][ rateID( fs_API_Hz ) ]; - silk_assert( psDec->delay <= MAX_DECODER_DELAY ); - 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 ) ); + 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 ) ); @@ -74,7 +63,7 @@ opus_int silk_decoder_set_fs( } /* 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 ); + 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 ); |