-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg-3.4.2 can compile with graphite and lto enabled #103
Comments
Indeed, at least one other user has been able to do this as well. I'm waiting on a GCC 8 release before I investigate further. |
I got https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69728 with ffmpeg-4. supposed to be fixed in gcc 8 though |
Managed to get it built with Graphite, but without LTO using GCC 8.1.0. I'll update the workaround accordingly, but keep the issue open. |
#103 Package-Manager: Portage-2.3.33, Repoman-2.3.9
GCC 8.2.0 and still can't build with LTO here. Can still build with Graphite however. |
for me it compiles fine and then promptly crashes on loading anything: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132. looks to be fixed in ffmpeg-9999 though |
@Hello71 In #85132 they blame Meanwhile, I can confirm
|
Ah, my mistake, I accidentally also uncommented the ltoworkarounds line, so it actually compiled without LTO. It in fact still crashes with 9999 if LTO is properly enabled. |
I just tried to build with |
#47 ?
Your comments. |
Indeed, I was just testing to see if anything had changed since then. So far, still in the same spot. |
Then possible solution is to drop problematic flags ( |
Yeah, that is one way -- foregoing the explicit SSE code for the implicit version offered by the compiler via vectorization. I'd want to benchmark both before dropping the SSE4 flag. It may be that the implicit SSE is equivalent or better when combined with LTO (+O3, Graphite, and now |
Do you have any reasons to suspect that compiler-generated code with LTO will be faster than hand-made? |
No reason to believe one way or the other! Just suggesting a possibility :) Vectorization has improved a ton in recent releases of GCC and Clang. |
aac crash fixed upstream https://trac.ffmpeg.org/ticket/7491 |
note that upstream also suggests to turn off hardcoded-tables: https://bugs.gentoo.org/668636 |
BTW, can't build with LTO and Previously I used only Sadly there is no simple method to change --- a/ffmpeg-4.1.3.ebuild
+++ b/ffmpeg-4.1.3.ebuild
@@ -401,6 +401,7 @@
break
done
+ [[ ${ABI} == x86 ]] && filter-flags "-flto*" || append-flags "-flto"
# LTO support, bug #566282
is-flagq "-flto*" && myconf+=( "--enable-lto" )
|
My USE flags are very stripped down, encoding and all the other jazz is disabled, so I could imagine results might differ on a more complete ffmpeg, but nonetheless it's worth noting.
These are my USE flags: X, alsa, aes, mmx, mmxext, sse ,sse2 ,sse3, sse4_1, sse4_2, ssse3, gpl, hardcoded-tables, iconv, libass, libdrm, mp3, network, opengl, sdl, threads, truetype, vaapi, vorbis, xcb, xvid, zlib.
I used the cflags from your make.conf plus -ffast-math. There is a minor but nonetheless real improvement from enabling graphite and lto here. A particularly intense 3 minute segment of video which consistently dropped around 160 frames in MPV prior to recompiling with lto and graphite now only drops 140. If there are indeed issues with compiling a full ffmpeg with grapite and lto, they obviously should be disabled by default. But it might be worth commenting in that it can work with them, as it can be a noticable improvement for people with trash hardware like me.
The text was updated successfully, but these errors were encountered: