Josh Coalson wrote in 2009 <http://lists.xiph.org/pipermail/flac-dev/2009-April/002654.html>:
"the reference encoder has avoided negative shifts entirely since 1.1.4. negative shifts were meant to be positive shifts in the opposite direction but they were implemented directly with << >> and in C negative shifts are undefined. treat as an error for now to avoid bad behavior but I need to come back to this to specify exactly." But libFLAC itself doesn't care about their values. It checks a value of qlp_coeff_precision, though. So this patch adds a check of a value of quantization_level. I'm not sure what should libFLAC do if a negative (=invalid) value of quantization_level is encountered. But it seems logical that it should treat an invalid value of quantization_level in the same way as it treats an invalid value of qlp_coeff_precision. The patch should also remove "shift exponent is negative" errors reported at <https://sourceforge.net/p/flac/bugs/431/>. See also <https://sourceforge.net/p/flac/bugs/424/>.
qlp_shift.patch
Description: Binary data
_______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev