Page 2 of 3

Re: Black artifacts with modulate

Posted: 2016-02-15T10:07:11-07:00
by Andy
Looks indeed similar.
Strangely i don't have the problem when i use his example image. :/

http://s8.postimg.org/izkvrqgph/c5cdc3e ... b8c0e2.jpg

Re: Black artifacts with modulate

Posted: 2016-02-19T13:42:15-07:00
by Andy
Has anyone more ideas how to debug this? It's really a dealbreaker for me.

Re: Black artifacts with modulate

Posted: 2016-02-19T14:18:39-07:00
by dlemstra
Did you build ImageMagick with OpenCL enabled? Maybe this is an OpenCL issue.

Re: Black artifacts with modulate

Posted: 2016-02-20T03:54:28-07:00
by Andy
Yes i did.
I posted my build options here: https://www.imagemagick.org/discourse-s ... 50#p130289

Is imagemagick fully functional without opencl? I could build it without it then.

Re: Black artifacts with modulate

Posted: 2016-02-20T06:48:54-07:00
by Andy
ok, reporting back.

With "--disable-opencl" the problem is gone!

Can someone explain to me what exactly opencl does and if i should report this somewhere?

Re: Black artifacts with modulate

Posted: 2016-02-20T11:47:52-07:00
by fmw42
See http://www.imagemagick.org/script/archi ... istributed. Apparently IM automatically uses the GPU if available and OpenCL is enabled to process images faster than the CPU for certain IM functions. OpenCL must not work well on your platform/GPU or is buggy for whatever function you were trying to use or interfered with the processing of other functions.

Re: Black artifacts with modulate

Posted: 2016-02-20T12:38:23-07:00
by Andy
Thx

Re: Black artifacts with modulate

Posted: 2016-02-20T13:45:59-07:00
by fmw42
Indeed, https://github.com/ImageMagick/ImageMag ... celerate.c shows that -modulate is one of the functions that is accelerated by OpenCL

Re: Black artifacts with modulate

Posted: 2016-02-20T14:19:11-07:00
by Andy
Not sure why this is happening tho. I am using the proprietary nvidia drivers on Linux. At least performance wise the best you can get on this platform.

Re: Black artifacts with modulate

Posted: 2016-02-20T15:01:00-07:00
by fmw42
I have heard that certain OS do not handle OpenCL well, but I know little more than that. One of the IM developers would have to comment further.

Re: Black artifacts with modulate

Posted: 2016-02-20T15:36:46-07:00
by Andy
Well, as far as i am concerned my problem is fixed but i am glad to help debuging this further.
Any suggestions how to get a dev in this thread?

Re: Black artifacts with modulate

Posted: 2016-02-20T15:40:23-07:00
by fmw42
They will see it. dlemstra was the one that suggested to turn off opencl.

Re: Black artifacts with modulate

Posted: 2016-02-20T15:51:56-07:00
by dlemstra
I suspect this is an issue with the OpenCL software on your operating system. I also have an OpenCL enabled build and I cannot reproduce the issue. I will forward this post to an OpenCL export and ask if they can reproduce this on their system. It might take a while before you have an answer. For now you are probably better of with disabling OpenCL on your system.

Re: Black artifacts with modulate

Posted: 2016-02-20T16:48:17-07:00
by fmw42
Dirk,

Would they not have to have his exact OS and GPU card to have a chance of reproducing the error?

Re: Black artifacts with modulate

Posted: 2016-02-21T02:40:42-07:00
by dlemstra
If it is a bug in the OpenCL driver we cannot fix it but maybe this is a bug in our OpenCL code. Just want to make sure its not the latter first.