View Full Version : Removing Grain with fft3dfilter/fft3dgpu - please help!
bokonon
4th January 2008, 18:27
Source
Video:1080p h264 .ts broadcast
Audio: AC3
Demuxed using TSConverter (http://www.dvbportal.de/projects/tsconverter/)
It is being frameserved to AVI Synth using dgavcdec100a13 (http://forum.doom9.org/showthread.php?t=122598)
Setup
2GB dual channel
E6600 Core 2 Duo
Windows XP MCE
HIS IceQ3 Turbo X1950XT
AVS Script
loadplugin("DGAVCDecode.dll")
loadplugin("fft3dfilter.dll")
AVCsource("1.dga")
crop( 2, 0, 0, -12)
fft3dfilter(sigma=2.5,bw=32,bh=32,bt=5,ow=16,oh=16)
spline36resize(1280,720)
This script worked beautifully for removing the grain as you can see in the screenshots I have provided. However, its simply too slow (< 1.00 FPS) when encoding in MeGUI using the following settings:
x264 settings
--pass 2 --bitrate 5874 --stats ".stats" --ref 5 --mixed-refs --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter -2,-1 --subme 6 --trellis 1
--analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --cqmfile "C:\Documents and Settings\J\Desktop\eqm_avc_hr.cfg" --progress
--no-psnr --no-ssim --output "output" "input"
FPS during 1st pass
http://i17.tinypic.com/6qckjlz.png
I have tried using FFT3dGPU(sigma=2.5,bw=32,bh=32,bt=4) as I have heard it is much faster, yet the results are strange (see screenshots). If you focus in the center of the image a vertical line appears when using FFT3dGPU. I have tried different settings, including a simple FFT3dGPU(bt=1, sigma=2) and i still get this strange "stretching" of pixels down the center. I have no idea why! I hope someone can help me...
No Filters (just crop and resize)
http://xs323.xs.to/xs323/08015/Frame_1[withoutfilters].jpg.xs.jpg (http://xs323.xs.to/xs323/08015/Frame_1%5Bwithoutfilters%5D.jpg) http://xs323.xs.to/xs323/08014/Frame_3[withoutfilters].jpg.xs.jpg (http://xs323.xs.to/xs323/08014/Frame_3%5Bwithoutfilters%5D.jpg)
FFT3Dfilter.dll (sigma=2.5,bw=32,bh=32,bt=5,ow=16,oh=16)
http://xs323.xs.to/xs323/08015/Frame_1[withfilters3].jpg.xs.jpg (http://xs323.xs.to/xs323/08015/Frame_1%5Bwithfilters3%5D.jpg) http://xs323.xs.to/xs323/08015/Frame_3[withfilters3].jpg.xs.jpg (http://xs323.xs.to/xs323/08015/Frame_3%5Bwithfilters3%5D.jpg)
FFT3dGPU.dll (sigma=2.5,bw=32,bh=32,bt=4,ow=16,oh=16)
http://xs323.xs.to/xs323/08015/Frame_1_with_fft3D_GPU.jpg.xs.jpg (http://xs323.xs.to/xs323/08015/Frame_1_with_fft3D_GPU.jpg) http://xs323.xs.to/xs323/08015/Frame_3_with_fft3D_GPU.jpg.xs.jpg (http://xs323.xs.to/xs323/08015/Frame_3_with_fft3D_GPU.jpg)
Dark Shikari
4th January 2008, 18:40
What is the exact width of your original video?
Blue_MiSfit
4th January 2008, 18:45
Are you using a multithreaded version of avisynth? IIRC, fft3dgpu doesn't work correctly with MT yet.
Just a thought..
~MiSfit
bokonon
4th January 2008, 18:51
What is the exact width of your original video?
original file was:
1920 x 1088
then cropped and resized to
1280 x 720
EDIT: see below for a screen cap of source
Are you using a multithreaded version of avisynth? IIRC, fft3dgpu doesn't work correctly with MT yet.
Just a thought..
~MiSfit
I'm not sure...how can i check this?
EDIT: used Version() and i'm using 2.58 from 19 Sep 2007. Is this version ok?
http://xs122.xs.to/xs122/07526/ab-ftb101-h264.01_Medium.png (http://xs122.xs.to/xs122/07526/ab-ftb101-h264.01.png)
Didée
4th January 2008, 19:13
The script in your 1st post goes
- Source
- crop
- fft3d
- resize
Try swapping the lines with crop and fft3d, like
- Source
- fft3dGPU
- crop
- resize
Perhaps it helps ... I don't have the hardware to use FFT3DGPU, so I can't check.
foxyshadis
4th January 2008, 19:34
2.58 is not for multithreading yet. You need a version that can use SetMTMode, because frankly, AVCSource is probably your main bottleneck, not fft3dfilter. Test by removing all filters and check the cpu usage.
bokonon
4th January 2008, 21:01
The script in your 1st post goes
- Source
- crop
- fft3d
- resize
Try swapping the lines with crop and fft3d, like
- Source
- fft3dGPU
- crop
- resize
Perhaps it helps ... I don't have the hardware to use FFT3DGPU, so I can't check.
this was a great idea! that annoying line in the middle is now gone, simply by moving the crop down.
I have a quesion about fft3dGPU, how can i control my GPU processing? it seems to slow my PC down a lot, giving me some serious lag, so I am unable to use my PC when running this filter :(
I am using a HIS Radeon IceQ3 Turbo X1950XT and ATI Catalyst's latest drivers/software...
Dark Shikari
4th January 2008, 21:06
this was a great idea! that annoying line in the middle is now gone, simply by moving the crop down.
I have a quesion about fft3dGPU, how can i control my GPU processing? it seems to slow my PC down a lot, giving me some serious lag, so I am unable to use my PC when running this filter :(
I am using a HIS Radeon IceQ3 Turbo X1950XT and ATI Catalyst's latest drivers/software...Unfortunately there isn't an easy way to do so... the easiest way I've found is to just make sure that the fft3dgpu() is not the bottleneck in the processing--as long as there is something else that is, even marginally, slower, the GPU will not be used to its full potential and the system won't lag.
For example, raise your x264 settings until x264 becomes the bottleneck.
bokonon
4th January 2008, 21:20
I am already using HQ Slower in x264, so perhaps raising it to HQ Slowest or Insane will make it the bottleneck?
SOmehow I can't see it getting any slower than this!!?? THe screenshot below is with FFT3dGPU and its actually SLOWER than FFT3dfilter!! (~1.00 FPS). I have not changed any other settings! (only the bt=4 instead of bt=5 as fft3dgpu does not support 5, and i moved the order of the script around, as suggested) All x264 settings have remained the same!
http://i13.tinypic.com/7xbot1c.png
bokonon
4th January 2008, 21:29
2.58 is not for multithreading yet. You need a version that can use SetMTMode, because frankly, AVCSource is probably your main bottleneck, not fft3dfilter. Test by removing all filters and check the cpu usage.
Is there an alternative method for mpeg-4/h.264/avc video sources? This was the one I was taught to do...
EDIT: AVCSource is not the bottleneck. I removed the fft3dfilter and got ~10 FPS using the same encoding methods....
Dark Shikari
4th January 2008, 21:42
If FFT3DGPU is slower, it means your graphics card is too slow.
bokonon
4th January 2008, 21:52
If FFT3DGPU is slower, it means your graphics card is too slow.
http://www.hisdigital.com/newimages/products/X1950XTIceQ3T-card_500.jpg
X1950 XT (http://www.hisdigital.com/html/product_sp.php?id=268)
Really? What kind of graphics card would i need?
Could it be my drivers perhaps?
tsp
5th January 2008, 15:41
bokonon:
fft3dgpu is developed with a geforce 7800 GT so it is not allways perfoming to well with ati cards. The x1950 XT has raw power enough so I think it could be the drivers or maybe there are not enough ram on the graphics card (as 1920 x 1088 uses a lot of ram). If it is the last thing speed should improve by using bt=2 or bt=3.
rcubed
5th January 2008, 23:03
Bokonon
I'm running a HIS X1950 Pro (running at 400Mhz with 512M of memory) PCI express card in a system with an AMD 5600+ X2 2G of RAM. I encode in mpeg2 format (std dvd 720x480), and the card typically runs very fast. I usually encode using HCEnc022. I haven't tried mpeg4 with high resolution so I don't know the impact in that case. Don't know if that helps or not. You could try running a std mpeg encode on something (ripped dvd) and see how that goes. I use DVD Rebuilder quite a lot and get fps in the 20s running both CPUs. I'm running the 7-11_xp32_dd_ccc_wdm_enu_54453 AIT drivers from their site.
rcubed
bokonon
8th January 2008, 18:32
thanks tsp and rcubed, i've update my drivers and ensured i'm still getting poor speeds, perhaps because the RAM on my graphics card is only 256mb. Is there perhaps a way of using my other RAM (2GB) with fft3dGPU?
My other concern is AVCSource(1.dga) - which apparantly can be quite slow. Is ther another way of sourcing my h264 ts into my script?
foxyshadis
8th January 2008, 23:44
DirectShowSource with coreavc or mainconcept (both commercial filters) will be much faster than avcsource or ffmpegsource. But then you get all the downsides of directshowsource; someone needs to write a coreavcsource interface!
If you use mainboard ram on a gpu, you basically destroy any speed advantage, because PCI-E is so much slower than GDDR3. In fact that might be exactly what's happening now, fft3dfilter might be spilling into main ram so that it works at all, explaining the slowness.
Blue_MiSfit
9th January 2008, 00:58
Yeah. DirectShowSource with CoreAVC works pretty durn well, especially if you massage it with a custom GraphEdit grf file and specify the number of frames etc...
Sucks about fft3d being so slow on 1080p... Is it really worth it tho? I mean, some of that noise will get killed by x264 anyway, and you can just add some noise on playback to hide it...
I've got a big project coming up... I'm going to try re-encoding Planet Earth from HD-DVD 1080i to 1080p60 using MCBob!
I might have to spend a week for each disc, but we'll see!!!
~MiSfit
bokonon
9th January 2008, 01:08
DirectShowSource with coreavc or mainconcept (both commercial filters) will be much faster than avcsource or ffmpegsource. But then you get all the downsides of directshowsource; someone needs to write a coreavcsource interface!
Thanks for your reply foxyshadis! You mentioned the downsides of directshowsource, could u elaborate on these please? Sorry to be such a noob...
I'm just a little confused about whether or not DirectShowSource will be able to frameserve the dga file I created with dgavcdec. I'm pretty sure I tried this before and it didn't recognise the dga file, I have ffdshow and Nvidia Pure Video installed for h264 playback I think. Many people say CoreAVC isn't an accurate decoder so I don't have it...I don't think I've heard anything about mainconcept, would you recomend it?
Dark Shikari
9th January 2008, 01:11
Thanks for your reply foxyshadis! You mentioned the downsides of directshowsource, could u elaborate on these please? Sorry to be such a noob...
I'm just a little confused about whether or not DirectShowSource will be able to frameserve the dga file I created with dgavcdec. I'm pretty sure I tried this before and it didn't recognise the dga file, I have ffdshow and Nvidia Pure Video installed for h264 playback I think. Many people say CoreAVC isn't an accurate decoder so I don't have it...I don't think I've heard anything about mainconcept, would you recomend it?CoreAVC has been accurate for quite a while...
bokonon
9th January 2008, 01:14
I've got a big project coming up... I'm going to try re-encoding Planet Earth from HD-DVD 1080i to 1080p60 using MCBob!
I might have to spend a week for each disc, but we'll see!!!
~MiSfit
Would love to see some Source vs. Filters comparison shots, haven't really seen what MCBob can do before...
Didée
9th January 2008, 12:53
I've got a big project coming up... I'm going to try re-encoding Planet Earth from HD-DVD 1080i to 1080p60 using MCBob!
Flapdoodle! - Planet Earth is progressive content. :)
CruNcher
9th January 2008, 14:59
Here you can find some of my tests in those regards and a script useing Mvtool and MVDegrain :)
http://cruncher.mufflastig.com/hdtv/chromacomp/
it goes from slight compression (Visual Lossless) upto Heavy Motion Based Compression results i called the extremest Bitsucker, but i try to not go further then a balanced compression average so don't expect detail destructive compression here (if you coun't grain as detail ofcourse you can) ;)
But im still not finished the final goal for this (and usage Scenario) is HD-DVD and Blu-Ray conversion => DVD5
Didée
9th January 2008, 16:26
levels = 2
search = 0
searchparam = 0
thSAD = 950
Good joke!
You don't seriously want to use that for denoising, no?
CruNcher
9th January 2008, 17:28
Degraining yes Denoiseing no im still testing Degraining as you can see the result is still not perfect but speedwise it's the most balanced for now i could find.
Blue_MiSfit
9th January 2008, 17:46
Flapdoodle! - Planet Earth is progressive content. :)
I was under the impression it was 1080i!
My mistake... looks like I won't be in for such a masochistic encoding session after all..
:thanks:
/OT
Seriously, look into alternatives to FFT3D. It's powerful, but I find it reveals banding too easily. Easier to just do without, or possibly use something else...
~MiSfit
Didée
9th January 2008, 18:28
I was under the impression it was 1080i!
It very well might be 1080i, but that says nothing. If you have a NTSC movie, 29.97fps /w hard telecine -- that's 480i. Would you bob it because of the "i"? No. Would you IVTC it? Yes.
Degraining yes Denoiseing no Ah, the old elitaire argument.
Signal processing doesn't know about grain-or-noise. Avisynth filters don't know about grain-or-noise.
From the POV of signal processing, GRAIN IS NOISE. Period.
but speedwise it's the most balanced for now i could find. Well, speed ... don't you know the golden rule
"you shall not make any processing of HD content"
... unless you have a renderfarm
However. search=0 / searchparam=0 has little to do with motion search. With those parameters it's more of a motion lottery ... beyond of what motion predictors are predicting, there is no "search", just one single guess.
In addition, with such high thSAD there's a big risk (almost a guarantee) to produce artefacts and/or lose detail in low-contrast areas.
CruNcher
9th January 2008, 18:32
i tried to avoid artifacts(those nice blocks or fadeing away into the next frame) checked alot in those regards but true is that's only for this source it means nothing for other ;)
Blue_MiSfit
9th January 2008, 18:52
It very well might be 1080i, but that says nothing. If you have a NTSC movie, 29.97fps /w hard telecine -- that's 480i. Would you bob it because of the "i"? No. Would you IVTC it? Yes.
Well of course! I thought it was true interlaced 1080i. I guess I read some misinformation out there. According to Wikipedia, it's 1080p, as you say.
Looking forward to watching it as soon as I get it!
/OT for real this time...
~MiSfit
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.