Sign in

username:

password:



Not a member?

Search speechcoding



Search tips

Subscribe to speechcoding



speechcoding by Keywords

ACELP | ADPCM | AMBE | AMR | AMR-NB | CELP | Codebook | DTMF | G.723 | G.726 | G.729 | GSM | Interpolation | LPC | LSF | LSP | MELP | PCM | Perceptual | Pitch | PSOL | QCELP | Quantization | SMV | VAD | Vocoder

Ads

Discussion Groups

Discussion Groups | Speech Coding | Decoding two channel

Technical discussions related to Speech Coding (all itu and other vocoders, ACELP, CELP, AMR, etc)

  

Post a new Thread

Decoding two channel - "mas...@tin.it" - Jun 15 7:27:22 2006



The problem I met consist of two or more decode each one of them belong 
to a different channel.

I'm implementig a easy routine in which a 
buffer 160 element wide is create (called RBuffer[]) and fill of sample 
described by 16 bit.
Once the "RBuffer[]" is full the buffer is passed 
to the encode function of speex like this:
     speex_bits_reset
(&bits1);
     speex_encode_int(encState,(spx_int16_t*)&RBuffer[0], 
&bits1);
     nbBytes = speex_bits_write(&bits1, cbits, 200);

This 
structure of the program works well. The problems begins when I 
introduce an other decode.
To simulate two decode I take coefficients 
from the same "cbits" and insert the first decoded samples in "TBuffer
[]" like in the previos example, while the second and third in a 
temporary buffer called "TBufferTemp[]":
     speex_bits_read_from
(&bits3, cbits, nbBytes);
     speex_decode_int(decState, &bits3, 
(spx_int16_t*)&TBufferTemp[0]);

     speex_bits_read_from(&bits4, 
cbits, nbBytes);
     speex_decode_int(decState, &bits4, (spx_int16_t*)
&TBufferTemp[0]);
The problem I encountered is that the suond is bad 
and the presence of the second decode functions disturbs the first.

To 
resolve this problem I tryed creating a second decState like this:

decState  = speex_decoder_init(&speex_nb_mode);
decState2 = 
speex_decoder_init(&speex_nb_mode);

but in this case the function 
speex_bits_read_from(&bits2, cbits, nbBytes) can't write in *bits and 
*bits2 (are NULL) and the output buffer is fixed to 0.

Someone knows 
how can I create and initialize a second encoder state? Or the problem 
is the frequency of CCLK of the processor?

Thanks....



(You need to be a member of speechcoding -- send a blank email to speechcoding-subscribe@yahoogroups.com )