DSPRelated.com
Forums

G726 testing

Started by vija...@yahoo.co.in July 25, 2006
Hi All,
I am using reference G.726 code of ITU software tool library. I am now testing the code using VC++. It is said that the reference code takes A-law or Mu-law coded input and outputs the same, but the code takes 2 bytes of input( short ) and A-law coded should be one byte. I am getting wrong output. can any one help in this regard??

Regards,
Vijay
Maybe 16 bit is OK.16 bit per sample means the raw
data.and G.726 should deal with it.I think it's no
need to tranfer input to A-law or u-law.
--- v...@yahoo.co.inŠ“

> Hi All,
> I am using reference G.726 code of ITU software tool
> library. I am now testing the code using VC++. It is
> said that the reference code takes A-law or Mu-law
> coded input and outputs the same, but the code takes
> 2 bytes of input( short ) and A-law coded should be
> one byte. I am getting wrong output. can any one
> help in this regard??
>
> Regards,
> Vijay
Do the following:
for the input samples/data to the encoder.
for(i=0;i
inp_buf[i]=(0x3FFF & (inp_buf[i]>>2));

and after decoding i.e. at the decoder data which I assume goes in out_buf:

for(i=0;i
out_buf[i]=out_buf[i]<<2;

I hope it will give you the correct decoded outputs. here input should be 16 bit pcm if U are using ITU code. Anyway you can see in the code what format it needs? Its very simple....

Sanjeev

________________________________

From: s... [mailto:s...] On Behalf Of wu xudong
Sent: Wednesday, July 26, 2006 7:30 AM
To: s...
Subject: Re: [speechcoding] G726 testing

Maybe 16 bit is OK.16 bit per sample means the raw
data.and G.726 should deal with it.I think it's no
need to tranfer input to A-law or u-law.

--- v...@yahoo.co.in $B
> Hi All,
> I am using reference G.726 code of ITU software tool
> library. I am now testing the code using VC++. It is
> said that the reference code takes A-law or Mu-law
> coded input and outputs the same, but the code takes
> 2 bytes of input( short ) and A-law coded should be
> one byte. I am getting wrong output. can any one
> help in this regard??
>
> Regards,
> Vijay