Revision 0aed5e9f libavcodec/flacenc.c

View differences:

libavcodec/flacenc.c
594 594

  
595 595
    for(j=0; j<lag; j+=2){
596 596
        double sum0 = 1.0, sum1 = 1.0;
597
        for(i=0; i<len; i++){
597
        for(i=j; i<len; i++){
598 598
            sum0 += data1[i] * data1[i-j];
599 599
            sum1 += data1[i] * data1[i-j-1];
600 600
        }
......
604 604

  
605 605
    if(j==lag){
606 606
        double sum = 1.0;
607
        for(i=0; i<len; i+=2){
607
        for(i=j-1; i<len; i+=2){
608 608
            sum += data1[i  ] * data1[i-j  ]
609 609
                 + data1[i+1] * data1[i-j+1];
610 610
        }

Also available in: Unified diff