fix the case in the coeff quantizer where the coeffs were not quantized when the shift is zero

This commit is contained in:
Josh Coalson
2001-07-06 00:37:57 +00:00
parent 6d5be83970
commit 4e6b3ac2ac

View File

@@ -155,8 +155,7 @@ redo_it:
} }
} }
if(*shift != 0) { /* just to avoid wasting time... */ if(*shift >= 0) {
if(*shift > 0) {
for(i = 0; i < order; i++) { for(i = 0; i < order; i++) {
qlp_coeff[i] = (FLAC__int32)floor((double)lp_coeff[i] * (double)(1 << *shift)); qlp_coeff[i] = (FLAC__int32)floor((double)lp_coeff[i] * (double)(1 << *shift));
@@ -186,7 +185,7 @@ redo_it:
} }
} }
} }
}
return 0; return 0;
} }