View Full Version : New very slow FFT denoiser
Pages :
1
2
3
4
5
6
7
8
[
9]
10
11
12
13
14
15
16
17
videoFred
21st October 2005, 15:39
but that only contained fftw3.dll, not ffw3.dll. So where to get it from?
Additional question: Do I have to change the colorspace to YV12 before applying the filter?
mumdigaueln
That's the one, My mistake :eek:
And does it work now?
The newest version works both in YV12 and YUY2 colorspace.
But now I'm gone for the weekend.. byee :p
Fred.
mumdigaueln
21st October 2005, 16:04
That's the one, My mistake :eek:
And does it work now?
Fred.
No, because I didn't change anything till I entered this thread. Any other idea?
mumdigaueln
Fizick
21st October 2005, 19:25
What is your system? CPU, Memory. Windows version?
May be you have dual boot system, and put fft3w.dll to other system32?
Please, be more specific.
mumdigaueln
22nd October 2005, 00:00
@Fizick
Everything OK now. I rebooted the system. Don't know why this should have been necessary!?
Short question before I start testing: If you have a look at the script
AVISource("F:\Video\Movie1\movie1.avi")
loadplugin("E:\Programme\AviSynth\plugins\FFT3DFilter\fft3dfilter.dll")
BlindPP(quant=8, cpu2="xxxxxx", moderate_h=45, moderate_v=55)
Crop(0,0,320,240)
FFT3DFilter(sigma=2.5,sharpen=0)
limitedsharpen(ss_x=2.0,ss_y=2.0,strength=70)
BicubicResize(528,480,0.33,0.33,0,0,320,240)
AddBorders(96,0,96,0)
ConvertToYUY2()
do you think that the filter sequence deblock --> crop --> denoise --> sharpen --> resize --> change of colorspace (for CCE) is OK?
Many thanks
mumdigaueln
danpos
22nd October 2005, 03:37
@mumdigaulen
"LoadPlugin" line must to be before "Avisource" line. I think that order is OK but you're who must to judge if the filters used are sufficient for you. :)
Cya!
mumdigaueln
22nd October 2005, 08:42
@danpos
Thanks for your feedback. Now testing starts. It will take some time until one has a "feeling" for a new filter.
Best regards
mumdigaueln
Fizick
4th November 2005, 17:12
Hmm, I experimentally found that default degrid was really =0 in 1.8 and 1.8.1 acidentally.
So I release new v.1.8.2 with default degrid=1.0
puffpio
5th November 2005, 05:05
Would it be better to use this before or after deinterlacing on an NTSC interlaced source?
Fizick
5th November 2005, 10:55
I think, before. But i never deinterlaced any NTSC interlaced source. :)
Revgen
5th November 2005, 19:24
I recommend deinterlacing after. I usually recieve more interlacing artifacts when denoising before.
puffpio
5th November 2005, 21:36
I recommend deinterlacing after. I usually recieve more interlacing artifacts when denoising before.
???? hahah I must be confused...the first sentence wants to deinterlace after
But the second sentence says you get more artifacts when denoising before (ie deinterlacing after)
:P
DarkNite
5th November 2005, 21:39
limitedsharpen(ss_x=2.0,ss_y=2.0,strength=70)
BicubicResize(528,480,0.33,0.33,0,0,320,240)
Why? For optimal results do the resize in limitedsharpen.
limitedsharpen(dest_x=528,dest_y=480,ss_x=2.0,ss_y=2.0,strength=70)
Putting bicubic soft after a high quality sharpening filter is just wasting clock cycles.
Revgen
5th November 2005, 21:41
???? hahah I must be confused...the first sentence wants to deinterlace after
But the second sentence says you get more artifacts when denoising before (ie deinterlacing after)
:P
Your Right. :confused:
I meant that you should denoise after you deinterlace. Denoising before deinterlacing causes interlacing artifacts.
raquete
8th November 2005, 22:47
i don't have a fast machine and fft3dfilter give good result but is very slow.
with script in D2S(Roba and cce encoder)
LoadPlugin("C:\ARQUIV~1\DVD2SVCD\dgindex\DGDecode.dll")
MPEG2Source("D:\D2S\DGINDE~1.D2V")
Import("C:\Arquivos de programas\DVD2SVCD\Tylo\RoBaConditional.avs")
FFT3DFilter(bt=-1, sharpen=0.7)
BicubicResize(720,480,0.0,0.6)
Import("D:\D2S\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
cce is running now at speed 0.22, without the filter speed 1.0x.
this fftd3filter parameters was used to give little sharpness(from readme).
limitedsharpen run faster than ffd3dfilter?
10x!
Boulder
10th November 2005, 13:52
Can I do Very Bad Things if I use an insanely high sigma value when filtering the U channel? My DV stuff appears to have lots of noise in the U channel which can be eliminated by FFT3DFilter(sigma=25,plane=1), sometimes even with sigma=30.
Interleaving the original clip and filtered one I can't see much difference, only the ugly yellow, purple and blue spots are gone:) I just wanted to know if there's anything I should watch out for.
AVIL
10th November 2005, 14:03
@Boulder:
I think also that FFT3Dfilter can be a good chroma denoiser. Please, read my post :http://forum.doom9.org/showpost.php?p=732380&postcount=26
Bye
puffpio
10th November 2005, 16:59
how good is the sharpen w/ fft3dfilter?
previously I was running fft3dfilter on all planes, then doing a limitedsharpen..
but if I can do it all within fft3dfilter, why not? :) It's a TV source so some noise
raquete
13th November 2005, 01:42
@ puffpio
sharpen with fft3dfilter is cool but very slow.
@ all
catching quality and speed with bugs life in dvd2svcd(d2sroba) for dvd-5.
first script:
FFT3DFilter(bt=-1,sharpen=0.7)
BicubicResize(720,480,0.0,0.6)
colormatrix()
cce run at 0.22 speed,Q 10 for dvd-5 target(need ~7hours to encode)
http://img386.imageshack.us/img386/8749/15wx.th.png (http://img386.imageshack.us/my.php?image=15wx.png)
second script:
asharp(1.25,3.75)
BicubicResize(720,480,0.0,0.6)
colormatrix()
cce run at 0.93 speed,Q 11,same target(need ~01:50 to encode)
http://img386.imageshack.us/img386/632/66zt.th.png (http://img386.imageshack.us/my.php?image=66zt.png)
tiny differences in quality.
Pookie
13th November 2005, 10:23
raquete - sharpening is very nice with FFT3Dfilter, but you're right, there are faster sharpening-only plugins out there. Where FFT3Dfilter is amazing is in the denoising AND retaining the detail of the source. In that case, the slow speed is well worth the visual improvement of your target file.
puffpio
13th November 2005, 12:14
ok..so sharpening with fft3dfilter is slow..
but if I am running it anyways for it's denoising properties, will the sharpening hit not be as bad?
Fizick
13th November 2005, 16:41
puffpio,
Yes, speed will be almost the same. FFT calculation takes the most time.
raquete
15th November 2005, 20:04
tiny differences in quality. http://forum.doom9.org/showthread.php?p=737232#post737232
@ Fizick
comparing this 2 encodes FFT is better,we only need more time to encode.
thank you for FFT :)
kingmob
18th November 2005, 16:09
With using FFT i drop from about 2.40 to 0.69 in cce. Is this an expected drop in speed or am i doing something wrong?
Fizick
18th November 2005, 16:20
What is the name of this topic?
kingmob
19th November 2005, 18:47
Very slow isn't really exact. I was just wondering if maybe i missed an sse2 flag or something like that.
gst
20th November 2005, 16:40
Hi,
this is a call to avisynth gurus!
I'm trying to smooth an animation made from a game. I'm using the fft denoiser and i have great results except one thing :
the ingame text on the screen is blurred in a funny way. White strokes are perfectly handled by the denoiser, but other colors (at least blue) are totally screwed up. Here an example :
(zoom x2):
no fft denoiser
http://x.spirit.free.fr/tmp/following_normal.png
+ fft denoiser
http://x.spirit.free.fr/tmp/following_fft3d.png
The link to the two clips hook.zip 8.51Mo (http://x.spirit.free.fr/tmp/hook.zip)
As you can see the blue text is blurred and white is intact.
And my script :
AVISource("hook.avi")
ConvertToYV12()
FFT3DFilter(sigma=3,plane=1)
FFT3DFilter(sigma=3,plane=2)
FFT3DFilter(sigma=3,plane=0)
I've tried to disable different planes but the problem is still there. Anyway to prevent this or to exclude this zone (following + name) of the fft denoiser process ?
Hope you can help me, bye !
Seed
20th November 2005, 16:58
And my script :
AVISource("hook.avi")
ConvertToYV12()
FFT3DFilter works in YUY2 as well. If your original clip is in YUY2, don't convert to YV12, and see if the problem goes away.
Boulder
20th November 2005, 17:10
Or if the clip is interlaced (which game videos often are), you need to treat it in a specific way.
gst
20th November 2005, 18:11
ok, you are in the right way :thanks:
normal
http://x.spirit.free.fr/tmp/following_normal.png
fft3d + YUY2
http://x.spirit.free.fr/tmp/following_fft3d_YUY2.png
fft3 + YUY2 + interlaced true
http://x.spirit.free.fr/tmp/following_fft3d_YUY2_interl.png
So the problem come from the conversion and not from the denoiser? The result is better but there's no way to avoid this color destruction ?
Boulder
20th November 2005, 18:40
Try
AVISource("hook.avi")
AssumexFF # replace x with T for top field first, B for bottom field first video
TDeint(mode=1) # possibly type=3?
FFT3DFilter(sigma=3,plane=1)
FFT3DFilter(sigma=3,plane=2)
FFT3DFilter(sigma=3,plane=0)
AssumexFF # the same here
SeparateFields()
SelectEvery(4,0,3)
Weave()
gst
20th November 2005, 23:15
Boulder script + tdeint type 3
http://x.spirit.free.fr/tmp/following_boulder_tdint-type=3.png
The result is better (best so far) but there's still distorsion.
I think i should stay with this script because i'm not in the good thread :')
Link to a clean image with no color manipulation if someone want to make a test click (http://x.spirit.free.fr/tmp/cooller_original.png)
Leak
20th November 2005, 23:37
I'm trying to smooth an animation made from a game.
I'm just curious - if the animation was made directly from a game, why would there be a need for denoising? *wonders*
Anyhow, have you tried simply not using FFT3DFilter on the U and V planes, or using a lower sigma for them? That should lessen the impact on colored text.
np: Bring Back The Buffalo - Not Up To You (Bring Back The Buffalo)
gst
20th November 2005, 23:47
In fact the animation is made from an image sequence. There's a built-in command inside the game for taking screenshots.
Video games are higly detailled, fast, and often you'll need a ~3000kpbs for keep a decent amount of detail with a player point of view. So i'm trying new way for lowering the bitrate, motion blur + temporal smoother is a good combo.
I haven't tried a lower sigma, the problem seems to come from the color conversion. I've tried a clip with a YUY2 conversion without FFT denoiser and the "blue blug" appear. Maybe a FFT denoiser with a rgb32 input would solve the problem ?!
Boulder
21st November 2005, 08:00
Are those screenshots directly from VDub or are they from the final format?
gst
21st November 2005, 10:57
The screens above are taking with the "copy source frame to clipboard" of virtualdub then export in photoshop and saved with full quality in png.
All the screens are made from non compressed .avi
Original format of the screenshots are 800x600 tga. example (1.21Mo) (http://x.spirit.free.fr/tmp/frame_00000000.tga)
Boulder
21st November 2005, 13:03
Is the clip hook_normal.avi in the hook.zip archive the original file? If not, please provide an unprocessed sample.
I tried FFT3DFilter(sigma=3,plane=1) on the normal clip and it didn't look that bad.
gst
21st November 2005, 18:44
Yes hook_normal is the original file but with xvid compression. Here is a totally unprocessed sample but with only 24 frames due to the size.
hook_full.zip (http://x.spirit.free.fr/tmp/hook_full.zip)
Boulder
22nd November 2005, 09:32
From what I can see, the destruction of the blue letters comes from the RGB24->YV12 conversion.
Compare this to the original:
AVISource("hook_full.avi",pixel_type="RGB24")
ConverttoYV12()
So FFT3DFilter is not the one to blame :)
Maybe you should try capturing in YUY2 if possible?
raquete
22nd November 2005, 14:26
Features:
1. Works only in YV12 color format.
you're right Boulder.
gst
22nd November 2005, 16:17
I don't know if it's possible to change the color space while i'm capturing. Like i said before, the video is a sequence of tga frames. Maybe there's a trick when i'm creating the full unprocessed .avi but i don't know a thing about color space manipulation =)
Thanks for the replies Boulder and other, your help is greatly appreciated.
Boulder
22nd November 2005, 17:55
Maybe you should start a new thread in the capture forum, or do a search as there should be several possibilities to capture a game video. Bottom line is you can't avoid the conversion as XviD, DivX, MPEG1 and MPEG2 all use YV12.
Leak
22nd November 2005, 22:30
I don't know if it's possible to change the color space while i'm capturing. Like i said before, the video is a sequence of tga frames. Maybe there's a trick when i'm creating the full unprocessed .avi but i don't know a thing about color space manipulation =)
Have you tried to read the TGA files directly into AviSynth with ImageReader? Then you could at least use ConvertToYUY2() or ConvertToYV12() which probably don't screw up the colors too much...
np: Seefeel - Air Eyes (Mira Calix remix) (Warp 10+3 Remixes (Disc 2))
Fizick
22nd November 2005, 22:54
Capture is really off-topic here.
By the way, congratulations to all!
Today is anniversary of fft3dfilter creation :)
tsp
25th November 2005, 15:34
I discovered a small bug when testing fft3dfilter and fft3dgpu.
in this code line 2383 in fft3dfilter.cpp version 1.8.2
else if (bt==0) //Kalman filter
{
// get power spectral density (abs quadrat) for every block and apply filter
if ( n==0 )
{
return dst; // first frame not processed
}
dst should be changed to src because env->NewVideoFrame is used instead of env->MakeWritable
Fizick
25th November 2005, 17:36
Thanks. But it works somehow.
Oh, I use copyframe for YUY2 (fullframe).
So it is bug for YV12 if we do not filter all color planes with 3 fft3d.
I am afraid you will discover more bugs, and probably will laugh on my dilettante code.
tsp
26th November 2005, 02:59
nooo you code is very nice else I wouldn't use it in fft3dgpu :). The only thing that I don't understand is why you treat the first frames separatly because you can request negative frame from child->getframe and get frame 0. No need to treat frame 0 as special. It just waste cycles when processing all the other frames.
and yes the bug only appears when using yv12.
Fizick
26th November 2005, 12:29
I never try to request negative frame numbers.
I do not see any info about it in Avisynth plugin SDK. I do not know, may be in next version it will result in exception?
So, I am over-cautious probably.
Moreover, I do not see any real (complete) SDK :( It's a pity.
tsp
26th November 2005, 15:42
It's only because I made the multithreading modification to avisynth that I discovered this in the cache:
n = min(vi.num_frames-1, max(0,n)); // Inserted to avoid requests beyond framerange.
But it is a pity that it is neccesary to run a debug build of avisynth to figure out how the non-documented stuff works.
Fizick
27th November 2005, 23:09
This bug is fixed in v1.8.3
Egh
29th November 2005, 04:10
This bug is fixed in v1.8.3
Thanks for your job btw :) FFT3DFilter is one of my favorites for some heavy-duty noise removal in complicated cases, especially on fadings, where lots of temporal filters screw up.
A small sidenote: though you updated english page on your site, but you haven't done russian, and the last version on that page is 1.8.2 :)
BTW, a question: i used FFT3DFilter (iirc it was 1.8.0 or so) for some serious sharpening of blurred material. It worked ok, but i noticed on the filtered source some kind of shimmering edges, especially on dynamic scenes (scrolling/panning).
Could this kind of effect caused by FFT3D and if so, what setting can reduce that effect? (i was using bt=-1 with sharpen=0.75 iirc).
Also, sometimes is a bit tough to understand documentation, even in russian :P For instance, sharpen setting could be >1.0. What is the difference from <1.0 and why strengh >1.0 is "not good"?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.