The old implementation relied on the tricks that no longer seem to
optimize anything and break strict aliasing rule, which in turn is an
undefined behavior:
/var/storage/rf/proj/itgmania/src/RageTypes.h: In function ‘unsigned char FTOC(float)’:
/var/storage/rf/proj/itgmania/src/RageTypes.h:300:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
300 | int ret = reinterpret_cast<int&>(base);
| ^~~~
Compiler explorer summary: https://godbolt.org/z/5857747P3
It's also possible to eliminate this strict aliasing violation with a union,
while leaving all the tricky code (also included in the link above).
Online build of the test code that's suggested for FTOC: https://onlinegdb.com/O7N0Orl0r
ARM version of the code wasn't correct -- as in not passing the attached test.
It didn't perform accurately around the end of the input range.
Dynamic linking against libbz2 was problematic on some distributions.
We only needed it for pcre's CLI (which we don't use) and ffmpeg's mkv
decompression in case a user forced encoder to use it, because its usage
is discouraged by the standard.
See https://github.com/itgmania/itgmania/issues/217 for the related
discussion.