Chocobo1 / opus-tools_win32-build

opus-tools Unofficial Builds - Win32 & x64
55 stars 5 forks source link

Opus 1.3.1 64 Bit Windows build planned? #4

Closed Sa-Ja-Di closed 4 years ago

Sa-Ja-Di commented 4 years ago

Would be nice to see also an 1.3.1 Windows 64 Bit Opus build.

Anything planned?

Thanks :)

Chocobo1 commented 4 years ago

It is already there: https://github.com/Chocobo1/opus-tools_win32-build/releases/tag/untagged-a1b48173e3c9944eb7e2

However it requires your CPU to support AVX instructions set.

Sa-Ja-Di commented 4 years ago

Your link gives a 404 error back

Chocobo1 commented 4 years ago

oops, should be this one: https://github.com/Chocobo1/opus-tools_win32-build/releases/tag/2019.04.13

sergeevabc commented 4 years ago

@Chocobo1, have you found a way around AVX crash for CPUs with no such support?

julonexus commented 4 years ago

Hi, I think I have a workaround for you : libopus is not really build with AVX RTCD. It only uses the build option -mavx, that lead to the compiler to change instructions (add VEX) in build time. Adding -mno-sse2avx while building doesn't seem to work. To avoid that, just remove lines where opus add -mavx in : https://gitlab.xiph.org/xiph/opus/-/blob/master/cmake/OpusFunctions.cmake#L170 or https://gitlab.xiph.org/xiph/opus/-/blob/v1.3.1/opus_functions.cmake#L162 and replace it by set(AVX_SUPPORTED 1 PARENT_SCOPE) or by check_and_set_flag(AVX -mno-sse2avx) should be enough. Use something like target_compile_options(opus PRIVATE -mavx) only when your have OPUS_X86_PRESUME_AVX The same for Windows with /arch:AVX