comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: bitstreams
Date: Sun, 14 Jan 2001 16:15:35 GMT
Date: 2001-01-14T16:15:35+00:00	[thread overview]
Message-ID: <Hgk86.125780$A06.4006545@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 93se2v$nen$1@eol.dd.chalmers.se

>In my mp3 decoder I will have to search for bit-patterns in a buffer of
>bytes, how is this best done, and How can I "shift" in a sequence of bits
   I'm guessing that perhaps mp3 uses a Huffman code like a fax.  For
a fax, the longest code is 13 bits so it's much faster to create an
array of 2**13 entries such that the next 13 bits in the data can be used
as an index, and the value at that position in the array is the desired
code.  For instance, if the third code is "01", then
lookup(16#0100000000000# .. 16#0111111111111#) = 3.



  parent reply	other threads:[~2001-01-14 16:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-14 14:47 bitstreams Daniel Nilsson
2001-01-14 15:10 ` bitstreams Larry Kilgallen
2001-01-14 16:15 ` tmoran [this message]
2001-01-14 19:46 ` bitstreams srini
2001-01-15 19:56   ` bitstreams mark_lundquist
2001-01-15 21:54     ` bitstreams Tucker Taft
2001-01-16  0:41       ` bitstreams Robert Dewar
2001-01-16  0:39     ` bitstreams Robert Dewar
2001-01-16 23:26       ` bitstreams Rajagopalan Srinivasan
2001-01-15 19:21 ` bitstreams mark_lundquist
2001-01-15 20:43   ` bitstreams Pat Rogers
2001-01-15 21:15     ` bitstreams mark_lundquist
2001-01-16  0:59   ` bitstreams Robert Dewar
2001-01-16 17:36     ` bitstreams mark_lundquist
2001-01-16 20:08       ` bitstreams Pat Rogers
2001-01-17  2:15         ` bitstreams Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox