encyclopegia.org

Mu-law algorithm

(blue) and μ-law (red) compression on an input signal (green).[2] Both axes use logarithmic scales in decibels.|350x350px The μ-law algorithm (sometimes written mu-law, often abbreviated as u-law) is a companding algorithm, primarily used in eight-bit PCM digital telecommunications systems in North America and Japan.[2] It is one of the two companding algorithms in the G.711 standard from ITU-T, the other being the similar A-law.[2] A-law is used in regions where digital telecommunication signals are carried on E-1 circuits, e.g.[src] Europe.[src] The terms PCMU, G711u or G711MU are used for G711 μ-law.[src] Companding algorithms reduce the dynamic range of an audio signal.[2] In analog systems, this can increase the signal-to-noise ratio (SNR) achieved during transmission; in the digital domain, it can reduce the quantization error (hence increasing the signal-to-quantization-noise ratio).[src] These SNR increases can be traded instead for reduced bandwidth for equivalent SNR.[src] At the cost of a reduced peak SNR, it can be mathematically shown that μ-law's non-linear quantization effectively increases dynamic range by 33 dB or bits over a linearly-quantized signal, hence 13.5 bits (which rounds up to 14 bits) is the most resolution required for an input digital signal to be compressed for 8-bit μ-law.[2]

(blue) and μ-law (red) compression on an input signal (green).[2] Both axes use logarithmic scales in decibels.|350x350px The μ-law algorithm (sometimes written mu-law, often abbreviated as u-law) is a companding algorithm, primarily used in eight-bit PCM digital telecommunications systems in North America and Japan.[2] It is one of the two companding algorithms in the G.711 standard from ITU-T, the other being the similar A-law.[2] A-law is used in regions where digital telecommunication signals are carried on E-1 circuits, e.g.[src] Europe.[src] The terms PCMU, G711u or G711MU are used for G711 μ-law.[src] Companding algorithms reduce the dynamic range of an audio signal.[2] In analog systems, this can increase the signal-to-noise ratio (SNR) achieved during transmission; in the digital domain, it can reduce the quantization error (hence increasing the signal-to-quantization-noise ratio).[src] These SNR increases can be traded instead for reduced bandwidth for equivalent SNR.[src] At the cost of a reduced peak SNR, it can be mathematically shown that μ-law's non-linear quantization effectively increases dynamic range by 33 dB or bits over a linearly-quantized signal, hence 13.5 bits (which rounds up to 14 bits) is the most resolution required for an input digital signal to be compressed for 8-bit μ-law.[2] ==Algorithm types== The μ-law algorithm may be described in an analog form and in a quantized digital form.[2] ===Continuous=== For a given input , the equation for μ-law encoding is F(x) = \sgn(x) \dfrac{\ln(1 + \mu |x|)}{\ln(1 + \mu)}, \quad -1 \leq x \leq 1, where in the North American and Japanese standards, and is the sign function.[4] The range of this function is −1 to 1.[src] μ-law expansion is then given by the inverse equation: F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^ - 1}{\mu}, \quad -1 \leq y \leq 1.[4] ===Discrete=== The discrete form is defined in ITU-T Recommendation G.711.[4] G.711 is unclear about how to code the values at the limit of a range (e.g.[src] whether +31 codes to 0xEF or 0xF0).[src] However, G.191 provides example code in the C language for a μ-law encoder.[src] The difference between the positive and negative ranges, e.g., the negative range corresponding to +30 to +1 is −31 to −2.[src] 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.[src] ==Implementation== The μ-law algorithm may be implemented in several ways: Analog: Use an amplifier with non-linear gain to achieve companding entirely in the analog domain.[2] Non-linear ADC: Use an analog-to-digital converter with quantization levels that are unequally spaced to match the μ-law algorithm.[2] Digital: Use the quantized digital version of the μ-law algorithm to convert data once it is in the digital domain.[2] Software/DSP Use the continuous version of the μ-law algorithm to calculate the companded values.[2] ==Usage justification== μ-law encoding is used because speech has a wide dynamic range.[src] In analog signal transmission, in the presence of relatively constant background noise, the finer detail is lost.[src] Given that the precision of the detail is compromised anyway, and assuming that the signal is to be perceived as audio by a human, one can take advantage of the fact that the perceived acoustic intensity level or loudness is logarithmic by compressing the signal using a logarithmic-response operational amplifier (Weber–Fechner law).[2] In telecommunications circuits, most of the noise is injected on the lines, thus after the compressor, the intended signal is perceived as significantly louder than the static, compared to an uncompressed source.[src] This became a common solution, and thus, prior to common digital usage, the μ-law specification was developed to define an interoperable standard.[src] This pre-existing algorithm had the effect of significantly lowering the amount of bits required to encode a recognizable human voice in digital systems.[src] A sample could be effectively encoded using μ-law in as little as 8 bits, which conveniently matched the symbol size of the majority of common computers.[src] μ-law encoding effectively reduced the dynamic range of the signal, thereby increasing the coding efficiency while biasing the signal in a way that results in a signal-to-distortion ratio that is greater than that obtained by linear encoding for a given number of bits.[2] The μ-law algorithm is also used in the .au format, which dates back at least to the SPARCstation 1 by Sun Microsystems as the native method used by the /dev/audio interface, widely used as a de facto standard for sound on Unix systems.[2] The au format is also used in various common audio APIs, such as the classes in the sun.audio Java package in Java 1.1 and in some C# methods.[src] This plot illustrates how μ-law concentrates sampling in the smaller (softer) values.[src] The horizontal axis represents the byte values 0-255, and the vertical axis is the 16-bit linear decoded value of μ-law encoding.[src] ==Comparison with A-law== The μ-law algorithm provides a slightly larger dynamic range than the A-law at the cost of worse proportional distortions for small signals.[2] By convention, A-law is used for an international connection if at least one country uses it.[src] ==See also== Dynamic range compression Signal compression (disambiguation) G.711, a waveform speech coder using either A-law or μ-law encoding Tapered floating point ==References== ==External links== Waveform Coding Techniques – details of implementation A-Law and mu-Law Companding Implementations Using the TMS320C54x (PDF) TMS320C6000 μ-Law and A-Law Companding with Software or the McBSP (PDF) A-law and μ-law realisation (in C) u-law implementation in C-language with example code[2]

