Hallo Didée,
schonmal vielen Dank für die Hinweise, da fehlt tatsächlich was, sorry.
Da ich mit Staxrip arbeite habe ich in den Einstellungen die Angaben hinterlegt welche immer am Anfang auszuführen sind.
Das aufrufende Script sieht dann z.B. so aus:
LoadPlugin("G:\StaxRip\Applications\DGMPGDec\DGDecode.dll")
SetMemoryMax(512)
SetMTMode(5)
MPEG2Source("H:\Vob\Film1\SZ_32\VIDEO_TS\VTS_01_1 temp files\VTS_01_1.d2v")
Crop(0,0, -Width % 8,-Height %
ConvertToYV12()
Crop(0,86,-0,-90)
Import("g:\Staxrip\Avisynth\sswfft.avsi")
Der letzte Importbefehl ruft dann das zuerst genannte Script auf.
Davon ausgehend sollte die Problematik mit dem Speicher ausgeschlossen werden können.
In der aktuellen Variante (liegt auf meinem "Rechenknecht" und war daher hier nicht mit dabei) gibt es auch leider schon die Anweisung Return(last) am Ende, das hatte ich beim Durchsuchen des Forums gefunden mit dem von Dir genannten Hinweis, kann sogar sein, dass das von Dir stammte.
Die Reduktion auf 4 Threads kann ich noch versuchen. Allerdings habe ich das ganze schon auf zwei Rechnern getestet, einmal Zweikern, einmal Vierkern, jeweils Ivy Bridge (vielleicht liegt hier das Problem?). Der Vierkernrechner sollte mit 8 Threads normalerweise arbeiten, der andere mit 4, soweit mit meine Architekturkenntnisse da nicht im Stich lassen.
Den MtMode(2) hatte ich schon an verschiedenen Stellen stehen (auch den Mode 3). Seltsamerweise hatte ich eine höhere Framerate wenn Mode 2 nach FFT3D stand. Das war aber in einer anderen Evolutionsstufe des Scripts, daher werde ich das ebenfalls noch ändern.
Was mir noch einfällt: Crop ist nicht Mod 16, wäre vielleicht auch noch einen Versuch wert?
So läuft jetzt und sieht wie folgt aus:
LoadPlugin("G:\StaxRip\Applications\DGMPGDec\DGDecode.dll")
SetMemoryMax(512)
SetMTMode(5,4)
MPEG2Source("H:\Vobneu\MainMovie\DRAGONHEART\VIDEO_TS\VTS_01_1 temp files\VTS_01_1.d2v")
Crop(0,0, -Width % 8,-Height %
ConvertToYV12()
Crop(0,74,-4,-74)
Import("g:\Staxrip\Avisynth\sswfft.avsi")
Das aufgerufende Script (mal wieder ohne Sse3):
LoadPlugin("g:\Staxrip\Avisynth\mvtools2.dll")
LoadPlugin("g:\Staxrip\Avisynth\mt_masktools-25.dll")
LoadPlugin("g:\Staxrip\Avisynth\RemoveGrainS.dll")
LoadPlugin("g:\Staxrip\Avisynth\RepairS.dll")
LoadPlugin("g:\Staxrip\Avisynth\FFT3DFilter.dll")
source = last
SetMTMode(2,4)
preNR = source.fft3dfilter(sigma=16,sigma2=10,sigma3=6,sigma4=4,bt=4,bw=16,bh=16,ow=8,oh=8)
sharp0 = source.Seesaw(nrlimit=0, nrlimit2=99, bias=49, sstr=1.24, Spower=3, Szp=12, Sdamplo=4, SdampHi=19, Slimit=99, sootheT=0, sootheS=0)
preNR_super = preNR.MSuper(pel=2, sharp=2)
super2 = sharp0.MSuper(pel=2,sharp=2,levels=1)
backward_vec2 = MAnalyse(preNR_super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(preNR_super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(preNR_super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(preNR_super, isb = false, delta = 2, overlap=4)
source.MDeGrain2(super2, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=350)
Return(last)
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")
NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
#SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)
(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, float power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
Alles anzeigen
Ich hatte das zwischenzeitlich reinkopiert, auch wegen der Tests mit AVSP. Soothe hatte ich entfernt, da nicht von mir genutzt.
Gruß Michael