[asterisk-dev] g722 question

Steve Underwood steveu at coppice.org
Mon Dec 7 09:45:09 CST 2009


On 12/07/2009 11:17 PM, Saúl Ibarra wrote:
> Hi Steve,
>    
>> I think most of these projects are using my implementation of G.722.
>> Early versions had this 14<->16 bit issue. The current one doesn't.
>> People with the problem really ought to upgrade. The right thing is for
>> the G.722 clipping point to be 32767/-32768.
>>      
> According to pjmedis'a source, their g722 implementation is not based
> on yours :-/ I'm not an expert on this, so could you please elaborate
> a bit more so I can try and get the issue fixed? Is this conversion
> always necessary? Any place to find more info on this?
>    
It looks like they have made no attempt to scale the signal properly. 
The codec follows the G.722 spec in its handling of number scaling. That 
means it takes in 14 bit linear samples, and output 14 bit linear 
samples. A 16 bit signal needs to be shifted down 2 bits before 
encoding, and shifted up 2 bits after decoding. 2 bits is 12 dB, which 
is a pretty large change in volume.

Regards,
Steve




More information about the asterisk-dev mailing list