[Speex-dev] [patch] speex_preprocess_ctl
Mihai Balea
mihai at hates.ms
Mon Nov 5 10:11:11 PST 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2411 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20071105/9f068902/smime-0001.bin
More information about the Speex-dev
mailing list