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

Alex Converse alex.converse
Tue Feb 2 05:41:37 CET 2010


2010/1/30 M?ns Rullg?rd <mans at mansr.com>:
> Alex Converse <alex.converse at gmail.com> writes:
>
>> Notes:
>> *There are still several lroundf() calls that take all integer inputs.
>> If anyone has advice on how to do them in an integer only fashion. I
>> would love to hear it.
>> *There is a brand new filterbank. The analysis filterbank is based on
>> the FFT. The synthesis filterbank is based on the MDCT. I also have a
>> synthesis filterbank based on an FFT but is slower than the MDCT
>> filterbank. I think if we had a generic twiddle and permute DSP
>> function it could be faster. The new filterbanks still do not support
>> ff_float_to_int16_interleave_c.
>
> Most of my comments from the first version are still standing.
>
>> +/**
>> + * 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];
>
> vector_fmul_reverse()

Fixed

>
>> + ? ? ? ?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];
>> + ? ? ? ?}
>
> SIMD should help here despite the permutation. ?It can probably be
> combined with the z[] calculation too.
>
>> + ? ? ? ?ff_fft_calc(fft, u);
>> + ? ? ? ?for (k = 0; k < 32; k++) {
>> + ? ? ? ? ? ?W[1][k][l][0] = u[k].re * analysis_cos_post[k] - u[k].im * analysis_sin_post[k];
>> + ? ? ? ? ? ?W[1][k][l][1] = u[k].re * analysis_sin_post[k] + u[k].im * analysis_cos_post[k];
>> + ? ? ? ?}
>
> SIMD
>

We seem to be missing appropriate DSPutil functions for some of these.
Does it really make sense to clutter up the already messy dsputil with
a bunch of placeholder functions?



More information about the ffmpeg-devel mailing list