At 07:55 AM 4/3/00 +1000, you wrote: >> -----Original Message----- >> From: Scott Dattalo [SMTP:scott@DATTALO.COM] >> Sent: Sunday, 2 April 2000 8:00 >> To: PICLIST@MITVMA.MIT.EDU >> Subject: Re: A-law or mu-law to linear conversion. >> >> On Fri, 31 Mar 2000, Terry wrote: >> >> > Anyone know of a method to convert 8 bit A or mu-law to 16 bit linear >> fast >> > and compact using a 16c72? >> > Is a lookup table the only way? >> >> I don't know the specifics on mu-law other than it involves logarithmic >> compression. A quick search on the web led me to: >> >> http://www-s.ti.com/sc/psheets/spra267/spra267.pdf >> >> From which I copied this table: >> >> linear compressed >> 12 11 10 9 8 7 6 5 4 3 2 1 0 | 6 5 4 3 2 1 0 >> ---------------------------------------------------------- >> 0 0 0 0 0 0 0 1 Q3 Q2 Q1 Q0 x 0 0 0 Q3 Q2 Q1 Q0 >> 0 0 0 0 0 0 1 Q3 Q2 Q1 Q0 x x 0 0 1 Q3 Q2 Q1 Q0 >> 0 0 0 0 0 1 Q3 Q2 Q1 Q0 x x x 0 1 0 Q3 Q2 Q1 Q0 >> 0 0 0 0 1 Q3 Q2 Q1 Q0 x x x x 0 1 1 Q3 Q2 Q1 Q0 >> 0 0 0 1 Q3 Q2 Q1 Q0 x x x x x 1 0 0 Q3 Q2 Q1 Q0 >> 0 0 1 Q3 Q2 Q1 Q0 x x x x x x 1 0 1 Q3 Q2 Q1 Q0 >> 0 1 Q3 Q2 Q1 Q0 x x x x x x x 1 1 0 Q3 Q2 Q1 Q0 >> 1 Q3 Q2 Q1 Q0 x x x x x x x x 1 1 1 Q3 Q2 Q1 Q0 >> >> Is this correct? >> > I don't think so A law has alternate bit inversion, and this only >seems to have 7 bits compressed. Just remember that in the compressed for >each bit is equal to 3dB up to 0dBmO. > > > Dennis Dennis It's mu-law there without the sign bit and median approximation, other then that Scott's written a super conversion code. Cheers Terry