[speex-dev] Packet Loss

Jean-Marc Valin jean-marc.valin at hermes.usherb.ca
Sat Nov 16 20:47:31 PST 2002


Le jeu 14/11/2002 à 14:59, Brian C. Wiles a écrit :
>    I've just started testing Speex, and it seems very good so far.  In 
> testing the Speex decoder and simulating packet loss, I noticed that simply 
> not calling speex_decode(st, NULL, output) when a packet is dropped doesn't 
> appear to degrade the quality of the audio later on.

What do you mean by "not calling speex_decode"? If you just remove the
call from speexdec, it will end up repeating the last frame "as is".
Otherwise, if you remove the frame, you end up with a shorter file. That
is definitely not an option in a real-time system. Also, if you say it
doesn't degrade much, try a higher loss rate, you'll see the difference.

>    The reason for this test is that in a real-time situation, you may not 
> know right away when a packet is dropped vs. just out of order, etc.  Plus, 
> I wanted to see if it was necessary to call speex_decode() for each lost 
> packet, or just once to indicate to the decoder that it needs to re-adjust 
> its state.

Well, depends on what you want to do... if you just want to stop playing
the stream (cutting the data out), there's not much do to (except maybe
reset the decoder, which I'll allow in beta4). Otherwise, in a real-time
system, you have to put "something". That something is obtained by
calling speex_decode with a NULL "bits" argument for each lost packet
you want to "guess". You do that when you give up waiting for the packet
(i.e. it needs to be played NOW).

        Jean-Marc


-- 
Jean-Marc Valin, M.Sc.A.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 242 bytes
Desc: signature.asc
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20021116/b47b7e59/signature-0001.pgp


More information about the Speex-dev mailing list