/* Apply sine window to signal vector. */ /* Window types: */ /* 1 -> sine window from 0 to pi/2 */ /* 2 -> sine window from pi/2 to pi */ /* Every other sample is linearly interpolated, for speed. */ /* Window length must be between 16 and 120 (incl) and a multiple of 4. */
void silk_apply_sine_window(
opus_int16 px_win[], /* O Pointer to windowed signal */ const opus_int16 px[], /* I Pointer to input signal */ const opus_int win_type, /* I Selects a window type */ const opus_int length /* I Window length, multiple of 4 */
)
{
opus_int k, f_Q16, c_Q16;
opus_int32 S0_Q16, S1_Q16;
celt_assert( win_type == 1 || win_type == 2 );
/* Length must be in a range from 16 to 120 and a multiple of 4 */
celt_assert( length >= 16 && length <= 120 );
celt_assert( ( length & 3 ) == 0 );
/* Frequency */
k = ( length >> 2 ) - 4;
celt_assert( k >= 0 && k <= 26 );
f_Q16 = (opus_int)freq_table_Q16[ k ];
/* Factor used for cosine approximation */
c_Q16 = silk_SMULWB( (opus_int32)f_Q16, -f_Q16 );
silk_assert( c_Q16 >= -32768 );
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.