DSPLIB的问题,我需要对信号做加窗处理需要调用什么函数?怎么使用?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
dsplib里没有hamming窗函数。请看一下下面的实现方法。
https://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/590483
dsplib里没有窗函数的函数是吗?其实不管用什么窗函数,都是直接与窗函数相乘即可?
mult= 0.5 * (1 -
cos
(2*PI*i/2047));就是Hanning窗函数的表达式。
For example the 2k sample hanning window implementation would be :
vecSize =2048
1
2
3
4
5
6
7
8
9
10
|
_nassert(vecSize % 8 == 0 ); // window size is always multiple of 8 _nassert(vecSize > 0); // window size is always greater than 0 _nassert(( int )DataOut % 8 == 0); // data is double word aligned _nassert(( int )DataInput % 8 == 0); // data is double word aligend #pragma MUST_ITERATE(64,8192,64); for ( i = 0; i < vecSize; i++) { double mult= 0.5 * (1 - cos (2*PI*i/2047)); DataOut[i] = mult * DataInput[i]; } |