/* 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.) */ /* Note: A monic filter is one with the first coefficient equal to 1.0. In Silk we omit the first */ /* coefficient in an array of coefficients, for monic filters. */ static OPUS_INLINE silk_float warped_gain( const silk_float *coefs,
silk_float lambda,
opus_int order
) {
opus_int i;
silk_float gain;
lambda = -lambda;
gain = coefs[ order - 1 ]; for( i = order - 2; i >= 0; i-- ) {
gain = lambda * gain + coefs[ i ];
} return (silk_float)( 1.0f / ( 1.0f - lambda * gain ) );
}
/* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum */ /* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */ static OPUS_INLINE void warped_true2monic_coefs(
silk_float *coefs,
silk_float lambda,
silk_float limit,
opus_int order
) {
opus_int i, iter, ind = 0;
silk_float tmp, maxabs, chirp, gain;
/* Convert to monic coefficients */ for( i = order - 1; i > 0; i-- ) {
coefs[ i - 1 ] -= lambda * coefs[ i ];
}
gain = ( 1.0f - lambda * lambda ) / ( 1.0f + lambda * coefs[ 0 ] ); for( i = 0; i < order; i++ ) {
coefs[ i ] *= gain;
}
/* Limit */ for( iter = 0; iter < 10; iter++ ) { /* Find maximum absolute value */
maxabs = -1.0f; for( i = 0; i < order; i++ ) {
tmp = silk_abs_float( coefs[ i ] ); if( tmp > maxabs ) {
maxabs = tmp;
ind = i;
}
} if( maxabs <= limit ) { /* Coefficients are within range - done */ return;
}
/* Convert back to true warped coefficients */ for( i = 1; i < order; i++ ) {
coefs[ i - 1 ] += lambda * coefs[ i ];
}
gain = 1.0f / gain; for( i = 0; i < order; i++ ) {
coefs[ i ] *= gain;
}
/* Point to start of first LPC analysis block */
x_ptr = x - psEnc->sCmn.la_shape;
/****************/ /* GAIN CONTROL */ /****************/
SNR_adj_dB = psEnc->sCmn.SNR_dB_Q7 * ( 1 / 128.0f );
/* Input quality is the average of the quality in the lowest two VAD bands */
psEncCtrl->input_quality = 0.5f * ( psEnc->sCmn.input_quality_bands_Q15[ 0 ] + psEnc->sCmn.input_quality_bands_Q15[ 1 ] ) * ( 1.0f / 32768.0f );
/* Coding quality level, between 0.0 and 1.0 */
psEncCtrl->coding_quality = silk_sigmoid( 0.25f * ( SNR_adj_dB - 20.0f ) );
/*******************************/ /* Control bandwidth expansion */ /*******************************/ /* More BWE for signals with high prediction gain */
strength = FIND_PITCH_WHITE_NOISE_FRACTION * psEncCtrl->predGain; /* between 0.0 and 1.0 */
BWExp = BANDWIDTH_EXPANSION / ( 1.0f + strength * strength );
/* Slightly more warping in analysis will move quantization noise up in frequency, where it's better masked */
warping = (silk_float)psEnc->sCmn.warping_Q16 / 65536.0f + 0.01f * psEncCtrl->coding_quality;
/********************************************/ /* Compute noise shaping AR coefs and gains */ /********************************************/ for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { /* Apply window: sine slope followed by flat part followed by cosine slope */
opus_int shift, slope_part, flat_part;
flat_part = psEnc->sCmn.fs_kHz * 3;
slope_part = ( psEnc->sCmn.shapeWinLength - flat_part ) / 2;
/* More harmonic noise shaping for high bitrates or noisy input */
HarmShapeGain += HIGH_RATE_OR_LOW_QUALITY_HARMONIC_SHAPING *
( 1.0f - ( 1.0f - psEncCtrl->coding_quality ) * psEncCtrl->input_quality );
/* Less harmonic noise shaping for less periodic signals */
HarmShapeGain *= ( silk_float )sqrt( psEnc->LTPCorr );
} else {
HarmShapeGain = 0.0f;
}
/*************************/ /* Smooth over subframes */ /*************************/ for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) {
psShapeSt->HarmShapeGain_smth += SUBFR_SMTH_COEF * ( HarmShapeGain - psShapeSt->HarmShapeGain_smth );
psEncCtrl->HarmShapeGain[ k ] = psShapeSt->HarmShapeGain_smth;
psShapeSt->Tilt_smth += SUBFR_SMTH_COEF * ( Tilt - psShapeSt->Tilt_smth );
psEncCtrl->Tilt[ k ] = psShapeSt->Tilt_smth;
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.12Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-01)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.