[Speex-dev] (small) bug in nb_decode?

Tom Harper tharper at sightspeed.com
Mon Oct 24 21:55:45 PDT 2005


Hi,

So I got a crash on the following code:
             k1=SUBMODE(lpc_enh_k1);
             k2=SUBMODE(lpc_enh_k2);
which in the newer codebase is:
          bw_lpc(SUBMODE(lpc_enh_k1), st->interp_qlpc, awk1, st->lpcSize);
          bw_lpc(SUBMODE(lpc_enh_k2), st->interp_qlpc, awk2, st->lpcSize);

I am not sure if the newer code will have the same issue but the
following check is performed in nb_decode_lost, so I figure the
same thing should be done in decode... right?

add (or equivalent):

         if (st->submodes[st->submodeID] != NULL)
          {
             k1=SUBMODE(lpc_enh_k1);
             k2=SUBMODE(lpc_enh_k2);
             k3=(1-(1-r*k1)/(1-r*k2))/r;
          } else {
             k1=k2=0.7;
                         k3 = 0.0f;
          }

Tom


______________________________________________

Tom Harper
Lead Software Engineer
SightSpeed - <http://www.sightspeed.com/>http://www.sightspeed.com/

918 Parker St, Suite A14
Berkeley, CA 94710

Email: tharper at sightspeed.com
Phone: 510-665-2920
Fax: 510-649-9569
My SightSpeed Video Link: http://tom.sightspeed.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20051024/2f3ed3d1/attachment.htm


More information about the Speex-dev mailing list