Commit 26aab110 authored by serge's avatar serge

Fix for issue #829 ("ffvorbis outputs crackling sound, libvorbis plays fine")

This was off-by-one bug which affects floor0 encoded files. Tracked down
by valgrind (was reported as the use of uninitialized memory).

With this patch applied, tiny_psnr now reports the following when ffvorbis
is compared to libvorbis-1.0beta4 output for 'lsp-test.ogg' sample:
stddev:    0.76 PSNR: 98.69 bytes:  3498380/  3498452

Output from libvorbis-1.2 is substantially different:
stddev:  132.57 PSNR: 53.87 bytes:  3498424/  3498496


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18821 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bc288823
...@@ -1054,7 +1054,7 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc, ...@@ -1054,7 +1054,7 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc,
float two_cos_w=2.0f*cos(wstep*iter_cond); // needed all times float two_cos_w=2.0f*cos(wstep*iter_cond); // needed all times
/* similar part for the q and p products */ /* similar part for the q and p products */
for(j=0;j<order;j+=2) { for(j=0;j+1<order;j+=2) {
q *= lsp[j] -two_cos_w; q *= lsp[j] -two_cos_w;
p *= lsp[j+1]-two_cos_w; p *= lsp[j+1]-two_cos_w;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment