Log in

View Full Version : fft3dfilter settings and alternatives (realtime)


Demi9OD
17th September 2007, 08:09
I've been working on getting the best denoising possible for realtime playback and fft3dfilter seems to do the job better than anything else, as long as I get the sigma right. I'll go as low as .8 sigma for clean DVDs and 2 sigma for noisy ones. This is on a Q6600, and I am also running Seesaw, gradfun2db (which I only need because of fft3dfilter), and Lanczos 2tap resize.

Right now I can run fft3d with either of these two settings, any more is too much strain on the CPU. The 2 pixel border prevents horizontal separation lines from multithreading.

MT("FFT3DFILTER(sigma=1, bw=32,bh=32, bt=2)",6,2)
or
MT("FFT3DFILTER(sigma=1, bw=16,bh=16, bt=3)",6,2)

First, am I better off with 32pix blocks or 3 frame analysis?

Second, are there any other denoisers such as MVDeGrain2 that could do a more accurate job than fft3d with similar CPU usage? I have not had time to figure out if realtime MVTools scripts are a reality or not.
:thanks:

Dark Shikari
17th September 2007, 08:12
If you can, try FFT3DGPU. Heck, you might even be able to split the load by running FFT3DFilter on some of the color planes and FFT3DGPU on the others.

MVDegrain (IMO) is not as good as motion-compensated FFT3DFilter, but MVAnalyze generally can't be run in real time in my experience. You could try if your CPU is fast enough.

Jeremy Duncan
17th September 2007, 09:17
I'm helping Demi9OD over at avsforum and saw this thread so I decided to post.

Source d2v. Ghost in the Shell Anime (http://www.megaupload.com/?d=IJBHNNOS)

Now I'm going to post some pictures.
here's the settings to those pictures.

- Jeremy

SetMemoryMax(1024)
AssumeTFF()
Telecide(chroma=false)
decimate()
FluxSmoothT(3)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)


- Demi9OD Original.

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

FFT3DFILTER(sigma=1, bw=32,bh=32, bt=2)

MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)

aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

- Demi9OD Seven

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

FFT3DFILTER(sigma=1, bw=7,bh=7, bt=2)

MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)

aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

You need to download FFTW3 and put FFTW3.dll into your system32 folder in order to use FFT3DFILTER.dll
You also need to download FFT3DFILTER.dll, and you put this into the avisynth plugins folder.
You get them at this website: http://avisynth.org/warpenterprises/

- Here's the pictures.

Jeremy (http://fileserver1.jpghosting.com/images/JeremySeesaw_f53672a8fa15bc2b6a2fdcbcf3921a6c.PNG)
Demi9OD Seven (http://fileserver1.jpghosting.com/images/Demi9ODSeven_7383a5b83c9ee81f583345be03f7d044.PNG)
Subtract comparison 1 (http://fileserver1.jpghosting.com/images/Difference1_265b62b3a021599151adf15ba5fc1917.PNG)
Subtract comparison 2 (http://fileserver1.jpghosting.com/images/Difference2_23fdcd732528989990d652a603cfd1c8.PNG)

Look at her cheeks.

miamicanes
17th September 2007, 13:48
I tried FF3DGPU yesterday, but came to the conclusion that it's not necessarily the right choice for someone with a fast multicore CPU (I have an AMD A64/X2-4800+ w/GeForce6150 on the mobo). Right now, I'm rendering two jobs with FF3D in two running instances of HCenc, with the CPU pegged at 99%/99%, and the computer is still usable for web browsing. Last night, I had a single job running with FF3DGPU, CPU usage at 44%/0%, and it absolutely brought the system down to its knees. I'm guessing that in my case, the GPU is a relatively scarce resource compared to CPU power, and soaking up 99% of the GPU meant there wasn't much left for it to handle the rest of the Windows UI, even though only one of my cores was halfway active and the other was outright idle. I do suspect, however, that the story might be completely different on my laptop (1.6GHz Pentium M, ATI Radeon Mobility 200 GPU).

Would a PCI-express Geforce w/256mb onboard make a meaningful difference to the performance of FF3DGPU, or is the portion of the GPU that handles FFT a fairly small part that doesn't really vary much between an onboard 6150 and full-blown external card?

Demi9OD
17th September 2007, 13:56
Yeah FFT3DGPU seems really unstable on my X1900XT with complicated ffdshow/avisynth setups. I needed another CPU anyways as I part out the HTPC but fft3dfilter was one of the reasons I went with the quad core. It just eats up mpeg4 artifacts and noise so nicely. Jeremy you can get rid of that banding on the cheek with grad2fundb in avisynth or deband in ffdshow. I prefer using grad2fundb because I can multi thread it. CPU usage is not high.

Dark Shikari
17th September 2007, 15:10
Would a PCI-express Geforce w/256mb onboard make a meaningful difference to the performance of FF3DGPU, or is the portion of the GPU that handles FFT a fairly small part that doesn't really vary much between an onboard 6150 and full-blown external card?And this is your problem.

Every bit of graphics card power helps; in order to outperform your CPU, you need a serious graphics card, not an integrated one. For good performance, an 8800 GTS/GTX or 2900XT is nice :p

Demi9OD
17th September 2007, 15:26
Dark Shikari do you have one of those cards? If so could you try using fft3dgpu in ffdshow and see if this crashes when you open a DVD? Make sure your avisynth tab of ffdshow looks like this.


SetMemoryMax(1024)
AssumeTFF()
Telecide(chroma=false)
decimate()

FFT3DGPU(sigma=1, precision=2, bt=3)

http://i5.photobucket.com/albums/y167/Demi9OD/fft3dgpuffdshow.png

Dark Shikari
17th September 2007, 15:57
It works fine, but goes slow as hell (only a 7700 Go). Also note that FFT3DGPU should probably be used on precision 1; precision 2 I've found gives no visible difference.

Demi9OD
17th September 2007, 16:11
Precision 1 and Precision 2 are identical if you aren't using sharpening (I think)

I just discovered that I was using an older version of fft3dfilter, upgrading from 1.8.5 to 2.1.1 and using ncpu=4 instead of MT'ing 6 threads made a tremendous performance difference. I can now run this config with absolute ease. Edit: theoretically I can run this :P I am at work RDPing my home box so I can't actually see the video stream but CPU use looks good.

FFT3DFILTER(sigma=1,bw=32,bh=32,ow=16,oh=16,bt=3,ncpu=4)

I will look into fft3d sharpening and halo removal tonight, so I can potentially dump seesaw (which is really meant to be run with a,b, clips, and I can't multithread it with a,b, in the script) and also replace aWarpSharp.

edit: ncpu seems to be choking total CPU use around 40%. I think I need to stick with MT.

Dark Shikari
17th September 2007, 18:02
Precision 1 and Precision 2 are identical if you aren't using sharpening (I think)

I just discovered that I was using an older version of fft3dfilter, upgrading from 1.8.5 to 2.1.1 and using ncpu=4 instead of MT'ing 6 threads made a tremendous performance difference. I can now run this config with absolute ease. Edit: theoretically I can run this :P I am at work RDPing my home box so I can't actually see the video stream but CPU use looks good.

FFT3DFILTER(sigma=1,bw=32,bh=32,ow=16,oh=16,bt=3,ncpu=4)

I will look into fft3d sharpening and halo removal tonight, so I can potentially dump seesaw (which is really meant to be run with a,b, clips, and I can't multithread it with a,b, in the script) and also replace aWarpSharp.

edit: ncpu seems to be choking total CPU use around 40%. I think I need to stick with MT.Have you tried using FFT3DFilter separately on each of the three planes (Y,U, and V) in order to more easily multithread it?

Sharpening also shouldn't use much more CPU at all, and I personally really like the effect of the FFT3D sharpen.

Demi9OD
17th September 2007, 18:10
I can't handle multiple planes realtime without sacrificing in other areas.

miamicanes
17th September 2007, 20:20
Every bit of graphics card power helps; in order to outperform your CPU, you need a serious graphics card, not an integrated one. For good performance, an 8800 GTS/GTX or 2900XT is nice

It would partly depend upon how many times the GPU touches each byte of RAM used by a video field or frame between the time it gets copied TO the card's ram, and the time the result gets fetched back by the CPU. Insofar as the copying to and from goes, the integrated GPU would actually have a slight speed advantage, because there'd be no need to copy it from system RAM (where it was decompressed) to GPU ram, then back to cpu ram afterward for storage. HOWEVER, if the GPU is touching that byte 10 million times between the first and last copy actions, it would make a difference (because the GPU can access its own ram without interfering with the CPU, but if they're sharing the ram they need to take turns).

Personally, I suspect an external card would help a little, but not a whole lot. From what I remember reading about the HyperTransport bus, contention between the CPU and GPU for RAM is actually pretty minimal, even for 3D games, as long as you have at least two interleaved sticks of ram. The bigger difference is the number of rendering pipelines -- I think the external cards have more of them. And THAT's what I suspect would make the bigger difference.

Ultimately, though, I think it comes down to brute force winning out over elegant finesse. A dual or quad-core CPU can afford to waste and squander cycles, because it has so freakin' many to burn. Beyond a certain point, the coprocessor can actually become a bottleneck. Just look at the situation with hardware RAID 5. ~3-5 years ago, there was a HUGE controversy over the fact that software raid 5 absolutely KILLED every hardware raid controller in benchmark after benchmark. Why? Most of the RAID controllers had microcontrollers that were roughly comparable to either a 300MHz Pentium II or a 250MHz PPC. They were more efficient, because they took up 0% of the CPU's time instead of soaking up a few percent to do the RAID housekeeping... but in terms of raw, brute-force gigabyte-shoveling speed, nothing beat the performance of software RAID with a 2+GHz CPU doing PIO as fast and hard as it could drive the bare metal.

Ditto, for the original Rage Theater chip. Once ATI finally got its act together and delivered drivers for Win2k/XP that actually USED its DCT acceleration capabilities, it made it possible to do realtime MPEG-2 encoding with a relatively slow CPU. HOWEVER, if you compared that scheme's performance in a modern decked-out multicore PC to what the PC could achieve entirely on its own, it would NOW be a bottleneck in most cases, because the CPU just has more brute force.

Personally, though, I'd love to see versions of HCenc and x264 that install and run as well-behaved screen savers... slowly working their way through queued batch jobs whenever the CPU is idle, quickly dropping into the background and pausing whenever it's not. Occasionally resuming at very, very low priority if it notices that one or more CPU cores have been idle for a while, even if one is busy. ;-)

Dreassica
17th September 2007, 20:27
Why you using fft in MT when it has its own ncpu param for multithreading?

Blue_MiSfit
17th September 2007, 20:42
I can say for sure that fft3dgpu works well through realtime avisynth (provided you have a powerful GPU with good shader performance).

I usually do this (if I'm going to use it for chroma cleanup, which I frequently do for captured stuff)


fft3dgpu(plane=0, sigma=.5, sharpen=.3) #low sigma and sharpen to start. I rarely go over sigma=1 for luma
fft3dgpu(plane=3, sigma=2) #higher sigma for chroma, since it's usually very noisy and less noticable softening


With my older 7800gt it can run real-time on a full frame NTSC DVD. This in conjunction with HQ RGB32 out, gradfun2db, lanczos resize, and a bit of luma noise really improves the look of DVDs versus straight GPU scaling on my 1920x1200 24" LCD. I haven't even messed around with my shiny new screaming fast 650MHz / 2GHz overclocked 8800GTS, but it might be able to handle 1080p in real time!

For reference:

MPEG-2 Decoder -> fft3dgpu (luma) -> fft3dgpu (chroma) -> Lanczos or Spline to 1920 -> gradfun -> luma noise -> RGB32 through VMR9

Of course, it's a PITA to set up, and has to be constantly tweaked. I sometimes just turn it off and deal with a less than ideal image :)

~MiSfit

Demi9OD
17th September 2007, 20:43
I'll be testing it tonight Dreassica, but from what limited testing I can do from work, it looks like ncpu caps out far before the actual CPU does. Just load up your script into vdub with some crazy paramaters. It won't even get close to capping your dual core. Documentation states that ncpu has undergone very limited testing so I'm not really surprised I guess.


FFT3DFILTER(sigma=1,bw=64,bh=64,ow=32,oh=32,bt=5,ncpu=2)

edit: You actually might be able to max out your dual core. Regardless of how many threads I run I cannot break 50% total CPU. I am guessing ncpu gains you no additional speed past 2 threads.

Blue from what I've read the nvidia cards play nicer with ff3dgpu than ATI. I get allot of dll errors and crashes when I try to use it in conjunction with any other avisynth plugins.

Jeremy Duncan
18th September 2007, 03:59
- 14

Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Apply Pulldown checked,
Check Buffer back/Ahead: 1, 15
*copy and paste* the code below into the avisynth text box, and then click apply.

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2)",3)

MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)

aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Resize & aspect tab
Specify size 1680, 952
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked

Queue & Output tab
Queue output samples checked

Output tab
YV12 checked

- Jeremy

Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Apply Pulldown checked,
Check Buffer back/Ahead: 1, 15
*copy and paste* the code below into the avisynth text box, and then click apply.

SetMemoryMax(1024)
AssumeTFF()
Telecide(chroma=false)
decimate()
FluxSmoothT(3)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Resize & aspect tab
Specify size 1680, 952
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked

Queue & Output tab
Queue output samples checked

Output tab
YV12 checked

Picture of 14 Config (http://fileserver2.jpghosting.com/images/14_6c546ee219374a2b7bf7eb3b54fe6292.PNG)
Picture of Jeremy's Seesaw Config (http://fileserver2.jpghosting.com/images/Jeremy_e324167049958f97ed7aae7a37f51f30.PNG)

Link to other pictures: Ghost in the Shell, and Kill Bill (http://rapidshare.com/files/56461540/Pictures.zip.html)

I can play the 14 config at 12fps on my E6600 cpu and ATI X1300 video card. Audio stutters at 12fps though.
My cpu is not overclocked.

Demi9OD
18th September 2007, 06:32
We need to stop cross posting Jeremy :-P

Lets keep the development/experimental stuff here and you can keep the AVS people people up to speed with final results.

Jeremy Duncan
18th September 2007, 19:48
Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Apply Pulldown checked,
Check Buffer back/Ahead: 1, 15
*copy and paste* the code below into the avisynth text box, and then click apply.

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,sharpen=1.0)",3)

MT("aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)",3)

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Resize & aspect tab
Specify size 1680, 952
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked

Queue & Output tab
Queue output samples checked

Output tab
YV12 checked

Using this setting it's sharper than my seesaw config, it gets rid of the artifacts seen in the gits screen shot but it's got this line that goes nearly straight across the screen, 3/4 way to the top of the frame is where it always shows up, it's a horizontal line.
It's random, and only seen every now and then.

I tried to fix it, but I got tired anddecided to hand it over to you.
Here's the settings I ruled out as the cause of the problem:
Tried and failed:
sigma -
bw -
bh -
ow -
oh -
bt -
sharpen -
scutoff -
svr -
smin -
interlaced -
measure -
wintype-
pframe-
assumetff
assumebff

Here's a nice source sample d2v I use.
Link to d2v (http://www.megaupload.com/?d=ZK5J9MEL)

Here's the script in case you want to open it up in vdub:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RepairSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll")

MPEG2Source("C:\Documents and Settings\Dell\Desktop\Kill bill\Kill Bill.d2v")

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,sharpen=1.0)",3)

MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)

aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

In order for the line to be seen in the sample I made, you need to make to avi's.
Then you need to open them up in vdub using this script.
it's show it in b&w and the line will be pronounced:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")

clip1=MPEG2Source("C:\Documents and Settings\Dell\Desktop\gITs\Ghost in the Shell.d2v")
clip2=AVISource("C:\Documents and Settings\Dell\Desktop\Tweak.avi").Subtitle("No luma mask")
clip3=AVISource("C:\Documents and Settings\Dell\Desktop\Jeremy.avi").Subtitle("Luma mask")
clip4=Blankclip(clip1)
# --- special purpose clips below, for comparison ---
clip5 = SUBTRACT(clip1, clip2).LEVELS(107,1,149,0,255)
clip6 = SUBTRACT(clip1, clip3).LEVELS(107,1,149,0,255)
clip7 = SUBTRACT(clip2, clip3).LEVELS(107,1,149,0,255)

desc_clip1 = "Source"
desc_clip2 = "Tweak"
desc_clip3 = "Jeremy"
desc_clip4 = "Difference between clip 2 and 3"
desc_clip5 = "Difference Source - Tweak"
desc_clip6 = "Difference Source - Jeremy"
desc_clip7 = "Difference Source - Difference between clip 2 and 3"

# The two lines below will usually call clips 1-2-3-4, but 1-5-6-7 may be inserted
# to see [amplified] mathematical difference between clips
# To put it another way, these are the four clips we want to display
vertclip1 = STACKVERTICAL(clip1.SUBTITLE(desc_clip1), clip5.SUBTITLE(desc_clip5))
vertclip2 = STACKVERTICAL(clip6.SUBTITLE(desc_clip6), clip7.SUBTITLE(desc_clip7))

STACKHORIZONTAL(vertclip1,vertclip2)

Make this code a avs, open it up in vdub, and you just need to link to the avi's.

Jeremy Duncan
18th September 2007, 20:21
I saw the line i mentioned in my previous reply in the movies Equilibrium, and Kill bill at multiple parts of the movie.
So it's not a defect.
The line isn't there in my Seesaw configs in these parts of the movie.

Demi9OD
18th September 2007, 22:53
The line is from frame split when MT'ing fft3dfilter and aWarpSharp. Add a 2 pixel border to fft3d and a 4 pixel border to awarp. Imagine how much that bothered me with 6 threads.

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,sharpen=1.0)",3,2)
MT("aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)",3,4)

1.0 sharpen is a little much. Try lowering it to .8 or .6. And go easy on the textwalling each post. Anyone in this forum should know the basics :rolleyes:.

Jeremy Duncan
19th September 2007, 00:55
That Pixel tweak worked.
I tested the sharpness using my crossbar pattern and it's fine at sharpen=1.

I took some screen shot comparisons using frames from Ghost in the Shell and Equilibrium.

Here's the settings I used.

- Jeremy's Seesaw Config

Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Apply Pulldown checked,
Check Buffer back/Ahead: 1, 15
*copy and paste* the code below into the avisynth text box, and then click apply.

SetMemoryMax(1024)
AssumeTFF()
Telecide(chroma=false)
decimate()
FluxSmoothT(3)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Resize & aspect tab
Specify size 1680, 952
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked

Queue & Output tab
Queue output samples checked

Output tab
YV12 checked

- FFT3DFILTER Config

Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported

Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Apply Pulldown checked,
Check Buffer back/Ahead: 1, 15
*copy and paste* the code below into the avisynth text box, and then click apply.

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,sharpen=1.0)",3,2)

MT("aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)",3,2)

Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.

Resize & aspect tab
Specify size 1680, 952
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked

Queue & Output tab
Queue output samples checked

Output tab
YV12 checked

Pictures
Rapidshare (http://rapidshare.com/files/56661137/Pictures.zip.html)
Mega Upload (http://www.megaupload.com/?d=V6OEOF48)

Jeremy Duncan
19th September 2007, 15:43
I guess we are done then.

Demi9OD
19th September 2007, 16:08
We will never be done :P. I started using dehalo_alpha in place of aWarpSharp last night, pretty amazing results with darkstr=.3. Don't even try on a dual core though, tying fft3dfilter and dehalo_alpha together in realtime is no joke. Similar results could probably be attained by running SeeSaw correctly, with a denoised clip, but I cannot force SeeSaw to multithread if using a,b clips, so I don't see it as viable.

This is what I ended up with last night (warning, will melt most CPUs, use FFT3DGPU in place of FFT3DFILTER if you have fast GPU such as a 2900xt or 8800gts.)

MT("FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3, sharpen=1)",6,2)
###FFT3DGPU(sigma=1.5, precision=2, sharpen=1)
MT("dehalo_alpha(darkstr=.3)",6)
MT("gradfun2db()",6)

This thread was mainly about real-time denoising though so feel free to let it die out if no additional information exists on that front. I feel fft3dfilter is still the best option, motion compensating it with MVtools is too demanding for real-time until MVtools is built for multithreading. Tweak bw, bh, bt, ow, oh, to suit your CPU speed. Higher vaules result in better denoising but much higher CPU use.

Jeremy in your "14" config you could remove the ow and oh values, bump up sigma a little, and gain probably 20% speed on denoising by letting the overlaps default to 1/3 box size. Please don't two page post all ffdshow settings in every real time thread, it scares people away, and is silly when we're looking at individual elements as opposed to the entire script.

Jeremy Duncan
21st September 2007, 21:47
here's the best config I could make.
Try it out and see what you think.

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

MT("FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,dehalo=1,sharpen=0.9)",3,2)

MT("aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)",3,2)

Demi9OD
21st September 2007, 21:53
Not bad, but with fft3d you need a deband to fix banded noise reduction sections. Quad core gives me ALOT of room to work with. I don't like how aWarpSharp interacts with MT, even with a 2 pixel border, so I got rid of it. Adjust sigma to match noise of source ofc.


MT("FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3, sharpen=1)",6,2)
MT("dehalo_alpha(darkstr=.3)",6)
MT("gradfun2db()",6)

foxyshadis
21st September 2007, 21:58
Just curious, but why do you use multiple MT statements? It's a little faster to keep them all within a single string of code.

Demi9OD
21st September 2007, 22:08
Because I didn't don't know any better. I'm guessing it would look like...

MT("FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3, sharpen=1).dehalo_alpha(darkstr=.3).gradfun2db()",6,2)
Results in a 6.5% speed increase.

But I don't need the 2 pixel border for everything, just fft3d. I expect a correction shortly though, my syntax is still far from gosu.
Edited threads/border order.

foxyshadis
21st September 2007, 22:38
This is also legal and a bit easier on the eyes:
MT("
FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3, sharpen=1)
dehalo_alpha(darkstr=.3)
gradfun2db()
",6,2)
I haven't benchmarked but I'd guess the difference between using overlapped MT for all and one for fft3d and one for the others would probably be a wash, or worse if you have slow memory. (Every new MT has to split and rejoin the plane, which is fast but as you've seen, a measurable slowdown.)

Jeremy Duncan
22nd September 2007, 02:10
This is the latest one:

SetMemoryMax(1024)

AssumeTFF() # If it stutters try AssumeBFF instead of AssumeTFF.
Telecide(chroma=false)
decimate() # Delete this line if your playing a pal dvd, or if changing TFF to BFF doesn't stop the stutter.

MT("
FFT3DFILTER(sigma=1,bw=14,bh=14,ow=7,oh=7,bt=2,dehalo=1,hr=1,sharpen=0.9)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)
",3,2)

Jeremy Duncan
22nd September 2007, 06:02
It's about as tweaked out as I can get it.

SetMemoryMax(1024)

AssumeTFF() # If it stutters try AssumeBFF instead of AssumeTFF.
Telecide(chroma=false)
decimate() # Delete this line if your playing a pal dvd, or if changing TFF to BFF doesn't stop the stutter.

MT("
FFT3DFILTER(sigma=1.2,bw=14,bh=14,ow=7,oh=7,bt=2,dehalo=1,hr=1,sharpen=0.9)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)
",6,2)

Jeremy Duncan
23rd September 2007, 12:59
Tell me what you think of this config, Demi9OD.

SetMemoryMax(1024)

AssumeTFF() # If it stutters try AssumeBFF instead of AssumeTFF.
Telecide(chroma=false)
decimate() # Delete this line if your playing a pal dvd, or if changing TFF to BFF doesn't stop the stutter.

fluxsmootht(3)
MT("
FFT3DFILTER(sigma=0.6, ncpu=4, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)
",6,2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

Demi9OD
23rd September 2007, 17:33
I don't watch anime and just don't need warpsharp with dehalo_alpha. Like I said in an earlier post warpsharp does not multithread well, even with borders, and I prefer to not limit myself because one core is maxing out while the others are at 50%. Eliminating warpsharp allows me to use larger boxes and more frames (bt=3 or 4) in fft, as well as giving me room for gradfun2db.

As far as combo'ing up fft and fluxsmooth, I always thought fluxsmooth looked good on still shots but smeared movement just a tad. Natively fft will only use two threads no matter how high ncpu is set, and it seems a bit redundant anyways since we are already MT'ing it.

Right now I'm just enjoying some HDDVD discs that I have no method or need to post process, so my realtime pp tweaking is on hold for a couple days while I chew through these discs.

Jeremy Duncan
23rd September 2007, 18:28
You can't play the config from my previous post if you don't add any other filters ? Just exactly the one I showed ?
What cpu and what speed is it ?

awarpsharp removes resize artifacts that your last config doesn't.
In post #25.

It's recommended that a temporal denoiser be used before a spatial denoiser. Either that or use a spatial temporal denoiser.
7.2.7 Denoising (http://www.doom9.org/index.html?/capture/postprocessing_avisynth.html)

Demi9OD
23rd September 2007, 20:44
No, of course I can play it. My quad core is running at 3100mhz right now and I haven't even touched the voltage or dropped my Ultra-120 on it yet. I use more rigorous fft settings, dehalo_alpha, and gradfun2db instead. I really don't like what dehalo does in fft, and dehalo_alpha, while amazing, is far from easy to run. What exactly are you fixing with WarpSharp? Since it takes place before the resize, I don't see how it can be fixing resizing artifacts, unless you are talking about the source being resized from film resolution or something. FFT is a spatial-temporal filter.

I'd toss a non multithreaded warpsharp at the end of my filter chain if I felt like it made an appreciable enough difference to lower my fft settings and keep the primary core under 80%.

Jeremy Duncan
23rd September 2007, 21:46
What exactly are you fixing with WarpSharp? Since it takes place before the resize, I don't see how it can be fixing resizing artifacts, unless you are talking about the source being resized from film resolution or something.

Open the original with MPC Open File option, in the File tab.

No Awarpsharp

Link (http://fileserver2.jpghosting.com/images/Noawarpsharp_f0503bf3c5531b036c9c5364f9257066.PNG)

With Awarpsharp

Link (http://fileserver2.jpghosting.com/images/Withawarpsharp_80b04579cf03aa52f996bf82c960a631.PNG)

Original

http://aycu33.webshots.com/image/28992/2005286614481342303_th.jpg (http://allyoucanupload.webshots.com/v/2005286614481342303)

FFDshow settings

http://aycu25.webshots.com/image/26824/2005278675066019087_th.jpg (http://allyoucanupload.webshots.com/v/2005278675066019087)

Check out the line on the hood.

Demi9OD
23rd September 2007, 22:36
I suppose, with a luma sharpen of 2.0, you can see slight artifacts. I'm not sure it's worth it, but I can run this config with about 15% free on primary ffdshow core.
AssumeTFF()
Telecide(chroma=false)
decimate()
MT("
FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3,sharpen=1)
dehalo_alpha(darkstr=.3)
gradfun2db()
",6,2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

1360*768 Lanczos 2tapp
10 Luma Noise Added

Jeremy Duncan
23rd September 2007, 23:15
Without ncpu=2 and if I only use MT(")",3), I get below 14 fps, with ncpu=2 I get 14 fps.
So using ncpu and MT is a speed boost compared to using just MT.

Jeremy Duncan
23rd September 2007, 23:42
The temporal denoiser in this config isn't so good:

FFT3DFILTER(sigma=0.6, ncpu=4, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)

So I use Fluxsmootht.

This is using the hqv test dvd to test the temporal denoising.

Jeremy Duncan
24th September 2007, 00:51
________ Jeremys SeeSaw ________

SetMemoryMax(1024)
AssumeTFF() # If it stutters try AssumeBFF instead of AssumeTFF.
Telecide(chroma=false)
decimate() # Delete this line if your playing a pal dvd, or if changing TFF to BFF doesn't stop the stutter.
FluxSmoothT(3)
MT("
SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)
",3)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

________ Jeremys fft3dfilter ________

SetMemoryMax(1024)

AssumeTFF() # If it stutters try AssumeBFF instead of AssumeTFF.
Telecide(chroma=false)
decimate() # Delete this line if your playing a pal dvd, or if changing TFF to BFF doesn't stop the stutter.

Fluxsmootht(3)
MT("
FFT3DFILTER(sigma=0.6, ncpu=2, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)
",3,2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

________ Demi9ODs ________

AssumeTFF()
Telecide(chroma=false)
decimate()
MT("
FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3,sharpen=1)
dehalo_alpha(darkstr=.3)
gradfun2db()
",3,2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

Comparison Pictures showing a frame from these movies:
Ghost in the Shell
Equilibrium
Tears of the Sun

Link (http://rapidshare.com/files/57808595/Pictures.zip.html)

Demi9OD
24th September 2007, 02:04
Of course mine is going to look a bit softer with 1.5 sigma compared to your .6, but I feel it gives a more visually appealing MOVING picture, because we don't watch still frames all the time :-). Look at Bruce Willis' neck in your fft3d settings. There is such a thing as too sharp.