Example #1
0
static void fft16(FFTComplex *z)
{
    FFTSample t1, t2, t3, t4, t5, t6;

    fft8(z);
    fft4(z+8);
    fft4(z+12);

    TRANSFORM_ZERO(z[0],z[4],z[8],z[12]);
    TRANSFORM(z[2],z[6],z[10],z[14],sqrthalf,sqrthalf);
    TRANSFORM(z[1],z[5],z[9],z[13],ff_cos_16[1],ff_cos_16[3]);
    TRANSFORM(z[3],z[7],z[11],z[15],ff_cos_16[3],ff_cos_16[1]);
}
Example #2
0
void fft16(FFTComplex *z)
{
    fft8(z);
    fft4(z+8);
    fft4(z+12);

    TRANSFORM_ZERO(z,4);
    z+=2;
    TRANSFORM_EQUAL(z,4);
    z-=1;
    TRANSFORM(z,4,cPI1_8,cPI3_8);
    z+=2;
    TRANSFORM(z,4,cPI3_8,cPI1_8);
}
Example #3
0
static void fft16(Complex *z) {
	float t1, t2, t3, t4, t5, t6;

	fft8(z);
	fft4(z + 8);
	fft4(z + 12);

	const float * const cosTable = getCosineTable(4);

	TRANSFORM_ZERO(z[0], z[4], z[8], z[12]);
	TRANSFORM(z[2], z[6], z[10], z[14], sqrthalf, sqrthalf);
	TRANSFORM(z[1], z[5], z[9], z[13], cosTable[1],cosTable[3]);
	TRANSFORM(z[3], z[7], z[11], z[15], cosTable[3], cosTable[1]);
}
Example #4
0
void FFT::fft16(Complex *z) {
	float t1, t2, t3, t4, t5, t6;

	fft8(z);
	fft4(z + 8);
	fft4(z + 12);

	assert(_cosTables[0]);
	const float * const cosTable = _cosTables[0]->getTable();

	TRANSFORM_ZERO(z[0], z[4], z[8], z[12]);
	TRANSFORM(z[2], z[6], z[10], z[14], sqrthalf, sqrthalf);
	TRANSFORM(z[1], z[5], z[9], z[13], cosTable[1],cosTable[3]);
	TRANSFORM(z[3], z[7], z[11], z[15], cosTable[3], cosTable[1]);
}
Example #5
0
void FFT::fft(int n, int logn, Complex *z) {
	switch (logn) {
	case 2:
		fft4(z);
		break;
	case 3:
		fft8(z);
		break;
	case 4:
		fft16(z);
		break;
	default:
		fft((n / 2), logn - 1, z);
		fft((n / 4), logn - 2, z + (n / 4) * 2);
		fft((n / 4), logn - 2, z + (n / 4) * 3);
		assert(_cosTables[logn - 4]);
		if (n > 1024)
			pass_big(z, _cosTables[logn - 4]->getTable(), (n / 4) / 2);
		else
			pass(z, _cosTables[logn - 4]->getTable(), (n / 4) / 2);
	}
}
Example #6
0
static void fft8_dispatch(FFTComplex *z)
{
    fft8(z);
}