[FFmpeg-devel] [PATCH] libavfilter: add atempo filter (revised patch v5)

Pavel Koshevoy pkoshevoy at gmail.com
Wed Jun 13 05:07:39 CEST 2012


On 6/12/2012 8:34 PM, Michael Niedermayer wrote:
> On Tue, Jun 12, 2012 at 07:19:54PM -0600, Pavel Koshevoy wrote:
>> On 06/12/2012 05:07 PM, Michael Niedermayer wrote:
>>> On Mon, Jun 11, 2012 at 09:18:02PM -0600, Pavel Koshevoy wrote:
>> [...]
>>
>>
>>>> +
>>>> +    atempo->fft_forward = av_fft_init(nlevels + 1, 0);
>>>> +    if (!atempo->fft_forward) {
>>>> +        return AVERROR(ENOMEM);
>>>> +    }
>>>> +
>>>> +    atempo->fft_inverse = av_fft_init(nlevels + 1, 1);
>>>> +    if (!atempo->fft_inverse) {
>>>> +        return AVERROR(ENOMEM);
>>>> +    }
>>> by using a RDFT you can cut the computations needed down by a factor
>>> of 2
>> My DSP experience is limited.  What is the procedure for computing
>> cross correlation of two signals using rDFT?
> basically same procedure, its just half the real scalar values the
> fft deals with thus 2x as fast

It's not obvious until one remembers (or works out on paper) that conj(a 
* b) = conj(a) * conj(b);

I just want to confirm the procedure.  rDFT takes N real values and 
outputs (N/2 + 1) complex values, which is (N + 2) scalar values.  So, 
when I allocate FFTSample buffer I have to make its size N + 2.  I will 
initialize the first N real values, transform R2C, multiply, transform 
C2R...  Is this correct?

Thank you,
     Pavel



More information about the ffmpeg-devel mailing list