[speex-dev] speex_bits_write_whole_bytes, read_whole_bytes
tyensen at sympatico.ca
Wed Dec 18 06:24:05 PST 2002
I was playing around with using the speex_bits_write_whole_bytes function
(and read counterpart), and I noticed that they worked fine unless I played
around with streaming encoded audio and starting reception at random
packets. Then it seems that the Speex engine would start to crash. When
performing the same test with the normal speex_bits_write (and read
counterpart), I didn't seem to have these troubles. I expected the opposite
judging by the names of the functions...
What exactly are the write/read_whole_bytes functions for? (I believe they
are for more effecient bit packing, but if they can't support streaming ...)
My theory on why the write/read_whole_bytes functions crash is that some
information from the encoder is held back when creating the bitstream output
and placed at the beginning of the next bitstream packet. If the decoder is
"unlucky" enough to get one of these packets with "extra" information then
it gets confused - ie crash and burn. I might be way off on this theory, I
haven't spent a lot of time tracing it back through the code yet.
Anyway, if anyone can confirm my suspicions or comment on what the real use
of write/read_whole_bytes is, it would be appreciated.
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Speex-dev