Commit 43da5898 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

This should remove the last // comments

parent e766d9f6
......@@ -66,7 +66,7 @@ void silk_LTP_analysis_filter_FIX(
for( j = 1; j < LTP_ORDER; j++ ) {
LTP_est = SKP_SMLABB_ovflw( LTP_est, x_lag_ptr[ LTP_ORDER / 2 - j ], Btmp_Q14[ j ] );
}
LTP_est = SKP_RSHIFT_ROUND( LTP_est, 14 ); // round and -> Q0
LTP_est = SKP_RSHIFT_ROUND( LTP_est, 14 ); /* round and -> Q0*/
/* Subtract long-term prediction */
LTP_res_ptr[ i ] = ( opus_int16 )SKP_SAT16( ( opus_int32 )x_ptr[ i ] - LTP_est );
......
......@@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */
/* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */
static inline opus_int32 warped_gain( // gain in Q16
static inline opus_int32 warped_gain( /* gain in Q16*/
const opus_int32 *coefs_Q24,
opus_int lambda_Q16,
opus_int order
......@@ -179,8 +179,8 @@ void silk_noise_shape_analysis_FIX(
b_Q8 = SILK_FIX_CONST( 1.0, 8 ) - psEnc->sCmn.speech_activity_Q8;
b_Q8 = SKP_SMULWB( SKP_LSHIFT( b_Q8, 8 ), b_Q8 );
SNR_adj_dB_Q7 = SKP_SMLAWB( SNR_adj_dB_Q7,
SKP_SMULBB( SILK_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ), // Q11
SKP_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) ); // Q12
SKP_SMULBB( SILK_FIX_CONST( -BG_SNR_DECR_dB, 7 ) >> ( 4 + 1 ), b_Q8 ), /* Q11*/
SKP_SMULWB( SILK_FIX_CONST( 1.0, 14 ) + psEncCtrl->input_quality_Q14, psEncCtrl->coding_quality_Q14 ) ); /* Q12*/
}
if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) {
......@@ -209,7 +209,7 @@ void silk_noise_shape_analysis_FIX(
pitch_res_ptr = pitch_res;
for( k = 0; k < SKP_SMULBB( SUB_FRAME_LENGTH_MS, psEnc->sCmn.nb_subfr ) / 2; k++ ) {
silk_sum_sqr_shift( &nrg, &scale, pitch_res_ptr, nSamples );
nrg += SKP_RSHIFT( nSamples, scale ); // Q(-scale)
nrg += SKP_RSHIFT( nSamples, scale ); /* Q(-scale)*/
log_energy_Q7 = silk_lin2log( nrg );
if( k > 0 ) {
......@@ -291,7 +291,7 @@ void silk_noise_shape_analysis_FIX(
/* Convert reflection coefficients to prediction coefficients */
silk_k2a_Q16( AR2_Q24, refl_coef_Q16, psEnc->sCmn.shapingLPCOrder );
Qnrg = -scale; // range: -12...30
Qnrg = -scale; /* range: -12...30*/
SKP_assert( Qnrg >= -12 );
SKP_assert( Qnrg <= 30 );
......@@ -302,7 +302,7 @@ void silk_noise_shape_analysis_FIX(
}
tmp32 = silk_SQRT_APPROX( nrg );
Qnrg >>= 1; // range: -6...15
Qnrg >>= 1; /* range: -6...15*/
sqrt_nrg[ k ] = tmp32;
Qnrg_vec[ k ] = Qnrg;
......@@ -333,7 +333,7 @@ void silk_noise_shape_analysis_FIX(
silk_LPC_inverse_pred_gain_Q24( &pre_nrg_Q30, AR2_Q24, psEnc->sCmn.shapingLPCOrder );
silk_LPC_inverse_pred_gain_Q24( &nrg, AR1_Q24, psEnc->sCmn.shapingLPCOrder );
//psEncCtrl->GainsPre[ k ] = 1.0f - 0.7f * ( 1.0f - pre_nrg / nrg ) = 0.3f + 0.7f * pre_nrg / nrg;
/*psEncCtrl->GainsPre[ k ] = 1.0f - 0.7f * ( 1.0f - pre_nrg / nrg ) = 0.3f + 0.7f * pre_nrg / nrg;*/
pre_nrg_Q30 = SKP_LSHIFT32( SKP_SMULWB( pre_nrg_Q30, SILK_FIX_CONST( 0.7, 15 ) ), 1 );
psEncCtrl->GainsPre_Q14[ k ] = ( opus_int ) SILK_FIX_CONST( 0.3, 14 ) + silk_DIV32_varQ( pre_nrg_Q30, nrg, 14 );
......@@ -383,12 +383,12 @@ void silk_noise_shape_analysis_FIX(
psEncCtrl->LF_shp_Q14[ k ] = SKP_LSHIFT( SILK_FIX_CONST( 1.0, 14 ) - b_Q14 - SKP_SMULWB( strength_Q16, b_Q14 ), 16 );
psEncCtrl->LF_shp_Q14[ k ] |= (opus_uint16)( b_Q14 - SILK_FIX_CONST( 1.0, 14 ) );
}
SKP_assert( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ) < SILK_FIX_CONST( 0.5, 24 ) ); // Guarantees that second argument to SMULWB() is within range of an opus_int16
SKP_assert( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ) < SILK_FIX_CONST( 0.5, 24 ) ); /* Guarantees that second argument to SMULWB() is within range of an opus_int16*/
Tilt_Q16 = - SILK_FIX_CONST( HP_NOISE_COEF, 16 ) -
SKP_SMULWB( SILK_FIX_CONST( 1.0, 16 ) - SILK_FIX_CONST( HP_NOISE_COEF, 16 ),
SKP_SMULWB( SILK_FIX_CONST( HARM_HP_NOISE_COEF, 24 ), psEnc->sCmn.speech_activity_Q8 ) );
} else {
b_Q14 = SKP_DIV32_16( 21299, psEnc->sCmn.fs_kHz ); // 1.3_Q0 = 21299_Q14
b_Q14 = SKP_DIV32_16( 21299, psEnc->sCmn.fs_kHz ); /* 1.3_Q0 = 21299_Q14*/
/* Pack two coefficients in one int32 */
psEncCtrl->LF_shp_Q14[ 0 ] = SKP_LSHIFT( SILK_FIX_CONST( 1.0, 14 ) - b_Q14 -
SKP_SMULWB( strength_Q16, SKP_SMULWB( SILK_FIX_CONST( 0.6, 16 ), b_Q14 ) ), 16 );
......
......@@ -82,10 +82,10 @@ void silk_residual_energy_FIX(
tmp32 = SKP_LSHIFT32( gains[ i ], lz2 );
/* Find squared gains */
tmp32 = SKP_SMMUL( tmp32, tmp32 ); // Q( 2 * lz2 - 32 )
tmp32 = SKP_SMMUL( tmp32, tmp32 ); /* Q( 2 * lz2 - 32 )*/
/* Scale energies */
nrgs[ i ] = SKP_SMMUL( tmp32, SKP_LSHIFT32( nrgs[ i ], lz1 ) ); // Q( nrgsQ[ i ] + lz1 + 2 * lz2 - 32 - 32 )
nrgs[ i ] = SKP_SMMUL( tmp32, SKP_LSHIFT32( nrgs[ i ], lz1 ) ); /* Q( nrgsQ[ i ] + lz1 + 2 * lz2 - 32 - 32 )*/
nrgsQ[ i ] += lz1 + 2 * lz2 - 32 - 32;
}
}
......@@ -84,5 +84,5 @@ void silk_warped_autocorrelation_FIX(
corr[ i ] = ( opus_int32 )SKP_CHECK_FIT32( SKP_RSHIFT64( corr_QC[ i ], -lsh ) );
}
}
SKP_assert( corr_QC[ 0 ] >= 0 ); // If breaking, decrease QC
SKP_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/
}
......@@ -39,7 +39,7 @@ void silk_LTP_scale_ctrl_FLP(
opus_int round_loss;
/* 1st order high-pass filter */
//g_HP(n) = g(n) - 0.5 * g(n-1) + 0.5 * g_HP(n-1);
/*g_HP(n) = g(n) - 0.5 * g(n-1) + 0.5 * g_HP(n-1);*/
psEnc->HPLTPredCodGain = SKP_max_float( psEncCtrl->LTPredCodGain - 0.5f * psEnc->prevLTPredCodGain, 0.0f )
+ 0.5f * psEnc->HPLTPredCodGain;
psEnc->prevLTPredCodGain = psEncCtrl->LTPredCodGain;
......
......@@ -31,7 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "silk_SigProc_FLP.h"
#define MAX_FRAME_SIZE 384 // subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384
#define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384*/
#define MAX_NB_SUBFR 4
/* Compute reflection coefficients from input signal */
......
......@@ -199,8 +199,8 @@ TOC(ENCODE_PULSES)
TOC(ENCODE_FRAME)
#ifdef SAVE_ALL_INTERNAL_DATA
//DEBUG_STORE_DATA( xf.dat, pIn_HP_LP, psEnc->sCmn.frame_length * sizeof( opus_int16 ) );
//DEBUG_STORE_DATA( xfw.dat, xfw, psEnc->sCmn.frame_length * sizeof( SKP_float ) );
/*DEBUG_STORE_DATA( xf.dat, pIn_HP_LP, psEnc->sCmn.frame_length * sizeof( opus_int16 ) );*/
/*DEBUG_STORE_DATA( xfw.dat, xfw, psEnc->sCmn.frame_length * sizeof( SKP_float ) );*/
DEBUG_STORE_DATA( pitchL.dat, sEncCtrl.pitchL, MAX_NB_SUBFR * sizeof( opus_int ) );
DEBUG_STORE_DATA( pitchG_quantized.dat, sEncCtrl.LTPCoef, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( SKP_float ) );
DEBUG_STORE_DATA( LTPcorr.dat, &psEnc->LTPCorr, sizeof( SKP_float ) );
......@@ -214,7 +214,7 @@ TOC(ENCODE_FRAME)
DEBUG_STORE_DATA( per_index.dat, &psEnc->sCmn.indices.PERIndex, sizeof( opus_int8 ) );
DEBUG_STORE_DATA( PredCoef.dat, &sEncCtrl.PredCoef[ 1 ], psEnc->sCmn.predictLPCOrder * sizeof( SKP_float ) );
DEBUG_STORE_DATA( ltp_scale_idx.dat, &psEnc->sCmn.indices.LTP_scaleIndex, sizeof( opus_int8 ) );
// DEBUG_STORE_DATA( xq.dat, psEnc->sCmn.sNSQ.xqBuf, psEnc->sCmn.frame_length * sizeof( SKP_float ) );
/*DEBUG_STORE_DATA( xq.dat, psEnc->sCmn.sNSQ.xqBuf, psEnc->sCmn.frame_length * sizeof( SKP_float ) );*/
#endif
return ret;
}
......
......@@ -66,9 +66,11 @@ static void silk_P_Ana_calc_energy_st3(
opus_int complexity /* I Complexity setting */
);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//% CORE PITCH ANALYSIS FUNCTION %
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CORE PITCH ANALYSIS FUNCTION %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
opus_int silk_pitch_analysis_core_FLP( /* O voicing estimate: 0 voiced, 1 unvoiced */
const SKP_float *frame, /* I signal of length PE_FRAME_LENGTH_MS*Fs_kHz */
opus_int *pitch_out, /* O 4 pitch lag values */
......@@ -285,7 +287,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O voicing estimate: 0 voiced, 1 unvoic
/*********************************************************************************
* Find energy of each subframe projected onto its history, for a range of delays
*********************************************************************************/
SKP_memset( C, 0, PE_MAX_NB_SUBFR*((PE_MAX_LAG >> 1) + 5) * sizeof(SKP_float)); // Is this needed?
SKP_memset( C, 0, PE_MAX_NB_SUBFR*((PE_MAX_LAG >> 1) + 5) * sizeof(SKP_float)); /* Is this needed?*/
if( Fs_kHz == 8 ) {
target_ptr = &frame[ PE_LTP_MEM_LENGTH_MS * 8 ];
......
......@@ -80,7 +80,7 @@ void silk_solve_LDL_FLP(
opus_int i;
SKP_float L[ MAX_MATRIX_SIZE ][ MAX_MATRIX_SIZE ];
SKP_float T[ MAX_MATRIX_SIZE ];
SKP_float Dinv[ MAX_MATRIX_SIZE ]; // inverse diagonal elements of D
SKP_float Dinv[ MAX_MATRIX_SIZE ]; /* inverse diagonal elements of D*/
SKP_assert( M <= MAX_MATRIX_SIZE );
......@@ -163,7 +163,7 @@ void silk_LDL_FLP(
opus_int i, j, k, loop_count, err = 1;
SKP_float *ptr1, *ptr2;
double temp, diag_min_value;
SKP_float v[ MAX_MATRIX_SIZE ], D[ MAX_MATRIX_SIZE ]; // temp arrays
SKP_float v[ MAX_MATRIX_SIZE ], D[ MAX_MATRIX_SIZE ]; /* temp arrays*/
SKP_assert( M <= MAX_MATRIX_SIZE );
......@@ -172,7 +172,7 @@ void silk_LDL_FLP(
err = 0;
for( j = 0; j < M; j++ ) {
ptr1 = matrix_adr( L, j, 0, M );
temp = matrix_ptr( A, j, j, M ); // element in row j column j
temp = matrix_ptr( A, j, j, M ); /* element in row j column j*/
for( i = 0; i < j; i++ ) {
v[ i ] = ptr1[ i ] * D[ i ];
temp -= ptr1[ i ] * v[ i ];
......@@ -198,7 +198,7 @@ void silk_LDL_FLP(
temp += ptr2[ k ] * v[ k ];
}
matrix_ptr( L, i, j, M ) = ( SKP_float )( ( ptr1[ i ] - temp ) * Dinv[ j ] );
ptr2 += M; // go to next column
ptr2 += M; /* go to next column*/
}
}
}
......
......@@ -98,8 +98,8 @@ static inline void silk_A2NLSF_init(
P[ k ] = SKP_RSHIFT_ROUND( -a_Q16[ dd - k - 1 ] - a_Q16[ dd + k ], 16 - QPoly ); /* QPoly */
Q[ k ] = SKP_RSHIFT_ROUND( -a_Q16[ dd - k - 1 ] + a_Q16[ dd + k ], 16 - QPoly ); /* QPoly */
#elif( Qpoly == 16 )
P[ k ] = -a_Q16[ dd - k - 1 ] - a_Q16[ dd + k ]; // QPoly
Q[ k ] = -a_Q16[ dd - k - 1 ] + a_Q16[ dd + k ]; // QPoly
P[ k ] = -a_Q16[ dd - k - 1 ] - a_Q16[ dd + k ]; /* QPoly*/
Q[ k ] = -a_Q16[ dd - k - 1 ] + a_Q16[ dd + k ]; /* QPoly*/
#else
P[ k ] = SKP_LSHIFT( -a_Q16[ dd - k - 1 ] - a_Q16[ dd + k ], QPoly - 16 ); /* QPoly */
Q[ k ] = SKP_LSHIFT( -a_Q16[ dd - k - 1 ] + a_Q16[ dd + k ], QPoly - 16 ); /* QPoly */
......@@ -147,7 +147,7 @@ void silk_A2NLSF(
/* Find roots, alternating between P and Q */
p = P; /* Pointer to polynomial */
xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; // Q12
xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; /* Q12*/
ylo = silk_A2NLSF_eval_poly( p, xlo, dd );
if( ylo < 0 ) {
......@@ -235,9 +235,9 @@ void silk_A2NLSF(
#if OVERSAMPLE_COSINE_TABLE
xlo = silk_LSFCosTab_FIX_Q12[ ( k - 1 ) >> 1 ] +
( ( silk_LSFCosTab_FIX_Q12[ k >> 1 ] -
silk_LSFCosTab_FIX_Q12[ ( k - 1 ) >> 1 ] ) >> 1 ); // Q12
silk_LSFCosTab_FIX_Q12[ ( k - 1 ) >> 1 ] ) >> 1 ); /* Q12*/
#else
xlo = silk_LSFCosTab_FIX_Q12[ k - 1 ]; // Q12
xlo = silk_LSFCosTab_FIX_Q12[ k - 1 ]; /* Q12*/
#endif
ylo = SKP_LSHIFT( 1 - ( root_ix & 2 ), 12 );
} else {
......@@ -262,11 +262,11 @@ void silk_A2NLSF(
}
/* Error: Apply progressively more bandwidth expansion and run again */
silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 10 + i, i ) ); // 10_Q16 = 0.00015
silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 10 + i, i ) ); /* 10_Q16 = 0.00015*/
silk_A2NLSF_init( a_Q16, P, Q, dd );
p = P; /* Pointer to polynomial */
xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; // Q12
xlo = silk_LSFCosTab_FIX_Q12[ 0 ]; /* Q12*/
ylo = silk_A2NLSF_eval_poly( p, xlo, dd );
if( ylo < 0 ) {
/* Set the first NLSF to zero and move on to the next */
......
......@@ -182,4 +182,4 @@ static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approxim
}
#endif
#endif //_SILK_FIX_INLINES_H_
#endif /*_SILK_FIX_INLINES_H_*/
......@@ -53,7 +53,7 @@ static inline void silk_NLSF2A_find_poly(
out[0] = SKP_LSHIFT( 1, QA );
out[1] = -cLSF[0];
for( k = 1; k < dd; k++ ) {
ftmp = cLSF[2*k]; // QA
ftmp = cLSF[2*k]; /* QA*/
out[k+1] = SKP_LSHIFT( out[k-1], 1 ) - (opus_int32)SKP_RSHIFT_ROUND64( SKP_SMULL( ftmp, out[k] ), QA );
for( n = k; n > 1; n-- ) {
out[n] += out[n-2] - (opus_int32)SKP_RSHIFT_ROUND64( SKP_SMULL( ftmp, out[n-1] ), QA );
......
......@@ -51,11 +51,11 @@ void silk_NLSF_VQ(
sum_error_Q26 = 0;
for( m = 0; m < LPC_order; m += 2 ) {
/* Compute weighted squared quantization error for index m */
diff_Q15 = SKP_SUB_LSHIFT32( in_Q15[ m ], ( opus_int32 )*pCB_Q8++, 7 ); // range: [ -32767 : 32767 ]
diff_Q15 = SKP_SUB_LSHIFT32( in_Q15[ m ], ( opus_int32 )*pCB_Q8++, 7 ); /* range: [ -32767 : 32767 ]*/
sum_error_Q30 = SKP_SMULBB( diff_Q15, diff_Q15 );
/* Compute weighted squared quantization error for index m + 1 */
diff_Q15 = SKP_SUB_LSHIFT32( in_Q15[m + 1], ( opus_int32 )*pCB_Q8++, 7 ); // range: [ -32767 : 32767 ]
diff_Q15 = SKP_SUB_LSHIFT32( in_Q15[m + 1], ( opus_int32 )*pCB_Q8++, 7 ); /* range: [ -32767 : 32767 ]*/
sum_error_Q30 = SKP_SMLABB( sum_error_Q30, diff_Q15, diff_Q15 );
sum_error_Q26 = SKP_ADD_RSHIFT32( sum_error_Q26, sum_error_Q30, 4 );
......
......@@ -286,7 +286,7 @@ static inline void silk_noise_shape_quantizer(
}
/* Input minus prediction plus noise feedback */
//r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP;
/*r = x[ i ] - LTP_pred - LPC_pred + n_AR + n_Tilt + n_LF + n_LTP;*/
tmp1 = SKP_SUB32( tmp1, n_LF_Q10 ); /* subtract Q10 stuff */
r_Q10 = SKP_SUB32( x_sc_Q10[ i ], tmp1 );
......
......@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "silk_SigProc_FIX.h"
/* Coefficients for 2-band filter bank based on first-order allpass filters */
// old
/* old*/
static opus_int16 A_fb1_20[ 1 ] = { 5394 << 1 };
static opus_int16 A_fb1_21[ 1 ] = { 20623 << 1 }; /* wrap-around to negative number is intentional */
......
......@@ -51,7 +51,7 @@ opus_int16 silk_int16_array_maxabs( /* O Maximum absolute value, max
}
/* Do not return 32768, as it will not fit in an int16 so may lead to problems later on */
if( max >= 1073676289 ) { // (2^15-1)^2 = 1073676289
if( max >= 1073676289 ) { /* (2^15-1)^2 = 1073676289*/
return( SKP_int16_MAX );
} else {
if( vec[ ind ] < 0 ) {
......
......@@ -31,8 +31,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "silk_main.h"
//#define SKP_enc_map(a) ((a) > 0 ? 1 : 0)
//#define SKP_dec_map(a) ((a) > 0 ? 1 : -1)
/*#define SKP_enc_map(a) ((a) > 0 ? 1 : 0)*/
/*#define SKP_dec_map(a) ((a) > 0 ? 1 : -1)*/
/* shifting avoids if-statement */
#define SKP_enc_map(a) ( SKP_RSHIFT( (a), 15 ) + 1 )
#define SKP_dec_map(a) ( SKP_LSHIFT( (a), 1 ) - 1 )
......
......@@ -38,7 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if (defined(_WIN32) || defined(_WINCE))
#include <windows.h> /* timer */
#else // Linux or Mac
#else /* Linux or Mac*/
#include <sys/time.h>
#endif
......@@ -53,7 +53,7 @@ unsigned long silk_GetHighResolutionTime(void) /* O: time in usec*/
QueryPerformanceFrequency(&lpFrequency);
return (unsigned long)((1000000*(lpPerformanceCount.QuadPart)) / lpFrequency.QuadPart);
}
#else // Linux or Mac
#else /* Linux or Mac*/
unsigned long GetHighResolutionTime(void) /* O: time in usec*/
{
struct timeval tv;
......
......@@ -211,11 +211,11 @@ extern "C"
#define NLSF_QUANT_DEL_DEC_STATES ( 1 << NLSF_QUANT_DEL_DEC_STATES_LOG2 )
/* Transition filtering for mode switching */
# define TRANSITION_TIME_MS 5120 // 5120 = 64 * FRAME_LENGTH_MS * ( TRANSITION_INT_NUM - 1 ) = 64*(20*4)
# define TRANSITION_TIME_MS 5120 /* 5120 = 64 * FRAME_LENGTH_MS * ( TRANSITION_INT_NUM - 1 ) = 64*(20*4)*/
# define TRANSITION_NB 3 /* Hardcoded in tables */
# define TRANSITION_NA 2 /* Hardcoded in tables */
# define TRANSITION_INT_NUM 5 /* Hardcoded in tables */
# define TRANSITION_FRAMES ( TRANSITION_TIME_MS / MAX_FRAME_LENGTH_MS ) // todo: needs to be made flexible for 10 ms frames
# define TRANSITION_FRAMES ( TRANSITION_TIME_MS / MAX_FRAME_LENGTH_MS ) /* todo: needs to be made flexible for 10 ms frames*/
# define TRANSITION_INT_STEPS ( TRANSITION_FRAMES / ( TRANSITION_INT_NUM - 1 ) )
/* BWE factors to apply after packet loss */
......
......@@ -100,7 +100,7 @@ void silk_encode_indices(
#ifdef SAVE_ALL_INTERNAL_DATA
nBytes_after = SKP_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );
nBytes_after -= nBytes_before; // bytes just added
nBytes_after -= nBytes_before; /* bytes just added*/
DEBUG_STORE_DATA( nBytes_gains.dat, &nBytes_after, sizeof( opus_int ) );
#endif
......@@ -135,7 +135,7 @@ void silk_encode_indices(
#ifdef SAVE_ALL_INTERNAL_DATA
DEBUG_STORE_DATA( lsf_interpol.dat, &psIndices->NLSFInterpCoef_Q2, sizeof(int) );
nBytes_after = SKP_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );
nBytes_after -= nBytes_before; // bytes just added
nBytes_after -= nBytes_before; /* bytes just added*/
DEBUG_STORE_DATA( nBytes_LSF.dat, &nBytes_after, sizeof( opus_int ) );
#endif
......@@ -175,7 +175,7 @@ void silk_encode_indices(
#ifdef SAVE_ALL_INTERNAL_DATA
nBytes_after = SKP_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );
nBytes_lagIndex = nBytes_after - nBytes_before; // bytes just added
nBytes_lagIndex = nBytes_after - nBytes_before; /* bytes just added*/
#endif
#ifdef SAVE_ALL_INTERNAL_DATA
......@@ -190,7 +190,7 @@ void silk_encode_indices(
ec_enc_icdf( psRangeEnc, psIndices->contourIndex, psEncC->pitch_contour_iCDF, 8 );
#ifdef SAVE_ALL_INTERNAL_DATA
nBytes_after = SKP_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );
nBytes_contourIndex = nBytes_after - nBytes_before; // bytes just added
nBytes_contourIndex = nBytes_after - nBytes_before; /* bytes just added*/
#endif
/********************/
......@@ -221,12 +221,12 @@ void silk_encode_indices(
#ifdef SAVE_ALL_INTERNAL_DATA
nBytes_after = SKP_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 );
nBytes_LTP = nBytes_after - nBytes_before; // bytes just added
nBytes_LTP = nBytes_after - nBytes_before; /* bytes just added*/
#endif
}
#ifdef SAVE_ALL_INTERNAL_DATA
else {
// Unvoiced speech
/* Unvoiced speech*/
nBytes_lagIndex = 0;
nBytes_contourIndex = 0;
nBytes_LTP = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment