Sound Open Firmware
Loading...
Searching...
No Matches
window.h File Reference
Include dependency graph for window.h:

Go to the source code of this file.

Macros

#define WIN_BLACKMAN_A0_Q15   Q_CONVERT_FLOAT(7938.0 / 18608.0, 15) /* For "exact" blackman 16bit */
#define WIN_BLACKMAN_A0_Q31   Q_CONVERT_FLOAT(7938.0 / 18608.0, 31) /* For "exact" blackman 32bit */

Functions

void win_rectangular_16b (int16_t win[], int length)
 Returns a rectangular window with 16 bits, simply a values of ones vector.
void win_rectangular_32b (int32_t win[], int length)
 Returns a rectangular window with 32 bits, simply a values of ones vector.
void win_blackman_16b (int16_t win[], int length, int16_t a0)
 Calculates a Blackman window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Blackman_window.
void win_blackman_32b (int32_t win[], int length, int32_t a0)
 Calculates a Blackman window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Blackman_window.
void win_hann_16b (int16_t win[], int length)
 Calculates a Hann window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.
void win_hann_32b (int32_t win[], int length)
 Calculates a Hann window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.
void win_hamming_16b (int16_t win[], int length)
 Calculates a Hamming window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.
void win_hamming_32b (int32_t win[], int length)
 Calculates a Hamming window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.
void win_povey_16b (int16_t win[], int length)
 Calculates a Povey window function with 16 bits.

Macro Definition Documentation

◆ WIN_BLACKMAN_A0_Q15

#define WIN_BLACKMAN_A0_Q15   Q_CONVERT_FLOAT(7938.0 / 18608.0, 15) /* For "exact" blackman 16bit */

◆ WIN_BLACKMAN_A0_Q31

#define WIN_BLACKMAN_A0_Q31   Q_CONVERT_FLOAT(7938.0 / 18608.0, 31) /* For "exact" blackman 32bit */

Function Documentation

◆ win_blackman_16b()

void win_blackman_16b ( int16_t win[],
int length,
int16_t a0 )

Calculates a Blackman window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Blackman_window.

Parameters
winPointer to output vector with Q1.15 coefficients
lengthLength of coefficients vector
a0Parameter for window shape, use e.g. 0.42 as Q1.15

◆ win_blackman_32b()

void win_blackman_32b ( int32_t win[],
int length,
int32_t a0 )

Calculates a Blackman window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Blackman_window.

Parameters
winPointer to output vector with Q1.31 coefficients
lengthLength of coefficients vector
a0Parameter for window shape, use e.g. 0.42 as Q1.31

◆ win_hamming_16b()

void win_hamming_16b ( int16_t win[],
int length )

Calculates a Hamming window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.

Parameters
winPointer to output vector with Q1.15 coefficients
lengthLength of coefficients vector

◆ win_hamming_32b()

void win_hamming_32b ( int32_t win[],
int length )

Calculates a Hamming window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.

Parameters
winPointer to output vector with Q1.31 coefficients
lengthLength of coefficients vector

◆ win_hann_16b()

void win_hann_16b ( int16_t win[],
int length )

Calculates a Hann window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.

Parameters
winPointer to output vector with Q1.15 coefficients
lengthLength of coefficients vector

◆ win_hann_32b()

void win_hann_32b ( int32_t win[],
int length )

Calculates a Hann window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_function#Hann_and_Hamming_windows.

Parameters
winPointer to output vector with Q1.31 coefficients
lengthLength of coefficients vector

◆ win_povey_16b()

void win_povey_16b ( int16_t win[],
int length )

Calculates a Povey window function with 16 bits.

It's a window function used in Pytorch and Kaldi.

Parameters
winOutput vector with coefficients
lengthLength of coefficients vector

◆ win_rectangular_16b()

void win_rectangular_16b ( int16_t win[],
int length )

Returns a rectangular window with 16 bits, simply a values of ones vector.

Parameters
winPointer to output vector with Q1.15 coefficients
lengthLength of coefficients vector

◆ win_rectangular_32b()

void win_rectangular_32b ( int32_t win[],
int length )

Returns a rectangular window with 32 bits, simply a values of ones vector.

Parameters
winPointer to output vector with Q1.31 coefficients
lengthLength of coefficients vector