[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec truespeech.c,, NONE, 1.1 truespeech_data.h, NONE, 1.1 Makefile, 1.216, 1.217, allcodecs.c, 1.120, 1.121 avcodec.h, 1.438, 1.439
Kostya
kostya.shishkov
Sun Jan 8 16:55:49 CET 2006
>> dec->filters[i + 0]=(dec->cvector[i] * 21846 +
dec->prevfilt[i] * 10923 + 16384) >> 15;
>> dec->filters[i + 8]=(dec->cvector[i] * 10923 +
dec->prevfilt[i] * 21846 + 16384) >> 15;
>
>maybe theres a bug, maybe not but:
>32768*1/3 = 10922.666666 ~ 10923
>32768*2/3 = 21845.333333 ~ 21845
As you see, this codec uses integer math, so there are a lot of places
in the source where such fixed-point math occurs. One of dll's used a
whole lot of lea's and add's to create such multiplications and another
dll also used similar, so even if 21845 is closer to reality, they used
21846=10923*2, and I decided to keep closer to source ;)
More information about the ffmpeg-cvslog
mailing list