diff options
author | Koen Vos <koen.vos@skype.net> | 2011-12-13 23:47:31 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-12-13 23:47:31 +0400 |
commit | bf75c8ec4d0dded188bc7793de6da56c7ff0be1c (patch) | |
tree | c21bb05faf0a203b73e8f8aae90fc63dac27625d /src | |
parent | 6619a736376221f2782cecff55d051c3ecfc2ff7 (diff) |
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 'src')
-rw-r--r-- | src/opus_encoder.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c index a6772f95..54b48d42 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -126,10 +126,6 @@ static const opus_int32 mode_thresholds[2][2] = { { 48000, 24000}, /* stereo */ }; -static const int celt_delay_table[5] = { -/* API 8 12 16 24 48 */ - 10, 16, 21, 27, 55 -}; int opus_encoder_get_size(int channels) { int silkEncSizeBytes, celtEncSizeBytes; @@ -209,11 +205,11 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat st->voice_ratio = -1; st->encoder_buffer = st->Fs/100; - st->delay_compensation = st->Fs/400; - - st->delay_compensation += celt_delay_table[rateID(st->Fs)]; + /* Delay compensation of 4 ms (2.5 ms for SILK's extra look-ahead + + 1.5 ms for SILK resamplers and stereo prediction) */ + st->delay_compensation = st->Fs/250; - st->hybrid_stereo_width_Q14 = 1 << 14; + st->hybrid_stereo_width_Q14 = 1 << 14; st->variable_HP_smth2_Q15 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 ); st->first = 1; st->mode = MODE_HYBRID; |