[FFmpeg-devel] [PATCH] HE-AACv1 second revision

Alex Converse alex.converse
Tue Feb 2 04:17:20 CET 2010


On Sat, Jan 30, 2010 at 8:55 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> Alex Converse wrote:
...
>> +/**
>> + * Analysis QMF Bank (14496-3 sp04 p206)
>> + *
>> + * @param ? x ? ? ? pointer to the beginning of the first sample window
>> + * @param ? W ? ? ? array of complex-valued samples split into subbands
>> + */
>> +static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *fft, const
>> float *in, float *x,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? FFTComplex u[64], float W[2][32][32][2])
>> +{
>> + ? ?int i, k, l;
>> + ? ?const uint16_t *revtab = fft->revtab;
>> + ? ?memcpy(W[0], W[1], sizeof(W[0]));
>> + ? ?memcpy(x ? ?, x+1024, (320-32)*sizeof(x[0]));
>> + ? ?memcpy(x+288, in ? ?, ? ? 1024*sizeof(x[0]));
>> + ? ?x += 319;
>> + ? ?for (l = 0; l < 32; l++) { // numTimeSlots*RATE = 16*2 as 960 sample
>> frames
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // are not supported
>> + ? ? ? ?float z[320];
>> + ? ? ? ?for (i = 0; i < 320; i++)
>> + ? ? ? ? ? ?z[i] = x[-i] * sbr_qmf_window_ds[i];
>> + ? ? ? ?for (i = 0; i < 64; i++) {
>> + ? ? ? ? ? ?float f = z[i] + z[i + 64] + z[i + 128] + z[i + 192] + z[i +
>> 256];
>> + ? ? ? ? ? ?u[revtab[i]].re = f * analysis_cos_pre[i];
>> + ? ? ? ? ? ?u[revtab[i]].im = f * analysis_sin_pre[i];
>> + ? ? ? ?}
>> + ? ? ? ?ff_fft_calc(fft, u);
>
> This looks like a RDFT translated in the frequency space. If you could use a
> rdft you could make your temporary buffer half the size and also have half
> of the data for the fft.

It's a half-sample translation. Is there a fast way to deal with that?
A full sample would be trivial.



More information about the ffmpeg-devel mailing list