~ubuntu-branches/ubuntu/raring/python-scipy/raring-proposed

« back to all changes in this revision

Viewing changes to Lib/signal/medianfilter.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *  Cambridge University Press, 1992, Section 8.5, ISBN 0-521-43108-5
8
8
 */
9
9
 
10
 
void f_medfilt2(float*,float*,int*,int*);
11
 
void d_medfilt2(double*,double*,int*,int*);
12
 
void b_medfilt2(unsigned char*,unsigned char*,int*,int*);
 
10
#include "Python.h"
 
11
#define NO_IMPORT_ARRAY
 
12
#include "numpy/noprefix.h"
 
13
 
 
14
void f_medfilt2(float*,float*,intp*,intp*);
 
15
void d_medfilt2(double*,double*,intp*,intp*);
 
16
void b_medfilt2(unsigned char*,unsigned char*,intp*,intp*);
13
17
extern char *check_malloc (int);
14
18
 
15
19
#define ELEM_SWAP(a,b) { register float t=(a);(a)=(b);(b)=t; }
176
180
#undef ELEM_SWAP
177
181
 
178
182
/* 2-D median filter with zero-padding on edges. */
179
 
void d_medfilt2(in, out, Nwin, Ns)
180
 
double *in, *out;
181
 
int *Nwin, *Ns;
 
183
void d_medfilt2(double* in, double* out, intp* Nwin, intp* Ns)
182
184
183
185
  int nx, ny, hN[2];
184
186
  int pre_x, pre_y, pos_x, pos_y;
222
224
 
223
225
 
224
226
/* 2-D median filter with zero-padding on edges. */
225
 
void f_medfilt2(in, out, Nwin, Ns)
226
 
float *in, *out;
227
 
int *Nwin, *Ns;
 
227
void f_medfilt2(float* in, float* out, intp* Nwin, intp* Ns)
228
228
229
229
  int nx, ny, hN[2];
230
230
  int pre_x, pre_y, pos_x, pos_y;
268
268
 
269
269
 
270
270
/* 2-D median filter with zero-padding on edges. */
271
 
void b_medfilt2(in, out, Nwin, Ns)
272
 
unsigned char *in, *out;
273
 
int *Nwin, *Ns;
 
271
void b_medfilt2(unsigned char *in, unsigned char *out, intp* Nwin, intp* Ns)
274
272
275
273
  int nx, ny, hN[2];
276
274
  int pre_x, pre_y, pos_x, pos_y;