Closed MartinEesmaa closed 1 month ago
We'll have a look, thanks
Hi Martin,
Thanks for your report. Your toolchain file also needs to set the compiler flag -mfpu=neon-vfpv3
, for example like this:
set( ARM_COMPILER_FLAGS "-mfpu=neon-vfpv3" )
set( CMAKE_C_FLAGS_INIT "${ARM_COMPILER_FLAGS}" )
set( CMAKE_CXX_FLAGS_INIT "${ARM_COMPILER_FLAGS}" )
I'll add an armv7 toolchain file to code base, since we have some for aarch64 already.
But aside from getting the code to compile: If your CPU supports 64 bits, I recommend using that mode. I have seen significant performance differences (up to 50% if I remember correctly), when running the decoder either in ARMv7 mode or AARCH64 on the same CPU.
Best regards, Gabriel
Hi Gabriel, thanks for additional command flags of CMake toolchain to me! :)
My CPU supports 64 bits, so yes I can use recommended mode if I cross compile or native. I can make pull request to add armv7 toolchain to vvdec if you like to.
Sincerely, Martin Eesmaa
I used the chance to clean up our provided toolchain files, so I'll create a PR for that myself. But thank you very much for the offer.
Can I close the issue?
@K-os, yes you can close the issue. Thank you! :)
One thing, I tested it out and it worked with your additional flags, x86 SIMD and ARM SIMD on. When disabling x86 SIMD flag only to compile Linux armv7 binary, it will show results error like simde_bswap64
, so we might to force enabling x86 SIMD or add some codes to patch the bug for compiling Linux armv7 if necessary.
Oh, good find! Something is not wrapped properly in #ifdef TARGET_SIMD_X86
. I'll have a look and keep this issue open as a reminder.
Okay @K-os, alright. Take your time :)
got the same err with simde_bswap64 while disabling x86 SIMD flag.
After copy the following code to Bitstream.h and wrap it with#ifndef TARGET_SIMD_X86
, I'm able to compile correctly. But it might not be a nice solution.
uint64_t simde_bswap64(uint64_t v) { return ((v & (((uint64_t) 0xff) << 56)) >> 56) | ((v & (((uint64_t) 0xff) << 48)) >> 40) | ((v & (((uint64_t) 0xff) << 40)) >> 24) | ((v & (((uint64_t) 0xff) << 32)) >> 8) | ((v & (((uint64_t) 0xff) << 24)) << 8) | ((v & (((uint64_t) 0xff) << 16)) << 24) | ((v & (((uint64_t) 0xff) << 8)) << 40) | ((v & (((uint64_t) 0xff) )) << 56); }
Just for my understanding. Why would you disable TARGET_SIMD_X86
? The ARM implementation relies on that macro. Its confusing, I know, but thats the way it works.
I'm building for wasm use case, and some browsers may not support wasm simd.
Fixed/marked as non-operational in #177
Hi!
I have an issue about cross-compiling Linux armv7 vvdec binary on my Linux x86_64 machine. The commit of https://github.com/fraunhoferhhi/vvdec/commit/edd47ab839a73e47d672b1f1ad071725eb955f93 doesn't work and it fails to compile armv7 vvdec binary for Linux, but last commit of https://github.com/fraunhoferhhi/vvdec/commit/85ed28d022f2aaca0e7721dca5f3d6b1b7f63c66 was successfully compiled of Linux arm64 binary.
I'm running on Ubuntu 22.04.3 LTS Server and also GCC 11.4.0 with g++.
Here is the log that may be helpful to you and used CMake Toolchain of ARMv7.
toolchain_armv7.cmake:
CMake output logs:
CMake output logs (disabled of x86 and ARM SIMD):
So that's my two error logs, but here is a full log if you want it: fullerrorlogoflinuxarmv7vvdec.zip
Feel free to reply or ask question to me. Thank you! :)
Sincerely