Skip to content
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

media-video/ffmpeg: can be built w/ LTO #47

Closed
wants to merge 1 commit into from
Closed

media-video/ffmpeg: can be built w/ LTO #47

wants to merge 1 commit into from

Conversation

pchome
Copy link
Contributor

@pchome pchome commented Oct 19, 2017

No description provided.

@InBetweenNames
Copy link
Owner

Hi @pchome , I'm actually getting some ODR violations when I try to build it with LTO. What are your CFLAGS/CXXFLAGS for this one?

@pchome
Copy link
Contributor Author

pchome commented Oct 20, 2017

CFLAGS/CXXFLAGS same as yours (from make.conf.lto)

Version: 3.4(0/55.57.57)
USE flags set: X alsa bzip2 encode gpl hardcoded-tables iconv jack ladspa mp3 network openal opengl openssl postproc pulseaudio sdl svg threads truetype vdpau vorbis x264 xcb xvid zlib 
ABI_X86="64 -32 -x32"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3 -aes -avx -avx2 -fma3 -fma4 -sse4_1 -sse4_2 -ssse3 -xop"
FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"

@0xBRM
Copy link

0xBRM commented Oct 20, 2017

@InBetweenNames I can confirm. I actually tried to build ffmpeg with -flto yesterday or two days ago and it failed spectacularly.
@pchome any ffmpeg benchmarks?

@pchome
Copy link
Contributor Author

pchome commented Oct 20, 2017

Maybe it builds for me because I have every dependency LTOed or have no problematic USE flag set?
Better if someone show build error or attach build.log there ⬇️ in comment block .

@CrisBRM no, nothing to compare with and I don't want to play with it for now.

@InBetweenNames
Copy link
Owner

InBetweenNames commented Oct 22, 2017

I actually just did an emerge -1e ffmpeg just to see if that was the case, and I still get an error:

error: `asm` operand has impossible constraints

My USE: X encode mp3 sdl threads truetype vaapi vdpau x264

@0xBRM
Copy link

0xBRM commented Oct 22, 2017

@pchome if you have mpv you can easily benchmark it. Add this to mpv.conf

[bench]
audio=no
untimed=yes
video-sync=display-desync
vulkan-swap-mode=immediate
opengl-swapinterval=0
osd-msg1="FPS: ${estimated-display-fps}"

... and then, mpv --no-config --scale=ewa_lanczossharp --cscale=ewa_lanczossharp --profile=bench /path/to/video. You'd just have to reemerge ffmpeg without lto...

@InBetweenNames
Copy link
Owner

I'm actually wondering if it is from the CPU_FLAGS_X86, since @pchome has a more restricted set than I do. I could see that resulting in a codegen error with asm usages.

@InBetweenNames
Copy link
Owner

Upon further investigation it looks like this is actually related to SSE. I'll make a small note in the workarounds file to reflect this, as we can't toggle LTO based on USE flags yet. Although, I think such a thing would be possible with the right patches.

InBetweenNames added a commit that referenced this pull request Dec 5, 2017
Package-Manager: Portage-2.3.16, Repoman-2.3.6
@pchome pchome deleted the patch-2 branch July 1, 2018 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants