~ubuntu-branches/ubuntu/karmic/mumble/karmic-updates

« back to all changes in this revision

Viewing changes to speex/libspeex/lpc.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi, Patrick Matthäi, Thorvald Natvig
  • Date: 2009-03-22 16:21:58 UTC
  • mfrom: (1.1.5 upstream) (7.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090322162158-6byp3oehplc1xcm7
Tags: 1.1.8-1
[ Patrick Matthäi ]
* Fix override disparity. Set section of mumble-dbg to devel.
* Drop all patches (merged upstream).
* Bump Standards-Version to 3.8.1 (no changes needed).

[ Thorvald Natvig ]
* New upstream release.
* New overlay library doesn't use private ELF symbols anymore.
* Update defaults file to match new init-script options.
* Move mumble-dbg to section debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
   spx_word16_t r;
83
83
   spx_word16_t error = ac[0];
84
84
 
85
 
   if (ac[0] == 0)
86
 
   {
87
 
      for (i = 0; i < p; i++)
88
 
         lpc[i] = 0;
89
 
      return 0;
90
 
   }
91
 
 
92
85
   for (i = 0; i < p; i++) {
93
86
 
94
87
      /* Sum up this iteration's reflection coefficient */
102
95
#endif
103
96
      /*  Update LPC coefficients and total error */
104
97
      lpc[i] = r;
105
 
      for (j = 0; j < i>>1; j++) 
 
98
      for (j = 0; j < (i+1)>>1; j++) 
106
99
      {
107
 
         spx_word16_t tmp  = lpc[j];
108
 
         lpc[j]     = MAC16_16_P13(lpc[j],r,lpc[i-1-j]);
109
 
         lpc[i-1-j] = MAC16_16_P13(lpc[i-1-j],r,tmp);
 
100
         spx_word16_t tmp1, tmp2;
 
101
         /* It could be that j == i-1-j, in which case, we're updating the same value twice, which is OK */
 
102
         tmp1 = lpc[j];
 
103
         tmp2 = lpc[i-1-j];
 
104
         lpc[j]     = MAC16_16_P13(tmp1,r,tmp2);
 
105
         lpc[i-1-j] = MAC16_16_P13(tmp2,r,tmp1);
110
106
      }
111
 
      if (i & 1) 
112
 
         lpc[j] = MAC16_16_P13(lpc[j],lpc[j],r);
113
107
 
114
108
      error = SUB16(error,MULT16_16_Q13(r,MULT16_16_Q13(error,r)));
115
109
   }