# HG changeset patch # User lorenm # Date 1191123373 0 # Node ID f8029206caa2909ba935046b4a4e62d98baa8c24 # Parent 154b02065699ec961ab493325694d8bf9aa0b3e6 simplify lpc diff -r 154b02065699 -r f8029206caa2 flacenc.c --- a/flacenc.c Sun Sep 30 03:01:56 2007 +0000 +++ b/flacenc.c Sun Sep 30 03:36:13 2007 +0000 @@ -876,10 +876,10 @@ } #define LPC1(x) {\ - int s = smp[i-(x)+1];\ + int c = coefs[(x)-1];\ + p0 += c*s;\ + s = smp[i-(x)+1];\ p1 += c*s;\ - c = coefs[(x)-2];\ - p0 += c*s;\ } static av_always_inline void encode_residual_lpc_unrolled( @@ -888,9 +888,8 @@ { int i; for(i=order; i> shift); res[i+1] = smp[i+1] - (p1 >> shift); } @@ -952,16 +952,15 @@ #ifdef CONFIG_SMALL for(i=order; i> shift); + res[i ] = smp[i ] - (p0 >> shift); res[i+1] = smp[i+1] - (p1 >> shift); } #else