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. |
|
|
Thread Tools | Search this Thread | Display Modes |
23rd July 2015, 09:11 | #221 | Link | |
Registered User
Join Date: Feb 2014
Posts: 356
|
Hello. I've installed Visual C++ Redistributable Package for Visual Studio 2013 and the latest nVidia CUDA 7.0.28 on my Win 7, Intel HD Graphics 4000-nVidia NVS 5400M, i5 3320M machine and I'm trying to test drive KNLMeans CL, but the call:
Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll") LWLibavVideoSource("SourcePath") KNLMeansCL() Quote:
|
|
23rd July 2015, 13:38 | #224 | Link | |
Registered User
Join Date: Nov 2014
Posts: 440
|
Quote:
EDIT. It's only required a OpenCL driver, not all SDK. Last edited by Khanattila; 23rd July 2015 at 14:13. |
|
26th July 2015, 07:23 | #226 | Link |
Registered User
Join Date: Feb 2014
Posts: 356
|
It seems my other laptop (Win 7, Intel HD Graphics 4000-nVidia NVS 5400M, i7 3840QM) can run KNLMeansCL (not sure why the other one, with the same graphics combo, can't), but the output 8-bit x264 video is a bit odd with Lsb_InOut=True. With any source (here's a sample, TestClipShawshank2) the call
Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll") LWLibavVideoSource("D:\Temp\zzzTestClipShawshankTemp\TestClipShawshank.mkv") KNLMeansCL() Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll") LWLibavVideoSource("D:\Temp\zzzTestClipShawshankTemp\TestClipShawshank.mkv") KNLMeansCL(Lsb_InOut=True) Any suggestion would be much appreciated. |
26th July 2015, 07:39 | #227 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
You're encoding to 8-bit x264? Then you should use DitherPost to convert it back to 8-bit before feeding it to x264, it doesn't understand stacked video. It's kind of pointless to bother with that parameter for one filter; if you're using a full 16-bit chain, start with LWLibavVideoSource(...,stacked=true,format="YUV420P16") and continue from there. Your screenshot shows up broken because you didn't provide stacked video (that's what the In in LsbInOut means) but asked it to process as if it was; the filter won't convert from 8-bit to 16-bit for you.
http://avisynth.nl/index.php/High_bi..._with_Avisynth has more details on how to work with stacked 16-bit video. Last edited by foxyshadis; 26th July 2015 at 07:42. |
26th July 2015, 09:17 | #228 | Link |
Registered User
Join Date: Feb 2014
Posts: 356
|
Thanks for your help, foxyshadis . I get the gist (if not all the details) of your reply, as I'm still a relative noob. I'm actually trying to take your kind advice from here, but am having trouble because it seems that SMDegrain and KNLMeansCL handle the Lsb parameter differently. I was trying to sort it out with 8-bit x264 because I thought it would be simpler (guess not ), but my normal script is:
Code:
SetMemoryMax(2048) SetMTMode(3,7) LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll") LWLibavVideoSource("SourcePath") SetMTMode(2) SMDegrain(TR=3,ThSAD=400,RefineMotion=True,Plane=0,Chroma=False,Lsb=True,Lsb_Out=True) F=DitherPost(Mode=-1) S=F.FastLineDarkenMod() D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) GradFun3(Radius=16,Lsb_In=True,Lsb=True) Dither_Out() Code:
KNLMeansCL(Lsb_InOut=True,Device_Type="GPU") Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll") LWLibavVideoSource("SourcePath",Stacked=True,Format=YUV420P16) KNLMeansCL(Lsb_InOut=True,Device_Type="GPU") F=DitherPost(Mode=-1) S=F.FastLineDarkenMod() D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) GradFun3(Radius=16,Lsb_In=True,Lsb=True) Dither_Out() Edit: do you know if there's a way to use KNLMeansCL(Lsb_InOut=True) with DGSource("SourcePath")? Last edited by LouieChuckyMerry; 26th July 2015 at 10:23. |
26th July 2015, 10:53 | #231 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Code:
DGSource() Dither_convert_8_to_16() |
|
26th July 2015, 11:45 | #232 | Link | ||
Registered User
Join Date: Feb 2014
Posts: 356
|
Quote:
Quote:
Thank you again for all your help . |
||
27th July 2015, 06:15 | #233 | Link |
Registered User
Join Date: Feb 2014
Posts: 356
|
Hello . The following script runs without issue:
Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\DGIndexNV\DGDecodeNV.dll") DGSource("SourcePath") Dither_Convert_8_To_16() ### Deinterlace-Match Fields-Decimate ### LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll") Function FieldMatch(Clip C) { Global PP = C.DuplicateFrame(0) Global CC = C Global NN = C.DeleteFrame(0) P2 = PP.SeparateFields() C2 = CC.SeparateFields() N2 = NN.SeparateFields() Global PC = Interleave(P2.SelectEven(),C2.SelectOdd()).Weave() Global CP = Interleave(C2.SelectEven(),P2.SelectOdd()).Weave() Global CN = Interleave(C2.SelectEven(),N2.SelectOdd()).Weave() Global NC = Interleave(N2.SelectEven(),C2.SelectOdd()).Weave() Global Deint = QTGMC(CC).SelectEven() Return ScriptClip(CC, \ "!CC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CC : " + \ "!NN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NN : " + \ "!CN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CN : " + \ "!NC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NC : " + \ "!PP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PP : " + \ "!CP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CP : " + \ "!PC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PC : Deint") } TFM(Order=-1,Mode=5,PP=2,Clip2=FieldMatch(),Slow=2,MChroma=False,Ubsco=False,CThresh=12,Chroma=True) TDecimate(Mode=1) ### Fix Line-Doubled Fields ### NNEDI3(Field=-2) Merge(SelectEven(),SelectOdd()) ### Crop ### # Dither_Crop16(8,0,-8,0) ### Overall Spatio-Temporal Denoise (Plus Gibbs Noise) ### # KNLMeansCL(D=1,A=1,h=5.0,Lsb_InOut=True,Device_Type="GPU") ### Resize ### LinearResize(640,480,Lsb_In=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=20,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) ### Deband ### GradFun3(thR=0.55,SMode=2,Lsb_In=True,Lsb=True,StaticNoise=True) # Trim() # DitherPost() Dither_Out() Edit: a little rearranging, cropping before converting to 16-bit, sorted it out (although the above might be a problem somehow?). This works: Code:
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\DGIndexNV\DGDecodeNV.dll") DGSource("SourcePath") ### Deinterlace-Match Fields-Decimate ### LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll") Function FieldMatch(Clip C) { Global PP = C.DuplicateFrame(0) Global CC = C Global NN = C.DeleteFrame(0) P2 = PP.SeparateFields() C2 = CC.SeparateFields() N2 = NN.SeparateFields() Global PC = Interleave(P2.SelectEven(),C2.SelectOdd()).Weave() Global CP = Interleave(C2.SelectEven(),P2.SelectOdd()).Weave() Global CN = Interleave(C2.SelectEven(),N2.SelectOdd()).Weave() Global NC = Interleave(N2.SelectEven(),C2.SelectOdd()).Weave() Global Deint = QTGMC(CC).SelectEven() Return ScriptClip(CC, \ "!CC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CC : " + \ "!NN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NN : " + \ "!CN.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CN : " + \ "!NC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? NC : " + \ "!PP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PP : " + \ "!CP.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? CP : " + \ "!PC.IsCombedTIVTC(CThresh=12,Chroma=True,BlockX=16,BlockY=32) ? PC : Deint") } TFM(Order=-1,Mode=5,PP=2,Clip2=FieldMatch(),Slow=2,MChroma=False,Ubsco=False,CThresh=12,Chroma=True) TDecimate(Mode=1) ### Fix Line-Doubled Fields ### NNEDI3(Field=-2) Merge(SelectEven(),SelectOdd()) ### Crop ### Crop(8,0,-8,0) Dither_Convert_8_To_16() ### Overall Spatio-Temporal Denoise (Plus Gibbs Noise) ### KNLMeansCL(D=1,A=1,h=5.0,Lsb_InOut=True,Device_Type="GPU") ### Resize ### LinearResize(640,480,Lsb_In=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=20,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) ### Deband ### GradFun3(thR=0.55,SMode=2,Lsb_In=True,Lsb=True,StaticNoise=True) # Trim() # DitherPost() Dither_Out() Last edited by LouieChuckyMerry; 27th July 2015 at 07:01. |
28th July 2015, 11:06 | #235 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Test script: Code:
colorbars(width = 1280, height = 720, pixel_type = "yv12").killaudio() Dither_Convert_8_To_16() Dither_Crop16(8,0,-8,0) KNLMeansCL(Lsb_InOut = True) DitherPost() Debugging this with AVSMeter and checking "GetLastError()": With the lastest Dither.dll (1.27.1), AVSMeter throws an error but GetLastError() returns "0" (ERROR_SUCCESS). However, with the previous dither.dll (1.26.5), GetLastError() returns "0x0000007f" (ERROR_PROC_NOT_FOUND, "The specified procedure could not be found"). It works without error under these conditions:
Last edited by Groucho2004; 28th July 2015 at 14:05. |
|
28th July 2015, 15:20 | #236 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
actually a bug in avisynth or knlmeanscl
dither_crop16 is a... simple little function script in Dither.avsi, not a plugin in Dither.dll, it crops MSB and LSB separately and stacks them back together after that, and.. that's about it |
28th July 2015, 15:49 | #238 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
FYI: Dither_Crop16(8, 0, -8, 0) - crash Dither_Crop16(16, 0, -8, 0) - no crash Dither_Crop16(8, 0, -16, 0) - crash Dither_Crop16(16, 0, -16, 0) - no crash Edit: AVS+ r1825 does not crash whatever I try Edit2: HolyWu's correction below does fix the problem. Last edited by Groucho2004; 28th July 2015 at 16:02. |
|
28th July 2015, 15:56 | #239 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Speaking of this… there’s a little bug in Dither_crop16: it doesn’t pass the align parameter if the crop is only horizontal. It’s the case here but I’m not sure if this is related with the present issue.
EDIT: HolyWu got it first
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|
|