diff options
author | ijliao <ijliao@FreeBSD.org> | 2001-05-20 22:07:31 +0800 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2001-05-20 22:07:31 +0800 |
commit | f7863efc3d022981649b18419f1053d95520a3d8 (patch) | |
tree | 0d064bce2a67d28e2c59afb16b0bd7e678933b1c /audio/flac/files | |
parent | aa2792059367856195e7d6af5fb62dba695f8abf (diff) | |
download | freebsd-ports-gnome-f7863efc3d022981649b18419f1053d95520a3d8.tar.gz freebsd-ports-gnome-f7863efc3d022981649b18419f1053d95520a3d8.tar.zst freebsd-ports-gnome-f7863efc3d022981649b18419f1053d95520a3d8.zip |
encoding and decoding now works fine on alpha
Submitted by: Christian Weisgerber <naddy@mips.inka.de> (give me the patch) and Matt Zimmerman <mdz@debian.org> (make the patch)
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: |