HomeOfVapourSynthEvolution / VapourSynth-TCanny

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

Fix kernel compilation problem. #6

Closed DJATOM closed 5 years ago

DJATOM commented 5 years ago

I've got that error log when tried to use OpenCL version. Proposed changes fixed that problem.

vapoursynth.Error: TCannyCL: Build Program Failure
:167:21: warning: expression result unused
if (!label[pos] && buffer[pos] >= T_H) { 
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
:195:38: warning: expression result unused
if (!label[pos3] && buffer[pos3] >= T_L) { 
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
:264:42: warning: expression result unused
const uint output = min((uint)(input * MAGNITUDE + 0.5f), peak); 
~~~~~ ^ ~~~~~~~~~
:274:34: error: expected identifier or '('
const float output = input * MAGNITUDE - offset; 
^
:23:21: note: expanded from here
#define MAGNITUDE 5,100000
^
:274:34: error: expected ';' at end of declaration
:23:21: note: expanded from here
#define MAGNITUDE 5,100000
^
HolyWu commented 5 years ago

Thanks. Applied https://github.com/HomeOfVapourSynthEvolution/VapourSynth-TCanny/commit/297dfad81578bd8ae015c1bd7ab830ff604ae89c.