View Single Post
Old 22nd May 2019, 11:45   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Rough usage
Code:
ColorBars(Width=400,Height=400,Pixel_type="YV12")
InW=Width
InH=Height

SCALE = 3.3
TH    = 1.5
TH2   = TH
TAPS  = 5

RND   = 4    # Rounding to multiple of RND
OutW  = (InW * SCALE + RND-1).Int  / RND * RND   # Round UP
OutH  = (InH * SCALE + RND-1).Int  / RND * RND   # Round UP
#OutW  = (InW * SCALE + RND/2).Int / RND * RND   # Round Nearest
#OutH  = (InH * SCALE + RND/2).Int / RND * RND   # Round Nearest

rFactor=Last.Estimate_Nnedi3_Rpow2(OutW,OutH,th=TH,th2=TH2)
(rFactor>1)
    \ ? nnedi3_rpow2(rfactor=rfactor,cshift="LanczosResize",fwidth=OutW,fheight=OutH,ep0=TAPS)
    \ : LanczosResize(OutW, OUTH, src_left=-0.5, src_top=-0.5, taps=TAPS)

S=String(InW,"InW=%.0f")+String(InH," : InH=%.0f")+String(OutW,"\nOutW=%.0f")+String(OutH," : OutH=%.0f")+String(rFactor,"\nrFactor=%.0f\n") + ((rFactor>1) ? "Using RPOW2" : "Not Using RPOW2")

Return Subtitle(S,Size=Height/16.0,lsp=0)
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 24th May 2019 at 00:20. Reason: Small update
StainlessS is offline   Reply With Quote