Commit 925627b5 authored by ericlyon's avatar ericlyon

Merge pull request #1 from umlaeute/fix_nameclashes

Fix nameclashes
parents 5d1f146e 05f68139
File mode changed from 100755 to 100644
......@@ -2,12 +2,12 @@
#include "PenroseOscil.h"
t_float frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength ) {
t_float fftease_frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength ) {
return (frequency / samplingRate) * (t_float) bufferLength;
}
void makeSineBuffer( t_float *buffer, int bufferLength ) {
void fftease_makeSineBuffer( t_float *buffer, int bufferLength ) {
int i;
......@@ -20,7 +20,7 @@ void makeSineBuffer( t_float *buffer, int bufferLength ) {
}
t_float bufferOscil( t_float *phase, t_float increment, t_float *buffer,
t_float fftease_bufferOscil( t_float *phase, t_float increment, t_float *buffer,
int bufferLength )
{
......
#include "PenroseRand.h"
float rrand(int *seed)
float fftease_rrand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/16384. - 1.);
}
float prand(int *seed)
float fftease_prand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/32768.);
......
float rrand(int *seed);
float prand(int *seed);
float fftease_rrand(int *seed);
float fftease_prand(int *seed);
#include "fftease.h" void bloscbank( t_float *S, t_float *O, int D, t_float iD, t_float *lf, t_float *la, t_float *index, t_float *tab, int len, t_float synt, int lo, int hi ) { int amp,freq,chan, i; t_float a,ainc,f,finc,address; for ( chan = lo; chan < hi; chan++ ) { freq = ( amp = ( chan << 1 ) ) + 1; if ( S[amp] > synt ){ finc = ( S[freq] - ( f = lf[chan] ) )* iD; ainc = ( S[amp] - ( a = la[chan] ) )* iD; address = index[chan]; for ( i = 0; i < D ; i++ ) { O[i] += a*tab[ (int) address ]; address += f; while ( address >= len ) address -= len; while ( address < 0 ) address += len; a += ainc; f += finc; } lf[chan] = S[freq]; la[chan] = S[amp]; index[chan] = address; } } }
\ No newline at end of file
#include "fftease.h"
void fftease_bloscbank( t_float *S, t_float *O, int D, t_float iD, t_float *lf, t_float *la, t_float *index, t_float *tab,
int len, t_float synt, int lo, int hi )
{
int amp,freq,chan, i;
t_float a,ainc,f,finc,address;
for ( chan = lo; chan < hi; chan++ ) {
freq = ( amp = ( chan << 1 ) ) + 1;
if ( S[amp] > synt ){
finc = ( S[freq] - ( f = lf[chan] ) )* iD;
ainc = ( S[amp] - ( a = la[chan] ) )* iD;
address = index[chan];
for ( i = 0; i < D ; i++ ) {
O[i] += a*tab[ (int) address ];
address += f;
while ( address >= len )
address -= len;
while ( address < 0 )
address += len;
a += ainc;
f += finc;
}
lf[chan] = S[freq];
la[chan] = S[amp];
index[chan] = address;
}
}
}
\ No newline at end of file
......@@ -312,9 +312,9 @@ void do_bthresher(t_bthresher *x)
short inf_hold = x->inf_hold;
int i, j;
fold(fft);
rdft(fft,1);
convert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_convert(fft);
if( x->first_frame ){
for ( i = 0; i < N+2; i++ ){
composite_frame[i] = channel[i];
......@@ -364,11 +364,11 @@ void do_bthresher(t_bthresher *x)
channel[i] = composite_frame[i];
}
if(fft->obank_flag){
oscbank(fft);
fftease_oscbank(fft);
} else {
unconvert(fft);
rdft(fft,-1);
overlapadd(fft);
fftease_unconvert(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
}
}
......
......@@ -271,14 +271,14 @@ void do_burrow(t_burrow *x)
/* apply hamming window and fold our window buffer into the fft buffer */
fold(fft);
fold(fft2);
fftease_fold(fft);
fftease_fold(fft2);
/* do an fft */
rdft(fft, 1);
rdft(fft2, 1);
fftease_rdft(fft, 1);
fftease_rdft(fft2, 1);
if (invert) {
......@@ -348,11 +348,11 @@ void do_burrow(t_burrow *x)
/* do an inverse fft */
rdft(fft, -1);
fftease_rdft(fft, -1);
/* dewindow our result */
overlapadd(fft);
fftease_overlapadd(fft);
}
......
......@@ -364,9 +364,9 @@ void do_cavoc27(t_cavoc27 *x)
if( x->capture_flag || (x->capture_lock && ! x->freeze)) {
fold(fft);
rdft(fft,1);
convert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_convert(fft);
for( i = 1; i < fft->N+1; i += 2){
tmpchannel[i] = channel[i];
}
......@@ -421,11 +421,11 @@ void do_cavoc27(t_cavoc27 *x)
}
if(fft->obank_flag){
oscbank(fft);
fftease_oscbank(fft);
} else {
unconvert(fft);
rdft(fft, -1);
overlapadd(fft);
fftease_unconvert(fft);
fftease_rdft(fft, -1);
fftease_overlapadd(fft);
}
x->frames_left = frames_left;
......
......@@ -351,11 +351,11 @@ void do_cavoc(t_cavoc *x)
channel[(i*2) + 1] = freqs[i];
channel[i * 2] = amps[i];
}
oscbank(fft);
fftease_oscbank(fft);
} else {
unconvert(fft);
rdft(fft, -1);
overlapadd(fft);
fftease_unconvert(fft);
fftease_rdft(fft, -1);
fftease_overlapadd(fft);
}
}
......
......@@ -125,7 +125,7 @@ void centerring_init(t_centerring *x)
x->ringPhases = (t_float *) calloc((N2 + 1), sizeof(t_float));
x->ringIncrements = (t_float *) calloc((N2 + 1), sizeof(t_float));
x->sineBuffer = (t_float *) calloc((x->bufferLength + 1), sizeof(t_float));
makeSineBuffer(x->sineBuffer, x->bufferLength);
fftease_makeSineBuffer(x->sineBuffer, x->bufferLength);
} else {
x->ringIncrements = (t_float *)realloc((void *)x->ringIncrements, (N2 + 1) * sizeof(t_float));
x->ringPhases = (t_float *)realloc((void *)x->ringPhases, (N2 + 1) * sizeof(t_float));
......@@ -157,9 +157,9 @@ void centerring_adjust( t_centerring *x ) {
for (i=0; i < N2; i++) {
*(ringIncrements+i) =
frequencyToIncrement(
fftease_frequencyToIncrement(
x->frameR,
x->baseFreq * ((rrand(&(x->seed)) * x->bandFreq) + x->constFreq ),
x->baseFreq * ((fftease_rrand(&(x->seed)) * x->bandFreq) + x->constFreq ),
x->bufferLength
);
}
......@@ -180,7 +180,7 @@ void centerring_randphases( t_centerring *x ) {
int i;
for (i=0; i < x->fft->N2; i++)
*((x->ringPhases)+i) = prand(&(x->seed)) * (float) (x->bufferLength);
*((x->ringPhases)+i) = fftease_prand(&(x->seed)) * (float) (x->bufferLength);
}
......@@ -204,8 +204,8 @@ void do_centerring(t_centerring *x)
x->recalc = 0;
fold(fft);
rdft(fft,1);
fftease_fold(fft);
fftease_rdft(fft,1);
/* convert to polar coordinates from complex values */
......@@ -224,8 +224,8 @@ void do_centerring(t_centerring *x)
for (i=0; i < N2; i++) {
even = i<<1;
*(channel + even) *= bufferOscil( ringPhases+i,
*(ringIncrements+i), sineBuffer, bufferLength );
*(channel + even) *= fftease_bufferOscil( ringPhases+i,
*(ringIncrements+i), sineBuffer, bufferLength );
}
/* convert from polar to cartesian */
......@@ -239,8 +239,8 @@ void do_centerring(t_centerring *x)
if ( i != N2 )
*(buffer + odd) = (*(channel + even)) * -sin( *(channel + odd) );
}
rdft(fft,-1);
overlapadd(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
}
t_int *centerring_perform(t_int *w)
......
......@@ -172,11 +172,11 @@ void do_codepend(t_codepend *x)
if ( x->threshold != 0. )
threshold = x->threshold;
fold(fft);
fold(fft2);
fftease_fold(fft);
fftease_fold(fft2);
rdft(fft, 1);
rdft(fft2, 1);
fftease_rdft(fft, 1);
fftease_rdft(fft2, 1);
if (invert) {
......@@ -256,8 +256,8 @@ void do_codepend(t_codepend *x)
*(bufferOne+odd) = -(*(channelOne+even)) * sin( *(channelOne+odd) );
}
rdft(fft, -1);
overlapadd(fft);
fftease_rdft(fft, -1);
fftease_overlapadd(fft);
}
t_int *codepend_perform(t_int *w)
......
......@@ -12,7 +12,7 @@
to render these frequency values directly in Hz. */
void convert(t_fftease *fft)
void fftease_convert(t_fftease *fft)
{
t_float *buffer = fft->buffer;
t_float *channel = fft->channel;
......
......@@ -130,12 +130,12 @@ void do_cross(t_cross *x)
t_float ingain = 0;
t_float outgain, rescale;
t_float mymult;
fold(fft);
fold(fft2);
rdft(fft,1);
rdft(fft2,1);
fftease_fold(fft);
fftease_fold(fft2);
fftease_rdft(fft,1);
fftease_rdft(fft2,1);
/* changing algorithm for window flexibility */
if(autonorm){
ingain = 0;
......@@ -177,8 +177,8 @@ void do_cross(t_cross *x)
x->normult = mult;
//post("mymult: %f", mymult);
}
rdft(fft, -1);
overlapadd(fft);
fftease_rdft(fft, -1);
fftease_overlapadd(fft);
}
t_int *cross_perform(t_int *w)
......
......@@ -235,9 +235,9 @@ void do_dentist(t_dentist *x)
int N2 = fft->N2;
float sync = x->sync;
fold(fft);
rdft(fft,1);
leanconvert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_leanconvert(fft);
if(frames_left > 0 && ramp_frames > 0) {
// INTERPOLATE ACCORDING TO POSITION IN RAMP
......@@ -271,9 +271,9 @@ void do_dentist(t_dentist *x)
sync = 1.0;
}
leanunconvert(fft);
rdft(fft,-1);
overlapadd(fft);
fftease_leanunconvert(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
x->frames_left = frames_left;
x->sync = sync;
}
......
......@@ -345,9 +345,9 @@ void do_disarrain(t_disarrain *x)
x->reset_flag = 0;
}
fold(fft);
rdft(fft,1);
leanconvert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_leanconvert(fft);
// first time for interpolation, just do last frame
......@@ -404,9 +404,9 @@ void do_disarrain(t_disarrain *x)
ival = 0.0;
}
leanunconvert(fft);
rdft(fft,-1);
overlapadd(fft);
fftease_leanunconvert(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
......
......@@ -219,17 +219,17 @@ void do_disarray(t_disarray *x)
int *shuffle_in = x->shuffle_in;
int *shuffle_out = x->shuffle_out;
fold(fft);
rdft(fft,1);
leanconvert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_leanconvert(fft);
for( i = 0; i < shuffle_count ; i++){
tmp = channel[ shuffle_in[ i ] * 2 ];
channel[ shuffle_in[ i ] * 2] = channel[ shuffle_out[ i ] * 2];
channel[ shuffle_out[ i ] * 2] = tmp;
}
leanunconvert(fft);
rdft(fft,-1);
overlapadd(fft);
fftease_leanunconvert(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
}
......
......@@ -126,9 +126,9 @@ void do_drown(t_drown *x)
t_float frame_peak = 0.0, local_thresh;
int N = fft->N;
fold(fft);
rdft(fft,1);
leanconvert(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_leanconvert(fft);
if(x->peakflag){
for(i = 0; i < N; i += 2){
if(frame_peak < channel[i])
......@@ -142,9 +142,9 @@ void do_drown(t_drown *x)
if(channel[i] < local_thresh)
channel[i] *= drownmult;
}
leanunconvert(fft);
rdft(fft,-1);
overlapadd(fft);
fftease_leanunconvert(fft);
fftease_rdft(fft,-1);
fftease_overlapadd(fft);
}
t_int *drown_perform(t_int *w)
......
......@@ -242,10 +242,10 @@ void do_enrich(t_enrich *x)
t_fftease *fft = x->fft;
enrich_dolowfreq(x);
enrich_dohighfreq(x);
fold(fft);
rdft(fft,1);
convert(fft);
oscbank(fft);
fftease_fold(fft);
fftease_rdft(fft,1);
fftease_convert(fft);
fftease_oscbank(fft);
}
t_int *enrich_perform(t_int *w)
......
......@@ -114,10 +114,10 @@ void do_ether(t_ether *x)
t_float *channelOne = fft->channel;
t_float *channelTwo = fft2->channel;
fold(fft);
fold(fft2);
rdft(fft,1);
rdft(fft2,1);
fftease_fold(fft);
fftease_fold(fft2);
fftease_rdft(fft,1);
fftease_rdft(fft2,1);
if (invert) {
......@@ -180,8 +180,8 @@ void do_ether(t_ether *x)
if ( i != N2 )
*(bufferOne+odd) = -(*(channelOne+even)) * sin( *(channelOne+odd) );
}
rdft(fft, -1);
overlapadd(fft);
fftease_rdft(fft, -1);
fftease_overlapadd(fft);
}
t_int *ether_perform(t_int *w)
......
#include "fftease.h" /* If forward is true, rfft replaces 2*N real data points in x with N complex values representing the positive frequency half of their Fourier spectrum, with x[1] replaced with the real part of the Nyquist frequency value. If forward is false, rfft expects x to contain a positive frequency spectrum arranged as before, and replaces it with 2*N real values. N MUST be a power of 2. */ void rfft( t_float *x, int N, int forward ) { t_float c1,c2, h1r,h1i, h2r,h2i, wr,wi, wpr,wpi, temp, theta; t_float xr,xi; int i, i1,i2,i3,i4, N2p1; static int first = 1;/*t_float PI, TWOPI;*/ void cfft(); if ( first ) { first = 0; } theta = PI/N; wr = 1.; wi = 0.; c1 = 0.5; if ( forward ) { c2 = -0.5; cfft( x, N, forward ); xr = x[0]; xi = x[1]; } else { c2 = 0.5; theta = -theta; xr = x[1]; xi = 0.; x[1] = 0.; } wpr = -2.*pow( sin( 0.5*theta ), 2. ); wpi = sin( theta ); N2p1 = (N<<1) + 1; for ( i = 0; i <= N>>1; i++ ) { i1 = i<<1; i2 = i1 + 1; i3 = N2p1 - i2; i4 = i3 + 1; if ( i == 0 ) { h1r = c1*(x[i1] + xr ); h1i = c1*(x[i2] - xi ); h2r = -c2*(x[i2] + xi ); h2i = c2*(x[i1] - xr ); x[i1] = h1r + wr*h2r - wi*h2i; x[i2] = h1i + wr*h2i + wi*h2r; xr = h1r - wr*h2r + wi*h2i; xi = -h1i + wr*h2i + wi*h2r; } else { h1r = c1*(x[i1] + x[i3] ); h1i = c1*(x[i2] - x[i4] ); h2r = -c2*(x[i2] + x[i4] ); h2i = c2*(x[i1] - x[i3] ); x[i1] = h1r + wr*h2r - wi*h2i; x[i2] = h1i + wr*h2i + wi*h2r; x[i3] = h1r - wr*h2r + wi*h2i; x[i4] = -h1i + wr*h2i + wi*h2r; } wr = (temp = wr)*wpr - wi*wpi + wr; wi = wi*wpr + temp*wpi + wi; } if ( forward ) x[1] = xr; else cfft( x, N, forward ); } /* cfft replaces t_float array x containing NC complex values (2*NC t_float values alternating real, imagininary, etc.) by its Fourier transform if forward is true, or by its inverse Fourier transform if forward is false, using a recursive Fast Fourier transform method due to Danielson and Lanczos. NC MUST be a power of 2. */ void cfft( t_float *x, int NC, int forward ) { t_float wr,wi, wpr,wpi, theta, scale; int mmax, ND, m, i,j, delta; void bitreverse(); ND = NC<<1; bitreverse( x, ND ); for ( mmax = 2; mmax < ND; mmax = delta ) { delta = mmax<<1; theta = TWOPI/( forward? mmax : -mmax ); wpr = -2.*pow( sin( 0.5*theta ), 2. ); wpi = sin( theta ); wr = 1.; wi = 0.; for ( m = 0; m < mmax; m += 2 ) { register t_float rtemp, itemp; for ( i = m; i < ND; i += delta ) { j = i + mmax; rtemp = wr*x[j] - wi*x[j+1]; itemp = wr*x[j+1] + wi*x[j]; x[j] = x[i] - rtemp; x[j+1] = x[i+1] - itemp; x[i] += rtemp; x[i+1] += itemp; } wr = (rtemp = wr)*wpr - wi*wpi + wr; wi = wi*wpr + rtemp*wpi + wi; } } /* scale output */ scale = forward ? 1./ND : 2.; { register t_float *xi=x, *xe=x+ND; while ( xi < xe ) *xi++ *= scale; } } /* bitreverse places t_float array x containing N/2 complex values into bit-reversed order */ void bitreverse( t_float *x, int N ) { t_float rtemp,itemp; int i,j, m; for ( i = j = 0; i < N; i += 2, j += m ) { if ( j > i ) { rtemp = x[j]; itemp = x[j+1]; /* complex exchange */ x[j] = x[i]; x[j+1] = x[i+1]; x[i] = rtemp; x[i+1] = itemp; } for ( m = N>>1; m >= 2 && j >= m; m >>= 1 ) j -= m; } }
\ No newline at end of file
#include "fftease.h"
/* If forward is true, rfft replaces 2*N real data points in x with
N complex values representing the positive frequency half of their
Fourier spectrum, with x[1] replaced with the real part of the Nyquist
frequency value. If forward is false, rfft expects x to contain a
positive frequency spectrum arranged as before, and replaces it with
2*N real values. N MUST be a power of 2. */
void fftease_rfft( t_float *x, int N, int forward )
{
t_float c1,c2,
h1r,h1i,
h2r,h2i,
wr,wi,
wpr,wpi,
temp,
theta;
t_float xr,xi;
int i,
i1,i2,i3,i4,
N2p1;
static int first = 1;
/*t_float PI, TWOPI;*/
void fftease_cfft();
if ( first ) {
first = 0;
}
theta = PI/N;
wr = 1.;
wi = 0.;
c1 = 0.5;
if ( forward ) {
c2 = -0.5;
fftease_cfft( x, N, forward );
xr = x[0];
xi = x[1];
} else {
c2 = 0.5;
theta = -theta;
xr = x[1];
xi = 0.;
x[1] = 0.;
}
wpr = -2.*pow( sin( 0.5*theta ), 2. );
wpi = sin( theta );
N2p1 = (N<<1) + 1;
for ( i = 0; i <= N>>1; i++ ) {
i1 = i<<1;
i2 = i1 + 1;
i3 = N2p1 - i2;
i4 = i3 + 1;
if ( i == 0 ) {
h1r = c1*(x[i1] + xr );
h1i = c1*(x[i2] - xi );
h2r = -c2*(x[i2] + xi );
h2i = c2*(x[i1] - xr );
x[i1] = h1r + wr*h2r - wi*h2i;
x[i2] = h1i + wr*h2i + wi*h2r;
xr = h1r - wr*h2r + wi*h2i;
xi = -h1i + wr*h2i + wi*h2r;
} else {
h1r = c1*(x[i1] + x[i3] );
h1i = c1*(x[i2] - x[i4] );
h2r = -c2*(x[i2] + x[i4] );
h2i = c2*(x[i1] - x[i3] );
x[i1] = h1r + wr*h2r - wi*h2i;
x[i2] = h1i + wr*h2i + wi*h2r;
x[i3] = h1r - wr*h2r + wi*h2i;
x[i4] = -h1i + wr*h2i + wi*h2r;
}
wr = (temp = wr)*wpr - wi*wpi + wr;
wi = wi*wpr + temp*wpi + wi;
}
if ( forward )
x[1] = xr;
else
fftease_cfft( x, N, forward );
}
/* cfft replaces t_float array x containing NC complex values
(2*NC t_float values alternating real, imagininary, etc.)
by its Fourier transform if forward is true, or by its
inverse Fourier transform if forward is false, using a
recursive Fast Fourier transform method due to Danielson
and Lanczos. NC MUST be a power of 2. */
void fftease_cfft( t_float *x, int NC, int forward )
{
t_float wr,wi,
wpr,wpi,
theta,
scale;
int mmax,
ND,
m,
i,j,
delta;
void fftease_bitreverse();
ND = NC<<1;
fftease_bitreverse( x, ND );
for ( mmax = 2; mmax < ND; mmax = delta ) {
delta = mmax<<1;
theta = TWOPI/( forward? mmax : -mmax );
wpr = -2.*pow( sin( 0.5*theta ), 2. );
wpi = sin( theta );
wr = 1.;
wi = 0.;
for ( m = 0; m < mmax; m += 2 ) {
register t_float rtemp, itemp;
for ( i = m; i < ND; i += delta ) {
j = i + mmax;
rtemp = wr*x[j] - wi*x[j+1];
itemp = wr*x[j+1] + wi*x[j];
x[j] = x[i] - rtemp;
x[j+1] = x[i+1] - itemp;
x[i] += rtemp;
x[i+1] += itemp;
}
wr = (rtemp = wr)*wpr - wi*wpi + wr;
wi = wi*wpr + rtemp*wpi + wi;
}
}
/* scale output */
scale = forward ? 1./ND : 2.;
{ register t_float *xi=x, *xe=x+ND;
while ( xi < xe )
*xi++ *= scale;
}
}
/* bitreverse places t_float array x containing N/2 complex values
into bit-reversed order */
void fftease_bitreverse( t_float *x, int N )
{
t_float rtemp,itemp;
int i,j,
m;
for ( i = j = 0; i < N; i += 2, j += m ) {
if ( j > i ) {
rtemp = x[j]; itemp = x[j+1]; /* complex exchange */
x[j] = x[i]; x[j+1] = x[i+1];
x[i] = rtemp; x[i+1] = itemp;
}
for ( m = N>>1; m >= 2 && j >= m; m >>= 1 )
j -= m;
}
}
#include <math.h>
#include "fftease.h"
void init_rdft(int n, int *ip, t_float *w)
/* forward declarations */
static void rftsub(int n, t_float *a, int nc, t_float *c);
static void fftease_bitrv2(int n, int *ip, t_float *a);
static void fftease_cftsub(int n, t_float *a, t_float *w);
void fftease_init_rdft(int n, int *ip, t_float *w)
{
int nw,
nc;
void makewt(int nw, int *ip, t_float *w);
void makect(int nc, int *ip, t_float *c);
void fftease_makewt(int nw, int *ip, t_float *w);
void fftease_makect(int nc, int *ip, t_float *c);
nw = n >> 2;
makewt(nw, ip, w);
fftease_makewt(nw, ip, w);
nc = n >> 2;
makect(nc, ip, w + nw);
fftease_makect(nc, ip, w + nw);
return;
}
void rdft(t_fftease *fft, int isgn)
void fftease_rdft(t_fftease *fft, int isgn)
{
int n = fft->N;
t_float *a = fft->buffer;
......@@ -45,10 +49,10 @@ void rdft(t_fftease *fft, int isgn)
if (n > 4) {
rftsub(n, a, nc, w + nw);
bitrv2(n, ip + 2, a);
fftease_bitrv2(n, ip + 2, a);
}
cftsub(n, a, w);
fftease_cftsub(n, a, w);
for (j = 1; j <= n - 1; j += 2) {
a[j] = -a[j];
......@@ -58,10 +62,10 @@ void rdft(t_fftease *fft, int isgn)
else {
if (n > 4) {
bitrv2(n, ip + 2, a);
fftease_bitrv2(n, ip + 2, a);
}
cftsub(n, a, w);
fftease_cftsub(n, a, w);
if (n > 4) {
rftsub(n, a, nc, w + nw);
......@@ -74,7 +78,7 @@ void rdft(t_fftease *fft, int isgn)
}
void bitrv2(int n, int *ip, t_float *a)
void fftease_bitrv2(int n, int *ip, t_float *a)
{
int j, j1, k, k1, l, m, m2;
t_float xr, xi;
......@@ -136,7 +140,7 @@ void bitrv2(int n, int *ip, t_float *a)
}
void cftsub(int n, t_float *a, t_float *w)
void fftease_cftsub(int n, t_float *a, t_float *w)
{
int j, j1, j2, j3, k, k1, ks, l, m;
t_float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
......@@ -259,7 +263,7 @@ void cftsub(int n, t_float *a, t_float *w)