AC63_BT_SDK/include_lib/media/spectrum/coeff_calculate_api.h
2025-02-18 15:40:42 +08:00

39 lines
957 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef COEFF_CALCULATE_API_H
#define COEFF_CALCULATE_API_H
int get_coeff_calculate_buf(int section);
void coeff_calculate_init(void *ptr, int section, int fs);
void bpf_filts(void *ptr, int *in_buf_fc, int *qf);
typedef struct spectrum {
int section;
int fs;
int *SOSMatrix;
int pool[0];
} spec;
#if 0
coeff_calculate.a库说明
该库根据给定的参数计算带通滤波器的系数;
调用流程:
bufsize = int get_coeff_calculate_buf(section); //获取buf大小
section段数可根据并联的需要进行配置
workbuf = malloc(bufsize); //申请内存
coeff_calculate_init(workbuf, section, fs); //初始化
fs:
采样频率
bpf_filts(workbuf, in_buf, qf); //运行
in_buf 输入的fc数据定点24bit与段数匹配
qf输入的q因子数据定点24bit与段数匹配
输出每段5个系数定点22bit对应br23模型系数存储在缓存SOSMatrix中
#endif
#endif