⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resamp.h

📁 Intel开发的IPP库的应用实例
💻 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 + -