DSPRelated.com
Forums

G.729 Decoder Output

Started by bine...@gmail.com July 30, 2006
Hi All,
Now I am working with ITU-T's G.729 Recommendation.My input to encoder is one .wav file and got .bit file as output. Then I gave this .bit file as input to the Decoder and I got a .wav file as output.My first .wav(encoder input)file was properly work in Real One Player(Others also).But the Decoder output was not playing.What is the reson for it? How I will get a properly playing one? Then only I could evaluate the Decoder output.Please clear my doubts.
Thanks in advance,
Bineesh Jose.
Hi Bineesh,
I guess my previous reply didn't reach to the yahoo group successfully. I will send it again. Here it is.

The wav file that you create, might be having some header information. Which might looks similar to this:-

RIFF2...WAVEfmt......."V..D.......fact....u......data........./S....

Starting from 'RIFF2' upto 'data' is all header information. This is required by the player to play the audio. But G729 expects a raw file ie without headers. So, before passing this file to the encoder, remove this header (RIFF2 to data). You can open the wav file in a (hex/binary editor or msdev) and remove the header.

Decode the file and again add the header back into the decoded file. Now it should play back the original audio.

Let me know the results.
Thanks
Satish Pamnani

Hi All,
> Now I am working with ITU-T's G.729 Recommendation.My input to encoder is one .wav file and got .bit file as output. Then I gave this .bit file as input to the Decoder and I got a .wav file as output.My first .wav(encoder input)file was properly work in Real One Player(Others also).But the Decoder output was not playing.What is the reson for it? How I will get a properly playing one? Then only I could evaluate the Decoder output.Please clear my doubts.
>Thanks in advance,
>Bineesh Jose.
Hi Bineesh / Satish

Bineesh check always the encoded data, if the encoded data you are getiing the 1/8th size of the passed data then you can assume that
data is encoded, if it is not coming then your encoder is not encoding properly, hence you need to fix your encoder. (May be at the Computation of the LSF and LPC is wrong) But in your case the encoder
is correct as you are able to play back in the real player. :-)

Now if you pass the 1/8th size of the encoded data to the decoder
then the size of the decoded size should be same as the size of raw data which you passed.

Below diagram can explain.

Let say

raw data = 80 bytes (size)
encoded data = 10 bytes (size)
Decoded data = 80 bytes (size)

Now as what you have said in your mail taht you rae able to play the
encoded data into the real player then this conclude that your encoder is correct. As Real Player is able to play the encoded data. :-)

As your decoder is not able to play then there comes the many reason
why it is not decoding properly, Now to Dignaoss your decoder

First to check

if your size of the decoded data is not macthing to the size of the
passed raw data then your decoder is at fail. (You need to Fix it)
check for all the algorthims closely.

Second to check

if your decoded data size is equal to the passed raw data
then you need to include the header for the decoded data which
you have to add arroud 44Bytes (I hope it is correct).

still it is not playing then your decoder is at FAIL.

HTH
for further querry you can mail us

Regards
Ranjeet Gupta

On Wed, 09 Aug 2006 s...@rediffmail.com wrote :
>Hi Bineesh,
>I guess my previous reply didn't reach to the yahoo group successfully. I will send it again. Here it is.
>
>The wav file that you create, might be having some header information. Which might looks similar to this:-
>
>RIFF2...WAVEfmt......."V..D.......fact....u......data........./S....
>
>Starting from 'RIFF2' upto 'data' is all header information. This is required by the player to play the audio. But G729 expects a raw file ie without headers. So, before passing this file to the encoder, remove this header (RIFF2 to data). You can open the wav file in a (hex/binary editor or msdev) and remove the header.
>
>Decode the file and again add the header back into the decoded file. Now it should play back the original audio.
>
>Let me know the results.
>Thanks
>Satish Pamnani
>
>Hi All,
> > Now I am working with ITU-T's G.729 Recommendation.My input to encoder is one .wav file and got .bit file as output. Then I gave this .bit file as input to the Decoder and I got a .wav file as output.My first .wav(encoder input)file was properly work in Real One Player(Others also).But the Decoder output was not playing.What is the reson for it? How I will get a properly playing one? Then only I could evaluate the Decoder output.Please clear my doubts.
> >Thanks in advance,
> >Bineesh Jose.
> >
> >
Bineesh-

> I guess my previous reply didn't reach to the yahoo group successfully. I
> will send it again. Here it is.
>
> The wav file that you create, might be having some header information.
> Which might looks similar to this:-
>
> RIFF2...WAVEfmt......."V..D.......fact....u......data........./S....
>
> Starting from 'RIFF2' upto 'data' is all header information. This is
> required by the player to play the audio. But G729 expects a raw file ie
> without headers. So, before passing this file to the encoder, remove this
> header (RIFF2 to data). You can open the wav file in a (hex/binary editor
> or msdev) and remove the header.
>
> Decode the file and again add the header back into the decoded file. Now
> it should play back the original audio.

Satish is correct. Here is a link that further explains Microsoft .wav
file format header:

http://www.signalogic.com/ms_waveform.htm

-Jeff

> Hi All,
>> Now I am working with ITU-T's G.729 Recommendation.My input to
>> encoder is one .wav file and got .bit file as output. Then I gave
>> this .bit file as input to the Decoder and I got a .wav file as
>> output.My first .wav(encoder input)file was properly work in Real
>> One Player(Others also).But the Decoder output was not playing.What
>> is the reson for it? How I will get a properly playing one? Then
>> only I could evaluate the Decoder output.Please clear my doubts.
>>Thanks in advance,
>>Bineesh Jose.