Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Vos <koenvos@users.noreply.github.com>2016-06-01 08:14:32 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-19 23:11:09 +0300
commitf06774c64072e09936e262a1bfbad54b9a15e42f (patch)
tree35b4987df71d511c9ef7a9f612f1b72cc798ab88 /silk/float
parent07691f15d428ce56b4f7ddb4fcf6df2d703cb83f (diff)
more conservative scaling of LTP corrs; remove assert that checks for negative residual energy; discard CB entries leading to such negative energies
Diffstat (limited to 'silk/float')
-rw-r--r--silk/float/find_LTP_FLP.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/silk/float/find_LTP_FLP.c b/silk/float/find_LTP_FLP.c
index 2e1a0fe5..f9706493 100644
--- a/silk/float/find_LTP_FLP.c
+++ b/silk/float/find_LTP_FLP.c
@@ -33,10 +33,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include "tuning_parameters.h"
void silk_find_LTP_FLP(
- silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Weight for LTP quantization */
- silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* O Weight for LTP quantization */
+ silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Weight for LTP quantization */
+ silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* O Weight for LTP quantization */
const silk_float r_ptr[], /* I LPC residual */
- const opus_int lag[ MAX_NB_SUBFR ], /* I LTP lags */
+ const opus_int lag[ MAX_NB_SUBFR ], /* I LTP lags */
const opus_int subfr_length, /* I Subframe length */
const opus_int nb_subfr /* I number of subframes */
)
@@ -52,7 +52,7 @@ void silk_find_LTP_FLP(
lag_ptr = r_ptr - ( lag[ k ] + LTP_ORDER / 2 );
silk_corrMatrix_FLP( lag_ptr, subfr_length, LTP_ORDER, XX_ptr );
silk_corrVector_FLP( lag_ptr, r_ptr, subfr_length, LTP_ORDER, xX_ptr );
- xx = ( silk_float )silk_energy_FLP( r_ptr, subfr_length );
+ xx = ( silk_float )silk_energy_FLP( r_ptr, subfr_length + LTP_ORDER );
temp = 1.0f / silk_max( xx, LTP_CORR_INV_MAX * 0.5f * ( XX_ptr[ 0 ] + XX_ptr[ 24 ] ) + 1.0f );
silk_scale_vector_FLP( XX_ptr, temp, LTP_ORDER * LTP_ORDER );
silk_scale_vector_FLP( xX_ptr, temp, LTP_ORDER );