Sound Open Firmware
Loading...
Searching...
No Matches
decibels.h
Go to the documentation of this file.
1
2/* SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright(c) 2019 Intel Corporation. All rights reserved.
5 *
6 * Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
7 */
8
15#ifndef __SOF_MATH_DECIBELS_H__
16#define __SOF_MATH_DECIBELS_H__
17
18#include <stdint.h>
19
20#define EXP_FIXED_INPUT_QY 27
21#define EXP_FIXED_OUTPUT_QY 20
22#define DB2LIN_FIXED_INPUT_QY 24
23#define DB2LIN_FIXED_OUTPUT_QY 20
24
30int32_t exp_fixed(int32_t x);
31
37int32_t db2lin_fixed(int32_t x);
38
39#endif /* __SOF_MATH_DECIBELS_H__ */
int32_t db2lin_fixed(int32_t x)
Convert decibels to linear amplitude scale 10^(x/20).
int32_t exp_fixed(int32_t x)
Compute fixed-point exponential e^x.