ref: bdafb62cadb654173ad6768977ea7451448f2918
parent: 278b724576948c8b3ee9a22731475ae78476d0f0
parent: 5954bc016db0d1c53d4877f6fbcc24c70ad2a489
author: Fabian Greffrath <fabian@greffrath.com>
date: Mon Sep 30 08:18:13 EDT 2019
Merge pull request #27 from krabiswabbie/master 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 / 2];
+ double xr[BLOCK_LEN_LONG / 2];
/* 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);
}