summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-07-31 21:13:08 -0500
committerKenny Root <kenny@the-b.org>2009-11-08 15:54:59 -0600
commitef907fdb8168fa4a208be6f0de01831e0f2c611c (patch)
tree973bf6c6162a5bbb999cf97407b6e0e88f989833
parente9a2530c6cd1b97d9ce1b024ad7b4fb63985ad35 (diff)
downloadexternal_flac-ef907fdb8168fa4a208be6f0de01831e0f2c611c.zip
external_flac-ef907fdb8168fa4a208be6f0de01831e0f2c611c.tar.gz
external_flac-ef907fdb8168fa4a208be6f0de01831e0f2c611c.tar.bz2
Add in needed verbose tags when compiled integer-only
-rw-r--r--libFLAC/lpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libFLAC/lpc.c b/libFLAC/lpc.c
index 7806348..0356867 100644
--- a/libFLAC/lpc.c
+++ b/libFLAC/lpc.c
@@ -815,6 +815,7 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c
for(j = 0; j < order; j++) {
sum += qlp_coeff[j] * (*(--history));
sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history);
+#ifdef FLAC__OVERFLOW_DETECT_VERBOSE
#if defined _MSC_VER
if(sumo > 2147483647I64 || sumo < -2147483648I64)
fprintf(stderr,"FLAC__lpc_restore_signal: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%I64d\n",i,j,qlp_coeff[j],*history,sumo);
@@ -822,6 +823,7 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c
if(sumo > 2147483647ll || sumo < -2147483648ll)
fprintf(stderr,"FLAC__lpc_restore_signal: OVERFLOW, i=%u, j=%u, c=%d, d=%d, sumo=%lld\n",i,j,qlp_coeff[j],*history,(long long)sumo);
#endif
+#endif
}
*(data++) = *(r++) + (sum >> lp_quantization);
}
@@ -1079,19 +1081,23 @@ void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_l
for(j = 0; j < order; j++)
sum += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*(--history));
if(FLAC__bitmath_silog2_wide(sum >> lp_quantization) > 32) {
+#ifdef FLAC__OVERFLOW_DETECT_VERBOSE
#ifdef _MSC_VER
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%I64d\n", i, sum >> lp_quantization);
#else
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, sum=%lld\n", i, (long long)(sum >> lp_quantization));
#endif
+#endif
break;
}
if(FLAC__bitmath_silog2_wide((FLAC__int64)(*r) + (sum >> lp_quantization)) > 32) {
+#ifdef FLAC__OVERFLOW_DETECT_VERBOSE
#ifdef _MSC_VER
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%I64d, data=%I64d\n", i, *r, sum >> lp_quantization, (FLAC__int64)(*r) + (sum >> lp_quantization));
#else
fprintf(stderr,"FLAC__lpc_restore_signal_wide: OVERFLOW, i=%u, residual=%d, sum=%lld, data=%lld\n", i, *r, (long long)(sum >> lp_quantization), (long long)((FLAC__int64)(*r) + (sum >> lp_quantization)));
#endif
+#endif
break;
}
*(data++) = *(r++) + (FLAC__int32)(sum >> lp_quantization);