[FFmpeg-devel] Information about FFT implementation in ffmpeg
Vitor Sessak
vitor1001 at gmail.com
Mon Jul 25 21:33:54 CEST 2011
On Mon, Jul 25, 2011 at 10:30 AM, jogging song <joggingsong at gmail.com> wrote:
> Hi, all
>
> I hope to learn more about FFT implementation in ffmpeg.
> FFT in ffmpeg performs on float type data.
> When twiddle factors are generated, only one fourth of
> the length is calculated. Others are copied from generated
> twiddle factors and only cosine is generated.
> When the precision is considered, more twiddle factors
> are required.
This has nothing to do with precision.
> Such as in the function ff_init_ff_cos_tabs
> for(i=0; i<=m/4; i++)
>
> tab[i] = cos(i*freq);
>
> When i > m /4, the cosine value calculated from the
> above equation is not equal to the value copied
> from the generated value. One or two significant
> digits are different.
I expect the sign to be different, not just a few significant digits.
In the C implementation only the values for i < m/4 are used. Higher
values are used only in ASM implementations to avoid shuffling.
> Now I try to generate twiddle factors of half of the length
> for both cosine value and sine value, and use these
> twiddle factors to calculate FFT. I need to modify the
> source code.
Why?
> Is there any materials about the FFT implementation in ffmpeg?
It is a pretty standard split-radix FFT implementation. Google for
"split radix FFT".
-Vitor
More information about the ffmpeg-devel
mailing list