Khanattila / KNLMeansCL

An optimized OpenCL implementation of the Non-local means de-noising algorithm
GNU General Public License v3.0
107 stars 22 forks source link

Border processing bug(s) #24

Open Zeght opened 7 years ago

Zeght commented 7 years ago
blank = blankclip(pixel_type="Y8", height=128, color=$888888)
blank = stackvertical(blank, blank) # stacking is necessary to reproduce, you can use Dither_convert_8_to_16() instead
c = blank.mt_lutspa(expr="x 0.5 < 235 16 ?", u=-128, v=-128)
c.KNLMeansCL(rclip=blank)

Script above returns broken frame on first request. Other frames are usually fine. Bug don't happen when running with d=0, without rclip or inside MP_Pipeline.

Another bug that may not be related: low values of ref clip cause dimmed borders:

blank = blankclip(pixel_type="Y8", height=128, color=$888888)
ref = blank.mt_lut(y=0)
blank.KNLMeansCL(rclip=ref)

Also possible to reproduce without rclip by using y=-1 and processing in 16-bit color. Bug appears with any parameter combinations and affects more pixels with larger a

Tested on AviSynth+ r1576 and r2455