Talk:A-law algorithm

From Wikipedia, the free encyclopedia

This article is within the scope of the Professional sound production WikiProject, a collaborative effort to improve Wikipedia's coverage of the technology, equipment, companies and professions related to professional sound production. If you would like to participate, you can visit the project page, where you can join the project and see a list of open tasks.
Start This article has been rated as Start-Class on the assessment scale.


how does the a-law algorithm look like? What's the difference to the mu-law algorithm? --Abdull 17:08, 4 Apr 2005 (UTC)

Contents

[edit] equation

This needs finishing:

A-law expansion is then given by the inverse equation:


F^{-1}(y) = \begin{cases} {\sgn(y) |y| [1+\ln(A)]/A}, & 0 \leq |y| < {1 \over 1+\ln(A)} \\
\sgn(y) e^{|y|[1+ln(A)] - 1)} / [A + A \ln(A)], & {1 \over 1+\ln(A)} \leq |y| \leq 1 \end{cases}

It's not quite right. Check the external links and such. - Omegatron 15:12, May 24, 2005 (UTC)

[edit] retransformation wrong ?

I know these formulas are in many documents but I'm afraid the 2nd F − 1 is wrong.

I tried to build a VoIP (SIP) phone with A-Law audio codec. And I was very surprised because the decoded A-Law stream was very silent. I used exactly these formulas. And I think there is a mistake. Assume x = 1 then:


y = \frac{1+ \ln(A |x|)}{1 + \ln(A)} = \frac{1+ \ln(A)}{1 + \ln(A)} = 1

But the retransformation gives


x = F^{-1}(y) = {\exp(|y| (1 + \ln(A)) - 1) \over A (1 + \ln(A))} = {\exp((1 + \ln(A)) - 1) \over A (1 + \ln(A))} = 
{A \over A (1 + \ln(A))} = 0.1827

I think the A must be the denominator in both cases:


x = F^{-1}(y) = {\exp(|y| (1 + \ln(A)) - 1) \over A}

i.e.


F^{-1}(1) = {\exp(|1| (1 + \ln(A)) - 1) \over A} = {A \over A} = 1


Joerg Anders (GERMANY)

[edit] a or A

Is it a-law or A-law and what (if anything) does the a/A stand for? --Abdull 16:54, 11 August 2006 (UTC)

[edit] Legend of the graph uses wrong colours

The green straight line corresponds to no companding... 192.54.144.226 08:11, 22 August 2006 (UTC)Denis

Whoops - You are right - It's fixed now Ozhiker 08:35, 22 August 2006 (UTC)

[edit] Interoperability

The article states: "A-law is used for an international connection if at least one country uses it." Wouldn't both ends of the connection need to support the algorithm to send signals using it? Or am i missing something? Foobaz·o< 17:35, 17 May 2007 (UTC)

Maybe it could be worded more clearly - If either country uses A-law as their standard companding, then the companding rule when calls are made between the countries must be A-law. e.g. The UK uses A-Law for their standard companding, the USA uses u-Law. Hence because one uses A-Law, then all calls from the USA to UK or UK to USA must use A-Law. e.g.(2) Canada uses u-Law for their standard companding, the USA also uses u-Law. Hence they use u-Law companding on calls between the two countries becuase neither uses A-Law. --Ozhiker 22:19, 17 May 2007 (UTC)