Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th May 2020, 16:12   #1441  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
KNLMeansCL needs to be rebuilt for AviSynth+ 3.6
https://forum.doom9.org/showthread.p...98#post1909698
Until it is done officially, you can download it from my repository
pinterf is offline   Reply With Quote
Old 27th May 2020, 16:42   #1442  |  Link
hintlou
Registered User
 
Join Date: Nov 2019
Posts: 16
Thanks pinterf!I updated to your KNLMeansCL.
But it also made error:
Script error:expected ')'
((null),line 1,column 4)
(AviSynth+/plugins64+/srestore v2.796.avsi,line 79)
(QTGMC 3.364.avsi,line 186)
(my.avs line 25:QTGMC(preset="Very Slow", InputType=0,sourceMatch=3).SelectEven())
hintlou is offline   Reply With Quote
Old 27th May 2020, 19:24   #1443  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by hintlou View Post
Thanks pinterf!I updated to your KNLMeansCL.
But it also made error:
Script error:expected ')'
((null),line 1,column 4)
(AviSynth+/plugins64+/srestore v2.796.avsi,line 79)
(QTGMC 3.364.avsi,line 186)
(my.avs line 25:QTGMC(preset="Very Slow", InputType=0,sourceMatch=3).SelectEven())
update your scripts, especially SMDegrain and Zs_RF_Shared.avsi
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th May 2020, 10:25   #1444  |  Link
hintlou
Registered User
 
Join Date: Nov 2019
Posts: 16
Thanks!After I updated the Zs_RF_Shared.avsi,problem were solved.
hintlou is offline   Reply With Quote
Old 11th June 2020, 20:03   #1445  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
KNLMeansCL is still crashing for me with:
Code:
Avisynth error :  KNLMeansCL: fatal error!  (oclUtilsGetPlaformDeviceIDs: OCL_UTILS_UNKNOWN_ERROR) (E:\Temp\tempPreviewAvisynthFile08_26_19_695.avs, line 11) Couldn't import -1 (1)
also tried the testbuild from pinterf but it doesn't change anything.
Since it there hasn't been a driver version since February that works for me with KNLMeansCL anyone has an idea how to get it working again?
(Problem is only with 32bit Avisynth, works fine in 64bit Vapoursynth)

=> found the problem here, I had an abandoned old OpenCL.dll in the same folder as KNLMeansCL which caused the problem, after removing the OpenCL.dll it's working again
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 12th June 2020 at 11:40.
Selur is offline   Reply With Quote
Old 6th September 2020, 13:42   #1446  |  Link
Slogra
Registered User
 
Join Date: Oct 2001
Location: Region 2
Posts: 427
I'm using Ripbot264 which incluses the KNLMeansCL plugin, but the filter does not work well on my AMD VEGA GPU. (i believe it did not work on my previous AMD RX480 card either).

When i enable KNLMeansCL by using mono noise 2, then the output image gets very dark, almost completely black.

It seems to be minor issue though, because is soon as i resize the video from 1920x1080 to 1904x1072 for example, the output image is normal and the denoising works! It even works fine if i resize to higher resolution.

So resizing is a workaround. But i would like to keep original 1920x1080 resolution, so it's not a good workaround for me.

Does anyone know a better way to fix this issue?
Slogra is offline   Reply With Quote
Old 6th September 2020, 20:35   #1447  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Maybe it's due to a not mod16 resolution? You can workaround with padding, adding borders to the image (just the minimum needed, for example, does it work at 1920x1088?), filters and then crop the borders away to restore the original image.
mp3dom is offline   Reply With Quote
Old 7th September 2020, 09:39   #1448  |  Link
Slogra
Registered User
 
Join Date: Oct 2001
Location: Region 2
Posts: 427
Thanks, that's a good idea.

I would think 1920x1088 would be better, but that resolution did not fix it.

But I know that resizing to 1936x1090 works. So i added 16 and 10, and that works!


video=video.AddBorders(0,0,16,10)
video=KNLMeansCL(video,d=1, a=2, s=4, h=2, device_type="GPU", device_id=0)
video=video.Crop(0,0,-16,-10)
Slogra is offline   Reply With Quote
Old 9th September 2020, 17:03   #1449  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Selur View Post
KNLMeansCL is crashing for me with:
Code:
Avisynth error :  KNLMeansCL: fatal error!  (oclUtilsGetPlaformDeviceIDs: OCL_UTILS_UNKNOWN_ERROR) (E:\Temp\tempPreviewAvisynthFile08_26_19_695.avs, line 11) Couldn't import -1 (1)
Same error here after updating to NVidia drivers 460.15.

Unfortunately no orphaned opencl*.* around.

Reverted to 452.06 and everything works again.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 22nd September 2020, 11:15   #1450  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
460.20 Nvidia drivers solved OpenCL issue.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 16th October 2020, 12:37   #1451  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
bug when using rclip and prefetch at least with https://github.com/pinterf/KNLMeansCL (didn't test the others since they not work with last avs+ now)

Code:
ColorBars(width=640, height=480, pixel_type="yv24").Trim(0,1000).Subtitle("Testing",align=5,size=200)
Animate(0, 500, "Crop", 
\    0, 0, 300,400, 
\  316, 0, 300,400)
KNLMeansCL(rclip=Blur(1))
prefetch(8)
using avspmod and seek to frame 120 (or any other) and refresh with f5 you will noted that image is blended with another frame and it same or worst when you go to the next frames (121, 122, ...) until you reach clean frames after some frames

