[Vorbis-dev] RE: encode, decode and encode again
Aleksey Surkov
Aleksey_S at abbyy.com
Mon Sep 18 05:46:10 PDT 2006
Hi!
> The simplest thing is just to do a hex dump and compare the file
> contents against the standard.
Thanks a lot!
It seems I've found the bug. Decoded files was really corrupted.
All of them contained some extra bytes (less then 4, so no artifacts
appeared in 16bit mono).
The cause of the problem was function
vorbis_analysis_wrote( &vd, 0 ),
that was called somewhere in midway of encoding (last portion of
wav-stream in buffer was less then 4 bytes - less then one sample):
file_n.wav: | readLength | readLength | 3bytes (0 samples in buffer)
called: vorbis_analysis_wrote( &vd, 0 );
file_n+1.wav: | readLength | readLength | readLength | some samples +
3bytes
After this moment (calling of vorbis_analysis_wrote( &vd, 0 )) encoder
began to collect all passed to him stream-data.
I don't know, is it a bug or no (such behaviour of encoder), but it was
curious for me :)
More information about the Vorbis-dev
mailing list