martaczaska

blockfir

May 16th, 2020
1,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. void blockfir(short* input, const short* filter, short* output, int numSamples, int numFilter){
  2.     int i;
  3.     int j;
  4.  
  5.     for(j = 0; j < N; j++){
  6.         long y = 0;
  7.        
  8.             for(i = 0; i < N; i++){
  9.                 y = _smac(y, input[i], filter[i]);
  10.             }
  11.  
  12.         output[j] = (short)(_sround(y) >> 16);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment