shithub: aacenc

Download patch

ref: 0b18a49e85abd44fc98e7fcaabc8aae7b95ee283
parent: ad1f6640329462fbea9a63ee7ace7e1aabbd373f
author: oxygene2000 <oxygene2000>
date: Wed Feb 9 16:19:58 EST 2000

Placed fftw_init/destroy where they have to be
Removed transfo.h as it isn't needed
Added rdft.h

--- a/enc_tf.c
+++ b/enc_tf.c
@@ -16,7 +16,7 @@
 #include "aac_se_enc.h"
 #include "nok_ltp_enc.h"
 #include "winswitch.h"
-#include "transfo.h"
+#include "rdft.h"
 
 #define SQRT2 C_SQRT2
 
@@ -91,6 +91,7 @@
 	for (chanNum=0;chanNum<MAX_TIME_CHANNELS+2;chanNum++) {
 		if (DTimeSigLookAheadBuf[chanNum]) free(DTimeSigLookAheadBuf[chanNum]);
 	}
+	fftw_destroy();
 }
 
 
@@ -193,6 +194,7 @@
 
 	make_MDCT_windows();
 	make_FFT_order();
+	fftw_init();
 }
 
 /*****************************************************************************************
--- a/rdft_spectrum2.c
+++ b/rdft_spectrum2.c
@@ -41,8 +41,6 @@
 {
 rfftw_plan rdft_plan;
 double fo[lg2n];
-fftw_init();
-// FIXME: has to be placed elsewhere
 switch(lg2n) {
     case 11: rfftw_one(rdft_plan11,fr,fo);
 	break;
@@ -55,8 +53,6 @@
 	printf("ERROR: rdft with size %i",lg2n);
 }
 	memcpy(fr,fo,sizeof(fr));
-fftw_destroy();
-/*FIXME: has to be placed elsewhere*/
 }
 
 void spectrum( double *f, unsigned lg2n )