Skip to main content
yuriy80149087
Inspiring
June 10, 2023
Question

[SDK] Issues with iterate suite

  • June 10, 2023
  • 2 replies
  • 586 views

Hi, it's me again. I was trying to get rid of similar glitches that were caused by using iterate() from iterate8(16,32)Suite. Why am I sure it is because of this function? Because by changing to a simple pass over all pixels - the problem went away. But now I came to SmartRender, and there is a problem, when I try to get a pixel, I get a reading violation, because some pixels are not available, because the mask is applied, it makes no sense to check for nullptr, because they do contain something, but from inaccessible memory area, then I get an exception. Having returned everything to iterate, there are no errors, masks work, but I still get these glitches, even if I get rid of calculations completely and just flip pixels from input to output, I still get these errors. What could be the problem?

 

 

This topic has been closed for replies.

2 replies

Community Expert
June 11, 2023

can you show your calls to the iteration functions? you might be passing wrong size data. perhaps you're assuming the input and output buffers are the size of the layer? they might be shrunken or expanded for numerous reasons.

yuriy80149087
Inspiring
June 11, 2023

Iterate Functions you can watch above in replies in screenshots. Btw i returned to for-loops, it's worked for me, but code with iterate is pretty similar with for-loops. And it's a little weird, both work, but the for loops are not glitching, and the iterate function is glitching

yuriy80149087
Inspiring
June 10, 2023

Code of iterate function and pixel function:

If I change the code above, it won't change anything, the glitches will remain.

yuriy80149087
Inspiring
June 10, 2023

Hmm... I found, that issue was not in THIS iterate function. I using two stages inside my plugin, copy to cv::mat from input_world, then some abracadabra, and then iterate thought input back to output_world. It's legit use two iterate inside one render call?
Code of first iterate:

 

James Whiffin
Legend
June 11, 2023

I'm not sure if you are doing this, but make sure never to store anything in the input buffer.

When using smartFX (and even using masks), you shouldn't get any access violations for checking to see if the input pixel has any alpha. If you are getting an access violation, could you post that violation and under which circumstance?