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. |
![]() |
#901 | Link |
Registered User
Join Date: Dec 2015
Posts: 322
|
MeGUI seems to be the problem.
Becuase i moved your scripts out of the plugin folder and created my basic script with only the index file, and i have moved your scripts back. Now i have tested my basic script and it's working with AVSMeter. With your scripts in the plugin folder, i couldnt create the basic script with MeGUI. So from now on, i need to import all the required plugins and scripts from another folder into my encoding script. |
![]() |
![]() |
![]() |
#902 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
Well thanks for testing, I checked and in "MeGUI/tools/avs" folder you find the avisynth dll files, you can try replacing those with v3.7.2 test3, just an idea.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#905 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,169
|
If you use latest avs+ ver, you need change new AvisynthWrapper to use latest avs+ ver
https://forum.doom9.org/showthread.php?t=181351 |
![]() |
![]() |
![]() |
#907 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,817
|
There seems to be some sort of a memory leak in QTGMC, at least when SRestore is involved. This script causes the memory usage to creep up until it hits the set memory limit, the Avisynth basically stalls. It does proceed, but at a very, very slow pace.
Replacing QTGMC with real.finder's STGMC fixes the issue, the memory usage stays below 1GB all the time. Code:
SetMemoryMax(8192) DGSource("source.dgi") # 1080i, 29.97 fps QTGMC(preset="medium", noisepreset="fast", tr2=0, sigma=0.25) Spline36Resize(1280,720) SRestore()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#908 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
I'm pretty sure it's a memory leak in pixel addressing, it has been reported almost 2 months ago, and recalled 2 weeks ago but pinterf has been turning a blind eye on it.
I will try to cobble up a version without pixel addressing so you can confirm. It's either that or a LUT bug.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#909 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,620
|
Quote:
__________________
See My Avisynth Stuff |
|
![]() |
![]() |
![]() |
#910 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
@Boulder: Test with this. I removed all pixel addressing calls, try to use the same threads than in STGMC, I don't know what's the default there.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#911 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,817
|
Quote:
error: Script error: There is no function named 'QTGMC_deflate'. (C:/Program Files/AviSynth+/plugins64/qtgmc.avsi, line 1064) (C:/Program Files/AviSynth+/plugins64/qtgmc.avsi, line 907)
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
![]() |
![]() |
![]() |
#912 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,817
|
The issue might be partly related to SRestore as well. Running it in HBD also causes the leak with STGMC. It would be interesting to see if the tuned version of QTGMC handles 8-bits though, since the original version didn't. I'll doublecheck that one more time though.
SetMemoryMax(8192) DGSource("source.dgi") # 1080i, 29.97 fps STGMC(preset="medium", noisepreset="fast", tr2=0, sigma=0.25) ConvertBits(16) Spline36Resize(1280,720) SRestore()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#913 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
Yes sorry, here are both functions from old QTGMC:
Code:
# Functions (from original TGMC) used instead of mt_xxflate with similar operation but a somewhat stronger result. Originally added for speed, they are # no longer faster due to improvements in masktools. Difference (visual and speed) is small so may be reverted in a later version. function QTGMC_inflate( clip c, int "Y", int "U", int "V" ) { # >>>> YUY2 is planar here mtY =default( Y, 3 ) mtU =default( U, 1 ) mtV =default( V, 1 ) rgY = (mtY == 3) ? 20 : -1 rgU = (mtU == 3) ? 20 : -1 rgV = (mtV == 3) ? 20 : -1 mt_logic( c, c.RemoveGrain( rgY, rgU, rgV ), "max", Y=mtY,U=mtU,V=mtV ) } function QTGMC_deflate( clip c, int "Y", int "U", int "V" ) { # >>>> YUY2 is planar here mtY =default( Y, 3 ) mtU =default( U, 1 ) mtV =default( V, 1 ) rgY = (mtY == 3) ? 20 : -1 rgU = (mtU == 3) ? 20 : -1 rgV = (mtV == 3) ? 20 : -1 mt_logic( c, c.RemoveGrain( rgY, rgU, rgV ), "min", Y=mtY,U=mtU,V=mtV ) } One more thing, it has been a long time I used srestore() but as far as I recall it was very picky with frame access. I used to use it only with MP_Pipeline() for these reasons or at another pass. You can also try to put RequestLinear() before the call.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 22nd February 2022 at 13:59. |
![]() |
![]() |
![]() |
#914 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
On another note, I coded a few new filters for ExTools, usually this involves several iterations that don't make the cut to the final version but there still might be some value on them.
This time it happened with Harris corner detection, I created one version that differs from the canonical one from the papers but IMO performs better. So here it is the "by the book" Harris corner detection with helper function Non-Maximum Suppression. Code:
# Harris corner detection # # Alternative version which works well for small images and graphics function ex_corner_canon(clip a, float "sigma", float "th", bool "show") { rgb = isRGB(a) isy = isy(a) bi = BitsPerComponent(a) rd = Default(sigma, 1.4) th = Default(th, 0.7) # From 0.1 to 0.9 sh = Default(show, false) th = th/10000. a = ConvertBits(a,32) a x1 = ex_lut("x[0,-1] x[0,1] - dup *").ex_blur(rd,mode="gaussian") y1 = ex_lut("x[-1,0] x[1,0] - dup *").ex_blur(rd,mode="gaussian") xy = ex_lutxy(x1,y1,"x y * ").ex_blur(rd,mode="gaussian") # xy = ex_lut("x[0,-1] x[0,1] - abs x[-1,0] x[1,0] - abs max").ex_blur(rd,mode="gaussian") ex_lutxyz(x1,y1,xy,"x y * z - x y + dup * 0.05 * -",UV=2) # R = Det(M) - k*Trace(M)^2 ex_NMS(thin=1.0) # In the paper this goes after thresholding, but this resulted better on my tests ex_lut(Format("x {th} > range_max 0 ?"),UV=2) # Alternative without suppression # ex_lutxyz(x1,y1,xy,Format("x y * z - x y + dup * 0.04 * - {th} > range_max 0 ?"),UV=2) # Corner augment ex_expand(3,mode="disk").ex_deflate() # Show sh ? ex_blend(a,last, "linearadd", 0.4, 1.0) : last ConvertBits(bi) } # Non-Maximum Suppression (NMS) - Edge Thinning Algorithm # # ex_NMS(thin=0.3) # 15.5 (164 without scaling) # awarpsharp2(chroma=2, depth=12, blur=4, thresh=128) # 167 # aWarpSharp(depth=8,blurlevel=2,thresh=0.5) # 182 # function ex_NMS(clip a, float "thin", bool "show") { ss = Default(thin, 0.5) # Super sampling factor sh = Default(show, false) ss = min(4.0,1./ss) RatioResize(a,ss,"%",kernel="blackman",src_left=0.25,src_top=0) ex_lut("x[0,-1] T@ x[0,1] B@ - x[-1,0] L@ x[1,0] R@ - atan2 0.1591549431 * dup 0 > swap dup 1 + ? 180 * A@ 157.5 > x[0,0] X@ T > X B > & X L ? A 112.5 > X x[1,-1] UR@ > X x[-1,1] DL@ > & X DL ? A 67.5 > X L > X R > & X T ? X x[-1,-1] UL@ > X x[1,1] > & X UL ? ? ? ? ",UV=2) RatioResize(1./ss,"%",kernel="bicubic",b=0,c=1) ex_limitdif(a, last, thr=2, elast=5, UV=2) }
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#915 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,817
|
I think I found the culprit after many rounds of debugging - it's propCopy and that's why your QTGMC leaks memory since STGMC doesn't use the props feature at all.
This won't stall: Code:
DGSource("source.dgi") STGMC(preset="medium", noisepreset="fast", tr2=0, sigma=0.25) propSet("_FieldBased", 0) Spline36Resize(1280,720) SRestore() Code:
DGSource("source.dgi") org=last STGMC(preset="medium", noisepreset="fast", tr2=0, sigma=0.25) propCopy(last, org) propSet("_FieldBased", 0) Spline36Resize(1280,720) SRestore()
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#916 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
Oh, that one was also reported back in October, still no word from pinterf.
So you are saying that my QTGMC mod without propCopy is fine? Or do you want to keep debugging it?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#917 | Link |
Guest
Posts: n/a
|
Can someone explain why this is happening...
I have a PC with an old AMD R9 290 GPU (which DOES NOT support CUDA), and when I use BM3D CUDA, of course it fails, BUT, I have also installed a basic GTX 650 (which DOES support CUDA). And now, if I use BM3DCUDA, both are encoding, using OpenCL. The R9 290 is a LOT faster as it has 40 compute units, whereas the poor little GTX 650 only has 2. |
![]() |
![]() |
#918 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,614
|
Quote:
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA Quote:
|
||
![]() |
![]() |
![]() |
Tags |
avisynth, dogway, filters, hbd, packs |
Thread Tools | Search this Thread |
Display Modes | |
|
|