# HG changeset patch # User michael # Date 1151845808 0 # Node ID de8cdb05117f01caca07d21505d68554d9251334 # Parent 22c7b4c96c2dc8b7f41f2bf84e33ed179ea36080 simplify diff -r 22c7b4c96c2d -r de8cdb05117f flacenc.c --- a/flacenc.c Sun Jul 02 13:01:01 2006 +0000 +++ b/flacenc.c Sun Jul 02 13:10:08 2006 +0000 @@ -649,7 +649,7 @@ int32_t *lpc_out, int *shift) { int i; - double d, cmax; + double cmax; int32_t qmax; int sh; @@ -659,18 +659,13 @@ /* find maximum coefficient value */ cmax = 0.0; for(i=0; i cmax) - cmax = d; + cmax= FFMAX(cmax, fabs(lpc_in[i])); } /* if maximum value quantizes to zero, return all zeros */ if(cmax * (1 << MAX_LPC_SHIFT) < 1.0) { *shift = 0; - for(i=0; i