[asterisk-dev] dsp questions

Dmitry Andrianov dimas at dataart.com
Tue Nov 20 05:29:00 CST 2007


Thanks to all who responded.

Regarding possible performance loss when FAX_DETECT is unconditionally
expanded:

> The flag to activate fax detection was added on Jun 2004. The purpose
is 
> not really the same because if even if fax detection is disabled by
the 
> flag, processing is still done and may slow down the whole thing,

It is very easy to do the goertzel_sample(&s->fax_tone, amp[j]) only in
the case DSP_FEATURE_FAX_DETECT flag is set. And this is what I'm going
to do as well. Although I do not believe anyone would ever notice
performance impact from it.

Regards,
Dmitry Andrianov

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of MENEAULT
Maxime
Sent: Tuesday, November 20, 2007 11:31 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] dsp questions

Dmitry Andrianov wrote:
> Okay, does silence means nobody using these defines and dsp.c can be
> simplified removing OLD_DSP_ROUTINES completely and doing FAX_DETECT
> unconditionally?

If you looked at dsp.c history you would have understood why is this 
silence. When new detection routines were added on dec 15 2003 (changes 
made by Steve Underwood), the define OLD_DSP_ROUTINES was added so as to

safely add the code without breaking everything. Users that would notice

regressions would simply define OLD_DSP_ROUTINES. It should have been 
removed when no regressions were noticed. It's completely outdated.

FAX_DETECT define was added on Mar 24 2004 because of miss detection 
(false positives) I think and because it was not really tested neither.
If you look at outdated comment on FAX_DETECT you will see NOT 
RECOMMENDED IN STABLE :)
The flag to activate fax detection was added on Jun 2004. The purpose is

not really the same because if even if fax detection is disabled by the 
flag, processing is still done and may slow down the whole thing, 
goertzel algorithm is pretty fast but not so fast.
However what's true is that every user is suffering it by default so 
only real asterisk hackers who are really concerned about performances 
may undefine FAX_DETECT.

To sum up, OLD_DSP_ROUTINES can be safely removed if no regression was 
found on new routines which AFAIK is true.
FAX_DETECT maybe removed because most users won't notice its removal 
even if there could be still a reason to have it (think of Asterisk in 
an embedded environment) but as it is not well documented I am quite 
sure "nobody" (except developers) noticed the trick to save time.

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list