Revision 5d2f52b9
libavcodec/flacenc.c  

649  649 
int32_t *lpc_out, int *shift) 
650  650 
{ 
651  651 
int i; 
652 
double d, cmax;


652 
double cmax; 

653  653 
int32_t qmax; 
654  654 
int sh; 
655  655  
...  ...  
659  659 
/* find maximum coefficient value */ 
660  660 
cmax = 0.0; 
661  661 
for(i=0; i<order; i++) { 
662 
d = lpc_in[i]; 

663 
if(d < 0) d = d; 

664 
if(d > cmax) 

665 
cmax = d; 

662 
cmax= FFMAX(cmax, fabs(lpc_in[i])); 

666  663 
} 
667  664  
668  665 
/* if maximum value quantizes to zero, return all zeros */ 
669  666 
if(cmax * (1 << MAX_LPC_SHIFT) < 1.0) { 
670  667 
*shift = 0; 
671 
for(i=0; i<order; i++) { 

672 
lpc_out[i] = 0; 

673 
} 

668 
memset(lpc_out, 0, sizeof(int32_t) * order); 

674  669 
return; 
675  670 
} 
676  671 
Also available in: Unified diff