DSPRelated.com
Forums

8 bits samples G.729

Started by T March 20, 2003
Hi list,
 
I'm involved in integrating G.729 algorithm.
 
I know that G.729 encodes with 16 bits samples but our system provides 8 bits input, so
I've allocated these 8 bits samples in the LSB bytes of the 16 bits words before encoding.
But sound after encoding/decoding process is so poor.
 
Is there a better way to encode with 8 bits samples?
Is it possible to modify the ITU's reference code to do this?
 
Thanks in advance



Use the MSB byte, not the LSB. You might have to change from unsigned to
signed first.

Mark Lakata, Staff Engineer 1225 Charleston Road voice 650-567-5170
MIPS Technologies Mountain View CA 94043 fax 650-567-5002

On Thu, 20 Mar 2003, T wrote:

> Hi list,
>
> I'm involved in integrating G.729 algorithm.
>
> I know that G.729 encodes with 16 bits samples but our system provides 8 bits
input, so
> I've allocated these 8 bits samples in the LSB bytes of the 16 bits words
before encoding.
> But sound after encoding/decoding process is so poor.
>
> Is there a better way to encode with 8 bits samples?
> Is it possible to modify the ITU's reference code to do this?
>
> Thanks in advance
>



T-

Is your 8-bit data PCM or A-Law?

If PCM, shift to ms byte, watch out for sign bit (may have to subtract 128).

If A-Law, convert to 16-bit PCM first.

Jeff Brower
DSP sw/hw engineer
Signalogic > T wrote:
>
> Hi list,
>
> I'm involved in integrating G.729 algorithm.
>
> I know that G.729 encodes with 16 bits samples but our system provides 8 bits
> input, so
> I've allocated these 8 bits samples in the LSB bytes of the 16 bits words
before
> encoding.
> But sound after encoding/decoding process is so poor.
>
> Is there a better way to encode with 8 bits samples?
> Is it possible to modify the ITU's reference code to do this?
>
> Thanks in advance




Surely it will be better to use the bytes as the MSB.

Also, I wonder whether your 8 bits are linear or have been companded with A law
or mu law? If they are companded, it would be much better to convert them to
linear first before doing the 729 encoding. Chuck Hutton In a message dated 3/20/2003 1:16:23 PM Eastern Standard Time,
writes:

> Hi list,
>
> I'm involved in integrating G.729 algorithm.
>
> I know that G.729 encodes with 16 bits samples but our system provides 8 bits
input, so
> I've allocated these 8 bits samples in the LSB bytes of the 16 bits words
before encoding.
> But sound after encoding/decoding process is so poor.
>
> Is there a better way to encode with 8 bits samples?
> Is it possible to modify the ITU's reference code to do this?
>
> Thanks in advance >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you want
your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/speechcoding
>
> Other DSP-Related Groups: http://www.dsprelated.com > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.




Hi Mark,

Is it not sufficient if we put the data in LSB Byte
and then "sign extend"?. I think only the signal
strength could be less. But, as such there should not
be any problem with the quality. Right?

David,
Do you mean to say that the Quality of sound is poor
or Just the strength??? I think, in your case, as sign
extension was not done, it treats the values as
positive only and hence Quality of should really be
poor.

Best Regards,
Bhanu Prakash.

--- Mark Lakata <> wrote:
> Use the MSB byte, not the LSB. You might have to
> change from unsigned to
> signed first.
>
> Mark Lakata, Staff Engineer 1225 Charleston Road
> voice 650-567-5170
> MIPS Technologies Mountain View CA
> 94043 fax 650-567-5002
>
> On Thu, 20 Mar 2003, T wrote:
>
> > Hi list,
> >
> > I'm involved in integrating G.729 algorithm.
> >
> > I know that G.729 encodes with 16 bits samples but
> our system provides 8 bits input, so
> > I've allocated these 8 bits samples in the LSB
> bytes of the 16 bits words before encoding.
> > But sound after encoding/decoding process is so
> poor.
> >
> > Is there a better way to encode with 8 bits
> samples?
> > Is it possible to modify the ITU's reference code
> to do this?
> >
> > Thanks in advance
> >


__________________________________________________



Remember that G.729 compresses 16 bits to 1 bit, on average. You want to have
your signal in the highest possible bits to be noticed, otherwise it might not
be substantially different than background noise. By not shifting 8 bits to the
right, that is the equivalent of 48 dB of attenuation, which I would guess is
probably not far from the limit of the dynamic range of G.729. Mark Lakata, Staff Engineer 1225 Charleston Road voice 650-567-5170
MIPS Technologies Mountain View CA 94043 fax 650-567-5002

On Fri, 21 Mar 2003, Bhanu prakash wrote:

> Hi Mark,
>
> Is it not sufficient if we put the data in LSB Byte
> and then "sign extend"?. I think only the signal
> strength could be less. But, as such there should not
> be any problem with the quality. Right?
>
> David,
> Do you mean to say that the Quality of sound is poor
> or Just the strength??? I think, in your case, as sign
> extension was not done, it treats the values as
> positive only and hence Quality of should really be
> poor.
>
> Best Regards,
> Bhanu Prakash. >
>
> --- Mark Lakata <> wrote:
> > Use the MSB byte, not the LSB. You might have to
> > change from unsigned to
> > signed first.
> >
> > Mark Lakata, Staff Engineer 1225 Charleston Road
> > voice 650-567-5170
> > MIPS Technologies Mountain View CA
> > 94043 fax 650-567-5002
> >
> > On Thu, 20 Mar 2003, T wrote:
> >
> > > Hi list,
> > >
> > > I'm involved in integrating G.729 algorithm.
> > >
> > > I know that G.729 encodes with 16 bits samples but
> > our system provides 8 bits input, so
> > > I've allocated these 8 bits samples in the LSB
> > bytes of the 16 bits words before encoding.
> > > But sound after encoding/decoding process is so
> > poor.
> > >
> > > Is there a better way to encode with 8 bits
> > samples?
> > > Is it possible to modify the ITU's reference code
> > to do this?
> > >
> > > Thanks in advance
> > >
> >
> >
> > __________________________________________________
>