ref: cb178e9f19e44a12544e65b8aae052e3b85119f3
parent: 10655c15c4d96dc52679a4f0f66ccb2d94c9a277
author: Eugène Filin <eugene.filin@gmail.com>
date: Tue Jul 16 06:04:13 EDT 2019
Memory allocations redefined
--- a/libfaac/blockswitch.c
+++ b/libfaac/blockswitch.c
@@ -271,14 +271,13 @@
// imported from filtbank.c
static void mdct( FFT_Tables *fft_tables, double *data, int N )
{
- double *xi, *xr;
double tempr, tempi, c, s, cold, cfreq, sfreq; /* temps for pre and post twiddle */
double freq = 2.0 * M_PI / N;
double cosfreq8, sinfreq8;
int i, n;
- xi = (double*)AllocMemory((N >> 2)*sizeof(double));
- xr = (double*)AllocMemory((N >> 2)*sizeof(double));
+ double xi[BLOCK_LEN_LONG];
+ double xr[BLOCK_LEN_LONG];
/* prepare for recurrence relation in pre-twiddle */
cfreq = cos (freq);
@@ -342,9 +341,6 @@
c = c * cfreq - s * sfreq;
s = s * cfreq + cold * sfreq;
}
-
- if (xr) FreeMemory(xr);
- if (xi) FreeMemory(xi);
}