[Tremor] bit ordering used in Ogg Vorbis
ercole work
ercolework
Sat Jul 31 23:43:45 PDT 2004
Hi,
I have a quick question regarding the bit ordering used in Ogg Vorbis.
While mainly most of the popular audio formats (MP3, AAC, AC3, DTS, WMA etc...), store bits in byte starting from MSB (most significant bit) to the LSB (least significant bit). In other words, from left to right.
Ogg Vorbis, in the contrary, stores bits in the opposite way: from right to left, but still get bytes from left to right.
Why did Vorbis choose a so counter intuitive convention (expecially when it comes to bits straddling on bytes).
Some examples:
Let's say you want to store the following groups of bits:
4 bits: 1010b
7 bits: 1111101b
So 11 bits in total.
In MP3, they will be stored as:
10101111b 101xxxxxb
Instead, in Vorbis they are packed like:
11111010b xxxxx101b
Here bits are grouped in bytes, and 'x' represents unknown bits...
Maybe my judgment is biased because of the existing other formats, but I can't figure out the logic behind chosing such a bit ordering...
It is quite annoying because some of deeply embedded DSPs provide instructions to get bits the "standard" way (ie the way used by MP3, AAC, AC3, DTS, WMA etc...).
So in the case of vorbis we need to have it done in software which is not as performant...
Thanks!
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/tremor/attachments/20040731/1432f268/attachment.html
More information about the Tremor
mailing list