49 sentences · 49 cited inline · 6 references stored

References

  1. Video/Voice/Speech Codecs . Grandstream . retrieved 19 July 2020 · retrieved 2026-08-20 · rev 1370491995
    Cite this reference

    MLA "Video/Voice/Speech Codecs . Grandstream . retrieved 19 July 2020." Video/Voice/Speech Codecs. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "Video/Voice/Speech Codecs . Grandstream . retrieved 19 July 2020." Video/Voice/Speech Codecs. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA Video/Voice/Speech Codecs. (2026). Video/Voice/Speech Codecs . Grandstream . retrieved 19 July 2020. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

  2. Cypress Semiconductor AN2095: Algorithm - Logarithmic Signal Companding - Not Just a Good Idea - It Is μ-Law . · retrieved 2026-08-20 · rev 1370491995
    Cite this reference

    MLA "Cypress Semiconductor AN2095: Algorithm - Logarithmic Signal Companding - Not Just a Good Idea - It Is μ-Law ." 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "Cypress Semiconductor AN2095: Algorithm - Logarithmic Signal Companding - Not Just a Good Idea - It Is μ-Law ." 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA encyclopegia.org. (2026). Cypress Semiconductor AN2095: Algorithm - Logarithmic Signal Companding - Not Just a Good Idea - It Is μ-Law . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

  3. Waveform Coding Techniques - Cisco . 2006-02-02. retrieved 2020-12-07 · retrieved 2020-12-06 · rev 1370491995
    Cite this reference

    MLA "Waveform Coding Techniques - Cisco . 2006-02-02. retrieved 2020-12-07." Waveform Coding Techniques - Cisco. 2020-12-06. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "Waveform Coding Techniques - Cisco . 2006-02-02. retrieved 2020-12-07." Waveform Coding Techniques - Cisco. 2020-12-06. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA Waveform Coding Techniques - Cisco. (2020). Waveform Coding Techniques - Cisco . 2006-02-02. retrieved 2020-12-07. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

  4. F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. ===Discrete=== The discrete form is defined in ITU-T Recommendation G.711. cite web |url=http://www.itu.int/rec/dolo . · retrieved 2026-08-20 · rev 1370491995
    Cite this reference

    MLA "F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. ===Discrete=== The discrete form is defined in ITU-T Recommendation G.711. cite web |url=http://www.itu.int/rec/dolo ." F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. ===Discrete=== The discrete form is defined in ITU-T Recommendation G.711. cite web |url=http://www.itu.int/rec/dolo ." F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. (2026). F^{-1}(y) = \sgn(y) \dfrac{(1 + \mu)^{|y|} - 1}{\mu}, \quad -1 \leq y \leq 1. ===Discrete=== The discrete form is defined in ITU-T Recommendation G.711. cite web |url=http://www.itu.int/rec/dolo . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

  5. International Telecommunication Union (ITU) . · retrieved 2026-08-20 · rev 1370491995
    Cite this reference

    MLA "International Telecommunication Union (ITU) ." 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "International Telecommunication Union (ITU) ." 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA encyclopegia.org. (2026). International Telecommunication Union (ITU) . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

  6. G.191 : Software tools for speech and audio coding standardization . www.itu.int . · retrieved 2026-08-20 · rev 1370491995
    Cite this reference

    MLA "G.191 : Software tools for speech and audio coding standardization . www.itu.int ." G. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995. Accessed 25 November 2026.

    Chicago "G.191 : Software tools for speech and audio coding standardization . www.itu.int ." G. 2026-08-20. https://en.wikipedia.org/w/index.php?oldid=1370491995.

    APA G. (2026). G.191 : Software tools for speech and audio coding standardization . www.itu.int . Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1370491995

Cite this article

MLA

"Mu-law algorithm." encyclopegia.org, 2026, https://encyclopegia.org/wiki/mu-law-algorithm. Accessed 25 November 2026.

Chicago

"Mu-law algorithm." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/mu-law-algorithm.

APA

encyclopegia.org. (2026). Mu-law algorithm. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/mu-law-algorithm

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Emperor Mu of Jin

stub · references available

Leonard Law

stub · references available

chemical law

stub · references available

law of the Czech Republic

stub · references available

philosophy of law

stub · references available

single whip law

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1370491995 · 0.5 · snapshot enwiki-001370491995

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.