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
G.711
(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!
=== μ-law === {{Main|μ-law algorithm}} The μ-law (sometimes referred to as ulaw, G.711Mu, or G.711μ) encoding takes a 14-bit signed linear audio sample in [[two's complement]] representation as input, inverts all bits after the sign bit if the value is negative, adds 33 (binary 100001) and converts it to an 8 bit value as follows: {| class="wikitable" style="text-align:left" |- ! Linear input value<br><ref group=note>This value is produced by taking the [[two's complement]] representation of the input value, inverting all bits after the sign bit if the value is negative, and adding 33.</ref> ! Compressed code<br>XOR 11111111 ! Linear output value<br><ref group=note>[[Signed magnitude]] representation. Final result is produced by decreasing the magnitude of this value by 33.</ref> |- | <code>s00000001abcdx</code> || <code>s000abcd</code> || <code>s00000001abcd1</code> |- | <code>s0000001abcdxx</code> || <code>s001abcd</code> || <code>s0000001abcd10</code> |- | <code>s000001abcdxxx</code> || <code>s010abcd</code> || <code>s000001abcd100</code> |- | <code>s00001abcdxxxx</code> || <code>s011abcd</code> || <code>s00001abcd1000</code> |- | <code>s0001abcdxxxxx</code> || <code>s100abcd</code> || <code>s0001abcd10000</code> |- | <code>s001abcdxxxxxx</code> || <code>s101abcd</code> || <code>s001abcd100000</code> |- | <code>s01abcdxxxxxxx</code> || <code>s110abcd</code> || <code>s01abcd1000000</code> |- | <code>s1abcdxxxxxxxx</code> || <code>s111abcd</code> || <code>s1abcd10000000</code> |} <references group=note/> Where {{code|s}} is the sign bit, and bits marked {{code|x}} are discarded. In addition, the standard specifies that the encoded bits are inverted before the octet is transmitted. Thus, a silent μ-law encoded PCM channel has the 8 bit samples transmitted 0xFF instead of 0x00 in the octets. Adding 33 is necessary so that all values fall into a compression group and it is subtracted back when decoding. Breaking the encoded value formatted as <code>seeemmmm</code> into 4 bits of mantissa {{var|m}}, 3 bits of exponent {{var|e}} and 1 sign bit {{var|s}}, the decoded linear value {{var|y}} is given by formula :<math>y = (-1)^s \cdot [(33 + 2m) \cdot 2^e - 33],</math> which is a 14-bit signed integer in the range ±0 to ±8031. Note that 0 is transmitted as 0xFF, and −1 is transmitted as 0x7F, but when received the result is 0 in both cases.
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
G.711
(section)
Add topic