📄 reverb_filter.h
字号:
/*//////////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 2005-2006 Intel Corporation. All Rights Reserved.
//
*/
/* Standard IPP headers */
#include "ipps.h"
/* Platform configuration */
//#include "ippac.h"
#ifndef __REVERB_FILTER_H__
#define __REVERB_FILTER_H__
#ifdef __cplusplus
extern "C" {
#endif
/************************
General Constants
*************************/
#define FIR_NZTAP_NUM 19 /* amount of non-zero taps for FIR filter */
#define COMB_NUM 6 /* num of comb filters */
#define COMBNZTAPSLEN1 2 /* 2+2 tap comb filter */
#define COMBNZTAPSLEN2 2
#define APNZTAPSLEN1 2 /* 2+1 tap allpass filter */
#define APNZTAPSLEN2 1
#define ALLPASS_GAIN 0.7f /* gain for allpass filter */
#define ALLPASS_DELAY 6 /* delay for allpass filter (in ms) */
/***********************
Reverberation State Variable
************************/
typedef struct {
Ipp32f scale;
Ipp8u *pData[2];
IppsFIRSparseState_32f *pState[2];
Ipp32s FIRTapPos[FIR_NZTAP_NUM];
} FIRInfo;
typedef struct {
Ipp32s sLen;
Ipp32s dLen;
Ipp8u *pData[2];
IppsIIRSparseState_32f *pState[2];
Ipp32f pNZTaps[COMBNZTAPSLEN1 + COMBNZTAPSLEN2];
Ipp32s pNZTapPos[COMBNZTAPSLEN1 + COMBNZTAPSLEN2];
Ipp32f g1;
Ipp32f g2; // G(1 - g1)
} COMBInfo;
typedef struct {
Ipp32s len;
Ipp8u *pData[2];
IppsIIRSparseState_32f *pState[2];
Ipp32f pNZTaps[APNZTAPSLEN1 + APNZTAPSLEN2];
Ipp32s pNZTapPos[APNZTAPSLEN1 + APNZTAPSLEN2];
} APInfo;
typedef struct
{
Ipp32s maxFrameLen; /* max length of the frame */
Ipp32f decayTime;
bool eReflect; /* early reflections */
bool lReflect; /* late echoes */
Ipp32f eReflectScale; /* scale factor for early reflections */
Ipp32f lReflectScale; /* scale factor for late echoes */
Ipp32f outputLevel; /* magnifier of output signal */
FIRInfo fir;
COMBInfo comb[COMB_NUM];
APInfo allpass;
Ipp32s fullDelayLineLen;
Ipp32f *pFullDelayLine[2];
Ipp32f *pSumBuf;
Ipp32f *pCombBuf;
Ipp32s delay;
} ReverbState;
typedef struct
{
Ipp32s nChannels;
Ipp32s sRate;
} FileInfo;
#ifdef __cplusplus
}
#endif
#endif /* __REVERB_FILTER_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -