HomeOfVapourSynthEvolution / VapourSynth-TCanny

TCanny filter for VapourSynth
GNU General Public License v3.0
27 stars 6 forks source link

Blank output when compiled with GCC and ASM is enabled #14

Open shssoichiro opened 2 years ago

shssoichiro commented 2 years ago

Initially brought this up in https://github.com/HomeOfVapourSynthEvolution/VapourSynth-TCanny/issues/13#issuecomment-1107654500, thought it made sense to create an issue to track this, even if there's no clue on a solution. Several others have reproduced it, so I wanted to document the workaround as well.

The workaround is to build this plugin with Clang or MSVC. You can use clang by prefixing CC=clang CXX=clang++ to the meson build step.

Stefan-Olt commented 1 month ago

Any idea what causes this issue? I have created a build repo for Linux (and macOS) that uses gcc, supporting another compiler is quite difficult (it's a custom build compiler using an old libc6 for compatibility with many Linux distributions). So I would rather fix the issue here. Additionally this could be an issue that may not be GCC specific and could occur with newer clang versions or optimization options as well

Stefan-Olt commented 1 month ago

Investigation: I started replacing all SSE2 functions with their C equivalent, I had to replace all functions used to make it work correctly. This told me it is a general issue, not a single line. And I found it auto&causes the problem, if I just use auto everything is fine. Can someone test if changing that does brake Clang/MSVC support?

Stefan-Olt commented 1 month ago

Have now open a pull request for a fix (also including Neon optimizations)