Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Μ-law algorithm
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Discrete=== The discrete form is defined in ITU-T Recommendation [[G.711]].<ref>{{cite web |url=http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-G.711-198811-I!!PDF-E&type=items |title=ITU-T Recommendation G.711}}</ref> G.711 is unclear about how to code the values at the limit of a range (e.g. whether +31 codes to 0xEF or 0xF0).{{citation needed|date=October 2016}} However, G.191 provides example code in the [[C language]] for a μ-law encoder.<ref>{{Cite web|url=https://www.itu.int/rec/T-REC-G.191/en|title=G.191 : Software tools for speech and audio coding standardization|website=www.itu.int}}</ref> The difference between the positive and negative ranges, e.g. the negative range corresponding to +30 to +1 is −31 to −2. This is accounted for by the use of [[1's complement]] (simple bit inversion) rather than [[2's complement]] to convert a negative value to a positive value during encoding. {| class="wikitable" |+ Quantized μ-law algorithm ! 14-bit binary linear input code !! 8-bit compressed code |- | +8158 to +4063 in 16 intervals of 256 || 0x80 + interval number |- | +4062 to +2015 in 16 intervals of 128 || 0x90 + interval number |- | +2014 to +991 in 16 intervals of 64 || 0xA0 + interval number |- | +990 to +479 in 16 intervals of 32 || 0xB0 + interval number |- | +478 to +223 in 16 intervals of 16 || 0xC0 + interval number |- | +222 to +95 in 16 intervals of 8 || 0xD0 + interval number |- | +94 to +31 in 16 intervals of 4 || 0xE0 + interval number |- | +30 to +1 in 15 intervals of 2 || 0xF0 + interval number |- | 0 || 0xFF |- | −1 || 0x7F |- | −31 to −2 in 15 intervals of 2 || 0x70 + interval number |- | −95 to −32 in 16 intervals of 4 || 0x60 + interval number |- | −223 to −96 in 16 intervals of 8 || 0x50 + interval number |- | −479 to −224 in 16 intervals of 16 || 0x40 + interval number |- | −991 to −480 in 16 intervals of 32 || 0x30 + interval number |- | −2015 to −992 in 16 intervals of 64 || 0x20 + interval number |- | −4063 to −2016 in 16 intervals of 128 || 0x10 + interval number |- | −8159 to −4064 in 16 intervals of 256 || 0x00 + interval number |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Μ-law algorithm
(section)
Add topic