?? resamp.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) 1999-2006 Intel Corporation. All Rights Reserved.
//
// Intel(R) Integrated Performance Primitives Speech Processing Sample for Windows*
//
// By downloading and installing this sample, you hereby agree that the
// accompanying Materials are being provided to you under the terms and
// conditions of the End User License Agreement for the Intel(R) Integrated
// Performance Primitives product previously accepted by you. Please refer
// to the file ippEULA.rtf located in the root directory of your Intel(R) IPP
// product installation for more information.
//
*/
//---------------------------------------------------------------------
// data resampling class header
//---------------------------------------------------------------------
#include <ippsr.h>
class Resample {
private:
double factor; // resampling factor
float window; // size of the ideal lowpass filter window
float rollf; // roll-off frequency of the filter
float alpha; // parameter of the Kaiser window
int length; // filter length for resampling with fixed factor (+1 for 0 phase)
int nStep; // discretization step for filter coefficients
int inRate; // input frequency
int outRate; // output frequency
int bufSize; // output frequency
bool fast; // true for float-point calculations
bool FPcalc; // true for float-point calculations
int history; // ~length/2
bool fixed; // true for fixed factor filter
bool ready;
IppsResamlingPolyphase_16s *sfil;
IppsResamlingPolyphase_32f *ffil;
IppsResamlingPolyphaseFixed_16s *sfix;
IppsResamlingPolyphaseFixed_32f *ffix;
short *inBuf;
short *outBuf;
float *finBuf;
float *foutBuf;
public:
void Do(char* inFile, char* outFile);
bool Check(void);
void InitFix(int inRate, int outRate, int length, int bufSize);
void InitFix(int inRate, int outRate, float window, int bufSize);
void Init(double factor, int length, int nStep, int bufSize);
void Init(double factor, float window, int nStep, int bufSize);
Resample (float rollf, float alpha, bool fast, bool FPcalc);
~Resample ();
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -