Log in

View Full Version : FFT3dfilter double image


anton_foy
1st November 2020, 16:06
Hi!

However I try to use FFT3dfilter (this version FFT3dFilter-v2.6.7)
I get this double image which looks like some before-after thing and I cannot get rid of it.

http://www.imagebam.com/image/ea1d311358288345

These lines I have tried and all result in the same double image:

fft3dfilter(sigma=1.4, sharpen=0.3, plane=4, ncpu = 4)
fft3dfilter(sigma=1.4, sharpen=0.0, plane=4)
fft3dfilter(sigma=1.4, plane=4)

this is the full script:

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)

convertbits(16)

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


# DENOISE #
fft3dfilter(sigma=1.4, sharpen=0.3, plane=4, ncpu = 4)

### ###
### 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)


I want to use this version because it support high bit depth. The neo_FFT3dfilter does not work with MP_Pipeline so I cannot use that. Any ideas?

pinterf
1st November 2020, 18:11
Check your MP_Pipeline and update if it is not the latest high-bit-depth aware version.
See at http://www.avisynth.nl/index.php/MP_Pipeline

anton_foy
1st November 2020, 20:19
Check your MP_Pipeline and update if it is not the latest high-bit-depth aware version.
See at http://www.avisynth.nl/index.php/MP_Pipeline

Thank you, I use the latest already v0.21.7 but I still get this problem.

FranceBB
1st November 2020, 20:47
@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:



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_Sample-Avisynth-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. ;)

pinterf
1st November 2020, 21:08
You must be using the old fft3dfilter from 2007. I'm seeing the same doubling when the old one is used instead of v2.6. Check your DLL versions.

anton_foy
1st November 2020, 22:04
@FranceBB
Hey avs-saviour nice to see you again! :D
Aha, thanks but in the wiki it says:
Supported color formats: Y8, YV12, YV16, YV24, YV411
AviSynth+: All planar formats (8/10/12/14/16/32-bit, Y, YUV(A), and RGB(A) with or without alpha) are supported.
http://avisynth.nl/index.php/FFT3DFilter

I am using that version of FFT3D but it is not supporting High bit depth?
Im confused...

EDIT: In your list you use hqdn3d in 16-bit interleaved, how exactly would this look like?

anton_foy
1st November 2020, 22:10
You must be using the old fft3dfilter from 2007. I'm seeing the same doubling when the old one is used instead of v2.6. Check your DLL versions.

Thanks, I double checked the dll's I am using this version:
2.6.7 and I downloaded it again from https://github.com/pinterf/fft3dfilter/releases/tag/v2.6

But still I get double image.

anton_foy
17th November 2020, 08:19
I found out that even if I load the dlls specifically from my main plugins folder and not from the repository avisynth+ ignores this and use the dlls from the avisynth_repository/plugins folder. Sorry, this I missed totally when switching to avisynth+ but putting the correct dlls into the repository/plugins folder solved it and now I MP pipeline can even find and use the neo_fft3d and all the other neo's aswell.

Thanks!

videoh
17th November 2020, 09:26
I found out that even if I load the dlls specifically from my main plugins folder and not from the repository avisynth+ ignores this and use the dlls from the avisynth_repository/plugins folder. I got bitten by that too a while back. Not sure why that is not considered a bug, or at least a design flaw. Can someone tell us why LoadPlugin() needs to invoke the autoloader?