View Single Post
Old 1st November 2020, 20:47   #4  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,905
@Anton, long time no see xD There's a problem, you're feeding FFT3DFilter with a 16bit planar input, but the old FFT3D only works in 8bit planar and doesn't support high bit depth, so 16bit planar, stacked and interleaved are not going to work.
If neo_FFT3D doesn't work with MPPipeline, you can just filter with 8bit precision:



Code:
MP_Pipeline("""

  ### Avisynth+ 3.6.1 (r3300, 3.6, I386) ###
SetFilterMTMode("DEFAULT_MT_MODE", 2)

#Index
FFVideoSource("F:\C0025.mp4")

# ### prefetch: 32, 16
### ###
### platform: Win32

SetFilterMTMode("FFVideoSource", MT_SERIALIZED)
trim(660,684)

### platform: win32
### branch 2
### ###

# DENOISE with 8bit planar precision#
fft3dfilter(sigma=1.4, sharpen=0.3, plane=4, ncpu = 4)
 

 
#Going  to 16bit planar
ConvertBits(16)




### ###
### platform: Win32



### platform: win32
### branch 2
### ###

### platform: Win32

### ###

# UNBLOW #
clip1 = last.Levels(0, 1, 65280, 0, 235*256, coring=false, dither=false)
clipR = Levels(0, 1, 65280, 0, 235*256, coring=false, dither=false).converttorgb64().extractR()
clipG = Levels(0, 1, 65280, 0, 235*256, coring=false, dither=false).converttorgb64().extractG()
clipB = Levels(0, 1, 65280, 0, 235*256, coring=false, dither=false).converttorgb64().extractB()
RBD = clipB.Overlay(clipR, mode="darken", opacity=1.0)
GRD = clipG.Overlay(RBD, mode="darken", opacity=1.0)
umask= Greyscale().Levels(197*256, 0.76, 65280, 0, 255*256, coring=false, dither=false).fastgaussblur(20)
mt_merge(clip1, GRD, umask, Y=3, U=2, V=2, chroma="copy first", w=-1, h=-1, paramscale="i16")

### ###
### platform: Win32


# TOPSHARP #
shrp=sharpen(1.0)
vid1 = last
emask1 = vid1.mt_edge(mode="prewitt",thy1=0,thy2=65280, paramscale="i16").mt_expand(paramscale="i16").fastgaussblur(10)
result1 = mt_merge(vid1,shrp,emask1, U=2,V=2, paramscale="i16")
merge(result1)

### ###
### platform: Win32

# SOFTEN #
blr=mt_expand(paramscale="i16").Blur(1.56).Blur(1.56).Blur(1.56).Blur(1.56).Blur(1.56).Blur(1.56).Blur(1.56)
vid = last
shine = vid.Overlay(blr, mode="blend", opacity=0.9)
emask = vid.mt_edge(mode="prewitt",thy1=0,thy2=65280, paramscale="i16").mt_expand(paramscale="i16").mt_expand(paramscale="i16").mt_expand(paramscale="i16").fastgaussblur(20)
result = mt_merge(vid,shine,emask, U=2,V=2, paramscale="i16")
result

### ###
### platform: Win32

ConverttoStacked()

### ###
### platform: Win32

#Debanding
f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, input_mode = 1, input_depth = 16, output_mode = 1, output_depth = 16, mt=true)

### ###
### platform: Win32

ConvertFromStacked()

### platform: Win32

### ###

""")

#Chroma Upscaling
ConverttoYUV444()

ConvertBits(bits=10, dither=1)
Prefetch(6)

Side note: if you're not sure about what supports planar high bit depth (and up to which bit depth), what supports interleaved high bit depth, what supports stacked high bit depth and what supports only 8bit planar, you can use the list I made for myself here: https://github.com/FranceBB/FranceBB...visynth-Script
If you go to the "denoise" section, there's a list of denoisers I use (or I was using in the past) with my suggested parameters and most importantly which bit depth they support.

Last edited by FranceBB; 1st November 2020 at 20:57.
FranceBB is offline   Reply With Quote