[Ffmpeg-devel] reading chunks of bits in reversed order (LSB first)

Balatoni Denes dbalatoni
Sun May 1 18:11:33 CEST 2005


Hi!

Answers below.

2005. ?prilis 30. 20.31-kor Balatoni Denes ezeket a bolcs gondolatokat 
fogalmazta meg:
> Hi!
>
> I have a (perhaps stupid) question concerning the subject. In a vorbis
> stream if there is the byte 0xB8 (1011 1000) and I read 4 bits then 4 bits
> again I will get 1011 and than 1000. However I would like to get these
> numbers in reverse order i.e. first 1000 and then 1011.
> Is there perhaps a trivial way to fix this ?
Unfortunately not.

> Or should I try to make the bitreader count the bits from the least
> significant bit of what is yet to be read?
Yes that's the right way. Or rather, add new functions that read from the 
stream in little endian order, because all other codecs read the bitstreams 
in big endian order (MSB first).

> thanks, bye
> Denes

bye
Denes

-- 
- Use the Source Luke ! -





More information about the ffmpeg-devel mailing list