Sound Open Firmware
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2022-2025 Intel Corporation.
4 *
5 * Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
6 */
7
14#ifndef __SOF_MATH_WINDOW_H__
15#define __SOF_MATH_WINDOW_H__
16
17#include <sof/audio/format.h>
18#include <stdint.h>
19
20#define WIN_BLACKMAN_A0_Q15 Q_CONVERT_FLOAT(7938.0 / 18608.0, 15) /* For "exact" blackman 16bit */
21#define WIN_BLACKMAN_A0_Q31 Q_CONVERT_FLOAT(7938.0 / 18608.0, 31) /* For "exact" blackman 32bit */
22
28void win_rectangular_16b(int16_t win[], int length);
29
35void win_rectangular_32b(int32_t win[], int length);
36
45void win_blackman_16b(int16_t win[], int length, int16_t a0);
46
55void win_blackman_32b(int32_t win[], int length, int32_t a0);
56
64void win_hann_16b(int16_t win[], int length);
65
73void win_hann_32b(int32_t win[], int length);
74
82void win_hamming_16b(int16_t win[], int length);
83
91void win_hamming_32b(int32_t win[], int length);
92
100void win_povey_16b(int16_t win[], int length);
101
102#endif /* __SOF_MATH_WINDOW_H__ */
void win_hamming_32b(int32_t win[], int length)
Calculates a Hamming window function with 32 bits, reference https://en.wikipedia....
void win_rectangular_32b(int32_t win[], int length)
Returns a rectangular window with 32 bits, simply a values of ones vector.
void win_hamming_16b(int16_t win[], int length)
Calculates a Hamming window function with 16 bits, reference https://en.wikipedia....
void win_rectangular_16b(int16_t win[], int length)
Returns a rectangular window with 16 bits, simply a values of ones vector.
void win_hann_16b(int16_t win[], int length)
Calculates a Hann window function with 16 bits, reference https://en.wikipedia.org/wiki/Window_functi...
void win_povey_16b(int16_t win[], int length)
Calculates a Povey window function with 16 bits.
void win_blackman_32b(int32_t win[], int length, int32_t a0)
Calculates a Blackman window function with 32 bits, reference https://en.wikipedia....
void win_hann_32b(int32_t win[], int length)
Calculates a Hann window function with 32 bits, reference https://en.wikipedia.org/wiki/Window_functi...
void win_blackman_16b(int16_t win[], int length, int16_t a0)
Calculates a Blackman window function with 16 bits, reference https://en.wikipedia....