[Vorbis] Block sizes

Tony O'Bryan stormreaver at direcway.com
Sat Sep 3 12:04:08 PDT 2005


My mind just isn't focused on my email program today.  Here's what I meant to 
send to the group the first and second times:

On Saturday 03 September 2005 12:13 pm, Graham Mitchell wrote:
> What you're doing works out to 2^x.  To do x^2, it'd say "(read 4 bits as
> unsigned integer) exponent 2".

English and American are notoriously imprecise languages, so no assumptions
can be safely made when there is any room for ambiguity.  Putting "exponent
2" before or after the parentheses may or may not be intended to alter any
given author's intent.  The author may merely just be speaking an odd dialect
as far as any arbitrary reader is concerned.  On a personal note, I cannot
recall having ever heard a shift operation expressed like that.

A clearer statement would be something like, "(read 4 bits as unsigned
integer); shift 1 left this number of bits."

> Note that 1 << x is probably much faster than 2^x in hardware.

Without question.  However, there is nothing guaranteeing the reader that the
specs are driven by raw speed at this point.  All a new reader can do is to
interpret the specs as written since he is not privy to the designer's
private thoughts and intents, or to the benefit of retrospect.



More information about the Vorbis mailing list