Stephane Lesage
2009-Jun-18 17:48 UTC
[Speex-dev] Resampler saturation, blackfin performance
> -----Message d'origine----- > De : Jean-Marc Valin [mailto:jean-marc.valin at usherbrooke.ca] > Envoy? : lundi, 15. juin 2009 01:30 > ? : Stephane Lesage > Cc : speex-dev at xiph.org > Objet : Re: [Speex-dev] Resampler saturation, blackfin performance> > - are there buffers who could be placed in scratch memory ? > > (I don't see any speex_scratch_alloc inthere) > > I don't understand your question.speex_alloc_scratch() is used only in nb_celp.c, and sb_celp.c re-uses the stack from the nb en/de-coder. But the echo-canceller and preprocessor don't use it. I suppose they also have some scratch buffers. (comments in SpeexEchoState_ structure mdf.c) But you allocate them with speex_alloc instead of using the VARDECL/ALLOC macros. Converting the code to the stack_alloc mechanism could result in better performance with a scratch buffer in SRAM. I think I can do it for mdf.c, but I would need information for preprocess.c. -- St?phane LESAGE ATEIS International
Jean-Marc Valin
2009-Jun-18 23:10 UTC
[Speex-dev] Resampler saturation, blackfin performance
Stephane Lesage a ?crit :> But the echo-canceller and preprocessor don't use it. > I suppose they also have some scratch buffers. > (comments in SpeexEchoState_ structure mdf.c) > But you allocate them with speex_alloc instead of using the VARDECL/ALLOC macros. > > Converting the code to the stack_alloc mechanism could result in better performance with a scratch buffer in SRAM. > > I think I can do it for mdf.c, but I would need information for preprocess.c.Indeed, I haven't had time to implement the same scratchpad system for mdf.c and preprocess.c. I'll be happy to apply a patch though -- or answer any question you may have on the code. Jean-Marc