[FFmpeg-devel] (i)(m)dct help for g.722.1

Benjamin Larsson banan
Mon May 14 16:56:17 CEST 2007

Ramiro Ribeiro Polla skrev:
> Hello,
> When I got to the dct part of g.722.1 (which is currently in 
> cook.c:687), I realized it doesn't use the same transform as cook (at 
> least I think so). After the window, overlap, and add, the output is 
> faster than it should be, making the last half of the 320 samples look 
> like a fade-out.
> I wanted to know if FFmpeg already has the same transform used in 
> g.722.1, or if I'm just using it the wrong way.
> The standard says it's a "type IV DCT":
> u(n) = \sum_{m=0}^{319} \sqrt{\frac{2}{320}} cos( \frac{\pi}{320} 
> (m+0.5)(n+0.5) ) mlt(m)
> for 0 \leq n \leq 319
> Or else, how would I go about implementing it?
> Ramiro Polla

It is probably the same. Try using a larger or smaller transform. That 
usually fixes sample rate problems.

Benjamin Larsson

More information about the ffmpeg-devel mailing list