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. |
30th June 2016, 16:33 | #1882 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
something in Dither_Luma_Rebuild not like avs+, did you try something else? like prefilter 1 and 2 and 3?
__________________
See My Avisynth Stuff |
30th June 2016, 18:03 | #1884 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
try this then
Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("lsmashvideosource", 3) lsmashvideosource("13HoursCUT.mp4", format="YUV420P8") Crop(0, 140, 0, -140) # In a more lucid state I could probably have laid out this block much better... or not... NL_in = Dither_convert_8_to_16() NL_W = width(NL_in) U8 = UToY8(NL_in) V8 = VToY8(NL_in) NL_lsb = StackVertical(StackVertical(Dither_get_msb(u8),Dither_get_msb(v8)),StackVertical(Dither_get_lsb(u8),Dither_get_lsb(v8))) Y8 = StackHorizontal(ConvertToY8(NL_in),NL_lsb) Y8 = Y8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") u_h = u8.height()/2 v_h = v8.height()/2 u16 = StackVertical(Dither_get_msb(Y8).crop(NL_W,0,0,-v_h),Dither_get_lsb(Y8).crop(NL_W,0,0,-v_h)) v16 = StackVertical(Dither_get_msb(Y8).crop(NL_W,u_h, 0,0),Dither_get_lsb(Y8).crop(NL_W,u_h, 0,0)) prefilter4 = YToUV(u16,v16,Y8.crop(0,0,-u8.width(),0)) SMDegrain (tr=4,PreFilter=prefilter4.SmoothLevels16(preset="tv2pc"),TV_range=false,thSAD=400,contrasharp=false,refinemotion=false,plane=4,chroma=true,lsb=true,mode=6) Prefetch(8) Code:
SMDegrain (tr=4,PreFilter=4,thSAD=400,contrasharp=false,refinemotion=false,plane=4,chroma=true,lsb=false,mode=6) Prefetch(8)
__________________
See My Avisynth Stuff Last edited by real.finder; 30th June 2016 at 18:20. |
1st July 2016, 08:47 | #1886 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Weird.
Replaced the one-pass combined YUV KNLMeans path Code:
NL_in = Dither_convert_8_to_16() NL_W = width(NL_in) U8 = UToY8(NL_in) V8 = VToY8(NL_in) NL_lsb = StackVertical(StackVertical(Dither_get_msb(u8),Dither_get_msb(v8)),StackVertical(Dither_get_lsb(u8),Dither_get_lsb(v8))) Y8 = StackHorizontal(ConvertToY8(NL_in),NL_lsb) Y8 = Y8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") u_h = u8.height()/2 v_h = v8.height()/2 u16 = StackVertical(Dither_get_msb(Y8).crop(NL_W,0,0,-v_h),Dither_get_lsb(Y8).crop(NL_W,0,0,-v_h)) v16 = StackVertical(Dither_get_msb(Y8).crop(NL_W,u_h, 0,0),Dither_get_lsb(Y8).crop(NL_W,u_h, 0,0)) prefilter4 = YToUV(u16,v16,Y8.crop(0,0,-u8.width(),0)) Code:
NL_in = Dither_convert_8_to_16() U8 = UToY8(NL_in) V8 = VToY8(NL_in) Y8 = ConvertToY8(NL_in) U16 = U8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") V16 = V8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") Y16 = ConvertToY8(NL_in).KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") prefilter4 = YToUV(u16,v16,Y16) KNLMeansCL: fatal error! No MT. Then I tried with different avisynth DLLs I have: Classic AVS 2.6: no error Avisynth+ r1576: no error From Avisynth r1689 on: KNLMeansCL: fatal error! When omitting KNLMeans calculation for clip V16, it works again. Code:
U8 = UToY8(NL_in) V8 = VToY8(NL_in) Y8 = ConvertToY8(NL_in) U16 = U8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") V16 = U16 #V8.KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") Y16 = ConvertToY8(NL_in).KNLMeansCL(D=1, A=1, h=7.0,lsb_inout=true,device_type="GPU") prefilter4 = YToUV(u16,v16,Y16) |
1st July 2016, 09:02 | #1888 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
P.S: When I say it "works", it is corruption related. I am not doing any analysis about quality of output.
__________________
@turment on Telegram |
|
1st July 2016, 09:25 | #1890 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
The uncommented works with Prefetch(6) instead of Prefetch(8) because otherwise GPU memory requirements goes beyond my 2GB card.
__________________
@turment on Telegram Last edited by tormento; 1st July 2016 at 10:17. Reason: Prefetch(6) works. |
|
1st July 2016, 10:01 | #1891 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
@tormento, pinterf
You guys realize that using Prefetch(8) will use 8 times the GPU memory, right? I ran a little test and ran out of memory at Prefetch(4). I do however only have 1G graphics memory. Use AVSMeter with the -gpu switch to check GPU memory usage. When you run out of GPU memory you'll get this: KNLMeansCL: fatal error! (AviSynthGetFrame)
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 1st July 2016 at 10:03. |
1st July 2016, 10:14 | #1892 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,577
|
Quote:
Code:
[Runtime info] Frames processed: 107 (0 - 106) FPS (min | max | average): 0.362 | 830086 | 8.244 Memory usage (phys | virt): 1272 | 2775 MiB Thread count: 171 CPU usage (average): 54% GPU usage (average): 29% Video engine load (average): 15% GPU memory usage: 1741 MiB Time (elapsed): 00:00:12.980
__________________
@turment on Telegram |
|
1st July 2016, 10:23 | #1894 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
1st July 2016, 11:05 | #1896 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Still no MT. Maybe we should pass the problem to the right forum. |
|
1st July 2016, 11:10 | #1897 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
What graphics card do you have? How much memory? Have you tried monitoring the GPU memory usage?
__________________
Groucho's Avisynth Stuff |
|
1st July 2016, 14:26 | #1900 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
1.) Image corruption solved*
Avisynth.dll compiled for Debug has no corruption. Release version has. 2.) KNLMeansCL fatal error (3*call in a sequence + SMDegrain) solved** Avisynth.dll compiled for Debug has no fatal error. Release version has. Programmers' dream: debug the release. *, **not solved |
Thread Tools | Search this Thread |
Display Modes | |
|
|