Created attachment 914006 [details] Output of 'emerge --info sys-devel/gcc ffmpeg isl' I posted this earlier in the forum <https://forums.gentoo.org/viewtopic-p-8848425.html#8848425> where I was asked to report here. I use sys-devel/gcc emerged with the `--graphite` flag (description: "Add support for the framework for loop optimizations based on a polyhedral intermediate representation"). It translates to --with-isl when gcc is build and pulls in dev-libs/isl. In order to make use of it, I added some CFLAGS in /etc/portage/make.conf like so: ### Compiler options # Basic CFLAGS="-O2 -pipe -march=native" # Loop nest optimisation (need GCC with USE=graphite setting for --with-isl) CFLAGS="${CFLAGS} -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-nest-optimize" When emerging media-video/ffmpeg (or ffmpeg-chromium) with this, one of its two MP3 decoders produces horribly distorted output, while there are no errors reported. Removing -floop-nest-optimze from the CFLAGS (via /etc/portage/package.env/...) and re-emerging media-video/ffmpeg (or ffmpeg-chromium), the MP3 decoders work as expected. I have an old "Intel(R) Xeon(R) CPU E3-1225 V2 @ 3.20GHz"; an "Ivy Bridge". I get this from app-misc/resolve-march-native: -march=ivybridge -maes --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=8192 The attached output of emerge --info sys-devel/gcc media-video/ffmpeg dev-libs/isl is from the fixed/workaround configuration. A command for testing would be ffmpeg -c:a mp3 -i example.mp3 -f matroska - | ffplay - I also (try to) attach sound samples: My input file "example.mp3" is a 20 second excerpt from a sound file labelled as public domain. The four conversions of this file to Ogg using the mp3 "fixed" decoder or the mp3float decoder, once with -floop-nest-optimize and once without. Below are the commands I used to generate the files. "with_floop-nest-optimize_mp3.ogg" is the distorted one. # ffmpeg with -floop-nest-optimize ffmpeg -c:a mp3float -i example.mp3 with_floop-nest-optimize_mp3float.ogg ffmpeg -c:a mp3 -i example.mp3 with_floop-nest-optimize_mp3.ogg # ffmpeg without -floop-nest-optimize ffmpeg -c:a mp3float -i example.mp3 no_floop-nest-optimize_mp3float.ogg ffmpeg -c:a mp3 -i example.mp3 no_floop-nest-optimize_mp3.ogg Side note: the documentation for -floop-nest-optimize states: "This option is experimental". Please let me know if I can provide additional information (build logs? of what?) or do some tests.
Created attachment 914007 [details] example MP3 file (input)
Created attachment 914008 [details] Output from mp3float with -floop-nest-opimize ffmpeg
Created attachment 914009 [details] Output from mp3 (fixed)with -floop-nest-opimize ffmpeg -> Distorted
Created attachment 914010 [details] Output from mp3float without -floop-nest-opimize for ffmpeg
Created attachment 914011 [details] Output from mp3 without -floop-nest-opimize for ffmpeg