[Speex-dev] [patch] speex_preprocess_ctl

Tom Grandgent tgrand at canvaslink.com
Mon Nov 5 11:08:38 PST 2007


Did you check it against the trunk in SVN?

If it's not applied, and you can hook Jean-Marc up with an email 
address like yours, I'm sure he will get right on it. :)

Tom

Mihai Balea <mihai at hates.ms> wrote:
> 
> Hi all,
> 
> Did anything happen to this patch?
> It seems to me that it fixes a valid issue, but I'm not an expert.   
> Anyways, I didn't see and follow-up or reply...
> 
> Cheers,
> Mihai
> 
> On Oct 29, 2007, at 7:14 PM, Mikael Magnusson wrote:
> 
> > There is a problem in speex_preprocess_ctl. Both speech_prob_start  
> > and speech_prob_continue are set to 327.67 for all input values  
> > except 0 which results in 0. This is in floating point mode.
> >
> > I think the included patch fixes the problem.
> >
> > Mikael
> > Index: libspeex/preprocess.c
> > ===================================================================
> > --- libspeex/preprocess.c	(revision 13983)
> > +++ libspeex/preprocess.c	(arbetskopia)
> > @@ -1126,16 +1126,16 @@
> >        break;
> >
> >     case SPEEX_PREPROCESS_SET_PROB_START:
> > -      *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*) 
> > ptr));
> > -      st->speech_prob_start = DIV32_16(MULT16_16(32767,* 
> > (spx_int32_t*)ptr), 100);
> > +      *(spx_int32_t*)ptr = MIN32(100,MAX32(0, *(spx_int32_t*)ptr));
> > +      st->speech_prob_start = DIV32_16(MULT16_16(Q15ONE,* 
> > (spx_int32_t*)ptr), 100);
> >        break;
> >     case SPEEX_PREPROCESS_GET_PROB_START:
> >        (*(spx_int32_t*)ptr) = MULT16_16_Q15(st->speech_prob_start,  
> > 100);
> >        break;
> >
> >     case SPEEX_PREPROCESS_SET_PROB_CONTINUE:
> > -      *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*) 
> > ptr));
> > -      st->speech_prob_continue = DIV32_16(MULT16_16(32767,* 
> > (spx_int32_t*)ptr), 100);
> > +      *(spx_int32_t*)ptr = MIN32(100,MAX32(0, *(spx_int32_t*)ptr));
> > +      st->speech_prob_continue = DIV32_16(MULT16_16(Q15ONE,* 
> > (spx_int32_t*)ptr), 100);
> >        break;
> >     case SPEEX_PREPROCESS_GET_PROB_CONTINUE:
> >        (*(spx_int32_t*)ptr) = MULT16_16_Q15(st- 
> > >speech_prob_continue, 100);
> > _______________________________________________
> > Speex-dev mailing list
> > Speex-dev at xiph.org
> > http://lists.xiph.org/mailman/listinfo/speex-dev



More information about the Speex-dev mailing list