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
8/* Window functions related functions */
9
10#ifndef __SOF_MATH_WINDOW_H__
11#define __SOF_MATH_WINDOW_H__
12
13#include <sof/audio/format.h>
14#include <stdint.h>
15
16#define WIN_BLACKMAN_A0_Q15 Q_CONVERT_FLOAT(7938.0 / 18608.0, 15) /* For "exact" blackman 16bit */
17#define WIN_BLACKMAN_A0_Q31 Q_CONVERT_FLOAT(7938.0 / 18608.0, 31) /* For "exact" blackman 32bit */
18
24void win_rectangular_16b(int16_t win[], int length);
25
31void win_rectangular_32b(int32_t win[], int length);
32
41void win_blackman_16b(int16_t win[], int length, int16_t a0);
42
51void win_blackman_32b(int32_t win[], int length, int32_t a0);
52
60void win_hann_16b(int16_t win[], int length);
61
69void win_hann_32b(int32_t win[], int length);
70
78void win_hamming_16b(int16_t win[], int length);
79
87void win_hamming_32b(int32_t win[], int length);
88
96void win_povey_16b(int16_t win[], int length);
97
98#endif /* __SOF_MATH_WINDOW_H__ */
uint32_t length
Definition tlv.h:1
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....