ref: 43da5898a011c877a9b64f54f220102e431e00c3
parent: e766d9f63d65bd7b6cd1bcdcf5cd4485392cca52
author: Jean-Marc Valin <[email protected]>
date: Sun Aug 28 20:00:25 EDT 2011
This should remove the last // comments
--- a/silk/fixed/silk_LTP_analysis_filter_FIX.c
+++ b/silk/fixed/silk_LTP_analysis_filter_FIX.c
@@ -66,7 +66,7 @@
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 );
--- a/silk/fixed/silk_noise_shape_analysis_FIX.c
+++ b/silk/fixed/silk_noise_shape_analysis_FIX.c
@@ -34,7 +34,7 @@
/* 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 @@
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 @@
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 @@
/* 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 @@
}
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 @@
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 @@
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 );
--- a/silk/fixed/silk_residual_energy_FIX.c
+++ b/silk/fixed/silk_residual_energy_FIX.c
@@ -82,10 +82,10 @@
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;
}
}
--- a/silk/fixed/silk_warped_autocorrelation_FIX.c
+++ b/silk/fixed/silk_warped_autocorrelation_FIX.c
@@ -84,5 +84,5 @@
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*/
}
--- a/silk/float/silk_LTP_scale_ctrl_FLP.c
+++ b/silk/float/silk_LTP_scale_ctrl_FLP.c
@@ -39,7 +39,7 @@
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;
--- a/silk/float/silk_burg_modified_FLP.c
+++ b/silk/float/silk_burg_modified_FLP.c
@@ -31,7 +31,7 @@
#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 */
--- a/silk/float/silk_encode_frame_FLP.c
+++ b/silk/float/silk_encode_frame_FLP.c
@@ -199,8 +199,8 @@
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 @@
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;
}
--- a/silk/float/silk_pitch_analysis_core_FLP.c
+++ b/silk/float/silk_pitch_analysis_core_FLP.c
@@ -66,9 +66,11 @@
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 @@
/*********************************************************************************
* 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 ];
--- a/silk/float/silk_solve_LS_FLP.c
+++ b/silk/float/silk_solve_LS_FLP.c
@@ -80,7 +80,7 @@
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 @@
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 @@
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 @@
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*/
}
}
}
--- a/silk/silk_A2NLSF.c
+++ b/silk/silk_A2NLSF.c
@@ -98,8 +98,8 @@
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 @@
/* 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 @@
#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 @@
}
/* 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 */
--- a/silk/silk_Inlines.h
+++ b/silk/silk_Inlines.h
@@ -182,4 +182,4 @@
}
#endif
-#endif //_SILK_FIX_INLINES_H_
+#endif /*_SILK_FIX_INLINES_H_*/
--- a/silk/silk_NLSF2A.c
+++ b/silk/silk_NLSF2A.c
@@ -53,7 +53,7 @@
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 );
--- a/silk/silk_NLSF_VQ.c
+++ b/silk/silk_NLSF_VQ.c
@@ -51,11 +51,11 @@
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 );
--- a/silk/silk_NSQ.c
+++ b/silk/silk_NSQ.c
@@ -286,7 +286,7 @@
}
/* 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 );
--- a/silk/silk_ana_filt_bank_1.c
+++ b/silk/silk_ana_filt_bank_1.c
@@ -32,7 +32,7 @@
#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 */
--- a/silk/silk_array_maxabs.c
+++ b/silk/silk_array_maxabs.c
@@ -51,7 +51,7 @@
}
/* 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 ) {
--- a/silk/silk_code_signs.c
+++ b/silk/silk_code_signs.c
@@ -31,8 +31,8 @@
#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 )
--- a/silk/silk_debug.c
+++ b/silk/silk_debug.c
@@ -38,7 +38,7 @@
#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 @@
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;
--- a/silk/silk_define.h
+++ b/silk/silk_define.h
@@ -211,11 +211,11 @@
#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 */
--- a/silk/silk_encode_indices.c
+++ b/silk/silk_encode_indices.c
@@ -100,7 +100,7 @@
#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 @@
#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 @@
#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 @@
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 @@
#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;
--- a/silk/silk_encode_pulses.c
+++ b/silk/silk_encode_pulses.c
@@ -75,7 +75,7 @@
const opus_uint8 *cdf_ptr;
const opus_uint8 *nBits_ptr;
- SKP_memset( pulses_comb, 0, 8 * sizeof( opus_int ) ); // Fixing Valgrind reported problem
+ SKP_memset( pulses_comb, 0, 8 * sizeof( opus_int ) ); /* Fixing Valgrind reported problem*/
/****************************/
/* Prepare for shell coding */
--- a/silk/silk_main.h
+++ b/silk/silk_main.h
@@ -45,9 +45,9 @@
/* Uncomment the next line to store intermadiate data to files */
-//#define SAVE_ALL_INTERNAL_DATA 1
+/*#define SAVE_ALL_INTERNAL_DATA 1*/
/* Uncomment the next line to force a fixed internal sampling rate (independent of what bitrate is used */
-//#define FORCE_INTERNAL_FS_KHZ 16
+/*#define FORCE_INTERNAL_FS_KHZ 16*/
/* Convert Left/Right stereo signal to adaptive Mid/Side representation */
--- a/silk/silk_pitch_analysis_core.c
+++ b/silk/silk_pitch_analysis_core.c
@@ -328,7 +328,7 @@
SKP_assert( target_ptr + sf_length_8kHz <= frame_8kHz + frame_length_8kHz );
energy_target = silk_inner_prod_aligned( target_ptr, target_ptr, sf_length_8kHz );
- // ToDo: Calculate 1 / energy_target here and save one division inside next for loop
+ /* ToDo: Calculate 1 / energy_target here and save one division inside next for loop*/
for( j = 0; j < length_d_comp; j++ ) {
d = d_comp[ j ];
basis_ptr = target_ptr - d;
@@ -350,7 +350,7 @@
lz = silk_CLZ32( temp32 );
lshift = SKP_LIMIT_32( lz - 1, 0, 15 );
energy = SKP_min( energy_target, energy_basis );
- C[ k ][ d ] = SKP_DIV32( SKP_LSHIFT( temp32, lshift ), SKP_RSHIFT( energy, 15 - lshift ) + 1 ); // Q15
+ C[ k ][ d ] = SKP_DIV32( SKP_LSHIFT( temp32, lshift ), SKP_RSHIFT( energy, 15 - lshift ) + 1 ); /* Q15*/
} else {
C[ k ][ d ] = 0;
}
--- a/silk/silk_resampler_private.h
+++ b/silk/silk_resampler_private.h
@@ -117,5 +117,5 @@
#ifdef __cplusplus
}
#endif
-#endif // SILK_RESAMPLER_H
+#endif /* SILK_RESAMPLER_H*/
--- a/silk/silk_resampler_rom.h
+++ b/silk/silk_resampler_rom.h
@@ -76,4 +76,4 @@
}
#endif
-#endif // _SILK_FIX_RESAMPLER_ROM_H_
+#endif /* _SILK_FIX_RESAMPLER_ROM_H_*/
--- a/silk/silk_scale_vector.c
+++ b/silk/silk_scale_vector.c
@@ -41,6 +41,6 @@
opus_int i;
for( i = 0; i < dataSize; i++ ) {
- data1[ i ] = (opus_int32)SKP_CHECK_FIT32( SKP_RSHIFT64( SKP_SMULL( data1[ i ], gain_Q26 ), 8 ) );// OUTPUT: Q18
+ data1[ i ] = (opus_int32)SKP_CHECK_FIT32( SKP_RSHIFT64( SKP_SMULL( data1[ i ], gain_Q26 ), 8 ) );/* OUTPUT: Q18*/
}
}
--- a/silk/silk_tuning_parameters.h
+++ b/silk/silk_tuning_parameters.h
@@ -167,4 +167,4 @@
}
#endif
-#endif // SILK_TUNING_PARAMETERS_H
+#endif /* SILK_TUNING_PARAMETERS_H*/