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. |
9th April 2022, 14:12 | #1 | Link |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
TRMC Auxclip / prefilter error
Hey, I modified TSMC to TRMC based off of a Didée idea but when I try to use auxclip to prefilter I get this error message:
Code:
MCompensate : wrong source or super frame size Code:
mocomp = Mcompensate(input,super,vmulti2,thsad=mthresh,tr=tradius,center=true,mt=true) TRMC: Code:
# TRMC function TRMC(clip input, int "tradius", int "mthresh", int "lumathresh", int "LR", int "CR", \ int "blocksize",clip "auxclip", bool "pref", int "Y", int "UV") { pref = Default(pref, true) Y = Default(Y, 3) UV = Default(UV, 2) t=Defined(tradius) tradius=t ? tradius : 6 # temporal radius-number of frames analyzed before/after current frame. LR = Default( LR, 12) CR = Default( CR, 30) m=Defined(mthresh) mthresh=m ? mthresh : 180 # motion threshold-higher numbers denoise areas with higher motion. #Anything above this number does not get denoised. l=Defined(lumathresh) lumathresh=l ? lumathresh : 255 # luma threshold- Denoise pixels that match in surrounding frames. #255 is the maximum and default. 0-255 are valid numbers. #Also adjusts chroma threshold. b=Defined(blocksize) blocksize=b ? blocksize : 16 #larger numbers = faster processing times chroma = UV == 3 aux=Defined(auxclip) w = width(input) h = height(input) isUHD = (w > 2599 || h > 1499) nw = round(w/2.0) nh = round(h/2.0) inputA = input inputA = aux ? auxclip : isUHD ? inputA.ConvertBits(8,dither=-1).BilinearResize(nw+nw%2, nh+nh%2) : inputA super = MSuper(input, pel=1, hpad = 0, vpad = 0, chroma=true, mt=true, levels=1) superfilt = MSuper(inputA,pel=1, hpad = 0, vpad = 0, chroma=true, mt=true) vmulti = Manalyse(superfilt,multi=true,delta=tradius,temporal=true,truemotion=true,blksize=blocksize,overlap=blocksize/2, mt=true, chroma=true) vmulti2 = Mrecalculate(superfilt,vmulti,thsad=mthresh,truemotion=true,tr=tradius,blksize=blocksize/2,overlap=blocksize/4, mt=true, chroma=true) vmulti2 = isUHD ? vmulti2.MScaleVect() : vmulti2 mocomp = Mcompensate(input,super,vmulti2,thsad=mthresh,tr=tradius,center=true,mt=true) dnmc = mocomp.T_REP(T=Tradius,LR=LR,CR=CR) dec = selectevery(dnmc,tradius * 2 + 1,tradius) Y != 3 ? input.mergechroma(dec) : dec } function T_rep(clip c, int "t", int "lr", int "cr"){ T = Default( T, 6) LR = Default( LR, 12) CR = Default( CR, 30) c.temporalsoften(t,lr,cr,28,2) last.clense().repair(last,1) } Code:
p = coloryuv(autogain=true).fft3dfilter(sigma=0.7,sigma2=1,sigma3=1.7,sigma4=1.7,plane=0,bt=1,ncpu=4) Trmc(auxclip=p) Last edited by anton_foy; 9th April 2022 at 14:21. |
9th April 2022, 16:56 | #2 | Link |
Registered User
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
|
I did I quick read, try:
Code:
super = MSuper(inputA,pel=1, hpad = 0, vpad = 0, chroma=true, mt=true) vmulti = Manalyse(super,multi=true,delta=tradius,temporal=true,truemotion=true,blksize=blocksize,overlap=blocksize/2, mt=true, chroma=true) vmulti2 = Mrecalculate(super,vmulti,thsad=mthresh,truemotion=true,tr=tradius,blksize=blocksize/2,overlap=blocksize/4, mt=true, chroma=true) vmulti2 = isUHD ? vmulti2.MScaleVect() : vmulti2 super = aux || isUHD ? MSuper(input, pel=1, hpad = 0, vpad = 0, chroma=true, mt=true, levels=1) : super mocomp = Mcompensate(input,super,vmulti2,thsad=mthresh,tr=tradius,center=true,mt=true) dnmc = mocomp.T_REP(T=Tradius,LR=LR,CR=CR) Last edited by Ceppo; 9th April 2022 at 17:01. |
9th April 2022, 17:25 | #3 | Link | |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
Quote:
|
|
9th April 2022, 17:28 | #4 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
To answer your PM since I don't have more space, it looks a bit to TemporalSoften mode in SMDegrain.
Code:
SMDegrain(6, 180, mode="TemporalSoften", prefilter=5, ContraSharp=false, RefineMotion=true, LFR=0, DCTFlicker=true) EDIT: It happens with UHD sources because you are not downscaling 'auxclip' as you do with 'inputA' Try this: Code:
inputA = aux ? auxclip : input inputA = isUHD ? inputA.ConvertBits(8,dither=-1).BilinearResize(nw+nw%2, nh+nh%2) : inputA
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 9th April 2022 at 17:35. |
9th April 2022, 17:37 | #5 | Link | |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
Quote:
EDIT: It works thank you! Last edited by anton_foy; 9th April 2022 at 17:40. |
|
|
|