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
9#ifndef __SOF_MATH_DECIBELS_H__
10#define __SOF_MATH_DECIBELS_H__
11
12#include <stdint.h>
13
14#define EXP_FIXED_INPUT_QY 27
15#define EXP_FIXED_OUTPUT_QY 20
16#define DB2LIN_FIXED_INPUT_QY 24
17#define DB2LIN_FIXED_OUTPUT_QY 20
18
19int32_t exp_fixed(int32_t x); /* Input is Q5.27, output is Q12.20 */
20int32_t db2lin_fixed(int32_t x); /* Input is Q8.24, output is Q12.20 */
21
22#endif /* __SOF_MATH_DECIBELS_H__ */
int32_t db2lin_fixed(int32_t x)
int32_t exp_fixed(int32_t x)