Re: [Freetel-codec2] Levinson Durbin

2016-09-19 Thread Steve
Thanks David, I missed that. I printed out the values and was scratching my
head. It was working, but I didn't know why??  That I missed!
--
___
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2


Re: [Freetel-codec2] Levinson Durbin

2016-09-19 Thread David Rowe
Substituting the actual values for the first outer loop iteration:

  for(i=1; i<=10; i++) {
   sum = 0.0;
for(j=1; j<=0; j++)
 sum += a[i-1][j]*R[i-j];   <-- this line never gets executed

- David

On 20/09/16 00:06, Steve wrote:
> I know this is 20 year old code, but in looking for why my program
> produces different pitch values (off by a fraction), I am looking at
> this algorithm in lpc.c:
>
> void levinson_durbin(  float R[], float lpcs[], int order) {
> float a[order+1][order+1];   < automatic no initialization
>
>  for(i=1; i<=order; i++) {
>   sum = 0.0;
>for(j=1; j<=i-1; j++)
> sum += a[i-1][j]*R[i-j];   <-- R multiplied by unknown data
>
> I've even looked at the referenced Makhoul paper, and it glosses over
> whatever "a" is supposed to be initially assigned.
>
> I tried assigning 1.0 to "a" elements. Even -1.0 just for kicks.
>
> I guess it doesn't really matter what "a" is, as it seems to work anyway??
>
>
>
> --
>
>
>
> ___
> Freetel-codec2 mailing list
> Freetel-codec2@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
>

--
___
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2