Patch A: (gccbug-v2-a.patch)
It replaces fp code with integer. Basically it changed
ceil(x * (1.-0.95)) with (x/20 + x%20?1:0). This also slightly
changes calculated RG value, so test_replaygain.sh was also updated.

Why RG value differs? Because double(1.-0.95) > double(0.05).
If x==20 then ceil(x * (1.-0.95)) == 2, while ceil(x * 0.05) == 1
and (x/20 + x%20?1:0) == 1. So the new code behaves differently
than the old. But IMHO the new behavior is "more correct" than
the old one.



Patch B: (gccbug-v2-b.patch)
It adds -mfpmath=sse option to configure.ac after -msse2 option.
Should fix the bug according to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61423#c2
According to my tests, it doesn't affect encoding speed.




Any of the two patches fix the problem here, so choose the better...
but I'd like to see both of them applied, just in case.

Attachment: gccbug-v2-a.patch
Description: Binary data

Attachment: gccbug-v2-b.patch
Description: Binary data

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to