[Home]

Summary:ASTERISK-02778: goertzel dsp was off-by-one
Reporter:apilosov2 (apilosov2)Labels:
Date Opened:2004-11-10 14:46:02.000-0600Date Closed:2008-01-15 15:13:25.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Goertzel DSP tone detection was off by one, and did not detect last tone in the toneset (for US zone, tone 1800hz, for CR zone, tone 425 - essentially, CR zone was broken).


****** ADDITIONAL INFORMATION ******

Bugfix:
dsp.c, patch:
@@ -1124,7 +1137,7 @@
               if (pass > dsp->gsamp_size - dsp->gsamps)
                       pass = dsp->gsamp_size - dsp->gsamps;
               for (x=0;x<pass;x++) {
-                       for (y=0;y<dsp->freqcount;y++)
+                       for (y=0;y<=dsp->freqcount;y++)
                               goertzel_sample(&dsp->freqs[y], s[x]);
                       dsp->genergy += s[x] * s[x];
               }
Comments:By: Mark Spencer (markster) 2004-11-10 15:19:05.000-0600

Fixed in CVS

By: Russell Bryant (russell) 2004-11-12 08:47:54.000-0600

fixed in 1.0 - will be in 1.0.3

By: Digium Subversion (svnbot) 2008-01-15 15:13:25.000-0600

Repository: asterisk
Revision: 4223

U   branches/v1-0/dsp.c

------------------------------------------------------------------------
r4223 | russell | 2008-01-15 15:13:25 -0600 (Tue, 15 Jan 2008) | 2 lines

fix off by one (bug ASTERISK-2778)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4223