📄 nspgrtzl.h
字号:
/*M*
//
// 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) 1995 Intel Corporation. All Rights Reserved.
//
// $Workfile: nspgrtzl.h $
// $Revision: 3 $
// $Modtime: Dec 16 1996 18:31:26 $
//
// Purpose: NSP Single Frequency DFT (Goertzel)
*M*/
#ifdef __cplusplus
extern "C" {
#endif
#if !defined (_NSPGRTZL_H) || defined (_OWN_BLDPCS)
# define _NSPGRTZL_H
/* ------------------------------------------------------------------------*/
#if !defined (_OWN_BLDPCS)
/* Single Frequency DFT structures. */
typedef struct _NSPSGoertzState {
float freq;
float cosV;
float sinV;
float cpcV;
float prev2re;
float prev2im;
float prev1re;
float prev1im;
} NSPSGoertzState;
typedef NSPSGoertzState NSPCGoertzState;
typedef struct _NSPDGoertzState {
double freq;
double cosV;
double sinV;
double cpcV;
double prev2re;
double prev2im;
double prev1re;
double prev1im;
} NSPDGoertzState;
typedef NSPDGoertzState NSPZGoertzState;
#endif
/* ------------------------------------------------------------------------*/
/* GoertzInit */
/* */
/* Initializes the coefficients and zeros the delay line. */
NSPAPI(void,nspsGoertzInit,(float freq, NSPSGoertzState *stPtr))
NSPAPI(void,nspcGoertzInit,(float freq, NSPCGoertzState *stPtr))
NSPAPI(void,nspdGoertzInit,(double freq, NSPDGoertzState *stPtr))
NSPAPI(void,nspzGoertzInit,(double freq, NSPZGoertzState *stPtr))
/* ------------------------------------------------------------------------*/
/* GoertzReset */
/* */
/* Zeros the delay line. */
NSPAPI(void,nspsGoertzReset,(NSPSGoertzState *stPtr))
NSPAPI(void,nspcGoertzReset,(NSPCGoertzState *stPtr))
NSPAPI(void,nspdGoertzReset,(NSPDGoertzState *stPtr))
NSPAPI(void,nspzGoertzReset,(NSPZGoertzState *stPtr))
/* ------------------------------------------------------------------------*/
/* Goertz */
/* */
/* Single Frequency DFT (Goertzel algorithm) */
NSPAPI(SCplx,nspsGoertz,(NSPSGoertzState *stPtr, float sample))
NSPAPI(SCplx,nspcGoertz,(NSPCGoertzState *stPtr, SCplx sample))
NSPAPI(DCplx,nspdGoertz,(NSPDGoertzState *stPtr, double sample))
NSPAPI(DCplx,nspzGoertz,(NSPZGoertzState *stPtr, DCplx sample))
NSPAPI(SCplx,nspsbGoertz,(NSPSGoertzState *stPtr,const float *inSamps,int len))
NSPAPI(SCplx,nspcbGoertz,(NSPCGoertzState *stPtr,const SCplx *inSamps,int len))
NSPAPI(DCplx,nspdbGoertz,(NSPDGoertzState *stPtr,const double *inSamps,int len))
NSPAPI(DCplx,nspzbGoertz,(NSPZGoertzState *stPtr,const DCplx *inSamps,int len))
NSPAPI(void,nspsGoertzOut,(NSPSGoertzState *stPtr, float sample, SCplx* val))
NSPAPI(void,nspcGoertzOut,(NSPCGoertzState *stPtr, SCplx sample, SCplx* val))
NSPAPI(void,nspsbGoertzOut,(NSPSGoertzState *stPtr,const float *inSamps,int len, SCplx* val))
NSPAPI(void,nspcbGoertzOut,(NSPCGoertzState *stPtr,const SCplx *inSamps,int len, SCplx* val))
#endif /* _NSPGRTZL_H */
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -