Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: opus compile with optimization (Read 3837 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

opus compile with optimization

hi,

how to enable the optimization in opus? is it even possible for a windows compile?
i get always

Quote
Inline Assembly Optimizations: . No inline ASM for your platform, please send patches
after "./configure"

/Edit: ok, this seems to be normal, so it is solved. this could be moved to trash.

Re: opus compile with optimization

Reply #1
Yeah, just to clarify, the inline assembly optimizations are only for platforms where it's really needed to improve the speed a significant portion. Namely, ARM. Intel x86 32 and 64 bit are already significantly fast enough to use compiled C code, but someone is welcome to contribute assembly optimizations, if they think it's really necessary to beat a minimum of 30x* realtime (or 1/30th utilization for a single stream in real time) encoding speed, depending on the processor.

* Certified figure pulled out at random, no bearing on reality. Just a silly guess. But it can't be too far off the mark. I just know it encodes really fast on my powerful desktop machines, using a single core.

Re: opus compile with optimization

Reply #2
With GCC compiler you need to use ./configure --enable-intrinsics for opuslib and --enable-sse for opustools. Without these settings you lose 20% encoding speed and 50% decoding speed. Note that the --enable-sse flag means the compiled binaries don't work on old CPUs that lack those instructions.

Re: opus compile with optimization

Reply #3
under MinGW everything seems to be activated (runtime detection) by a simple ./configure
 (runtime detection)

Quote
checking if compiler supports SSE intrinsics... no
checking if compiler supports SSE intrinsics with -msse... yes
checking if compiler supports SSE2 intrinsics... no
checking if compiler supports SSE2 intrinsics with -msse2... yes
checking if compiler supports SSE4.1 intrinsics... no
checking if compiler supports SSE4.1 intrinsics with -msse4.1... yes
checking if compiler supports AVX intrinsics... no
checking if compiler supports AVX intrinsics with -mavx... yes


Quote
      Intrinsics Optimizations.......: x86 SSE SSE2 SSE4.1 AVX
      Run-time CPU detection: ........ x86 SSE SSE2 SSE4.1 AVX

i had to disable SSE4.1 and AVX manually.

Re: opus compile with optimization

Reply #4
You may note that it only uses things which the current processor supports at run-time, for all of the displayed instruction sets. It won't use anything it can't detect, unless you turn off run-time detection, in which case it will use the best that you tell it to target at build time.