summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Vos <koenvos@users.noreply.github.com>2016-02-21 16:21:03 +0800
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-03 19:15:52 -0400
commite7a53f74d52d78b9bc9c2b7f2c2efc1a1f6fafda (patch)
treeef828183158df070ad527819a2fb99af58ad54ff
parent8668661ebf996a9242d63dad456bde2f38ddd474 (diff)
downloadopus-e7a53f74d52d78b9bc9c2b7f2c2efc1a1f6fafda.tar.gz
Clean up: replace tabs by spaces
-rw-r--r--silk/A2NLSF.c2
-rw-r--r--silk/LPC_fit.c6
-rw-r--r--silk/LPC_inv_pred_gain.c2
-rw-r--r--silk/NSQ.c4
-rw-r--r--silk/NSQ_del_dec.c2
-rw-r--r--silk/SigProc_FIX.h2
-rw-r--r--silk/VQ_WMat_EC.c62
-rw-r--r--silk/fixed/corrMatrix_FIX.c12
-rw-r--r--silk/fixed/find_LTP_FIX.c78
-rw-r--r--silk/fixed/find_pred_coefs_FIX.c2
-rw-r--r--silk/fixed/main_FIX.h8
-rw-r--r--silk/fixed/pitch_analysis_core_FIX.c18
-rw-r--r--silk/fixed/structs_FIX.h2
-rw-r--r--silk/float/energy_FLP.c2
-rw-r--r--silk/float/find_LTP_FLP.c2
-rw-r--r--silk/float/find_pred_coefs_FLP.c4
-rw-r--r--silk/float/k2a_FLP.c8
-rw-r--r--silk/float/main_FLP.h14
-rw-r--r--silk/float/noise_shape_analysis_FLP.c2
-rw-r--r--silk/float/wrappers_FLP.c14
-rw-r--r--silk/main.h20
-rw-r--r--silk/quant_LTP_gains.c28
-rw-r--r--silk/sum_sqr_shift.c2
-rw-r--r--silk/tuning_parameters.h2
24 files changed, 149 insertions, 149 deletions
diff --git a/silk/A2NLSF.c b/silk/A2NLSF.c
index 165049aa..b487686f 100644
--- a/silk/A2NLSF.c
+++ b/silk/A2NLSF.c
@@ -245,7 +245,7 @@ void silk_A2NLSF(
}
/* Error: Apply progressively more bandwidth expansion and run again */
- silk_bwexpander_32( a_Q16, d, 65536 - silk_LSHIFT( 1, i ) );
+ silk_bwexpander_32( a_Q16, d, 65536 - silk_LSHIFT( 1, i ) );
silk_A2NLSF_init( a_Q16, P, Q, dd );
p = P; /* Pointer to polynomial */
diff --git a/silk/LPC_fit.c b/silk/LPC_fit.c
index 69ff3958..cdea4f3a 100644
--- a/silk/LPC_fit.c
+++ b/silk/LPC_fit.c
@@ -34,14 +34,14 @@ POSSIBILITY OF SUCH DAMAGE.
/* Convert int32 coefficients to int16 coefs and make sure there's no wrap-around */
void silk_LPC_fit(
opus_int16 *a_QOUT, /* O Output signal */
- opus_int32 *a_QIN, /* I/O Input signal */
+ opus_int32 *a_QIN, /* I/O Input signal */
const opus_int QOUT, /* I Input Q domain */
const opus_int QIN, /* I Input Q domain */
const opus_int d /* I Filter order */
)
{
- opus_int i, k, idx = 0;
- opus_int32 maxabs, absval, chirp_Q16;
+ opus_int i, k, idx = 0;
+ opus_int32 maxabs, absval, chirp_Q16;
/* Limit the maximum absolute value of the prediction coefficients, so that they'll fit in int16 */
for( i = 0; i < 10; i++ ) {
diff --git a/silk/LPC_inv_pred_gain.c b/silk/LPC_inv_pred_gain.c
index cb9983f5..257b28fd 100644
--- a/silk/LPC_inv_pred_gain.c
+++ b/silk/LPC_inv_pred_gain.c
@@ -79,7 +79,7 @@ static opus_int32 LPC_inverse_pred_gain_QA( /* O Returns inver
for( n = 0; n < (k + 1) >> 1; n++ ) {
tmp1 = A_QA[ n ];
tmp2 = A_QA[ k - n - 1 ];
- A_QA[ n ] = MUL32_FRAC_Q( tmp1 - MUL32_FRAC_Q( tmp2, rc_Q31, 31 ), rc_mult2, mult2Q );
+ A_QA[ n ] = MUL32_FRAC_Q( tmp1 - MUL32_FRAC_Q( tmp2, rc_Q31, 31 ), rc_mult2, mult2Q );
A_QA[ k - n - 1 ] = MUL32_FRAC_Q( tmp2 - MUL32_FRAC_Q( tmp1, rc_Q31, 31 ), rc_mult2, mult2Q );
}
}
diff --git a/silk/NSQ.c b/silk/NSQ.c
index 800db3af..18cd9465 100644
--- a/silk/NSQ.c
+++ b/silk/NSQ.c
@@ -75,7 +75,7 @@ void silk_NSQ_c
const silk_encoder_state *psEncC, /* I/O Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
SideInfoIndices *psIndices, /* I/O Quantization Indices */
- const opus_int16 x16[], /* I Input */
+ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
@@ -460,7 +460,7 @@ static OPUS_INLINE void silk_nsq_scale_states(
NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] );
}
- /* Save inverse gain */
+ /* Save inverse gain */
NSQ->prev_gain_Q16 = Gains_Q16[ subfr ];
}
}
diff --git a/silk/NSQ_del_dec.c b/silk/NSQ_del_dec.c
index 8e725b82..2532ce25 100644
--- a/silk/NSQ_del_dec.c
+++ b/silk/NSQ_del_dec.c
@@ -115,7 +115,7 @@ void silk_NSQ_del_dec_c(
const silk_encoder_state *psEncC, /* I/O Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
SideInfoIndices *psIndices, /* I/O Quantization Indices */
- const opus_int16 x16[], /* I Input */
+ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
diff --git a/silk/SigProc_FIX.h b/silk/SigProc_FIX.h
index 4d0e7df8..c45d187f 100644
--- a/silk/SigProc_FIX.h
+++ b/silk/SigProc_FIX.h
@@ -277,7 +277,7 @@ void silk_NLSF2A(
/* Convert int32 coefficients to int16 coefs and make sure there's no wrap-around */
void silk_LPC_fit(
opus_int16 *a_QOUT, /* O Output signal */
- opus_int32 *a_QIN, /* I/O Input signal */
+ opus_int32 *a_QIN, /* I/O Input signal */
const opus_int QOUT, /* I Input Q domain */
const opus_int QIN, /* I Input Q domain */
const opus_int d /* I Filter order */
diff --git a/silk/VQ_WMat_EC.c b/silk/VQ_WMat_EC.c
index d33da26d..67e63418 100644
--- a/silk/VQ_WMat_EC.c
+++ b/silk/VQ_WMat_EC.c
@@ -34,38 +34,38 @@ POSSIBILITY OF SUCH DAMAGE.
/* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */
void silk_VQ_WMat_EC_c(
opus_int8 *ind, /* O index of best codebook vector */
- opus_int32 *res_nrg_Q15, /* O best residual energy */
- opus_int32 *rate_dist_Q8, /* O best total bitrate */
- const opus_int32 *XX_Q17, /* I correlation matrix */
- const opus_int32 *xX_Q17, /* I correlation vector */
+ opus_int32 *res_nrg_Q15, /* O best residual energy */
+ opus_int32 *rate_dist_Q8, /* O best total bitrate */
+ const opus_int32 *XX_Q17, /* I correlation matrix */
+ const opus_int32 *xX_Q17, /* I correlation vector */
const opus_int8 *cb_Q7, /* I codebook */
const opus_uint8 *cl_Q5, /* I code length for each codebook vector */
- const opus_int subfr_len, /* I number of samples per subframe */
+ const opus_int subfr_len, /* I number of samples per subframe */
const opus_int L /* I number of vectors in codebook */
)
{
opus_int k;
const opus_int8 *cb_row_Q7;
- opus_int32 neg_xX_Q24[ 5 ];
+ opus_int32 neg_xX_Q24[ 5 ];
opus_int32 sum1_Q15, sum2_Q24, sum1_best_Q15;
- opus_int32 bits_res_Q8, bits_tot_Q8;
+ opus_int32 bits_res_Q8, bits_tot_Q8;
- /* Negate and convert to new Q domain */
- neg_xX_Q24[ 0 ] = -silk_LSHIFT32( xX_Q17[ 0 ], 7 );
- neg_xX_Q24[ 1 ] = -silk_LSHIFT32( xX_Q17[ 1 ], 7 );
- neg_xX_Q24[ 2 ] = -silk_LSHIFT32( xX_Q17[ 2 ], 7 );
- neg_xX_Q24[ 3 ] = -silk_LSHIFT32( xX_Q17[ 3 ], 7 );
- neg_xX_Q24[ 4 ] = -silk_LSHIFT32( xX_Q17[ 4 ], 7 );
+ /* Negate and convert to new Q domain */
+ neg_xX_Q24[ 0 ] = -silk_LSHIFT32( xX_Q17[ 0 ], 7 );
+ neg_xX_Q24[ 1 ] = -silk_LSHIFT32( xX_Q17[ 1 ], 7 );
+ neg_xX_Q24[ 2 ] = -silk_LSHIFT32( xX_Q17[ 2 ], 7 );
+ neg_xX_Q24[ 3 ] = -silk_LSHIFT32( xX_Q17[ 3 ], 7 );
+ neg_xX_Q24[ 4 ] = -silk_LSHIFT32( xX_Q17[ 4 ], 7 );
/* Loop over codebook */
*rate_dist_Q8 = silk_int32_MAX;
- *res_nrg_Q15 = silk_int32_MAX;
- sum1_best_Q15 = silk_int32_MAX;
+ *res_nrg_Q15 = silk_int32_MAX;
+ sum1_best_Q15 = silk_int32_MAX;
cb_row_Q7 = cb_Q7;
for( k = 0; k < L; k++ ) {
/* Weighted rate */
- /* Quantization error: 1 - 2* xX * cb + cb' * XX * cb */
- sum1_Q15 = SILK_FIX_CONST( 1.0001, 15 );
+ /* Quantization error: 1 - 2* xX * cb + cb' * XX * cb */
+ sum1_Q15 = SILK_FIX_CONST( 1.0001, 15 );
/* first row of XX_Q17 */
sum2_Q24 = silk_MLA( neg_xX_Q24[ 0 ], XX_Q17[ 1 ], cb_row_Q7[ 1 ] );
@@ -98,25 +98,25 @@ void silk_VQ_WMat_EC_c(
sum1_Q15 = silk_SMLAWB( sum1_Q15, sum2_Q24, cb_row_Q7[ 3 ] );
/* last row of XX_Q17 */
- sum2_Q24 = silk_LSHIFT32( neg_xX_Q24[ 4 ], 1 );
+ sum2_Q24 = silk_LSHIFT32( neg_xX_Q24[ 4 ], 1 );
sum2_Q24 = silk_MLA( sum2_Q24, XX_Q17[ 24 ], cb_row_Q7[ 4 ] );
sum1_Q15 = silk_SMLAWB( sum1_Q15, sum2_Q24, cb_row_Q7[ 4 ] );
- /* If ever the following assert triggers, increase LTP_CORR_INV_MAX */
+ /* If ever the following assert triggers, increase LTP_CORR_INV_MAX */
silk_assert( sum1_Q15 >= 0 );
- /* find best */
- if( sum1_Q15 <= sum1_best_Q15 ) {
- sum1_best_Q15 = sum1_Q15;
- /* Translate residual energy to bits using high-rate assumption (6 dB ==> 1 bit/sample) */
- bits_res_Q8 = silk_SMULBB( subfr_len, silk_lin2log( sum1_Q15 ) - (15 << 7) );
- bits_tot_Q8 = silk_ADD_LSHIFT32( bits_res_Q8, cl_Q5[ k ], 2 );
- if( bits_tot_Q8 <= *rate_dist_Q8 ) {
- *rate_dist_Q8 = bits_tot_Q8;
- *res_nrg_Q15 = sum1_Q15;
- *ind = (opus_int8)k;
- }
- }
+ /* find best */
+ if( sum1_Q15 <= sum1_best_Q15 ) {
+ sum1_best_Q15 = sum1_Q15;
+ /* Translate residual energy to bits using high-rate assumption (6 dB ==> 1 bit/sample) */
+ bits_res_Q8 = silk_SMULBB( subfr_len, silk_lin2log( sum1_Q15 ) - (15 << 7) );
+ bits_tot_Q8 = silk_ADD_LSHIFT32( bits_res_Q8, cl_Q5[ k ], 2 );
+ if( bits_tot_Q8 <= *rate_dist_Q8 ) {
+ *rate_dist_Q8 = bits_tot_Q8;
+ *res_nrg_Q15 = sum1_Q15;
+ *ind = (opus_int8)k;
+ }
+ }
/* Go to next cbk vector */
cb_row_Q7 += LTP_ORDER;
diff --git a/silk/fixed/corrMatrix_FIX.c b/silk/fixed/corrMatrix_FIX.c
index c0118009..1b4a29c2 100644
--- a/silk/fixed/corrMatrix_FIX.c
+++ b/silk/fixed/corrMatrix_FIX.c
@@ -78,8 +78,8 @@ void silk_corrMatrix_FIX(
const opus_int L, /* I Length of vectors */
const opus_int order, /* I Max lag for correlation */
opus_int32 *XX, /* O Pointer to X'*X correlation matrix [ order x order ] */
- opus_int32 *nrg, /* O Energy of x vector */
- opus_int *rshifts, /* O Right shifts of correlations and energy */
+ opus_int32 *nrg, /* O Energy of x vector */
+ opus_int *rshifts, /* O Right shifts of correlations and energy */
int arch /* I Run-time architecture */
)
{
@@ -89,9 +89,9 @@ void silk_corrMatrix_FIX(
/* Calculate energy to find shift used to fit in 32 bits */
silk_sum_sqr_shift( nrg, rshifts, x, L + order - 1 );
- energy = *nrg;
+ energy = *nrg;
- /* Calculate energy of first column (0) of X: X[:,0]'*X[:,0] */
+ /* Calculate energy of first column (0) of X: X[:,0]'*X[:,0] */
/* Remove contribution of first order - 1 samples */
for( i = 0; i < order - 1; i++ ) {
energy -= silk_RSHIFT32( silk_SMULBB( x[ i ], x[ i ] ), *rshifts );
@@ -100,13 +100,13 @@ void silk_corrMatrix_FIX(
/* Calculate energy of remaining columns of X: X[:,j]'*X[:,j] */
/* Fill out the diagonal of the correlation matrix */
matrix_ptr( XX, 0, 0, order ) = energy;
- silk_assert( energy >= 0 );
+ silk_assert( energy >= 0 );
ptr1 = &x[ order - 1 ]; /* First sample of column 0 of X */
for( j = 1; j < order; j++ ) {
energy = silk_SUB32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ L - j ], ptr1[ L - j ] ), *rshifts ) );
energy = silk_ADD32( energy, silk_RSHIFT32( silk_SMULBB( ptr1[ -j ], ptr1[ -j ] ), *rshifts ) );
matrix_ptr( XX, j, j, order ) = energy;
- silk_assert( energy >= 0 );
+ silk_assert( energy >= 0 );
}
ptr2 = &x[ order - 2 ]; /* First sample of column 1 of X */
diff --git a/silk/fixed/find_LTP_FIX.c b/silk/fixed/find_LTP_FIX.c
index 4eadd134..aea6fc01 100644
--- a/silk/fixed/find_LTP_FIX.c
+++ b/silk/fixed/find_LTP_FIX.c
@@ -33,9 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
#include "tuning_parameters.h"
void silk_find_LTP_FIX(
- opus_int32 XXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Correlation matrix */
- opus_int32 xXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER ], /* O Correlation vector */
- const opus_int16 r_ptr[], /* I Residual signal after LPC */
+ opus_int32 XXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Correlation matrix */
+ opus_int32 xXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER ], /* O Correlation vector */
+ const opus_int16 r_ptr[], /* I Residual signal after LPC */
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 */
@@ -43,56 +43,56 @@ void silk_find_LTP_FIX(
)
{
opus_int i, k, extra_shifts;
- opus_int xx_shifts, xX_shifts, XX_shifts;
+ opus_int xx_shifts, xX_shifts, XX_shifts;
const opus_int16 *lag_ptr;
opus_int32 *XXLTP_Q17_ptr, *xXLTP_Q17_ptr;
- opus_int32 xx, nrg, temp;
+ opus_int32 xx, nrg, temp;
xXLTP_Q17_ptr = xXLTP_Q17;
XXLTP_Q17_ptr = XXLTP_Q17;
for( k = 0; k < nb_subfr; k++ ) {
lag_ptr = r_ptr - ( lag[ k ] + LTP_ORDER / 2 );
- silk_sum_sqr_shift( &xx, &xx_shifts, r_ptr, subfr_length ); /* xx in Q( -xx_shifts ) */
- silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, XXLTP_Q17_ptr, &nrg, &XX_shifts, arch ); /* XXLTP_Q17_ptr and nrg in Q( -XX_shifts ) */
- extra_shifts = xx_shifts - XX_shifts;
- if( extra_shifts > 0 ) {
- /* Shift XX */
- xX_shifts = xx_shifts;
- for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
- XXLTP_Q17_ptr[ i ] = silk_RSHIFT32( XXLTP_Q17_ptr[ i ], extra_shifts ); /* Q( -xX_shifts ) */
- }
- nrg = silk_RSHIFT32( nrg, extra_shifts ); /* Q( -xX_shifts ) */
- } else if( extra_shifts < 0 ) {
- /* Shift xx */
- xX_shifts = XX_shifts;
- xx = silk_RSHIFT32( xx, -extra_shifts ); /* Q( -xX_shifts ) */
- } else {
- xX_shifts = xx_shifts;
- }
- silk_corrVector_FIX( lag_ptr, r_ptr, subfr_length, LTP_ORDER, xXLTP_Q17_ptr, xX_shifts, arch ); /* xXLTP_Q17_ptr in Q( -xX_shifts ) */
+ silk_sum_sqr_shift( &xx, &xx_shifts, r_ptr, subfr_length ); /* xx in Q( -xx_shifts ) */
+ silk_corrMatrix_FIX( lag_ptr, subfr_length, LTP_ORDER, XXLTP_Q17_ptr, &nrg, &XX_shifts, arch ); /* XXLTP_Q17_ptr and nrg in Q( -XX_shifts ) */
+ extra_shifts = xx_shifts - XX_shifts;
+ if( extra_shifts > 0 ) {
+ /* Shift XX */
+ xX_shifts = xx_shifts;
+ for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
+ XXLTP_Q17_ptr[ i ] = silk_RSHIFT32( XXLTP_Q17_ptr[ i ], extra_shifts ); /* Q( -xX_shifts ) */
+ }
+ nrg = silk_RSHIFT32( nrg, extra_shifts ); /* Q( -xX_shifts ) */
+ } else if( extra_shifts < 0 ) {
+ /* Shift xx */
+ xX_shifts = XX_shifts;
+ xx = silk_RSHIFT32( xx, -extra_shifts ); /* Q( -xX_shifts ) */
+ } else {
+ xX_shifts = xx_shifts;
+ }
+ silk_corrVector_FIX( lag_ptr, r_ptr, subfr_length, LTP_ORDER, xXLTP_Q17_ptr, xX_shifts, arch ); /* xXLTP_Q17_ptr in Q( -xX_shifts ) */
- /* At this point all correlations are in Q(-xX_shifts) */
- temp = silk_SMLAWB( 1, nrg, SILK_FIX_CONST( LTP_CORR_INV_MAX, 16 ) );
- temp = silk_max( temp, xx );
+ /* At this point all correlations are in Q(-xX_shifts) */
+ temp = silk_SMLAWB( 1, nrg, SILK_FIX_CONST( LTP_CORR_INV_MAX, 16 ) );
+ temp = silk_max( temp, xx );
TIC(div)
#if 0
- for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
- XXLTP_Q17_ptr[ i ] = silk_DIV32_varQ( XXLTP_Q17_ptr[ i ], temp, 17 );
- }
- for( i = 0; i < LTP_ORDER; i++ ) {
- xXLTP_Q17_ptr[ i ] = silk_DIV32_varQ( xXLTP_Q17_ptr[ i ], temp, 17 );
- }
+ for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
+ XXLTP_Q17_ptr[ i ] = silk_DIV32_varQ( XXLTP_Q17_ptr[ i ], temp, 17 );
+ }
+ for( i = 0; i < LTP_ORDER; i++ ) {
+ xXLTP_Q17_ptr[ i ] = silk_DIV32_varQ( xXLTP_Q17_ptr[ i ], temp, 17 );
+ }
#else
- for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
- XXLTP_Q17_ptr[ i ] = (opus_int32)( ( ((opus_int64)XXLTP_Q17_ptr[ i ]) << 17 ) / temp );
- }
- for( i = 0; i < LTP_ORDER; i++ ) {
- xXLTP_Q17_ptr[ i ] = (opus_int32)( ( ((opus_int64)xXLTP_Q17_ptr[ i ]) << 17 ) / temp );
- }
+ for( i = 0; i < LTP_ORDER * LTP_ORDER; i++ ) {
+ XXLTP_Q17_ptr[ i ] = (opus_int32)( ( ((opus_int64)XXLTP_Q17_ptr[ i ]) << 17 ) / temp );
+ }
+ for( i = 0; i < LTP_ORDER; i++ ) {
+ xXLTP_Q17_ptr[ i ] = (opus_int32)( ( ((opus_int64)xXLTP_Q17_ptr[ i ]) << 17 ) / temp );
+ }
#endif
TOC(div)
- r_ptr += subfr_length;
+ r_ptr += subfr_length;
XXLTP_Q17_ptr += LTP_ORDER * LTP_ORDER;
xXLTP_Q17_ptr += LTP_ORDER;
}
diff --git a/silk/fixed/find_pred_coefs_FIX.c b/silk/fixed/find_pred_coefs_FIX.c
index 917dee08..2b286a6a 100644
--- a/silk/fixed/find_pred_coefs_FIX.c
+++ b/silk/fixed/find_pred_coefs_FIX.c
@@ -87,7 +87,7 @@ void silk_find_pred_coefs_FIX(
/* LTP analysis */
silk_find_LTP_FIX( XXLTP_Q17, xXLTP_Q17, res_pitch,
- psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch );
+ psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch );
/* Quantize LTP gain parameters */
silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex,
diff --git a/silk/fixed/main_FIX.h b/silk/fixed/main_FIX.h
index 4b7513b1..992f3bf3 100644
--- a/silk/fixed/main_FIX.h
+++ b/silk/fixed/main_FIX.h
@@ -147,9 +147,9 @@ void silk_find_LPC_FIX(
/* LTP analysis */
void silk_find_LTP_FIX(
- opus_int32 XXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Correlation matrix */
- opus_int32 xXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER ], /* O Correlation vector */
- const opus_int16 r_lpc[], /* I Residual signal after LPC */
+ opus_int32 XXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* O Correlation matrix */
+ opus_int32 xXLTP_Q17[ MAX_NB_SUBFR * LTP_ORDER ], /* O Correlation vector */
+ const opus_int16 r_lpc[], /* I Residual signal after LPC */
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 */
@@ -207,7 +207,7 @@ void silk_corrMatrix_FIX(
const opus_int L, /* I Length of vectors */
const opus_int order, /* I Max lag for correlation */
opus_int32 *XX, /* O Pointer to X'*X correlation matrix [ order x order ] */
- opus_int32 *nrg, /* O Energy of x vector */
+ opus_int32 *nrg, /* O Energy of x vector */
opus_int *rshifts, /* O Right shifts of correlations */
int arch /* I Run-time architecture */
);
diff --git a/silk/fixed/pitch_analysis_core_FIX.c b/silk/fixed/pitch_analysis_core_FIX.c
index 848df561..308fe54f 100644
--- a/silk/fixed/pitch_analysis_core_FIX.c
+++ b/silk/fixed/pitch_analysis_core_FIX.c
@@ -96,7 +96,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0
{
VARDECL( opus_int16, frame_8kHz_buf );
VARDECL( opus_int16, frame_4kHz );
- VARDECL( opus_int16, frame_scaled );
+ VARDECL( opus_int16, frame_scaled );
opus_int32 filt_state[ 6 ];
const opus_int16 *frame, *frame_8kHz;
opus_int i, k, d, j;
@@ -148,25 +148,25 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0
for( i = 0; i < frame_length; i++ ) {
frame_scaled[ i ] = silk_RSHIFT( frame_unscaled[ i ], shift );
}
- frame = frame_scaled;
- } else {
- frame = frame_unscaled;
+ frame = frame_scaled;
+ } else {
+ frame = frame_unscaled;
}
/* Resample from input sampled at Fs_kHz to 8 kHz */
if( Fs_kHz == 16 ) {
- ALLOC( frame_8kHz_buf, frame_length_8kHz, opus_int16 );
+ ALLOC( frame_8kHz_buf, frame_length_8kHz, opus_int16 );
silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) );
silk_resampler_down2( filt_state, frame_8kHz_buf, frame, frame_length );
- frame_8kHz = frame_8kHz_buf;
+ frame_8kHz = frame_8kHz_buf;
} else if( Fs_kHz == 12 ) {
- ALLOC( frame_8kHz_buf, frame_length_8kHz, opus_int16 );
+ ALLOC( frame_8kHz_buf, frame_length_8kHz, opus_int16 );
silk_memset( filt_state, 0, 6 * sizeof( opus_int32 ) );
silk_resampler_down2_3( filt_state, frame_8kHz_buf, frame, frame_length );
- frame_8kHz = frame_8kHz_buf;
+ frame_8kHz = frame_8kHz_buf;
} else {
silk_assert( Fs_kHz == 8 );
- frame_8kHz = frame;
+ frame_8kHz = frame;
}
/* Decimate again to 4 kHz */
diff --git a/silk/fixed/structs_FIX.h b/silk/fixed/structs_FIX.h
index 1694db8d..2774a97b 100644
--- a/silk/fixed/structs_FIX.h
+++ b/silk/fixed/structs_FIX.h
@@ -57,7 +57,7 @@ typedef struct {
/* Buffer for find pitch and noise shape analysis */
silk_DWORD_ALIGN opus_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];/* Buffer for find pitch and noise shape analysis */
opus_int LTPCorr_Q15; /* Normalized correlation from pitch lag estimator */
- opus_int32 resNrgSmth;
+ opus_int32 resNrgSmth;
} silk_encoder_state_FIX;
/************************/
diff --git a/silk/float/energy_FLP.c b/silk/float/energy_FLP.c
index 8f24f93a..7bc7173c 100644
--- a/silk/float/energy_FLP.c
+++ b/silk/float/energy_FLP.c
@@ -42,7 +42,7 @@ double silk_energy_FLP(
/* 4x unrolled loop */
result = 0.0;
- for( i = 0; i < dataSize - 3; i += 4 ) {
+ for( i = 0; i < dataSize - 3; i += 4 ) {
result += data[ i + 0 ] * (double)data[ i + 0 ] +
data[ i + 1 ] * (double)data[ i + 1 ] +
data[ i + 2 ] * (double)data[ i + 2 ] +
diff --git a/silk/float/find_LTP_FLP.c b/silk/float/find_LTP_FLP.c
index 8bc10ddf..2e1a0fe5 100644
--- a/silk/float/find_LTP_FLP.c
+++ b/silk/float/find_LTP_FLP.c
@@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
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 ], /* 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 subfr_length, /* I Subframe length */
diff --git a/silk/float/find_pred_coefs_FLP.c b/silk/float/find_pred_coefs_FLP.c
index 0c8a896f..86799742 100644
--- a/silk/float/find_pred_coefs_FLP.c
+++ b/silk/float/find_pred_coefs_FLP.c
@@ -61,12 +61,12 @@ void silk_find_pred_coefs_FLP(
/**********/
silk_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + LTP_ORDER / 2 );
- /* LTP analysis */
+ /* LTP analysis */
silk_find_LTP_FLP( XXLTP, xXLTP, res_pitch, psEncCtrl->pitchL, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
/* Quantize LTP gain parameters */
silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex,
- &psEncCtrl->LTPredCodGain, XXLTP, xXLTP, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch );
+ &psEncCtrl->LTPredCodGain, XXLTP, xXLTP, psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr, psEnc->sCmn.arch );
/* Control LTP scaling */
silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding );
diff --git a/silk/float/k2a_FLP.c b/silk/float/k2a_FLP.c
index 6eb0e89d..1448008d 100644
--- a/silk/float/k2a_FLP.c
+++ b/silk/float/k2a_FLP.c
@@ -42,12 +42,12 @@ void silk_k2a_FLP(
silk_float rck, tmp1, tmp2;
for( k = 0; k < order; k++ ) {
- rck = rc[ k ];
+ rck = rc[ k ];
for( n = 0; n < (k + 1) >> 1; n++ ) {
- tmp1 = A[ n ];
- tmp2 = A[ k - n - 1 ];
+ tmp1 = A[ n ];
+ tmp2 = A[ k - n - 1 ];
A[ n ] = tmp1 + tmp2 * rck;
- A[ k - n - 1 ] = tmp2 + tmp1 * rck;
+ A[ k - n - 1 ] = tmp2 + tmp1 * rck;
}
A[ k ] = -rck;
}
diff --git a/silk/float/main_FLP.h b/silk/float/main_FLP.h
index fbd2f1a7..343e6c10 100644
--- a/silk/float/main_FLP.h
+++ b/silk/float/main_FLP.h
@@ -144,7 +144,7 @@ void silk_find_LPC_FLP(
/* LTP analysis */
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 ], /* 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 subfr_length, /* I Subframe length */
@@ -185,14 +185,14 @@ void silk_LPC_analysis_filter_FLP(
/* LTP tap quantizer */
void silk_quant_LTP_gains_FLP(
- silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
+ silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook index */
opus_int8 *periodicity_index, /* O Periodicity index */
- silk_float *pred_gain_dB, /* O LTP prediction gain */
- const silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Correlation matrix */
- const silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* I Correlation vector */
- const opus_int subfr_len, /* I Number of samples per subframe */
- const opus_int nb_subfr, /* I Number of subframes */
+ silk_float *pred_gain_dB, /* O LTP prediction gain */
+ const silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Correlation matrix */
+ const silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* I Correlation vector */
+ const opus_int subfr_len, /* I Number of samples per subframe */
+ const opus_int nb_subfr, /* I Number of subframes */
int arch /* I Run-time architecture */
);
diff --git a/silk/float/noise_shape_analysis_FLP.c b/silk/float/noise_shape_analysis_FLP.c
index 85dba009..cb3d8a50 100644
--- a/silk/float/noise_shape_analysis_FLP.c
+++ b/silk/float/noise_shape_analysis_FLP.c
@@ -121,7 +121,7 @@ static OPUS_INLINE void limit_coefs(
opus_int i, iter, ind = 0;
silk_float tmp, maxabs, chirp;
- for( iter = 0; iter < 10; iter++ ) {
+ for( iter = 0; iter < 10; iter++ ) {
/* Find maximum absolute value */
maxabs = -1.0f;
for( i = 0; i < order; i++ ) {
diff --git a/silk/float/wrappers_FLP.c b/silk/float/wrappers_FLP.c
index 9f03e576..81e0b66e 100644
--- a/silk/float/wrappers_FLP.c
+++ b/silk/float/wrappers_FLP.c
@@ -172,14 +172,14 @@ void silk_NSQ_wrapper_FLP(
/* Floating-point Silk LTP quantiation wrapper */
/***********************************************/
void silk_quant_LTP_gains_FLP(
- silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
+ silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook index */
opus_int8 *periodicity_index, /* O Periodicity index */
- silk_float *pred_gain_dB, /* O LTP prediction gain */
- const silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Correlation matrix */
- const silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* I Correlation vector */
- const opus_int subfr_len, /* I Number of samples per subframe */
- const opus_int nb_subfr, /* I Number of subframes */
+ silk_float *pred_gain_dB, /* O LTP prediction gain */
+ const silk_float XX[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Correlation matrix */
+ const silk_float xX[ MAX_NB_SUBFR * LTP_ORDER ], /* I Correlation vector */
+ const opus_int subfr_len, /* I Number of samples per subframe */
+ const opus_int nb_subfr, /* I Number of subframes */
int arch /* I Run-time architecture */
)
{
@@ -201,5 +201,5 @@ void silk_quant_LTP_gains_FLP(
B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f );
}
- *pred_gain_dB = (silk_float)pred_gain_dB_Q7 * ( 1.0f / 128.0f );
+ *pred_gain_dB = (silk_float)pred_gain_dB_Q7 * ( 1.0f / 128.0f );
}
diff --git a/silk/main.h b/silk/main.h
index 6eacf696..38e1eabd 100644
--- a/silk/main.h
+++ b/silk/main.h
@@ -205,13 +205,13 @@ void silk_interpolate(
/* LTP tap quantizer */
void silk_quant_LTP_gains(
- opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
+ opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook Index */
opus_int8 *periodicity_index, /* O Periodicity Index */
- opus_int *pred_gain_dB_Q7, /* O LTP prediction gain */
+ opus_int *pred_gain_dB_Q7, /* O LTP prediction gain */
const opus_int32 XX_Q17[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Correlation matrix in Q18 */
const opus_int32 xX_Q17[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Correlation vector in Q18 */
- const opus_int subfr_len, /* I Number of samples per subframe */
+ const opus_int subfr_len, /* I Number of samples per subframe */
const opus_int nb_subfr, /* I Number of subframes */
int arch /* I Run-time architecture */
);
@@ -219,13 +219,13 @@ void silk_quant_LTP_gains(
/* Entropy constrained matrix-weighted VQ, for a single input data vector */
void silk_VQ_WMat_EC_c(
opus_int8 *ind, /* O index of best codebook vector */
- opus_int32 *res_nrg_Q15, /* O best residual energy */
- opus_int32 *rate_dist_Q8, /* O best total bitrate */
- const opus_int32 *XX_Q17, /* I correlation matrix */
- const opus_int32 *xX_Q17, /* I correlation vector */
+ opus_int32 *res_nrg_Q15, /* O best residual energy */
+ opus_int32 *rate_dist_Q8, /* O best total bitrate */
+ const opus_int32 *XX_Q17, /* I correlation matrix */
+ const opus_int32 *xX_Q17, /* I correlation vector */
const opus_int8 *cb_Q7, /* I codebook */
const opus_uint8 *cl_Q5, /* I code length for each codebook vector */
- const opus_int subfr_len, /* I number of samples per subframe */
+ const opus_int subfr_len, /* I number of samples per subframe */
const opus_int L /* I number of vectors in codebook */
);
@@ -242,7 +242,7 @@ void silk_NSQ_c(
const silk_encoder_state *psEncC, /* I/O Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
SideInfoIndices *psIndices, /* I/O Quantization Indices */
- const opus_int16 x16[], /* I Input */
+ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
@@ -268,7 +268,7 @@ void silk_NSQ_del_dec_c(
const silk_encoder_state *psEncC, /* I/O Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
SideInfoIndices *psIndices, /* I/O Quantization Indices */
- const opus_int16 x16[], /* I Input */
+ const opus_int16 x16[], /* I Input */
opus_int8 pulses[], /* O Quantized pulse signal */
const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I Short term prediction coefs */
const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I Long term prediction coefs */
diff --git a/silk/quant_LTP_gains.c b/silk/quant_LTP_gains.c
index 68494924..23f85695 100644
--- a/silk/quant_LTP_gains.c
+++ b/silk/quant_LTP_gains.c
@@ -32,13 +32,13 @@ POSSIBILITY OF SUCH DAMAGE.
#include "main.h"
void silk_quant_LTP_gains(
- opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
+ opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* O Quantized LTP gains */
opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook Index */
opus_int8 *periodicity_index, /* O Periodicity Index */
- opus_int *pred_gain_dB_Q7, /* O LTP prediction gain */
+ opus_int *pred_gain_dB_Q7, /* O LTP prediction gain */
const opus_int32 XX_Q17[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Correlation matrix in Q18 */
const opus_int32 xX_Q17[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Correlation vector in Q18 */
- const opus_int subfr_len, /* I Number of samples per subframe */
+ const opus_int subfr_len, /* I Number of samples per subframe */
const opus_int nb_subfr, /* I Number of subframes */
int arch /* I Run-time architecture */
)
@@ -66,23 +66,23 @@ void silk_quant_LTP_gains(
xX_Q17_ptr = xX_Q17;
b_Q14_ptr = B_Q14;
- res_nrg_Q15 = 0;
+ res_nrg_Q15 = 0;
rate_dist_Q7 = 0;
for( j = 0; j < nb_subfr; j++ ) {
silk_VQ_WMat_EC(
&temp_idx[ j ], /* O index of best codebook vector */
- &res_nrg_Q15_subfr, /* O residual energy */
+ &res_nrg_Q15_subfr, /* O residual energy */
&rate_dist_Q7_subfr, /* O best weighted quantization error + mu * rate */
XX_Q17_ptr, /* I correlation matrix */
- xX_Q17_ptr, /* I correlation vector */
+ xX_Q17_ptr, /* I correlation vector */
cbk_ptr_Q7, /* I codebook */
cl_ptr_Q5, /* I code length for each codebook vector */
- subfr_len, /* I number of samples per subframe */
+ subfr_len, /* I number of samples per subframe */
cbk_size, /* I number of vectors in codebook */
arch /* I Run-time architecture */
);
- res_nrg_Q15 = silk_ADD_POS_SAT32( res_nrg_Q15, res_nrg_Q15_subfr );
+ res_nrg_Q15 = silk_ADD_POS_SAT32( res_nrg_Q15, res_nrg_Q15_subfr );
rate_dist_Q7 = silk_ADD_POS_SAT32( rate_dist_Q7, rate_dist_Q7_subfr );
b_Q14_ptr += LTP_ORDER;
@@ -104,12 +104,12 @@ void silk_quant_LTP_gains(
}
}
- if( nb_subfr == 2 ) {
- res_nrg_Q15 = silk_RSHIFT32( res_nrg_Q15, 1 );
- } else {
- res_nrg_Q15 = silk_RSHIFT32( res_nrg_Q15, 2 );
- }
+ if( nb_subfr == 2 ) {
+ res_nrg_Q15 = silk_RSHIFT32( res_nrg_Q15, 1 );
+ } else {
+ res_nrg_Q15 = silk_RSHIFT32( res_nrg_Q15, 2 );
+ }
- *pred_gain_dB_Q7 = (opus_int)silk_SMULBB( -3, silk_lin2log( res_nrg_Q15 ) - ( 15 << 7 ) );
+ *pred_gain_dB_Q7 = (opus_int)silk_SMULBB( -3, silk_lin2log( res_nrg_Q15 ) - ( 15 << 7 ) );
}
diff --git a/silk/sum_sqr_shift.c b/silk/sum_sqr_shift.c
index 43c6b5aa..667cc0e0 100644
--- a/silk/sum_sqr_shift.c
+++ b/silk/sum_sqr_shift.c
@@ -82,7 +82,7 @@ void silk_sum_sqr_shift(
nrg = silk_RSHIFT_uint( (opus_uint32)nrg, 1 );
shft++;
}
- silk_assert( nrg >= 0 );
+ silk_assert( nrg >= 0 );
/* Output arguments */
*shift = shft;
diff --git a/silk/tuning_parameters.h b/silk/tuning_parameters.h
index d63a6bad..bf1d23b2 100644
--- a/silk/tuning_parameters.h
+++ b/silk/tuning_parameters.h
@@ -54,7 +54,7 @@ extern "C"
#define FIND_LPC_COND_FAC 1e-5f
/* LTP analysis defines */
-#define LTP_CORR_INV_MAX 0.015f
+#define LTP_CORR_INV_MAX 0.015f
/***********************/
/* High pass filtering */