A Survey of Gaussian Convolution Algorithms
filter_util.h
Go to the documentation of this file.
1 
20 #ifndef _FILTER_UTIL_H_
21 #define _FILTER_UTIL_H_
22 
23 #include "num.h"
24 
25 #ifdef __GNUC__
26 __attribute__((pure,unused))
27 #endif
28 
68 static long extension(long N, long n)
69 {
70  while (1)
71  if (n < 0)
72  n = -1 - n; /* Reflect over n = -1/2. */
73  else if (n >= N)
74  n = 2 * N - 1 - n; /* Reflect over n = N - 1/2. */
75  else
76  break;
77 
78  return n;
79 }
80 
81 void recursive_filter_impulse(num *h, long N,
82  const num *b, int p, const num *a, int q);
83 
84 void init_recursive_filter(num *dest, const num *src, long N, long stride,
85  const num *b, int p, const num *a, int q,
86  num sum, num tol, long max_iter);
87 
88 #endif /* _FILTER_UTIL_H_ */