[Asterisk-Dev] lightning fast 9:1 compression ratio audio codec, anyone?

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu May 12 07:04:16 MST 2005


in a panic last month i tried to write an audio codec.

it uses a hamming principle over-and-above what adpcm does.

it _does_ have clipping artefacts (which would be mitigated
against when using higher sampling rates) , but it is blindingly
fast (utilises even less CPU than adpcm), and has a compression
ratio of about 9:1.

so an 8000Hz data stream results in about... 1600 - 1700 bytes/sec.

it's a bit-based codec (!) using "escape" sequencing, so the
actual data rate is variable-bit-length (!) and depends on the
incoming audio data.

[yes i coded up some state data structs that cope with this
by storing the last byte and where things have got up to in
that byte[.


it's something i knocked up in about 10 hours, so don't expect
perfection.

anyone interested (now, next week, next year, next decade, you
have google, you know how it works) feel free to contact me.

l.

p.s. reason i didn't use it was because i got confused between 1600
bytes / sec and 1600 _bits_ / sec and the target was 9600 baud
(GSM data).

i missed that target by a factor of at least two, more's the pity,
and went back to speex :)

-- 
--
<a href="http://lkcl.net">http://lkcl.net</a>
--



More information about the asterisk-dev mailing list