diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-05-20 14:07:31 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-05-20 14:07:31 +0000 |
commit | 54c68f8ad3f3255de7c5ece93a1031301e640d0c (patch) | |
tree | 0d7afce7cf897afebf9c003890e288b78e90b466 /audio/flac/files | |
parent | dd56df5272980e1f8a150f0bc84e2c6bdeea3d5a (diff) | |
download | ports-54c68f8ad3f3255de7c5ece93a1031301e640d0c.tar.gz ports-54c68f8ad3f3255de7c5ece93a1031301e640d0c.zip |
Notes
Diffstat (limited to 'audio/flac/files')
-rw-r--r-- | audio/flac/files/patch-src::libFLAC::fixed.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/audio/flac/files/patch-src::libFLAC::fixed.c b/audio/flac/files/patch-src::libFLAC::fixed.c new file mode 100644 index 000000000000..4b8a20cd93ee --- /dev/null +++ b/audio/flac/files/patch-src::libFLAC::fixed.c @@ -0,0 +1,37 @@ +--- src/libFLAC/fixed.c.orig Sun Apr 1 07:35:25 2001 ++++ src/libFLAC/fixed.c Sun May 20 13:37:20 2001 +@@ -81,11 +81,11 @@ unsigned FLAC__fixed_compute_best_predic + residual_bits_per_sample[3] = (real)((data_len > 0) ? log(M_LN2 * (real)(int64)total_error_3 / (real) data_len) / M_LN2 : 0.0); + residual_bits_per_sample[4] = (real)((data_len > 0) ? log(M_LN2 * (real)(int64)total_error_4 / (real) data_len) / M_LN2 : 0.0); + #else +- residual_bits_per_sample[0] = (real)((data_len > 0) ? log(M_LN2 * (real)total_error_0 / (real) data_len) / M_LN2 : 0.0); +- residual_bits_per_sample[1] = (real)((data_len > 0) ? log(M_LN2 * (real)total_error_1 / (real) data_len) / M_LN2 : 0.0); +- residual_bits_per_sample[2] = (real)((data_len > 0) ? log(M_LN2 * (real)total_error_2 / (real) data_len) / M_LN2 : 0.0); +- residual_bits_per_sample[3] = (real)((data_len > 0) ? log(M_LN2 * (real)total_error_3 / (real) data_len) / M_LN2 : 0.0); +- residual_bits_per_sample[4] = (real)((data_len > 0) ? log(M_LN2 * (real)total_error_4 / (real) data_len) / M_LN2 : 0.0); ++ residual_bits_per_sample[0] = (real)((data_len > 0 && total_error_0 > 0) ? log(M_LN2 * (real)total_error_0 / (real) data_len) / M_LN2 : 0.0); ++ residual_bits_per_sample[1] = (real)((data_len > 0 && total_error_1 > 0) ? log(M_LN2 * (real)total_error_1 / (real) data_len) / M_LN2 : 0.0); ++ residual_bits_per_sample[2] = (real)((data_len > 0 && total_error_2 > 0) ? log(M_LN2 * (real)total_error_2 / (real) data_len) / M_LN2 : 0.0); ++ residual_bits_per_sample[3] = (real)((data_len > 0 && total_error_3 > 0) ? log(M_LN2 * (real)total_error_3 / (real) data_len) / M_LN2 : 0.0); ++ residual_bits_per_sample[4] = (real)((data_len > 0 && total_error_4 > 0) ? log(M_LN2 * (real)total_error_4 / (real) data_len) / M_LN2 : 0.0); + #endif + + return order; +@@ -152,7 +152,7 @@ unsigned FLAC__fixed_compute_best_predic + + void FLAC__fixed_compute_residual(const int32 data[], unsigned data_len, unsigned order, int32 residual[]) + { +- unsigned i; ++ int i; + + switch(order) { + case 0: +@@ -190,7 +190,7 @@ void FLAC__fixed_compute_residual(const + + void FLAC__fixed_restore_signal(const int32 residual[], unsigned data_len, unsigned order, int32 data[]) + { +- unsigned i; ++ int i; + + switch(order) { + case 0: |