the problem is there even without rclip, but it's worst with rclip

and it also showed with d=0

using SetFilterMTMode("KNLMeansCL",3,true) or SetFilterMTMode("KNLMeansCL",2,true) will fix it

edit: with real encoding, even SetFilterMTMode("KNLMeansCL",3,true) is not fully fix it, it only make it showed in less frames

edit: I tried with another device with only opencl on cpu, and it work fine! the one above was using intel gpu
edit: seems it also showed in opencl on cpu device, but not in the frame that I refreshed but in next 2 or 3
__________________
See My Avisynth Stuff

Last edited by real.finder; 16th October 2020 at 13:06.
real.finder is offline   Reply With Quote
Old 22nd October 2020, 22:39   #1452  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
also I note that KNLMeansCL (at least with mcKNLMeansCL) in very complex scripts even without prefetch case random deadlock but the cpu usage will stay high in x264/avspmod with no progress
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 12th November 2020, 13:56   #1453  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by real.finder View Post
bug when using rclip and prefetch at least with https://github.com/pinterf/KNLMeansCL (didn't test the others since they not work with last avs+ now)

Code:
ColorBars(width=640, height=480, pixel_type="yv24").Trim(0,1000).Subtitle("Testing",align=5,size=200)
Animate(0, 500, "Crop", 
\    0, 0, 300,400, 
\  316, 0, 300,400)
KNLMeansCL(rclip=Blur(1))
prefetch(8)
using avspmod and seek to frame 120 (or any other) and refresh with f5 you will noted that image is blended with another frame and it same or worst when you go to the next frames (121, 122, ...) until you reach clean frames after some frames
Bug fixed. For high bit depth (9-15 bits) support and other changes see change log. (mods done and tested for both VS and Avs)
https://github.com/pinterf/KNLMeansC...es/tag/v1.1.1e
pinterf is offline   Reply With Quote
Old 13th November 2020, 03:23   #1454  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
Bug fixed. For high bit depth (9-15 bits) support and other changes see change log. (mods done and tested for both VS and Avs)
https://github.com/pinterf/KNLMeansC...es/tag/v1.1.1e
thanks! everything seems work now
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 17th December 2020, 09:41   #1455  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by pinterf View Post
Bug fixed. For high bit depth (9-15 bits) support and other changes see change log. (mods done and tested for both VS and Avs)
https://github.com/pinterf/KNLMeansC...es/tag/v1.1.1e
Arg! You have succumbed to the dark side of the force!
I'm joking, of course.

EDIT. Seriously, I have never added support for 9-15 bits formats because I think it is a waste of memory.
In the best of scenarios, they are as fast as the 16-bit format... so why bother?
__________________
github.com

Last edited by Khanattila; 17th December 2020 at 09:57.
Khanattila is offline   Reply With Quote
Old 17th December 2020, 13:24   #1456  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
You still developer KNLMeansCL or abandoned, Khanattila??
kedautinh12 is offline   Reply With Quote
Old 17th December 2020, 14:48   #1457  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Khanattila View Post
Arg! You have succumbed to the dark side of the force!
I'm joking, of course.

EDIT. Seriously, I have never added support for 9-15 bits formats because I think it is a waste of memory.
In the best of scenarios, they are as fast as the 16-bit format... so why bother?
I think it's better to support them and leave the choice to the user, also here https://forum.doom9.org/showthread.p...09#post1906009

Quote:
Originally Posted by kedautinh12 View Post
You still developer KNLMeansCL or abandoned, Khanattila??
I have same question and also https://forum.doom9.org/showthread.php?t=182126
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 17th December 2020, 15:33   #1458  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
users don't know shit, the internal processing precision has nothing to do with either the bitdepth of the source file, or the bitdepth of the encoded file, or the display bitdepth.
feisty2 is offline   Reply With Quote
Old 17th December 2020, 15:52   #1459  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Even first going up to int16 or directly to fp32, then simply applying truncation to convert the bitdepth to something like int10 before encoding would be better than an int10 processing line. clueless users should be banned from touching filters before they understand how error propagation works.
feisty2 is offline   Reply With Quote
Old 18th December 2020, 12:07   #1460  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
Quote:
Originally Posted by real.finder View Post
I think it's better to support them and leave the choice to the user, also here https://forum.doom9.org/showthread.p...09#post1906009
I wrote it to be sharp and transparent and then use AvS or VS to smooth the corners.
Anyway, you are probably right; I wrote the program 6 years ago, while I was studying C and OpenCL, and anyone can notice it by style in which I wrote it.

Quote:
Originally Posted by real.finder View Post
To be honest, I didn't think anyone cared. I wrote it myself just to test one thing. It is a project that I could think of resuming if there is interest.

To talk about KNLMeansCL ... I don't think it's worth it. Let me be clear, I am glad that there is someone who takes care of it but OpenCL support is a complete disaster, and will not improve. If today I work on it actively, I will try to do it again in C ++ and Vulkan.

"Tensorflow on open source GPUs" - David Airlie (LCA 2020)
__________________
github.com

Last edited by Khanattila; 18th December 2020 at 12:42.
Khanattila is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.