Displaying 2 results from an estimated 2 matches for "encodeddata".
2006 Sep 19
0
Multiple frame encode and decode
...all.
Did I do anything wrong?
Speex setting: narrow band, 8000 khz,20ms,8000 bps.
1 frame encoded size = 20 bytes
1 frame decoded size = 160 bytes, but i got 960
bytes(160 x 6 frames)
Code sample:
Encode:
speex_encode_int(mEncState, input, &mSpxBits);
length = speex_bits_write(&mSpxBits, encodedData,
200);
memcpy(&mRtpBuffer[mCopyIndex],encodedData,length);
Decode:
------
speex_bits_read_from(&mSpxBits, input, inputLength);
while(speex_decode_int(decState, &spxBits, buff) !=
-1)
{
written = mSpxBits.nbBits; //hope i get 160 bytes
}
speex_bits_reset(&mSpxBits);
_______________...
2012 Dec 18
2
multi stream decode
...k I'm right when I create an OpusMsDecoder with
opus_multistream_decoder_create (48000, 2, 2 ,0 ,mapping, NULL)
where mapping is: unsigned char mapping[2] = {0,1} isn't it ?
Next, i need to encode data which I get from jack (float) so I use
opus_multistream_encode_float(enc, data, 480 , encodedData, MAX_DATA)
Then I send it using RTP.
My question is how can I make the opposite in the client.
I created my decoder with
m_decoder = opus_multistream_decoder_create (48000, 2, 2 ,0,mapping,NULL)
and
unsigned char mapping[2] = {0,1};
Currently, I can read my RTP packet from network, and get data...