View Full Version : fft3dGPU 0.8.2


tsp
13th February 2005, 21:51
Test this new GPU version of fft3dfilter.
Get the newest
version 0.8.2 (http://www.avisynth.org/tsp/fft3dgpu0.8.2a.exe). manual installation (dll and hlsl only) (http://www.avisynth.org/tsp/fft3dgpu0.8.2.7z)
version 0.8.1 (http://www.avisynth.org/tsp/fft3dgpu0.8.1.exe). manual installation (dll and hlsl only) (http://www.avisynth.org/tsp/fft3dgpu0.8.1.7z)
version 0.8 (http://www.avisynth.org/tsp/fft3dgpu0.8.exe). manual installation (dll and hlsl only) (http://www.avisynth.org/tsp/fft3dgpu0.8.7z)
version 0.7 (http://www.avisynth.org/tsp/fft3dgpu0.7.exe). manual installation (dll and hlsl only) (http://www.avisynth.org/tsp/FFT3dGPU0.7.7z)
version 0.6.4 (http://www.avisynth.org/tsp/fft3dgpu0.6.4.exe). manual installation (dll and hlsl only) (http://www.avisynth.org/tsp/FFT3dGPU0.6.4.7z)
version 0.6.3 (http://www.avisynth.org/tsp/fft3dgpu0.6.3.exe).
version 0.6.2 (http://www.avisynth.org/tsp/fft3dgpu0.6.2.exe).
version 0.6.1 (http://www.avisynth.org/tsp/fft3dgpu0.6.1.exe).
version 0.6 (http://www.avisynth.org/tsp/fft3dgpu0.6.exe).
version 0.51 (http://www.avisynth.org/tsp/fft3dgpu0.51.exe). (Manual installation available here (http://www.avisynth.org/tsp/fft3dgpu_051.zip))
version 0.5a (http://www.avisynth.org/tsp/fft3dgpu_05a.zip).
version 0.47 (http://www.avisynth.org/tsp/fft3dgpu_47.zip).
version 0.46.1 (http://www.avisynth.org/tsp/fft3dgpu_0461.zip).

From the readme:

Introduction

FFT3dGPU is a GPU version of Fizick's FFT3DFilter. The algorithm (Fast Fourier Transform, denoising) is the same for the most part. Currently the following is not implemented: support for noise pattern.

In this version the next frame is processed while waiting for the GPU to end it's work. Meaning the filters before fft3dGPU are working concurrently with it.
Install:

To use this filter you need directx 9.0c or better and a graphics card supporting directx 9 in hardware. That is at least an ATI Radeon 95xx or Nvidia Geforce fx 5xxx. Geforce 6xxx or better is recommended. If you have downloaded the installer just run it and you're done, else copy fft3dgpu.hlsl and copy FFT3dGPU.dll into the same directory from the 7-zip archive, also install the latest version of directx (april 2006 or later). You can get it here or extract the file d3dx9_30.dll (not included in the archive) to the c:\windows\system32 directory. The installer will copy d3dx9_30.dll to the right location meaning that it shouldn't be neccesary to run the directx installer if you have Directx 9c installed.
Syntax

FFT3DGPU(clip, float "sigma", float "beta", int "bw", int "bh", int "bt", float "sharpen", int "plane", int "mode", int "bordersize", int "precision", bool "NVPerf", float "degrid", float "scutoff", float "svr", float "smin", float "smax", float "kratio", int "ow", int "oh", int "wintype" , int "interlaced", float "sigma2", float "sigma3", float "sigma4", bool "oldfft" )
Function parameters:

clip: the clip to filter. The clip must be YV12 or YUY2.

sigma and beta has the same meaning as in fft3dfilter. Default=2.

sigma2, sigma3, sigma4 If specified controls the sigma value for highest(sigma) to lowest frequency(sigma4). Default=sigma

bw,bh: blockwide and block height. It should be a power of 2 ie valid values is 4,8,16,32,64,128,256,512 (note that bw should be greater than 4 for best result). Default=32

bt: mode. bt=-1 sharpen only, bt=0 kalman filtering, bt=1 is 2d filtering, bt=2 uses the current and previous frame, bt=3 uses the previous current and next frame, bt=4 uses the two previous frames, the current and next frame. default 3

sharpen: positive values sharpens the image, negative values blurs the image. 0 disables sharpening. Default 0.

plane: 0 filters luma, 1,2 and 3 filters Chroma (both U and V). 4 filters both luma and chroma. Default 0.

mode: 0 only overlaps 1:1. This is faster but produces artifacts with high sigma values.
mode=1 block overlaps 2:1. This is slower but produces fewer artifacts.
mode=2 again 1:1 overlap but with a additional border. This reduces border artifacts seen with mode=0. The speed is between mode 0 and 1.
Kalman(bt=0) works well with mode=0. Default 1

bordersize: only used with mode 2. Defines the size of the border. Default is 1.

precision: 0: to use 16 bit floats(half precision),
1: to use 32 bit float(single precision) for the fft and 16 bit float for the wienner/kalman and sharpening.
2: allways use 32 bit floats.
Using 16 bit float increases the performance but reduces precision. With a Geforce 7800GT precision=0 is ~1.5 times faster than than mode 2. Default=0.

NVPerf: Enables support for NVPerfHUD (http://developer.nvidia.com/object/nvperfhud_home.html). Default false.

degrid: Enables degriding. Only works well with mode=1. Doesn't degrid the Kalman filter (but it does degrid the sharpening (if enabled) after kalman filter). default 1.0 for mode=1, 0.0 for mode=0 or 2

scutoff, svr, smin, smax:Same meaning as fft3dfilter. Controls the sharpening. default scutoff=0.3, svr=1.0, smin=4.0, smax=20.0

kratio: same as fft3dfilter. Control the threshold for reseting the Kalman filter. Default 2.0

ow,oh: this only works with mode=1. This specifies how big the overlap between the blocks are. Overlap size must be less than or equal to half the blocksize. Ow must be even. Default: ow=bw/2 ,oh=bh/2

wintype: Change the analysis and syntesis window function. Same as fft3dfilter

interlaced: Set to true for separate filtering for each field. Default=false.

oldfft: Set to true to use the old fftcode (used in version 0.6.2 and lower) false to use new fft code. If not defined fft3dgpu will use the fastest code.
FAQ:
Q: What does it mean when I get a popup box Unexpected error encountered with Error Code: D3DERR_OUTOFVIDEOMEMORY.

A: It means that fft3dgpu needs more memory than there are availebol on the graphics card. So either you will have to upgrade or try lowering the resolution, precision, bt,bh,bw,ow,oh or use usefloat16=true or mode 0 or 2
Q: I can't get this filter to work

A: Try upgrading to the latest drivers(ati radeon or nvidia geforce). Check if your card is supported (see below). If that doesn't solve the problem write me an bug report (see support) where you include the script used, program used and what GPU, driver version, windows version and directx version version you use.
Q: What setting gives the same result as fft3dfilter?

A:fft3dGPU(mode=1,precision=2) is similair to fft3dfilter() but please note the different default values for bw,ow,bh,ow
Q: Is there any differences between fft3dfilter and fft3dgpu?

A: Some of the features from fft3dfilter is still missing.
Q: Why is fft3dGPU so slow compaired to fft3dfilter?

A: either you have a slow graphics card like a Geforce FX 5200 or you are not using it while doing cpu heavy encoding (like XviD/DivX)
Q: How do I use NVPerfHUD?

A: set NVperf=true and used this commandline or make a shortcut to run it: "PATH TO NVPerfHUD\NVPerfHUD.exe" "PATH TO VIRTUALDUB\virtualdub.exe" "PATH TO AVS\test.avs" and enabled "force NON PURE device"
Q: I get this errormessage: "Only pixelshader 2.0 or greater supported"

A: It is because you need a graphics card that has hardware support for Directx 9.
The following cards will not work:

Nvidia:
TNT
TNT2
Geforce 256
GeForce2 Ultra, Ti, Pro,MX,Go and GTS
Geforce3 Ti 200, Ti 500
GeForce4 Ti, MX, Go

Ati:
Radeon 7xxx
Radeon 8xxx
Radeon 90xx
Radeon 92xx

Matrox:
G2xx
G4xx
G5xx
maybe Parhelia

The following should work:

Nvidia:
Geforce FX 5xxx
Geforce 6xxx
Geforce 7xxx

Ati:
Radeon 9500
Radeon 9550
Radeon 9600
Radeon 9700
Radeon 9800
Radeon Xxxx
Radeon X1xxx

where x means any digit.

Support:

This thread on the doom9 forum or my email address (tsp (at) person.dk).
TODO:

(maybe) noise pattern support. Fix all the stupid bugs. Add the directx 9.0b version back.
Changelog:

* 0.1 first release. Buggy and used Brook
* 0.2 sigma should now work like fft3dfilter
* 0.3 Rewrote the code to use Directx 9.0 directly and support for 16 bit float increasing performance and stability.
* 0.31 Fixed bug causing aliased edges.
* 0.4 Added sharpen, mode 1,2, reduceCPU and multithreading
* 0.41 Fixed bug when calculating PSD.
* 0.42 Fixed memory leak when reloading
* 0.43 Fixed bug that caused coruptions on the Geforce FX cards and some more memory leaks. Added more comments to the sourcecode and small performance improvement in the shaders. Also added support for directx 9.0b
* 0.44 fft3dgpu can now reset a lost device and continue work. The direcx 9.0b version should work now.
* 0.45 fixed bug when filtering the chromaplane and mode=0 or 2 crashed the filter.
* 0.46 fixed lockups on hyperthread enabled machines(hopefull). Also fixed infinite loop when closing WMP 6.4.
* 0.46.1 fixed issue with nvperf=true causing fft3dgpu to lock up. Added a FAQ section to this file.
* 0.47 fixed bug with corrupted frames after reseting a lost device. Renamed the readme.txt to fft3dgpu.txt. Uses a newer version of DirectX 9.0c so please _read the install instructions_!!!
* 0.5 Added Kalman, sharpening, bt=4, degrid from fft3dfilter. Renamed ps.hlsl to fft3dgpu.hlsl. Rewrote some of the code. Added new bugs.
* 0.5a fixed bug with bt=2. Only file changed is fft3dgpu.hlsl
* 0.51 Fixed bugwithparametersafterNVPerfwasshifted.iedegrid=scutoff,scutoff=svr. Improved download speed from GPU. Geforce fx 5xxx now works with Kalman filter.
* 0.6 Added wintypes, plane=4 and variable overlap size (ow,oh). Change useFloat16 to precision. Changed default value for mode to 1
* 0.6.1 variable overlap now works on the geforce fx 5xxx. Default value for mode is 1 now.
* 0.6.2 bugfix: Degrid works better and vertical banding is gone when using mode 1. Right edge artifacts gone when using non mod 8 width and plane>0.
* 0.6.3 New fft code. Should improve performance when using larger blocksize and precision= 2(by up to 70%). Fixed bug with HC 0.17 crashing. New html doc(thanks Fizicks for creating this).
* 0.6.4 new fft code should now work with ati cards.
* 0.7 Added sigma2,sigma3 and sigma4 and support for interlaced filtering. Uses the fastest fft code now.
* 0.8 Added support for YUY2 colorspace. If not enough GPU memory is available the least used texture will be swapped to system memory.
* 0.8.1 Fixed crash when recovering lost device with plane=4 (thanks Fizick). Changed default for bt to 3 as ff3dfilter
* 0.8.2 Fixed crash when recovering lost device with interlaced=true (thanks Fizick) and recovering lost device with bt=0 and sigma2,3,4 =sigma.



Sourcecode released under GPL see copying.txt

708145
13th February 2005, 22:26
Very nice indeed :D

Could somebody with a recent GPU please provide info about results, problems, speedup, ...?

It'll definitely help to convince me to get out and buy a new GPU ASAP ;)

bis besser,
Tobias

Soulhunter
13th February 2005, 22:41
Hrm, bt mode 3 gives me this... (http://img107.exs.cx/img107/1258/118ve.png) :\

But mode 1/2 works nice (720x576 @ ~10fps) !!!

My box: Athlon XP2800+ / 1024MB RAM / GeForce 6600GT


Bye

Fizick
13th February 2005, 23:25
Tsp,
talanted works!
But not for my GF2MX400 :(
So, I will stay with fft3dfilter :)
BTW, what is "hole frame" ? Whole?

Once more question:
Have you plan to implement in GPU all my other plugins?
:D

tsp
14th February 2005, 08:52
BTW, what is "hole frame" ? Whole?


umm yes typo. It should be whole frame. So the border are also filtered.


Have you plan to implement in GPU all my other plugins?

Only the FPU heavy filter ;)

Also how does the Kalmar filter works if I should implement it?

Soulhunter: I get a similar result with bt=3. If you use usecache=false the chroma shift disappear (and also the speed)
I'm trying to find out where the error is.

708145: On my computer an athlon xp 2400 MHz with an ASUS Geforce 6800 GT (V9999GT) I get about 10-11 fps @ 720x576
I'm a little curious how the radeons would perform.

bill_baroud
14th February 2005, 09:15
gah, i forgot my usb dongle, i don't have my screenshots...

well i tested, and got some weird results, quickly :

- it does not any filter (??) but insert some weird black square on the image, of size bh/bw.

- it add some black borders horizontally too.

- speed is about 5-6fps on my FX5900 (looks like it likes those fps :)

tsp
14th February 2005, 11:50
I fixed the chroma bug with bt=3. Also added a new option reducecpu. If enabled the cpuload is reduced (but so is the framerate but hopefull it will be fixed someday).
Same link as before.

bill_baroud: What driver are you using? What size is the image? How does the script look like? This filter only process YV12.

bill_baroud
14th February 2005, 13:25
uh yeah, i forgot ... Source is MJPEG (avi) or MPEG4v2, 768x576 (PAL cap) or 832x480. My script just convert to YV12 and use fft3dgpu() with default settings (well i tried to change the others settings, but with no luck, it only change the size of black squares).

Drivers ??? huh ... i don't think they are the latest, something like 66.77.

I also tried other colorspace as input, but the results were really funky as expected, and not like my bug.

tsp
14th February 2005, 15:35
bill_baroud: I have tested the filter with version 66.93 and 71.80 both didn't show any artifacts. You could try to update the driver.

Fizick
14th February 2005, 23:27
tsp,
But sigma=1 in fft3dfilter ~ sigma=25 in fft3dGPU.

How about compatibility? I use:

norm = 1.0f/(bw*bh); // do not forget set FFT normalization factor
sigma2NoiseNormed = bt*sigma*sigma/norm; // normalize noise value

Backwoods
15th February 2005, 09:32
GeForce 6800 OC

720x272

FFT3dFilter = 10-12fps

FFT3dGPU = 12-16fps

(sigma=3.0, bt=3, bh=32 ,bw=32) for both filters.

tsp
15th February 2005, 09:44
Fizick I have added the normalization code to sigma. The only thing I can't seem to figure out is how to apply the 2d window function. At the moment I'm using af 1d window but this produces artifact with sigma values above 10.
When just multiplying the cosx and cosy values I get a checkboard pattern(when the picture is shifted bw/2 and bh/2 and summed the factor doesn't add up to 1.

edit

nevermind I cheated and used this as the window function:

void ImgStream::CreateFactorMap(float* Map,int x,unsigned int xnum,int y,unsigned int ynum,bool shift)
{
double cosy,cosx;
unsigned int offset=0;
double x1=x;
double y1=y;
//xnum=xnum/2;
//ynum=ynum/2;
for(unsigned int repy=0;repy<(ynum+shift);repy++){
for(double n1=(shift&&(repy==0||repy==ynum)?0:-y1/2.0)+0.5;n1<y1/2.0;n1++){
cosy=cos(n1*pi/(y1));
for(unsigned int repx=0;repx<(xnum+shift);repx++){
for(double n2=(shift&&(repx==0||repx==xnum)?0:-x1/2.0)+0.5;n2<x1/2.0;n2++){
cosx=cos(n2*pi/(x1));
Map[offset++]=sqrt(0.5*(cosx*cosx+cosy*cosy));
}
}
}
}
}


I have upload version 0.2 where the sigma values should work like fizick's fft3dfilter.

Antitorgo
15th February 2005, 18:33
Hmm... seems really slow.

The previous version I tested got something like 6-7fps now I get 2-3fps... This is with reduce CPU set to false (I tried true and got the same framerate with lower CPU utilization)... This could be because of something on my laptop or something tho.

From the stuff on the AviShader thread...

On the sleep() calls, I do them before copying the texture back, in D3D, as soon as the DrawPrimitive() call happens, the GPU begins it's thing, so any work you do between there and copying the texture back is the place to do things. For example, you can start copying the next frame up to the GPU or any sort of preprocessing on the CPU.

As far as my channel idea... if you are uploading a 1 channel 8-bit image (typically Luma) to the GPU, I'm guessing that brook is doing packing/unpacking into a 32-bit texture (which is native on the GPU) at 1/4 the width. This leads to an ineffeciency because of the packing/unpacking that has to happen on the GPU and just adds overhead. My idea was to upload 4 frames into each channel on a 32-bit texture, then you can run the shader across 4 frames at a time. In your case, it is a little complicated because you have your shifted/multiplied frame thing going on... so I'm not sure if it is applicable in your case (In avishader, I expect it to give me a huge performance boost when I get around to implementing it)...

tsp
15th February 2005, 19:55
Antitorgo I don't get lower framerates with the new version. Strange.
Also in this version the sleep is placed just before EndScene. And the texture is uploaded as D3DFMT_L8 then converted to D3DFMT_A32B32G32R32F where all the calculation is done (FFT requeres float) before converted back to D3DFMT_A8R8G8B8 for download. But I'm convienced that I will have to rewrite the filter without brook if I shall optimize this filter more. So now I just have to learn how to set up DirectX to do the rendering :p

Antitorgo
17th February 2005, 17:30
Yeah, copying back using the A8R8G8B8 is what has always killed me too, because it is the slowest operation and has to transfer 4x as much data as necessary. That is why I was thinking that the 4 frame at a time deal would work well...

If you want the source for AviShader which has all the D3D stuff, PM me and I'll see what I can do. D3D is pretty straightforward once you grok it.

tsp
22nd February 2005, 20:25
when using A8R8G8B8 (or fixed4 in brook) I pack 4 pixels to avoid waisting bandwidth (see FFT3dshader.br for the brook shaders).

tsp
14th March 2005, 22:57
released version 0.3. It's a major rewrite now using Directx directly instead of brook. The shaders are also optimized and the filter can now use float16(2 byte float) instead of float32(4 byte float or single precision) for storing the calculations causing an up to 150% speed increase compaired to version 0.2:
This is the framerates for version 0.2 ,0.3 and fft3dfilter using this syntax:
fft3dGPU(bt=1,sigma=2)
fft3dfilter(bt=1,sigma=2)
on a 720x576 clip:

fft3dfilter 7.0 FPS
fft3dGPU 0.2 11.0 FPS
fft3dGPU 0.3 24.3 FPS

this is on an athlon XP 2400 MHZ (nforce-2 chipset 200 MHz DDR ram)
and a Geforce 6800 GT 128 MB RAM (411 MHz core/742 MHz mem).

So a 350 % speed increase compaired to fft3dfilter. Nice...

Please report if the filter work with your graphics card. What card it is and how fast.

I have only tested this version with my geforce 6800 GT so I don't know how well it works with geforce FX 5xxx and Radeon Xxxx and 9xxx so please try and report back.

Backwoods
15th March 2005, 00:52
AVISource("otto.avi")
ConvertToYV12()
(sigma=3,bt=3)

FFT3DFilter 4-6 fps
FFT3dGPU 8-12 fps

720x480

GeForce 6800OC
2.8HT
1gig RAM

And I noticed the AA problem too.

tsp
15th March 2005, 10:26
Fixed the bug causing the aliased edges. Get the fixed version from the first post.

Also it would be nice if you could post the driver version you are using.

Backwoods: I'm a little curious why you only get 8-12 fps when I get about 18-21 fps on a 720x576 clip using bt=3. Maybe it's the 4 extra pipelines in the geforce 6800 GT.

Blue_MiSfit
15th March 2005, 13:20
AWESOME!

On my 9800 pro I get about 7-15 fps (encoding into cq2 qpel vhq4(&bvop) xvid) depending on the scene with a crop, lanczosresize(), removegrain(mode=2) and unfilter(-5,-5) before it.

powerful denoising without smudging the image too much, I really like it so far for the new Star Wars DVDs which have an absurd ammount of noise (gives 6of9 nightmares when barely filtered!!).

More later

~misfit

Didée
15th March 2005, 13:57
Originally posted by Blue_MiSfit
(gives 6of9 nightmares when barely filtered!!)
No, it doesn't give nighmares to 6of9.

It gives you nightmares because of the achieved high bitrates ... ;)

For pressing very noisy sources into tiny files, 6of9 is not suited, by intention.

Backwoods
15th March 2005, 22:59
Originally posted by tsp
Backwoods: I'm a little curious why you only get 8-12 fps when I get about 18-21 fps on a 720x576 clip using bt=3. Maybe it's the 4 extra pipelines in the geforce 6800 GT.

Just installed 71.84 and fft3dgpu 0.31 and now:

12~22 fps maintained 16-18

720x480

Xvid Q2

vinetu
16th March 2005, 23:11
I did some tests and here is the results.
The CPU is P4 1.8GHz overclocked to 2.9GHz,The VGA card is Radeon 9600 Non Pro.
The source avi is an uncompressed, progressive 720x576 YV12.avi ,273 frames,almost static natural video .
The avs script is :
-------------
LoadPlugin("fft3dGPU.dll")
Avisource("X:\YV12.avi")
fft3dGPU(bla,bla)
-------------
The "X:" drive is a 500 Mb RAMDiSK drive.
Processed in VirtualDubMod in direct stream mode and the filtered avi is saved on the same RAM drive -no HDDs involved...

It's really impossible to me to see the differences between original and filtered images,
so I decide to compress the filtered avi files at later point to XviD (single pass,quant 2,no B-frames) to "visualize" the filtering.

The chain is "uncompressed->fft_filter->uncompressed".

|__ settings __________________ | fft3dfilter (fps) / XviD avi Size _____ | fft3dGPU (fps) / XviD avi Size

|__ no filtering ________________ | _______________________________________________ 9,861,120 bytes

| (sigma=2.0, bt=1) ____________ | _ 10.11 fps / 8,026,112 bytes _____ | 18.20 fps / 9,439,232 bytes

| (sigma=3.0, bt=3) ____________ | __ 7.58 fps / 6,307,840 bytes _____ | 16.05 fps / 7,495,680 bytes ___ |

| (sigma=3.0, bt=3, bh=16 ,bw=16) | __ 5.46 fps / 6,408,192 bytes _____ | 19.50 fps / 8,501,248 bytes ___ |

| (sigma=3.0, bt=3, bh=48 ,bw=48) | __ 7.00 fps / 6,305,792 bytes _____ | 13.00 fps / 6,516,736 bytes ___ |
| (sigma=3.0, bt=3, bh=48 ,bw=48) | ___ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | 14.37 fps (R9600 overclocked from 325/202 to 425/225 core/memory)



This test is my fisrt try with fft based filtering -I'm VERY impressed by the compressibility results without distorting original.

Bow to the ground to both of you Fizick and Tsp!!!

Edit: text formating :(

tsp
16th March 2005, 23:57
thanks for the feedback. Wonder if someone with a Geforce 6800 Ultra SLI could test this filter ;)

vinetu: Please note that if bw or bh is not a power of two (4,8,16,32,64,128,256,512) it's rounded up to the next power of two 48 -> 64. This is not the case when using fft3dfilter because it uses fftw. Also it should be faster to compress directly to XviD when using fft3dGPU because the waisted CPU cycles when waiting on the graphics card are used the encode the last processed frame (if the program is multithreaded (virtualdubmod is)).

vinetu
17th March 2005, 00:22
Thank You tsp!!!

In addition to speed tests - there is no difference in speed between AGPx8 and AGPx4 modes here,
so I guess PCI-E cards should have equal performance to AGP ones (if core chip/memory is the same)

Best Regards

Soulhunter
18th March 2005, 08:35
Uhm, the latest version throws a error... :\

http://img100.exs.cx/img100/866/9869sy.png (http://www.imageshack.us)

tsp
18th March 2005, 11:47
Soulhunter: You should copy the file ps.hlsl from the zip file into the same directory as fft3dgpu.dll (in this case c:\programme\Avisynth 2.5\plugins\)

Soulhunter
18th March 2005, 13:13
Ouch, I feel very stupid now... :D

Guess it was one of this "drag&drop" errors !?!


Bye

Leo 69
18th March 2005, 21:10
With this filter I get resized picture (i.e reduced one) with bunch of big black artifacts all over the place. I use GeForce FX 5900 NU @ 71.84 official drivers. :(

tsp
19th March 2005, 00:10
Leo 69: Damn I hoped the new version would work on a Geforce Fx. Would you try this (http://www.tsp.person.dk/test.zip) version and see if it works with bt=1 or bt=2 or both. In this test version the filtering is disabled so it is just to see where the error is.

Blue_MiSfit
19th March 2005, 07:04
@ Didee

No, it doesn't give nighmares to 6of9.

It gives you nightmares because of the achieved high bitrates ...

For pressing very noisy sources into tiny files, 6of9 is not suited, by intention.


I was actually doing a cq2 compressibilty test for 6of9

Leo 69
19th March 2005, 14:11
Originally posted by tsp
Leo 69: Damn I hoped the new version would work on a Geforce Fx. Would you try this (http://www.tsp.person.dk/test.zip) version and see if it works with bt=1 or bt=2 or both. In this test version the filtering is disabled so it is just to see where the error is.

Yes, the test version works fine :)

tsp
19th March 2005, 14:55
Leo 69: Also with fft3dGPU(bt=1)?? If that is the case it shouldn't be to hard fixing the error.

Leo 69
19th March 2005, 19:39
Originally posted by tsp
Leo 69: Also with fft3dGPU(bt=1)?? If that is the case it shouldn't be to hard fixing the error.

Yes, everything's OK with bt=1 too, tsp

tsp
19th March 2005, 20:44
Leo 69: Good then try version 0.31 again but change the following passage in the end of ps.hlsl(should be in the same directory as fft3dgpu.dll. It's an ordinary text file so use notepad to open it)


//****************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
float2 PSD=float2(length(src.xz),length(src.yw));
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=((PSD.x-SIGMA.y)/PSD.x);
if(SIGMA.x<PSD.y)
MulFac.yw=((PSD.y-SIGMA.y)/PSD.y);
return MulFac*src;
}
#endif
//*******************************************************************


to this:

//*******************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
float2 PSD=float2(length(src.xz),length(src.yw));
float4 MulFac;
float4 dst;
MulFac.xz=((PSD.x-SIGMA.y)/PSD.x)*(SIGMA.x<PSD.x)+(SIGMA.x>=PSD.x)*float2(BETA.x,BETA.x);
MulFac.yw=((PSD.y-SIGMA.y)/PSD.y)*(SIGMA.x<PSD.y)+(SIGMA.x>=PSD.y)*float2(BETA.x,BETA.x);
dst=MulFac*src;
return dst;
}
#endif
//*******************************************************************

if that doesn't work try this version

//*******************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
float2 PSD=float2(length(src.xz),length(src.yw));
float4 dst;
if(SIGMA.x<PSD.x)
dst.xz=src.xz*((PSD.x-SIGMA.y)/PSD.x);
else
dst.xz=src.xz*float2(BETA.x,BETA.x);
if(SIGMA.x<PSD.y)
dst.yw=src.yw*((PSD.y-SIGMA.y)/PSD.y);
else
dst.xz=src.xz*float2(BETA.x,BETA.x);
return dst;
}
#endif
//*******************************************************************

Leo 69
19th March 2005, 21:41
None of the script versions work (properly), tsp. Overall Bt=2 mode gives largest amount of artifacts and by the way my mouse constantly stops responding for very short periods of time during playback (~0.2 sec or so).With test version too.

tsp
19th March 2005, 23:13
hmm could you post a sceneshoot of the artifacts? Also does this version produce artifacts(This disables the filtering but it's mainly to confirm that the bug lies in the if statements).

//*******************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
float4 dst;
dst=src;
return dst;
}
#endif
//*******************************************************************

Also I haven't heared about the mouse problem before. But I will see what I can do about it later when I get this filter working in a geforce FX (even if I have to buy a geforce FX 5200 to test on. Anyone has a spare one?)

LordIntruder
21st March 2005, 05:09
Hi,


I tested you work TSP and here is what I get:

I encoded a 10000 video frames (720 x 528) with this parameter for FFT:
'FFT3DFilter(sigma=3, bt=3, measure=true)'

For FFT3dGPU I used:
'fft3dGPU(sigma=3, bt=3)'

On a 2400+, 1Gb Ram, AGP Radeon 9600 Pro with latest drivers, Windows XP SP2, DirectX 9.0c. Neither my CPU nor my GPU are overcloked.

Without FFT:

1st Pass = 13 min
2nd Pass = 37 min

FFT Measure True:

1st Pass = 53 min
2nd Pass = 80 min

FFT Measure OFF:

1st Pass = 59 min
2nd Pass = 82 min

FFT3dGPU

1st Pass = 17 min
2nd Pass = 40 min

In my example I selected the heaviest solution with latest XviD beta: Qpel, GMC, VHQ4, VHQ for bframes, Chroma motion, etc... So this is why the encode is so slow. You untick Qpel, you put VHQ1, no chroma motion and the speed rise up to the roof :D

The GPU version is amazingly fast !!!! I can't believe it!!! :eek: :eek:

As far as my eyes can see, the quality seems the same between your filter and the original by Fizick. Can you confirm the only thing is about the 16 bits float (useFloat16)? Except that option (which we still can enable to 32 bits), we are suppose to get the same quality that the original filter right?

A last thing I don't understand, I quote you

--
"usecache: if enabled the frames are saved in the GPU after the 2d FFT to avoid calculating them again the next frame if bt=2 or 3.
It can be necessary to disable this internal cache if using motion compensation. Default = true"
--

What do you mean by motion compensation? GMC option in DivX or XviD? What drawbacks are we suppose to get? Artifacts I suppose? And this option Off slow down the encode a lot?

A great thanks for your work, Fizick's filter is very good but so slow. A good idea you've got here. :) I wouldn't imagine that my video card helps me to encode faster. Another reason to buy a fast new card :D

tsp
22nd March 2005, 01:24
Originally posted by LordIntruder

As far as my eyes can see, the quality seems the same between your filter and the original by Fizick. Can you confirm the only thing is about the 16 bits float (useFloat16)? Except that option (which we still can enable to 32 bits), we are suppose to get the same quality that the original filter right?

Ahemm I just discovered that my filter cheats a little more than just using 16 bit float. I'm only using a 1:1 overlap instead of a 2:1 this means that the filter only does half as many calculations as fft3dfilter (explaining in part why it's 4 times as fast). This results in border artifacts when using high sigmavalues (about 2.5-10 depending on bw/h that is higher bw lower sigma before artifacts appears ). That is a 1-2 pixel width dark border. Like this image:
http://www.tsp.person.dk/bug.png

I will do two things about that:
1) Implement the 2:1 overlap(This will cut the speed in half :mad: ).
2) and as an option for the speed hungry people. Just use a slightly larger blocksize and then crop the borders.

Until that is implementet be a little extra carefull with high sigma values.


A last thing I don't understand, I quote you

--
"usecache: if enabled the frames are saved in the GPU after the 2d FFT to avoid calculating them again the next frame if bt=2 or 3.
It can be necessary to disable this internal cache if using motion compensation. Default = true"
--

What do you mean by motion compensation? GMC option in DivX or XviD? What drawbacks are we suppose to get? Artifacts I suppose? And this option Off slow down the encode a lot?

No it was mainly aimed at MVTools but I don't think it will cause artifact anyway so I will disable this option in the next version.

tsp
1st April 2005, 20:16
released version 0.40. Now includes sharpening, 2:1 overlap and 1:1 overlap with border. Also better optimized for multitasking (the filters before fft3dgpu are processed at the same time as fft3dgpu)

vinetu
3rd April 2005, 00:10
Hi!
Some digits again-I did the "compressibility test" at same source (273 frames,PAL)

intel P4, Radeon 9600
non filtered Xvid.avi size 9,861,120 bytes

fft3dGPU v.0.31 (sigma=2.0,bt=1) ->9,439,232 bytes
fft3dGPU v.0.40 (sigma=2.0,bt=1) ->9,441,280 bytes

fft3dGPU v.0.31 (sigma=3.0,bt=3) ->7,495,680 bytes
fft3dGPU v.0.40 (sigma=3.0,bt=3) ->7,489,536 bytes

fft3dGPU v.0.31 (sigma=3.0,bt=3,bh=16,bw=16) ->8,501,248 bytes
fft3dGPU v.0.40 (sigma=3.0,bt=3,bh=16,bw=16) ->8,497,152 bytes

fft3dGPU v.0.31 (sigma=3.0,bt=3,bh=64,bw=64) ->6,516,736 bytes
fft3dGPU v.0.40 (sigma=3.0,bt=3,bh=64,bw=64) ->6,500,352 bytes
fft3dGPU v.0.40 (sigma=3.0,bt=3,bh=64,bw=64,mode=1) ->6,019,072 bytes

Still any artifacts are invisible here :)

Thank You!

P.S. Just curious why "FFT3DFilter(sigma=3.0,bt=3,bh=16,bw=16)"
is produceing much smaller file - 6,408,192 bytes vs 8,497,152 bytes(by fft3dGPU)

Fizick
4th April 2005, 05:53
tsp,
The speed results of your filter is great!

But what is your "1:1 overlap" and "2:1 overlap" mean?
Kokaram (and me) used say 16 pixels blocks width, every next block is shifted by 8 pixels (right, bottom), so one-side overlap size is 8 pixels for every block, and whole blocks width is overlapped, so summary overlap size (left and right) for block is equel to its width= 16 pixels.
I think it is full (maximum possible) overlapping (for simple algo).

Is it your "1:1" or "2:1" ?

Now i create (not release yet) new version of FFT3DFilter with partial overlapping (with arbitrary overlapped size), and confused with therms. I want use new parameter "overlap width" as one-side overlap size, with maximum value equal to half of block width.

tsp
4th April 2005, 07:45
Fizick : What you descripe is my 2:1 overlap=mode 1. In the 1:1 overlap (mode=0) the blocks are only shifted half bh down and bw to the right so 1/4 of a block is only overlapped by 1 block(compaired to 3 blocks when using mode=1). when using mode 2 only bw minus the border is used for overlapping (mainly because the artifacts are most severe at the borders). So this is nearly the same as partial overlap. mode 0 and mode 2 uses another window function than the one used in mode 1.
This image shows the diffent mode:
http://www.tsp.person.dk/overlap.png

So if you wants to compaire fft3dgpu with fft3dfilter use:
fft3dgpu(mode=1,usefloat16=false)

Fizick
4th April 2005, 21:06
tsp,
thanks for response and nice pic. But i am not not quite understand it.
I draw my overlap pic in fft3dfilter thread.
:)

tsp
4th April 2005, 21:38
Fizick: From your drawing it looks like the center of a block isn't overlapped at all. Is that true?
Also mode 1 in fft3dgpu and your default mode is the same. So look carefull at the (ugly) drawing of mode 1 and you can see four different colored blocks (dotted blue , dotted dark green, solid red and solid light green). To filter a 720x576 image we need to fft ~720/bw*576/bh*4 blocks. When using mode 0 there are only to overlapped block (red and green) meaning only ~720/bw*576/bh*2 blocks. And finaly mode 2 needs ~720/(bw-borderwidth*2)*576/(bh-borderheight*2)*2 blocks.

tsp
5th April 2005, 22:11
Found a bug. I forgot to square the modulus of the transformed image when calculating the PowerSpectralDensity. I will release a new version shortly until then the quick fix is to change line 518 in ps.hlsl from

float2 PSD=float2(length(src.xz),length(src.yw));

to

float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);

Fizick
6th April 2005, 21:46
tsp,
Yes, center is not overlapped in my partial overlap mode.

So I conclude, that full overlap mode of my FFT3dfilter(bw=32,bh=32, ow=16, oh=16) is the same as your FFT3DGPU(mode=1, bw=32,bh=32).
But my partial overlap FFT3dfilter(bw=32,bh=32, ow=8, oh=8) is NOT the same as your partial overlap
FFT3DGPU(mode=0, bw=32,bh=32).
So, users may compare results (quality) of different approaches.
(after you fix recent bug, and i fix my quite possible bugs - i rewrote many lines of code in v.0.9)

tsp
6th April 2005, 22:50
released version 0.41. Only new thing is the above bugfix plus a minor bug when calculating sigma (when mapping from 0-255 to 0-1 divide with 255 not 256 doh ).

LordIntruder
9th April 2005, 02:55
Hi,


Some speed measurements again. I put old results back here for better readability:

Athlon 2400+, Radeon 9600 Pro, 1 Gb Ram.

I encoded a 10000 video frames (720 x 528) with these parameters for FFT:

'FFT3DFilter(sigma=3, bt=3)'

For FFT3dGPU I used:
'fft3dGPU(sigma=3, bt=3)'

Without FFT
1st Pass = 13 min
2nd Pass = 37 min

FFT Measure True (v0.8.3)
1st Pass = 53 min
2nd Pass = 80 min

FFT Measure OFF (v0.8.3)
1st Pass = 59 min
2nd Pass = 82 min

FFT3dGPU (v0.3)
1st Pass = 17 min
2nd Pass = 40 min
--------

Today I encoded the exact same clip with the updated versions:

'FFT3DFilter(sigma=3, bt=3)'
'fft3dGPU(sigma=3, bt=3, mode=1, reduceCPU=false)'

FFT Measure OFF (v0.9.1)
1st Pass = 28 min
2nd Pass = 55 min

FFT3dGPU (v0.4)
1st Pass = 25 min
2nd Pass = 49 min

FFT3dGPU (v0.41 reduceCPU=false)
1st Pass = 29 min
2nd Pass = 57 min

FFT3dGPU (v0.41 reduceCPU=true (default))
1st Pass = 21 min
2nd Pass = 38 min

I thought 'reduceCPU=false' increased encoding speed when I first read your explanations about this option. In fact it decrease the speed and by default (true) it is already the fatest.

In short 0.41 is faster than 0.4 (I was afraid that the more complex math to fix the bug would increase time encoding and it is the opposite, good). However as you can notice I used mode=1 (so 2:1 overlap) for the GPU version. Tsp you told me the encoding speed should be cut by half but it is not the case despite twice more calculations. Normal or a bug?

We also can see that the 3DNow optimizations help a lot for the normal version of FFT. That is really great. :D

Is the GPU version 3Dnow or SSE optimized? If not I hope you intend to do it, we would get some speed. :D

Finally is the GPU version work as something multi-threaded, I mean as if there were 2 CPU cores like the forthcoming Intel and AMD processors? Maybe it is the way it works (differently of course but the idea), just curiosity. I was thinking about some general code that could be used by others filters.

I mean you use a special DLL or something like that, some parameters in the AVS and thanks to this the calculation would be done half by the CPU, half by the GPU. Maybe it's impossible, just idea but like that not only the FFT filter would take benefit of the GPU but also others filters and/or general calculations. Instead to optimize each filter you write a general parameters and any filter can take benefit. A crazy idea ;)

Oh before I forget: with both FFT and FFTGPU (and only them) when I start the job using Virtualdubmod latest version, most of the time it closes itself. I launch again VDM, I start the job and the 1st pass start. Then at the end of the 1st pass again sometimes VDM close and I need to manually launch it again and start the 2nd pass by myself or this one is launched after the 1st finishes. It appears ramdomly. I'm using the Avisynth 2.56 build 31 Jan and have just see another Beta from february 21 is out. Will give a try.

Anyway cheers to both of you on the work done on these filters :)

tsp
9th April 2005, 23:22
Originally posted by LordIntruder


I thought 'reduceCPU=false' increased encoding speed when I first read your explanations about this option. In fact it decrease the speed and by default (true) it is already the fatest.

There is a good explanation to this. It's because avisynth(fft3dgpu) uses less cputime when reduceCPU=true. This means that XviD gets more time to do the encoding and the encodetime decrease even if avisynth uses a little more time to process a frame. If reduceCPU=false then the extra cpu-time would be waisted instead of used to encode. You could try to repeat the test with Huffyuv or another fast codec (MJPEG)instead of XviD and you would get some very different results(at least that's what I think would happend)


In short 0.41 is faster than 0.4 (I was afraid that the more complex math to fix the bug would increase time encoding and it is the opposite, good). However as you can notice I used mode=1 (so 2:1 overlap) for the GPU version. Tsp you told me the encoding speed should be cut by half but it is not the case despite twice more calculations. Normal or a bug?

First the bugfix made the math simpler. Instead of calculating the modulus/length of the complex number/vector (squareroot(a^2+b^2)) the modules/length squarred is used (just a^2+b^2) so the squareroot isn't need (and that's an expensive operation).
I must admit that i'm a little surprised that the speed decrease wasn't bigger but again I think it's because the GPU uses more time meaning that XVid get's more time to encode so that it somewhat offset the extra time used (multiprocessing is very nice). Again if you use huffyuv or MJPEG you would get a greater speed decrease.



We also can see that the 3DNow optimizations help a lot for the normal version of FFT. That is really great. :D

Is the GPU version 3Dnow or SSE optimized? If not I hope you intend to do it, we would get some speed. :D

fft3dgpu doesn't need 3dnow or sse because all the math heavy calculations are done on the GPU and it uses a very different operation set (basicly all the commands used are like sse on steroides). Maybe some speed could be gained by using assembly instead of HLSL(the c-like language used by directx.)



Finally is the GPU version work as something multi-threaded, I mean as if there were 2 CPU cores like the forthcoming Intel and AMD processors? Maybe it is the way it works (differently of course but the idea), just curiosity. I was thinking about some general code that could be used by others filters.

I mean you use a special DLL or something like that, some parameters in the AVS and thanks to this the calculation would be done half by the CPU, half by the GPU. Maybe it's impossible, just idea but like that not only the FFT filter would take benefit of the GPU but also others filters and/or general calculations. Instead to optimize each filter you write a general parameters and any filter can take benefit. A crazy idea ;)

The filter is multithreaded. Basicly just before the GPU begins the calculations a thread is created that fetchers the next frame. Meanwhile the first thread asks the GPU(driver) if it's done with the calculations if that is not the case it sleeps 5 msec before asking again. When the GPU is done the data is downloaded to the main memory and then the first threads waits for the second thread to exit. When the next frame is requested the results from all the filters before fft3dgpu are already cached (because they where run at the same time the GPU was working). So with a dualcore processor you could have the filter do it's calculations and calculate thenext frame at the same time (although the cache usage could be quite high)

Try to guess which of these two scripts who would run fastest or would they be equally fast?

#SCRIPT A
fft3dfilter(plane=1)
fft3dfilter(plane=2)
fft3dGPU()

#SCRIPT B
fft3dGPU()
fft3dfilter(plane=1)
fft3dfilter(plane=2)

script A would be fastest if used with a fast encoder because the two filters before fft3dGPU would be run at the same time as fft3dGPU while in script B the extra cpu time would just be waisted because there are no filters before fft3dgpu. If used with Xvid or another slow encoder the speed difference would be less because the waisted cputime would be used by Xvid


Oh before I forget: with both FFT and FFTGPU (and only them) when I start the job using Virtualdubmod latest version, most of the time it closes itself. I launch again VDM, I start the job and the 1st pass start. Then at the end of the 1st pass again sometimes VDM close and I need to manually launch it again and start the 2nd pass by myself or this one is launched after the 1st finishes. It appears ramdomly. I'm using the Avisynth 2.56 build 31 Jan and have just see another Beta from february 21 is out. Will give a try.

Anyway cheers to both of you on the work done on these filters :)
I must say that it sounds odd it only happens with these two filter's because they don't share any code (unless Fizick used some of my code but I somewhat doubt it ;) ) The only bug I know of in fft3dgpu is that if you uses F5 to many times all the videomemory is used. This is caused by a memory leak somewhere (It must be microsoft's fault. DirectX or something :) )
Oh and thanks for the test. It's really amazing to see the interactions with Xvid

Fizick
10th April 2005, 14:11
LordIntruder,
your comparizon is not quite correct.
I change default overlap width since v.0.9.
(for speed).
3DNow was used previusly by FFTw internally for fft calculation (i think),
now in v.0.91 I add 3DNow for my Wiener calculation. The gain is about 25%.

tsp
11th April 2005, 23:38
I finaly got rid of the memory leaks so now you can F5 as crazy as you want in virtualdub(or use it in conditionalfilter/scriptclip/frameevaluate although I wouldn't recommend that because of the slow initialization).
Maybe this filter is ready for the avisynth usage categorie

MacAddict
12th April 2005, 02:36
Was the block artifact bug fixed mentioned earlier in this thread fixed? I've got an FX5200 using the 71.90 Nvidia driver with XP SP2. I still see 0.42 displaying the blocks. Many thanks for the effort!

vinetu
12th April 2005, 06:41
Just curious - what is the type of the picture where the blocks are best
visible - a gradient ...or a flat colored one?

tsp
12th April 2005, 07:53
vinetu: With mode=0 a sharp(gradient) image would produce the most borderartifacts. A single colored area with the same intensity wouldn't produce as many artifacts. But it's easier to spot the artifacts in a flat area. This should produce them:

fft3dGPU(mode=0,bw=128,bh=128,sigma=50)

MacAddict
12th April 2005, 11:06
Guess my picture attachment for the above post was never approved. The black blocks I mention above can be seen in
this screenshot. (http://home.insightbb.com/~macaddict01/gpu.jpg) They appear on every frame.

tsp
12th April 2005, 12:49
Originally posted by MacAddict
Guess my picture attachment for the above post was never approved. The black blocks I mention above can be seen in
this screenshot. (http://home.insightbb.com/~macaddict01/gpu.jpg) They appear on every frame.
yes the mysterious geforce fx bug. I don't know what's causing it. If you read page 2 in this thread Leo 69 had the same problem. I have compiled a new test version. It disables some of the filtering so if you could try it and tell me if it works. It is here (http://www.tsp.person.dk/test.zip). If it works try to replace the ps.hlsl file with the one from version 0.42 and see if it produces black boxes.

Also I have uploaded version 0.42 again because I forgot to update the dll :o

bill_baroud
12th April 2005, 17:02
hey i was the first to report this problem ;) but i didn't have the time to post my screenshot (was moving...) and to test your test version. Did you notice that the size of block depend on the bw/bh parameters ?

nevertheless, i was here to ask you another question: how is your algo scalable ?
because i found a website here (http://openvidia.sourceforge.net/) on parallel vision computation algorithm, and they use a computer with 6 PCI FX5200 (http://openvidia.sourceforge.net/hexagraphic_thumb.jpg).
So i was wondering if something like that could be usefull for our purpose :D

tsp
12th April 2005, 17:41
bill_baroud: If you want you can try the new test version and you're welcome to try fixing the bug ;) (src included) It's very strange that some of the block isn't processed.

I'm wondering if the bedst method to split the work between multiple GPUs would be to give each 1 frame or to split the frame up. Also wouldn't a single geforce 6800 GT be faster than 6 PCI fx5200 (they most be awfull bandwidth limited). If someone wants a multiple GPU version they could give me 2 geforce 6800 ULTRA and a nforce 4 SLI motherboard to work with :)

MacAddict
12th April 2005, 18:02
Originally posted by tsp
yes the mysterious geforce fx bug. I don't know what's causing it. If you read page 2 in this thread Leo 69 had the same problem. I have compiled a new test version. It disables some of the filtering so if you could try it and tell me if it works. It is here (http://www.tsp.person.dk/test.zip). If it works try to replace the ps.hlsl file with the one from version 0.42 and see if it produces black boxes.

Also I have uploaded version 0.42 again because I forgot to update the dll :o The new test build seems to work perfect. Blocks appeared again only when I replaced the ps.hlsl file from the 0.42 build. Seems like your narrowing it down:) Thx again!

tsp
12th April 2005, 18:35
MacAddict: ok try to change Line 481 to 495 in ps.hlsl from this:

//***************************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
//float2 PSD=float2(length(src.xz),length(src.yw));
float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=((PSD.x-SIGMA.y)/PSD.x);
if(SIGMA.x<PSD.y)
MulFac.yw=((PSD.y-SIGMA.y)/PSD.y);
return MulFac*src*float4(1,1,1,1);
}
#endif

to this:

//****************************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);

float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);
float2 PSDInv=1/PSD;
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=(PSD.x-SIGMA.y)*PSDInv.x;
if(SIGMA.x<PSD.y)
MulFac.yw=(PSD.y-SIGMA.y)*PSDInv.y;
return MulFac*src;
}
#endif

if that doesn't work try this variant:

//****************************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);

float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);
float2 PSDInv=1/PSD;
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=1-SIGMA.y*PSDInv.x;
if(SIGMA.x<PSD.y)
MulFac.yw=1-SIGMA.y*PSDInv.y;
return MulFac*src;
}
#endif

vinetu
12th April 2005, 19:01
MacAddict,
If you get troubles counting lines in ps.hlsl - you can use the script editor inside VirtualDubMod.

tsp,
Now (thanks to your script example) I see the blocks...

here are before/after zipped images (the web host is doing some weird things with my images,so I've zipped them)

before (http://www.hostinganime.com/nikotin05/tmp/before.zip)

fft3dGPU(mode=0,bw=128,bh=128,sigma=50) (http://www.hostinganime.com/nikotin05/tmp/after.zip)

the right Aspect Ratio for viewing is 16:9 (original resolution is 720x576),
the VGA is Radeon9600 non pro (Latest Drivers) AGPx8,
WinXP SP1,DirectX 9c 4.09.0000.904,FFT3dGPU.dll version 0.42 (updated one :) )

Ah and if you get troubles downloading images above with IE ("Save Target as..." did not work here) -try with some download manager...

vinetu
12th April 2005, 19:44
tsp,
now I did remember that nVidia VGA chips are working at low speed in 2D mode!
Typical example - 300MHz in 2D (avisynth) and 500MHz in 3D mode (Doom III :) ).
This is true for FX 5xxx and 6xxx series.

Did you know that?

tsp
12th April 2005, 19:49
Originally posted by vinetu
tsp,
now I did remember that nVidia VGA chips are working at low speed in 2D mode!
Typical example - 300MHz in 2D (avisynth) and 500MHz in 3D mode (Doom III :) ).
This is true for FX 5xxx and 6xxx series.

Did you know that?

yes I have mine clocked at 80 Mhz at 2D. I have a really noise fan on my graphc card so I have it run at very low speed in 2d mode.
Also don't worry when using fft3dgpu the 3D mode clock is used because I'm using Direct3D, you just don't see the rendered scene directly.

Also I can't download the after.zip even with a download accelerator. Couldn't you just upload the uncompressed picture
(The png file is compressed so you don't gain extra compression by "ziping" it)

vinetu
12th April 2005, 20:51
the problem with this .png images is that the web host there is "too smart" - at first try the files was .png and when i decide
to check them and download the hosted images - I get .png ,but looking like heavy down-resized and compressed .jpg ...
that's why i zipped them.

EDIT - Ok here they are:
before (http://www.freewebs.com/vinetu/before.zip)
after (http://www.freewebs.com/vinetu/after.zip)

script:
--------------------------------------
fft3dGPU(mode=0,bw=128,bh=128,sigma=50)
--------------------------------------

Radeon9600 non pro,WinXP SP1,DirectX 9c 4.09.0000.904

koszopal
13th April 2005, 09:16
@vinetu
maybe u can try post 2 png on
http://www.imageshack.ws/ ?
u can try post there as png files
and point here :D
koszopal

tsp
13th April 2005, 21:17
vinetu: That is exactly the kind of border artifacts. Also note how the plain area interacts with high detail area. So don't use such a high sigma value or use mode 1 or 2.

MacAddict: You can try this (http://www.tsp.person.dk/ps.hlsl) ps.hlsl file. It might work.

vinetu
13th April 2005, 22:06
Originally posted by tsp
That is exactly the kind of border artifacts.

Are these artifacts somehow different from these you get on nVidia?

I ask because long time ago I've read a review (something like "Ati vs nVidia") where was a lot of screen shots showing differences in rendered images in 3D games.For example the dithering on gradients was beter on Radeon 8500 ( IIRC the oposite card was GeForce 3 ).
I'm not an Ati fan :) this is technical question... I'm courious what could be my next VGA - for now the winner is FX6600... :)

bill_baroud
14th April 2005, 08:31
@vinetu: imho, you should go for a 6800 non-GT/non-ultra, the price difference is not that much with a 6600GT, and you got a much much better chip (10ps/5vs pipelines instead of 8/3...)

@tsp : v0.42 + ps.hlsl from the test version fixed the problem, i didn't get any blocks with many different parameter.
I didn't got nvperfhud working though, but it's not like it's important ;).

btw, i took a (really) quick look at your code (nice one indeed) and saw some DirectInput stuff ??? why do you need to manage something like that in an avisynth filter (just wondering) ?

tsp
14th April 2005, 08:59
bill_baroud: the ps.hlsl file from the test version disables the Wienerfiltering. So the problem lies in the WFilter function. Could you try the ps.hlsl from my last post. It's a fully working version.

About NVPerf:
Also you did use NVperf=true and used this commandline to run it:

"PATH TO NVPerfHUD\NVPerfHUD.exe" "PATH TO VIRTUALDUBMOD\virtualdubmod.exe" "PATH TO AVS\test.avs"

and enabled "force NON PURE device"

The DirectInput code is included to intercept keyboard commands to nvperfhud. So if nvperfhud isn't enabled the DirectInputcode isn't executed. Also I will have to comment the code better some day and organize the Getframe code. To many if..else.


Vinetu: The artifacts are the same. This filter doesn't use anything fancy like anisotopic filtering or even bi/trilinear filtering but it uses many pixelshaders. So the only difference between ati and nvidia is that nvidia uses 32 bit precision and ati only 24 bit. It doesn't matter that much because when usefloat16=true(the default) is used the result from each pixelshader is saved at 16 bit precision.
A artifact I haven't seen on a ATI card is this (http://www.tsp.person.dk/arti.png) when using high bw,bh like this:

fft3dGPU(mode=0,bt=1,bw=512,bh=256)

MacAddict
14th April 2005, 14:06
Originally posted by tsp
MacAddict: You can try this (http://www.tsp.person.dk/ps.hlsl) ps.hlsl file. It might work. tsp, using this file with the 0.42 build I'm still getting artifacts using fft3dGPU(bt=1):( Haven't tried other parameters yet.

tsp
14th April 2005, 14:42
Originally posted by MacAddict
tsp, using this file with the 0.42 build I'm still getting artifacts using fft3dGPU(bt=1):( Haven't tried other parameters yet.

:angry: :angry:
Oh well I ordered a Geforce FX 5200 today so I will see if I can fix it when it arrives.

bill_baroud
14th April 2005, 15:47
Originally posted by tsp
About NVPerf:
Also you did use NVperf=true and used this commandline to run it:

"PATH TO NVPerfHUD\NVPerfHUD.exe" "PATH TO VIRTUALDUBMOD\virtualdubmod.exe" "PATH TO AVS\test.avs"

and enabled "force NON PURE device"
uh no, i didn't thought of that .. tried the combo-key but it didn't work, and it can't launch the dll ;)

Oh well I ordered a Geforce FX 5200 today so I will see if I can fix it when it arrives.
i'm very curious of the performances it can achieve in your filter :)

bill_baroud
15th April 2005, 16:06
ok, i did some tests yesterday, here the results :

fft3dGPU(bw=32, bh=32,NVPerf=false, bt=1,sigma=2, plane=1, mode=0) : mixed normal/greenish image / no bug with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=1,sigma=2, plane=1, mode=1) : greenish image / no bug with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=1,sigma=2, plane=1, mode=2) : mixed normal/greenish image / a pink/green triangle, no filtering with test-ps.hlsl

fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=1, mode=0) : close vdub / same with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=1, mode=1) : greenish image / no bug with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=1, mode=2) : close vdub / same with test-ps.hlsl

fft3dGPU(bw=32, bh=32,NVPerf=false, bt=3,sigma=2, plane=1, mode=0) : close vdub / same with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=3,sigma=2, plane=1, mode=1) : greenish image / no bug with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=3,sigma=2, plane=1, mode=2) : close vdub / same with test-ps.hlsl

fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=0, mode=0)
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=0, mode=1) : black with image blocks ;) / same with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=2,sigma=2, plane=0, mode=2) : no filtering, only a black with white dots triangle in the left high corner. / same with test-ps.hlsl
same with bt=3

fft3dGPU(bw=32, bh=32,NVPerf=false, bt=1,sigma=2, plane=0, mode=0/1) : mixed image/black blocks / no bug with test-ps.hlsl
fft3dGPU(bw=32, bh=32,NVPerf=false, bt=1,sigma=2, plane=0, mode=2) : mixed image/black blocks / black triangle bug with test-ps.hlsl

opening many avs file in vdub without closing it > no more video memory and crash


some screenshots can be found here (http://moodub.free.fr/fftgpu.zip)

edit: it was v0.42 + ps.hlsl from your last post and from the test.zip

tsp
15th April 2005, 17:10
bill_baroud: The pink/green block is the same error as the black blocks just in the U og V plane. In mode 2 the blocks are triangulair because each block is created using two triangles (in mode 0 and 1 the entire image is made up by two triangles). I'm really curious what warnings the debug directx dll will produce when I get my new superfast Geforce fx 5200 with 64 mb ram :)

Also did you download version 0.42 before I updated it with the right dll since you getting out of video memory? You can see the version number in explorer.

bill_baroud
16th April 2005, 12:32
yes i think i did get the silent update version (can't verify now) because i downloaded it after you said so (iirc).

Also, i have the dx SDK installed with debug version and co, you could have asked me a report or something, by giving me the procedure to follow. Well now you can enjoy the blazing speed of the geforce FX series :D

tsp
19th April 2005, 19:52
ph33r |v|¥ n33w G'ph0Я5e 5200!!!! 1+ W1||| PWN J00!!!!!!!!!!!!!

oh well got my new geforce fx and finnaly fixed the stupid bug. A small riddle:
What is 1000/1000?
Is it 1 not if you ask a geforce fx no it's 13231 ???

Here's the fix change line 481 to 495 in ps.hlsl from this:


//***************************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
//float2 PSD=float2(length(src.xz),length(src.yw));
float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=((PSD.x-SIGMA.y)/PSD.x);
if(SIGMA.x<PSD.y)
MulFac.yw=((PSD.y-SIGMA.y)/PSD.y);
return MulFac*src*float4(1,1,1,1);
}
#endif

to this:


//****************************************************************************
#ifdef BETA
float4 WFilter( PS_INPUT In) : COLOR
{
float4 src=tex2D(Src,In.texCoord);
//float2 PSD=float2(length(src.xz),length(src.yw));
float2 PSD=float2(src.x*src.x+src.z*src.z,src.y*src.y+src.w*src.w);
float4 MulFac=float4(BETA.x,BETA.x,BETA.x,BETA.x);
if(SIGMA.x<PSD.x)
MulFac.xz=((PSD.x-SIGMA.y)/(PSD.x+0.0000000000000000000000000000000000001);
if(SIGMA.x<PSD.y)
MulFac.yw=((PSD.y-SIGMA.y)/(PSD.y+0.0000000000000000000000000000000000001);
return MulFac*src;
}

or download the ps.hlsl from here (http://www.tsp.person.dk/ps.hlsl)
I will release a new version when I fixes the mousecursor shuttering.

edit
hmm it seems as the shuttering is only present when the framerate drops below 4 fps and that it is the nvidia driver that is causing it. If you look at the cpu utilization in the task list and enables show kernel time you will notice a very high kernel time cpu utilization(in this case the nvidia driver) when the shuttering is present. The only solution I have found is to decrease the number of commands the GPU process at once. This however really kills the framerate (something like 1 fps for a 64x64 images :( ) so the only real solution is to upgrade the graphics card to something faster


Also the Geforce FX 5200 is about 15-30 times slower than my geforce 6800 GT. Can't wait to get it back in the computer.

bill_baroud
20th April 2005, 08:07
1000/1000 = 13231 ?? that's a nifty bug... you should perhaps forward it to nvidia :rolleyes: ?

I'll test the new ps.hlsl this evening, thanks :)

MacAddict
21st April 2005, 12:25
tsp,

It seems you definitely found the block bug a few of us were getting with the FX cards. The ps.hlsl modification seems to have fixed the issue.

I seen this stuttering problem while encoding and your right about the kernel times. In fact, while encoding my CPU only uses around 80% max utilization. I'm guessing my FX GPU is the bottleneck and thats why the CPU isn't being utilized 100%:)

tsp
22nd April 2005, 00:03
good to hear the modification worked. If you is not getting 100 % cpu just use some more demanding encoding settings or some more filters before fft3dgpu. Just curious what framerate do you get with a geforce fx 5900? also is it the total cpu utilization(green color) or is it the kerneltime(red color) that uses 80%?

FrEEwilL
26th April 2005, 11:18
i have a problem the filter working. :(
whenever i use FFT3DGPU() in avs, avisynth gives me unrecognized exception error and crashes vdub(or vdubmod) with a memory reference error (....xxxxxxx can not be read").

i'm using
P4 2.8e
Win2k3 Ent.
ATI 9500Pro(firmhacked to 9700)
Catalyst 0.48 (Aug, 2004)

firm patch can cause the problem?
i tried to install the driver both with original (recognized as 9700) and edited (forced to 9500Pro) ini settings but got the same error.

btw i have no problem with fft3dfilter or catalyst for other uses.

tsp
26th April 2005, 12:28
FrEEwilL: I don't think it's the firm patch that's causing the problem. It might be hyperthreading causing problems. Try disabling it and if it then works I will see if I can fix it.

MacAddict
26th April 2005, 12:30
@tsp

I'm actually using a FX5200 card unfortunately which gave me about 6-8fps. 60% of the CPU usage was kernel and the other 20% green. I suspect the high kernel usage could explain the mouse cursor sluggishness?

I'll be trying my other box with a Radeon 9700 Pro in the next 48hrs to see how it compares. Thanks again!

tsp
26th April 2005, 14:28
MacAddict: I also get shuttering when the framerate drops below 8 fps on my geforce 6800GT (although I have to use this setting to get is so low: fft3dGPU(mode=1, bt=3, sigma=10,usefloat16=false) )
the shuttering is reduced when decreasing the number of commands the GPU process at once but the speed is reduced by ~50%. I don't know if I should at it as an option(it could be cool if it only was enabled when the mouse was used. I just have to find a way to detect that)

bill_baroud
26th April 2005, 16:46
Originally posted by MacAddict
I'm actually using a FX5200 card unfortunately which gave me about 6-8fps.

!!
Are you sure it's a FX5200 ? i get 5-6fps with a FX5900 :eek:

which settings do you use (and codec) ?

FrEEwilL
30th April 2005, 11:27
Originally posted by tsp
FrEEwilL: I don't think it's the firm patch that's causing the problem. It might be hyperthreading causing problems. Try disabling it and if it then works I will see if I can fix it.

I tried to disable HT but it didn't help. :(

tsp
1st May 2005, 16:44
FrEEwilL: Could you try this (http://www.tsp.person.dk/test.zip) version. It will generate a text file called FFT3dGPU_log.txt in c:\. If you could post the content of this file I could see where it craches.

MacAddict: Any luck with the Radeon 9700 Pro?

FrEEwilL
3rd May 2005, 12:02
@tsp, i've tried test version and got the following,

when loading from the default avisynth plugin dir, w/ or w/o LoadPlugin()

AvisynthPluginInit2

when loading from the external path by LoadPlugin()

AvisynthPluginInit2

Create_fft3dGPU

FFT3dGPU Constructor

tsp
3rd May 2005, 12:58
FrEEwilL: thanks I have created a new test version that will generate a more detailed report. You can get it here (http://www.tsp.person.dk/test2.zip).
If you could post the new log when loaded from the default avisynth plugin dir and from an external dir.

FrEEwilL
6th May 2005, 12:44
@tsp, here is a log ('ext_log') when loading from the external dir.
when loading from the default dir, two logs are created.
one is in plugin dir and the other is in the root of c:
the former contains the first 2 lines of the following and
the latter is same as 'ext_log' except for the numbers in memory address.


AvisynthPluginInit2:

AvisynthPluginInit2 Addfunction done
CREATE_fft3dGPU

FFT3dGPU constructor address: 1c84ee8
imgp: 0
hr: 1
GetDevice
pDevice :0
RegisterClassEx
create window
Creating D3D
d3dpp: 12c2ec ZeroMemory
Setup d3dpp
Creating D3Ddevice...

tsp
6th May 2005, 18:56
FrEEwilL: ok I have a new test version ready here (http://www.tsp.person.dk/test.zip). It it will again produce a logfile in c:\ so if you could repeat the procidure and post the logfile and include the the adress that couldn't be read. You could also try to set NVPerf=true.

Another thing that could be wrong if you are using windows 2003 server is that directx acceleration is disabled as default. (http://groups.google.dk/groups?hl=da&lr=&threadm=eHoFwFfdDHA.3260%40TK2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fhl%3Dda%26lr%3D%26q%3D%2522Windows%2BServer%2B2003%2522%2Bdirectx) I don't know if you have enabled it or having problem with other non-fullscreen directx accellerated applications/games, also you need directx 9.0 (I think directx8.1 is the default installed). I don't know if you also have windows xp/2000/98 installed and could try it in these OS's instead.

MacAddict
6th May 2005, 19:47
Originally posted by bill_baroud
!!
Are you sure it's a FX5200 ? i get 5-6fps with a FX5900 :eek:

which settings do you use (and codec) ?

Yep, it's an Asus 5200/128MB card. I'm just using a simple script with XviD of course-
mpeg2source("D:\DIvX RIPs\Test Clips\xxxx\xxxx.d2v",idct=6)
crop(4,64,712,352)
fft3dGPU(bt=1)
LanczosResize(672,272)
Undot()
Limiter()

Not sure if it plays a part or not but my AGP bus is running around 69Mhz due to this MSI AMD64 board not supporting locked bus speeds when overclocking.

MacAddict
6th May 2005, 20:21
Originally posted by tsp

MacAddict: Any luck with the Radeon 9700 Pro? Yes indeed:D I'm averaging around 17fps using XviD and the above script. Now I just need to find time to do compression tests and play with the settings. Thx so much for your effort tsp.

Anyone with advice yet on clean DVD movie sources?

dragonfly
7th May 2005, 19:41
I am using fft3dGPU 0.42 and can't help getting the following error;
"Only pixelshader 2.0 or greater is supported."

Well I have an Nvidia Geforce2 Ti 64MB card. Could it be that this is an old card and that fft3dGPU doesn't work with old cards? At least fft3d.dll works with my card, but that is sooooo slow :p

tsp
7th May 2005, 23:25
dragonfly: Yes a geforce 2 is to old. You will need at least a geforce fx 5200 or a Radeon 9500 that is a card with full support for DirectX 9 not just compatible with directx 9 but thanks for testing the supported pixelshader code :)

The following cards will not work:

Nvidia:
TNT
TNT2
Geforce 256
GeForce2 Ultra, Ti, Pro,MX,Go and GTS
Geforce3 Ti 200, Ti 500
GeForce4 Ti, MX, Go

Ati:
Radeon 7xxx
Radeon 8xxx
Radeon 92xx

Matrox:
G2xx
G4xx
G5xx
maybe Parhelia

The following should work:
Nvida
Geforce FX 5xxx
Geforce 6xxx

Ati:
Radeon 9500
Radeon 9550
Radeon 9600
Radeon 9700
Radeon 9800
Radeon Xxxx

where x means any digit.



MacAddict: When testing the speed of the different setting remember to encode to Xvid while doing it. There are a bigger difference in speed between the various setting when using a less cpu demanding codec(like Huffyuy) or no codec compaired to Xvid and other demanding codecs.

LordIntruder
7th May 2005, 23:26
dragonfly:

Read the first page:

"To use this filter you need directx 9 and a graphics card supporting directx 9 in hardware"

Geforce 2 does not support DirectX9 in hardware but DX8 or DX7 don't remember exactly.

dragonfly
7th May 2005, 23:45
@tsp
Thanks for the quick and detailed reply. I guess I have to purchase a new card :D

@LordIntruder
I almost never play games on my pc, so I don't know much about DirectX and the support for it on my card. So when the error came I did some research and found out that pixel shaders are used in DirectX. But wasn't sure if my card supported the right DirectX in hardware.
Thanks for your reply. Slowly I get to know the world of Doom9!

Fizick
8th May 2005, 00:19
Tsp,
Some time ago I read some Dr. Kokaram articles where he describe FFT processing with old good Geforce2 GPU (with NVidia SDK - may be too complex for programming?).

tsp
8th May 2005, 23:38
Fizick: I don't think it will be easy to make a version working on directx 7.0 hardware(geforce2/radeon 7xxx) because it doesn't have programmable shaders so it's only posible to add or subtract textures also it doesn't support floating point math (this is first includes in directx 9) only 8 (maybe 16) bit precision integers. It is posible to do integer fft but I don't know how fast it would be on directx 8 hardware.
Another thing if you would like to know how to do convolution in the frequency domain take a look at the varialble blur source code.

FrEEwilL
9th May 2005, 13:27
Originally posted by tsp
FrEEwilL: ok I have a new test version ready here (http://www.tsp.person.dk/test.zip). It it will again produce a logfile in c:\ so if you could repeat the procidure and post the logfile and include the the adress that couldn't be read. You could also try to set NVPerf=true.

i've tried to toggle the params of bool type but no one helped.

AvisynthPluginInit2:

AvisynthPluginInit2 Addfunction done
CREATE_fft3dGPU

FFT3dGPU constructor address: 1c94ee8
imgp: 0
hr: 1
GetDevice
pDevice :0
RegisterClassEx
create window
Creating D3D

constructor address changes occasionally while repeating the procedures and
depending on what program is used to load the script (vdub,vdubmod, mpc, zp, wmp...)
i don't get memory reference error box any more.
vdub just crashes(disappear) silently _when i switch application focus_.
only mpc gave one _when i'm closing_ (it works if i just keep it open)

The instruction at "0x01fb1177" referenced memory at "0x0229a6c8". The memory could not be "read".

the address changes slightly too.


Another thing that could be wrong if you are using windows 2003 server is that directx acceleration is disabled as default. (http://groups.google.dk/groups?hl=da&lr=&threadm=eHoFwFfdDHA.3260%40TK2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fhl%3Dda%26lr%3D%26q%3D%2522Windows%2BServer%2B2003%2522%2Bdirectx) I don't know if you have enabled it or having problem with other non-fullscreen directx accellerated applications/games, also you need directx 9.0 (I think directx8.1 is the default installed).
i've been using win2003 more than a year and already know those issues.
everything has been set properly and dx 9.0b is installed.
to re-verify, i ran dxdiag and all of d3d/ddraw tests passed successfully.

I don't know if you also have windows xp/2000/98 installed and could try it in these OS's instead.
sorry but i don't have any other OS installed and won't be back to XP
because currently i'm using a soft-raid mirror set (along with hardware stripe sets), which is supported only on the server family.

tsp
9th May 2005, 13:56
FrEEwilL: Hmm try installing directx version 9.0c it's the version I use. I think that it might be the cause of the error. because fft3dgpu stops executing when trying to setup directx.

hartford
10th May 2005, 00:55
For the record: DirectX 9.0c causes problems for many people. I was fortunate in being able to remove it and revert to 9.0b.

Perhaps you could be explicit in the requirements of your filter that
DX 9.0c is required.

(I have Win2000 SP4, DX 9.0b, dual amd processor, ATI 9700. Your filter doesn't work for me :( )

MacAddict
10th May 2005, 01:02
9.0c is running flawlessly on all 4 of my XP and Win2K machines here. I'm not a gamer in the least so maybe thats why I havent seen issues.

@tsp,

I only use XviD with the same settings, source, AVS and CQM's while testing. I overclocked the 9700 to obtain the previous mentioned speeds, still shocked me though compared to this FX5200!

tsp
10th May 2005, 01:36
hartford: I didn't know until now what 9.0c was required. I could try to compile a version for directx 9.0b although it wouldn't support pixelshader 3.0.

hartford
10th May 2005, 01:54
Well, I don't know what the implications would be wrt shader 3.0.

I do not expect you to code for those that cannot use DX 9.0c. I'm just
asking that you inform those that want to use your filter that DX 9.0c is required, that's all.

tsp
10th May 2005, 02:05
hartford: I will do what also I will include an error message in the next version if directx 9.0c isn't installed.

hartford
10th May 2005, 02:09
Originally posted by MacAddict
9.0c is running flawlessly on all 4 of my XP and Win2K machines here. I'm not a gamer in the least so maybe thats why I havent seen issues.



Well, good for you. I don't understand how "gamming" introduces a problem.

I do see where 2 cpu's can introduce a problem.

What changed from DX 9.0b to 9.0c?

I don't know. Many others don't know. 2 programs to remove DX 9.0c would not be in existance if there were no problems, whether 1 or 2 cpu's.

Bah. Until MS fixes this there will be many unhappy people.

hartford
10th May 2005, 02:11
Originally posted by tsp
hartford: I will do what also I will include an error message in the next version if directx 9.0c isn't installed.

Thanks. I'm sure that this will prevent many curses ;)

tsp
10th May 2005, 17:01
I have just released version 0.43
It mainly contains memory leaks fixes and the geforce fx fix.
Also new is a version compiled for DirectX 9.0b so I expect hartford to come with a full report about how this version works on a SMP machine ;D
I also added more comments to the sourcecode if anyone wants to take a look.

FrEEwilL
11th May 2005, 13:04
@tsp
oh jesus.. dx9b was the cause. yesterday i've installed 9c and finally the filter worked! :P thanks for your help.

hartford
12th May 2005, 02:50
Originally posted by tsp
I have just released version 0.43
It mainly contains memory leaks fixes and the geforce fx fix.
Also new is a version compiled for DirectX 9.0b so I expect hartford to come with a full report about how this version works on a SMP machine ;D
I also added more comments to the sourcecode if anyone wants to take a look.

I'm sorry to say that I get this error (using FFT3dGPU9b):

Avisynth read error: Avisynth: caught an access violation at 0X0291cc61, attempting to read from 0x00000008

tsp
12th May 2005, 19:04
Originally posted by hartford
I'm sorry to say that I get this error (using FFT3dGPU9b):

Avisynth read error: Avisynth: caught an access violation at 0X0291cc61, attempting to read from 0x00000008

:( ok I'm installing win2k + SP4 +dx9.0b + visual c++ .NET + dx 9.0b SDK on a WMware virtual machine so I think it should be posible for me to make a working version soon. (Another thing about 15 sec after I installed win2k and connected to the internet there were 3 Trojan horses /WORMS installed from the internet. Total insane!!!)

[edit]
Could you try try this (http://www.tsp.person.dk/FFT3dGPU9b.zip) version. It cantains two files: fft3dgpu9b.dll and fft3dgpu9b_log.dll. try fft3dgpu9b.dll first and if it doesn't work try fft3dgpu9b_log.dll. It will generate a file called c:\FFT3dGPU_log.txt so if you could post the content of this file it would be easier to see what's wrong.
This build works in win2k with SP4+directx 9.0b and the reference (software) render. Vmware doesn't support hardware accelerated directx 9 so I couldn't test that.

MacAddict
12th May 2005, 22:17
Anyone successfully encoded 2passes with 0.43 version yet on an entire movie? My 2nd pass stopped almost immediately indicating the DirectX device was no longer available:confused:

tsp
12th May 2005, 22:45
MacAddict: Is the exact error message: "Direct3D device lost. Please restart the application"?
if that is the case do you have any full-screen program/games/screensavers running. That can cause it.
How many frames can you encode before it happens?

MacAddict
12th May 2005, 23:05
@tsp

Thats the exact message I got. I'll have more details in a few hours when I arrive home. Guessing right now but I dont think anymore than a thousand frames on the 2nd pass were encoded.

I can tell you now that no games are installed on this particular machine, all screensavers are disabled. Only thing else running at the time was 8rda-vcore monitoring voltages and temps in the system tray. Now that I think about it I cant be sure I didn't also launch ATItool to check my GPU speed momentarily:rolleyes:
http://www.techpowerup.com/atitool/

I'll restart the 2pass again to see if in fact ATItool was the culprit for that mishap:) Report back later, thanks for the tip!

tsp
12th May 2005, 23:35
MacAddict: It could be ATItool. Is this the first time it happens? I must amit that it is posible to recover the the Direct3D device but I'm a little lazy so it is not implementet yet (but I will se what i can do about it). As for what can cause it here is sentence from the directx docs:

By design, the full set of scenarios that can cause a device to become lost is not specified. Some typical examples include loss of focus, such as when the user presses ALT+TAB or when a system dialog is initialized. Devices can also be lost due to a power management event, or when another application assumes full-screen operation. In addition, any failure from IDirect3DDevice9::Reset puts the device into a lost state.

losing the focus shouldn't be a problem because this only applies to full-screen applications.

MacAddict
13th May 2005, 01:38
I'm almost positive now that at one point during the encode I did launch ATItool. I suspect the tool polled for D3D devices and somehow interrupted fft3dgpu. This is the first time I've attempted a full 2-pass encode on a DVD source. I'll start the encode up again tonight and report back soon.

FYI- No fullscreen apps, windows or screensavers were used.

hartford
13th May 2005, 02:57
Could you try try this (http://www.tsp.person.dk/FFT3dGPU9b.zip) version.


This version loads without error. I'm not certain at the moment if it works, ie, I'm using default and it doesn't seem to clean.

My script:

loadplugin("d:\plugins\FFT3dGPU9b.dll")

avisource("d:\test.avi").ConvertToYV12()

fft3dGPU()



Now that it loads I can adjust parameters.

Will report again.

hartford
13th May 2005, 03:00
Ok, I increased Sigma from default and it does work ;) nice!

Thankyou!


I'll post FPS when I capture a clip longer than 10 seconds.

hartford
13th May 2005, 03:30
Results from analog capture (analog capture to Huffyuv v2.1.1 CCESP Patch v0.2.5):

FPS: about 17


Did a 3min 45sec capture.

Used this script:

loadplugin("d:\plugins\FFT3dGPU9b.dll")
loadplugin("d:\plugins\Decomb521.dll")

avisource("d:\test2.avi")

Telecide(order=1,Post=0,Guide=1,nt=25)
Decimate(Cycle=5,Mode=0,Quality=3)

ConvertToYV12()

fft3dGPU(sigma=8)

(Recompressed to Huffyuv via VirtualDub)

--

I'm not commenting on the results of Sigma=8 (did cause banding), just
the FPS at that setting.

Zetto
13th May 2005, 09:40
Originally posted by hartford
What changed from DX 9.0b to 9.0c?

I don't know. Many others don't know. 2 programs to remove DX 9.0c would not be in existance if there were no problems, whether 1 or 2 cpu's.

Bah. Until MS fixes this there will be many unhappy people.

Major change with DS9c was the introduction of shaders v3.0 for the GF6x00s. As for the DX uninstallers, there are problems with ALL versions of DX , as there were with DX9b (like that major bug with capture cards ;) )

TSP, keep up the good work. Thanks for the help over emails :D Any plans to add a GUI for ur filter? I wanna see my 6800 work ;) Right now I have to settle for monitoring it's status by noise (fan speeds up) and by temp in the control panel

tsp
14th May 2005, 20:26
I have released version 0.44 of fft3dgpu, it now includes support for recovering a lost device and hopefull the directx 9.0b version works this time.

Zetto: There are already support for monitering the work done by using nvperfHUD(link in readme). To run nvPerfHUD do it like this:

set NVperf=true and used this commandline to run it:

code:
"PATH TO NVPerfHUD\NVPerfHUD.exe" "PATH TO VIRTUALDUBMOD\virtualdubmod.exe" "PATH TO AVS\test.avs"

and enabled "force NON PURE device"


hartford: Good to hear that it works now. Try setting mode=1 to reduce banding or lower the sigma value. Can you get more than 50% cpu utilization with fft3dgpu I ask because the code is multithreaded.

MacAddict: the new version should solve your problem

MacAddict
14th May 2005, 20:47
@tsp

I was able to reproduce the lost device issue:) It turned out to be the tightVNC service that was running in the background which I use for remote viewing purposes. My 2nd test with a full 2-pass encode worked flawlessly once I disable tightVNC.

Thanks for the new version. I'll give it a shot with tightVNC;)

Zetto
15th May 2005, 23:13
Thx, the nvperf_hud looks pretty neat. I have to complain tho about compatibility with HT cpus - still crashing with HT enabled (single cpu is rock solid). Both .43 and .44 are crash-prone (stops encoding, try to cancel and exit - crashes with memory access violation or somethin of that sort). Surprisingly, the .43 u have sent to me in email (is not the same as u have released here) is most stable. It works if I start first with single cpu enabled and later one I add the affinity for the second one. Dunno what to do about it. Without HT, encoding is very slow, and but when enabled, it crashes every now and then.

tsp
16th May 2005, 10:38
Zetto: The problem with hyperthreading is to locate where the error lies. Is it the nvidia driver that doesn't support multiple threads accesing the card at the same time(all games I know of only have 1 thread doing all the directx stuff) or is it somewhere in fft3dgpu there happens to be a lockup or maybe avisynth doesn't like multiple threads accesing the same frame at the same time or it could be virtualdub there is something wrong with. You can try downloading this (http://www.tsp.person.dk/test.zip) version of fft3dgpu 0.44. The only difference is that it will produce a log file (C:\FFT3dGPU_log.txt) so if you could post the last 100 lines from thise file when virtualdubmod locks up(with HT enabled). The filesize can be 10-45 MB if the lockups first come after a couples of hours.

Zetto
17th May 2005, 07:07
Hehe, first pass and it crashes :( I've attached the last 100 lines or so of the log file. Let me know what seems to be the problem :D From my layman perspective it has something to do with GPU.. driver perhaps? I'm using 71.84.

.....

Getframe 5481
time: 16782156
SetSamplerState...
done
download from GPU...

tsp
17th May 2005, 11:27
Zetto: From reading in the directx newsgroups it seems as the problem is that directx doesn't like two threads sending commands to the same GPU at the same time very much. So I made a new version where only one thread at a time can use the GPU. So please try if this (http://www.tsp.person.dk/fft3dgpu_0443.zip) version solves the problem.

Zetto
17th May 2005, 20:11
Yay, tsp, u rule :D I've tried new version but now it locked up with kernel use (red bar in task manager) thru the roof (didn't happen before). With other versions, vdub crashes but doesn't use CPU at all but now it takes up 50% on HT CPU. Hmmm...

Thanks for the effort anyways. Hopefully we'll be able to track this thing down :D

tsp
18th May 2005, 21:26
:angry: Why does it have to be so hard to make a SMP stable version. :(
Could you try virtual dub 1.6 and see if that change anything. I have a new log producing version ready here (http://www.tsp.person.dk/fft3dgpu_0443.zip) so if you could repeat the test and PM the last 100 lines of the log to me I will see what I can get out of it.

Revgen
18th May 2005, 21:32
I use a Geforce 6800 Ultra using WinXP pro, DirectX9c, and 67.02 drivers.

I always get this error message "Avisynth: caught an access violation at 0x01e5cfe1, attempting to read from 0x00000008" instead of a picture whenever I play this script in media player.

Here is the script:

LoadPlugin("E:\TomsMoComp.dll")
LoadPlugin("E:\fft3dgpu\FFT3dGPU.dll")
directshowsource("E:\ds000.avi")
TomsMoComp(1,10,1)
FFT3dGPU(sigma=5,beta=1,bt=3,plane=0)
FFT3dGPU(sigma=5,beta=1,bt=3,plane=1)
FFT3dGPU(sigma=5,beta=1,bt=3,plane=2)

But it's okay when I use this script:

LoadPlugin("E:\TomsMoComp.dll")
LoadPlugin("E:\fft3dgpu\FFT3dGPU.dll")
directshowsource("E:\ds000.avi")
TomsMoComp(1,10,1)
FFT3dGPU(sigma=5,beta=1,bt=3,plane=0)
#FFT3dGPU(sigma=5,beta=1,bt=3,plane=1)
#FFT3dGPU(sigma=5,beta=1,bt=3,plane=2)

I even disabled the luma plane and left the chroma planes active and it didn't work, but it didn't give an error message that time.

Apparently this plugin doesn't want to process chroma.

The ds000.avi file is a video capture from an old vhs tape. I captured it at 720x480 resolution with a special YV12 version of Huffyuv.

Is this a problem on my end? I'm not as advanced a user as some of you are, so I'm not sure.

Any help would be appreciated. Thanks.

tsp
18th May 2005, 22:13
Revgen: I must admit I changed the way the plane parameter works compaired to fft3dfilter. You only need plane=1 to process both chroma planes(U and V)(I made it like this because how many times do you only filter U or V plane?).
But I also found a bug in the code. I forgot to change a U to a V. I will release a new version shortly until then use mode=1.

Another thing if anyone is able to run this filter on a radeon 9700 pro and windows xp/SP2 with this options: fft3dGPU(sigma=3.0,bt=3,bh=64,bw=64,mode=1)
without getting artifacts like this (http://www.bausoft.de/bir0/radeon9700pro.jpg) could you post what driver version you use.

MacAddict
18th May 2005, 22:42
tsp,

With a Radeon 9700 clocked to 400/315Mhz using XP SP2 I'm not getting that artifact with the parameters above. Using the latest Cat 5.4 driver suite as well.

I'm also happy to report the D3D device isnt lost anymore when using other applications like tightVNC, ATItool, etc:) Nice work!

tsp
18th May 2005, 22:58
New version ready that fixes the chromaplane bug.

MacAddict: Thanks and good to hear that the lost driver issue is gone.

Zetto
18th May 2005, 23:13
Hey TSP, I think u should add test (loggin) version with each new release ;) I wanna test .45, I totally didn't use chroma, wanna give a shot :D

tsp
18th May 2005, 23:18
Zetto: the only difference between 0.45 and the test version is the chroma bugfix (and of course the log). So I don't hope you mind being my beta tester :p

Zetto
19th May 2005, 02:27
Check ur pm TSP... now it crashed during 2nd pass, with kernel use again up to 50% on one CPU... Gah! Single affinity works without a hitch ;) but fairly slow (about 10hours instead of 8 :( )

BTW, TSP, point out a single person here who is NOT a beta-tester :D ;)

PS
Is it my imagination or does FFT3d use up a lot of kernel time from ver .443 forward (speed the same give or take)? What's changed?

tsp
19th May 2005, 11:54
Zetto: new test version ready 0.45.1 (http://www.tsp.person.dk/fft3dgpu_0451.zip).
just pm the log like last time. Also try reduceCPU=false if reduceCPU=true crashes. It seems as if the filter is stuck in an infinite loop so I added a timeout after 10 secs.
The kernel time did increase but the speed is the same when encoding XviD (or maybe a little faster). The filter is not multithreaded anymore(in the version from 0.40 to 0.44 the next frame was cached in a seperate thread) and I take care of only thread at a time acces the directx device so the directx driver don't have to handle it.



BTW, TSP, point out a single person here who is NOT a beta-tester :D ;)

well okay you are my alpha tester :) but the time is close where I might create a thread in Avisynth Usage. I think most of the bugs are fixed.

Revgen
19th May 2005, 17:07
I wouldn't post this filter into the Avisynth Usage thread until the WMP memory leaks are fixed. After I play an Avisynth file using fft3dgpu I always have to open up the task bar and shut down WMP manualy.

Although memory leaks don't occur when encoding a file when using Gordian Knot or Virtual Dub, I still believe that WMP should be able to work with it without any issues.

tsp
19th May 2005, 19:25
Revgen: What version of Windows media player do you use and are you using the same avs file as in your first post? Also that is not a memory leak unless you have a steady increasing memory utilization during playback. I guess why this error hasn't turned up is because this filter is to slow for real time playback.

Zetto
19th May 2005, 22:27
Giving .451 a spin right now. Loads up CPU pretty heavy, about 5-10% higher on HT CPU, speed remains the same tho (with default reduceCPU setting, will try to disable it if it crashes). What happes if there is a timeout? :confused:

Revgen
19th May 2005, 22:35
I use WMP 6.4.

It plays back fine for me. The only problem is that when I exit WMP the WMP program still stays in memory. It only happens when I use your filter. I just like playing the file to preview what the image quality is like before I encode it. I have an Athlon 64 3500+ Socket 939 CPU so it's not too bad as far as playback speed goes.

Here is the script I use. I now use mode=1 like you suggested. So it plays back fine.

LoadPlugin("E:\TomsMoComp.dll")
LoadPlugin("E:\fft3dgpu\FFT3dGPU.dll")

directshowsource("E:\ds000.avi")

TomsMoComp(1,10,1)
FFT3dGPU(sigma=2,beta=1,bw=32,bh=32,bt=3,plane=0,mode=1)
FFT3dGPU(sigma=2,beta=1,bw=32,bh=32,bt=3,plane=1,mode=1)

tsp
19th May 2005, 23:21
Zetto: The loop where the lockups happends asks the GPU if it is done rendering if what is not the case FFT3dGPU sleeps so other threads/XviD can use the cpu. If the rendering is done or a timeout occurs the next thing happening is the result is downloaded from the GPU back to main memory. I don't know if the filter stops here or can process with the downloading but we will see what happens.

Revgen: I reproduced the lockup with WMP 6.4. It happends because the thread that initialize the invisible window FFT3dGPU uses for rendering is different from the thread destroying it when WMP closes down so fft3dgpu is stuck in an infinite loop waiting to close the window down. I will fix this tomorrow also you can safely use mode 0 from version 0.45 and onwards. It seems as if you finds a lot of bugs in my filter please continue that and it will soon be bugfree :D

Zetto
20th May 2005, 02:31
It chewed through 4 files (40 min each), actually, 2 files x 2 passes. No freezes. I am worried though that if the lockup has occurred, fft3dgpu stopped filtering (is that possible?) I'll review the files and see if they have problems with filtering.

EDIT: Seems like the v .451 have solved the problem with HT... I'll let it run overnight, see if anything breaks :D My comp been running 24x7 for a while now, hope nothing breaks...:eek:

Still I am curious: how does FFT3fGPU handle those exceptions when GPU locks up in the loop... does it try to redo the frame it got stuck at? or just moves on to the next one? If did I misread the hole idea?

tsp
20th May 2005, 11:20
version 0.46 is done. Includes two bugfixes so WMP 6.4 should work now and also Pentium 4 with HT enabled and Geforce 6800 Ultra.

Zetto: Take a look at this code snip where the lockups happens:

//While GPU working sleep
DWORD endtick=GetTickCount()+10000;//This is the end time this assures that we don't sleep for more than 10 sec.

LOG("sleep while query not flushed...")
//if GPU command queue is not empty and the time out has not occured sleep to allow other thread to work
while((S_FALSE == pQuery->GetData( NULL, 0, D3DGETDATA_FLUSH ))&&(GetTickCount()<endtick))
Sleep(0);
LOG("done")
}

//download texture to system memory texture
LOG("GetRenderTargetData...")
result=_pDevice->GetRenderTargetData(_pVideoSurface,_pShadowSurface);
LOG("done")

as you can see if the loop times out(because a lock-up occured, maybe because the nvidia driver that handles the Query isn't threadsafe) fft3dgpu just continues to the next step that is to download the texture(in this case frame) to the main memory just as it would if the GPU signaled it was done rendering. So it just continues working on the frame as nothing had happend. The only time FFT3dGPU redo's the frame is if the Direct3D device(GPU) is lost while calculating the frame(this can happend if a screensaver or another fullscreen 3D program/game are active.). That happend for MacAddict.

Zetto
20th May 2005, 18:32
So, if I understand correctly, when GPU locks up, the FFT3dGPU just takes whatever GPU has (or hasn't) done to the frame and loads it into main memory for further processing? Can it potentially lead to corrupted frames? That is, if the lock-up occurs while GPU is processing a frame, and does not complete the procedure, would FFT3dGPU load up whatever incompletely filtered frame from GPU into main memory for further processing? Would such crashes/lockups also speed up FFT3dGPU because it won't be processing ALL frames, since GPU would lock up on some of those?

I'm not saying I saw any corrrupted frames but I yet have to check the material I have produces so far. The good news is that the .451 worked for 10 hours straight with HT enabled and didn't crash. I just hope I didn't get garbage as a result ;)

On totally unrelated note, how do u check for artifacts? :D

tsp
20th May 2005, 20:44
Zetto: It is not as much the GPU that locks up that it is one specific command to check if the GPU is done rendering. I don't think there are many games if any that utilize this command so that might be why it locks up once in a while.
So I don't think it would cause any corrupted frames but if it is only 1 out of every 30000 frames I don't think you would notice it. The only way to see if there is any corruption would be to watch the movie. Also every time a lockup occur FFT3dGPU would have to wait 10 seconds before the loop times out so if there are many lockups the speed would only decrease.

Could you try version 0.46 and see if that one also works.

The usual way I check for artifacts is to look at the filtered frame :) or use something like this to compaire it with the output fft3dfilter produce:

src=avisource("c:\test.avi").convertoyv12()
a=src.fft3dfilter(bw=32,bh=32,ow=32,oh=32,sigma=3)
b=src.fft3dgpu(bw=32,bh=32,ow=32,oh=32,sigma=3,mode=1,usefloat16=false)
subtract(a,b)

Revgen
20th May 2005, 20:45
Surprise! Surprise! Another bug!:eek:

I was trying to encode my clip with Gordian Knot 0.35.0 using the new 0.46 version with FP32 instead of the default FP16. Unfortunately GK gave me this error.

http://img219.echo.cx/img219/6347/fft3dgpufp32gkerror10fq.th.jpg (http://img219.echo.cx/my.php?image=fft3dgpufp32gkerror10fq.jpg)

Here is the script I use.

LoadPlugin("E:\TomsMoComp.dll")
LoadPlugin("E:\fft3dgpu\FFT3dGPU.dll")
directshowsource("E:\ds000.avi")
TomsMoComp(-1,10,0)
FFT3dGPU(sigma=8,beta=1,bw=32,bh=32,bt=3,plane=0,mode=1,useFloat16=false)
FFT3dGPU(sigma=8,beta=1,bw=32,bh=32,bt=3,plane=1,mode=1,useFloat16=false)



This was the first time I ever tried to use FP32, so I decided to try it out on the VirtualDubMod 1.5.10 program without using Gordian Knot as a frontend and it worked fine.

So I decided to go back to using the "useFloat16=true" parameter and Gordian Knot didn't give an error.

This error comes up despite whether I'm doing a compressibility check or a straight encode.

tsp
20th May 2005, 20:51
Revgen: It is not a bug just me forgetting to include the explanation of this error in the readme.txt (Maybe I should include a FAQ in the readme). It just means that fft3dgpu needs more memory on the graphics card (yes I know you have 256 mb but that is not enough. Infact I think FFT3dGPU is the only reason why someone would have to buy a Geforce 6800 Ultra with 512 MB ram :) ). The only work around is to use mode 0 or 2 (or FP16). They only uses half the memory.

Revgen
20th May 2005, 22:58
Are you sure?

Why would it work well in VirtualDub and not in Gordian Knot?

tsp
20th May 2005, 23:05
hmm good question. It might be because Gordian knot allocates some memory on the GPU for it's own use or even worse it initialize two instances of the avs file(and when uses twice the memory). I will try downloading gordian knot and investigate what happens.

Revgen
20th May 2005, 23:56
This could be true, because I have to open my avi in Gordian Knot using the avs script that I created. Gordian Knot can't read my avi file because I captured it using a special directshow version of Huffyuv that uses YV12. The only way Gordian Knot and the Virtual Dub program included can read it is by using the "directshowsourece=myclip.avi" parameter in AVISynth.

Gordian Knot uses its own self-created .avs script and feeds it to Virtual Dub when it encodes video, so there may be a problem here.

tsp
21st May 2005, 00:54
Doh nvperfHud was messed up in 0.46 so I released version 0.46.1 that fixes it. Also added a FAQ section to the doc.

Revgen: From my first initial testing with GKNOT it seems a little random when it happends.

Revgen
21st May 2005, 01:26
Random?

It happens every time for me.

Does your filter use AGP memory?

I currently set aside 256mb of RAM for my AGP card to use. Would increasing it to 512mb help at all?

Backwoods
21st May 2005, 02:01
Just a silly little request. Can you rename your future Readme.txt to fft3dgpu_readme.txt?

MacAddict
21st May 2005, 02:20
Originally posted by Backwoods
Just a silly little request. Can you rename your future Readme.txt to fft3dgpu_readme.txt? Thank you, it was my next request as well ;)

Leak
21st May 2005, 10:18
Originally posted by Revgen
I captured it using a special directshow version of Huffyuv that uses YV12. The only way Gordian Knot and the Virtual Dub program included can read it is by using the "directshowsourece=myclip.avi" parameter in AVISynth.

Well, I encode quite a bit to YV12 HuffYUV files, but I'm using ffdshow's VfW interface for this - and with ffdshow set to decode HuffYUV in it's VfW settings I can directly open the file in Virtual Dub with no problems.

Just my .02 EUR...

np: Quinoline Yellow - Sealed (Dol-Goy Assist)

Revgen
21st May 2005, 17:28
Well, your suggestion works somewhat. I can now open my avi file without using avisynth, but unfortunately I still can't encode using FP32.

I guess I'll just have to do a manual 2-pass encode the old-fashioned way with Virtual Dub. Unless there is another frontend that can do a 2-pass encode other than GK.

vinetu
21st May 2005, 21:16
Revgen,
If you feed the fft3dGPU with low res image -let say add a "BilinearResize(320,240)" line before fft3dGPU - will that work with GK and FP32?
It's just for tracking - not a solution

MacAddict
21st May 2005, 21:48
Slightly OT but seems like you could use MeGUI or avs2avi to check the problem?

tsp
21st May 2005, 21:55
Revgen: I don't know much about GKNOT could you please descripe what exactly you do. Shrinking the source would work because it reduce the size of the needed memory but increasing the amount of AGP memory wouldn't because FFT3dGPU only use very little AGP memory (~1 MB).

Backwoods: Now you mentions it. It really annoys me when other filterwriters just call the docs readme.txt but it is really easy to forget that because I don't copy my own docs inside the plugin directory :o But in the next version it will definitely be called fft3dgpu_readme.txt or fft3dgpu.txt (I might even create a html doc).

Zetto
22nd May 2005, 05:30
So far, I didn't see any artifacts and encoding works with HT :D Finally! However, I am experimenting with sharpen now and it gives me problems every now and then. It works but does not accept values higher than +1 and it sometimes forces vdub to quit without any error messages or vdub just doesn't want to load the avs. I have to quit and reload the file to make it work (without making any changes to the script). Didn't try negative values since it seems a little unproductive - after all, fft3dgpu already softening up the image :D

tsp
22nd May 2005, 11:24
Zetto: What script are you using? This one works on my computer:
fft3dgpu(sharpen=200,plane=0)
The result are ugly but it works. But anyway I think i will rewrite the sharpening code so it does an ordinary unsharpen mask sharpen to avoid ringing(but I suspect the ringing could just be caused by the MJPEG compression and it is just more visible when applying the sharpening)

Revgen
22nd May 2005, 15:21
Originally posted by Zetto
So far, I didn't see any artifacts and encoding works with HT :D Finally! However, I am experimenting with sharpen now and it gives me problems every now and then. It works but does not accept values higher than +1 and it sometimes forces vdub to quit without any error messages or vdub just doesn't want to load the avs. I have to quit and reload the file to make it work (without making any changes to the script). Didn't try negative values since it seems a little unproductive - after all, fft3dgpu already softening up the image :D

I've experimented with the sharpen filter a little, and I've never had this problem.

What version of VirtualDub do you use?

I use VirtualDubMod 1.5.10.1 app that comes with Gordian Knot.

Zetto
22nd May 2005, 19:43
I use fft3dgpu(sigma=5,bt=3,mode=1,sharpen=1) with latest regular vdub v1.6.5 build 23350. I guess it's the vdub's fault :D I'll try vdubmod a little later on. TSP, please do improve on sharpen.. Check out other sharpeners with a goal of integrating them ;)

BTW I just noticed the lockup in task manager - the cpu1 usage dropped to 0% while cpu0 kernel rose to 45% for about 10 sec - symptoms of when vdub locked up with .44 version of fft3dgpu... I wonder what happened to that frame that was being processed :confused: It was first pass though, so hopefully second pass will produce a nice frame ;)

So the good news is that the workaround works, but on the bad side of things it doesn't address the issue: why do lockups occur in the first place? After all, without HT, it's smooth sailing all the way throuh.

Revgen
22nd May 2005, 21:29
Originally posted by Zetto
I use fft3dgpu(sigma=5,bt=3,mode=1,sharpen=1) with latest regular vdub v1.6.5 build 23350. I guess it's the vdub's fault :D I'll try vdubmod a little later on.

According to the VirtualDub sourceforge website ( http://virtualdub.sourceforge.net/ ) the v1.6.5 build is an "experimental" build. The older 1.5.10 build is considered stable. I'm betting that the problem is VirtualDub's fault.

tsp
22nd May 2005, 21:31
Originally posted by Zetto
I use fft3dgpu(sigma=5,bt=3,mode=1,sharpen=1) with latest regular vdub v1.6.5 build 23350. I guess it's the vdub's fault :D I'll try vdubmod a little later on. TSP, please do improve on sharpen.. Check out other sharpeners with a goal of integrating them ;)

just tried fft3dgpu(sigma=5,bt=3,mode=1,sharpen=20) and it doesn't crash. wonder of it is HT again. Could you try running with only 1 cpu and see if that works


BTW I just noticed the lockup in task manager - the cpu1 usage dropped to 0% while cpu0 kernel rose to 45% for about 10 sec - symptoms of when vdub locked up with .44 version of fft3dgpu... I wonder what happened to that frame that was being processed :confused: It was first pass though, so hopefully second pass will produce a nice frame ;)

So the good news is that the workaround works, but on the bad side of things it doesn't address the issue: why do lockups occur in the first place? After all, without HT, it's smooth sailing all the way throuh.
that sounds look a lockup.

I think it happends because I use a rarely used directx command and it might be because of that it hasn't been tested that much with HT. So the command doesn't work right but because it doesn't affect the rendering the result should be ok.

JnZ
22nd May 2005, 23:54
Hi everybody,

I've just make some speed tests:

Settings:
FFT3DFilter(sigma=3,bt=3,bh=32,bw=32)
FFT3DGPU(sigma=3,bt=3,bh=32,bw=32)

Configuration:
Athlon 64 3000+@2400MhZ,MSI NX6200@550/680.

Clip resolution:720x384

Speed:
FFT3DFilter: ~7.5fps (CPU:800MhZ):D (extremly situation for my Athlon)
FFT3DFilter: ~15fps (CPU:1800MhZ)
FFT3DFilter: ~20fps (CPU:2400MhZ)
FFT3DGPU : ~15fps (GPU/MEM:300/450MhZ,CPU:1800,2400MhZ)
FFT3DGPU : ~21fps (GPU/MEM:550/680MhZ,CPU:1800,2400MhZ)
FFT3DGPU : ~18fps (GPU/MEM:550/680MhZ,CPU:800MhZ)


It seems that Athlon64 is very strong on high frequencies and my graphics card is too slow, to boost encoding proces rapidly. Maybe if I unlock next 4 pipelines...
But, as you see, FFT3DGPU is very good for people with slow CPU and fast graphics card.

Bye

EDIT: I make some real tests with XviD codec:
XviD settings: Single Pass Q2,BPHQ matrix,Qpel,2 B-frames,Trellis,VHQ4
I test 1000 frames from "Der Untergang" dvd source, LanczosResize(720x384). Whole film contains 223251 frames of video.

FFT3DFilter: 193,1s (CPU:1800MhZ)
FFT3DFilter: 142,9s (CPU:2400MhZ)
FFT3DGPU : 147,9s (GPU/MEM:550/680MhZ,CPU:1800)
FFT3DGPU : 112,4s (GPU/MEM:550/680MhZ,CPU:2400MhZ)
-------------------------------------------------------------
Filesize:
FFT3DFilter: 7 946 240 b
FFT3DGPU : 9 310 208 b
-------------------------------------------------------------
Aprox. estimation to encode whole video:
FFT3DFilter: 8,862h (CPU:2400MhZ)
FFT3DGPU : 6,970h (GPU/MEM:550/680MhZ,CPU:2400MhZ)

So with GPU, I can shorten encoding proces abou 1 hour.
I never wanted strong graphics card,because not playing much,but now, I want 2x6800GT with SLI. With this,encoding process can be shorten rapidly. :D
Bye

Revgen
23rd May 2005, 17:19
@tsp

Have you gotten my email with the PDF and JPG's. I'm just asking because it was about 1.5mb in size and may have been too big for your email server to handle.

tsp
23rd May 2005, 18:35
Revgen: yes I got it. I will try testing it later.

JnZ: tnaks for the speed test. I think you could increase the compression by using mode=1 instead of the default mode=0 without increasing the encode time much(not compaired to when you just preview the video). I don't know if you could include
FFT3DGPU(sigma=3,bt=3,bh=32,bw=32,mode=1)
in you test(and the resulting filesize).
anyway the geforce 6200 performs quite good considering that it is a low budget card.

Revgen
23rd May 2005, 23:52
Originally posted by JnZ


It seems that Athlon64 is very strong on high frequencies and my graphics card is too slow, to boost encoding proces rapidly. Maybe if I unlock next 4 pipelines...


You can unlock the extra pipelines on your GPU depending on what revision of the 6200 chipset you have.

Go to this thread http://forums.guru3d.com/showthread.php?s=&threadid=136293 for more info.

tsp
24th May 2005, 12:25
Revgen: I reproduced your problem with GKnot and found a solution. GK doesn't close the videostream after you click on save and encode in the first window(with the title "FrameNo xxx/yyy") so the memory on the GPU (or main memory) is never deallocated so when you start the encoding fft3dGPU runs out of memory. The solution is simple: After you have clicked on "Add job to to Encoding Queue" you close GK instead of clicking on "start encoding". When you open GK again the job is still in the job list so just click on start encoding this time and it should work. Or you could first include fft3dgpu in the avs script generated by GKnot

Revgen
24th May 2005, 16:11
Your solution does work. Thanks:)

The only problem now is that the compressibility test still will not work. I can't exit Gknot and redo that. I guess I'm griping too much:D

Maybe, when you have some spare time, you can talk to Lenox about this and and maybe he can find a way to solve the problem peermanently in the next version of Gknot.


Thanks

tsp
24th May 2005, 18:53
revgen: what if you first add fft3dgpu in the script GKnot creates(save .avs script tab) (page 3 in the pdf file you send me)

Revgen
24th May 2005, 21:23
@tsp

I just discovered that both methods effectively when I want to do a straight encode. But changing the avisynth script still doesn't work when I want to do a correct compressibility check.

Try this.

1)Go to the "script" tab as shown on page 3, and change the script. However you do it doesn't matter. You can delete it all if you want.

2)Then click on the "compressibility check" tab.

3)Now click the "script" tab again and it will appear as it originally was before you changed it.

The compressibility check works, but I don't believe that it takes into account any of the FFT3dGPU settings. I believe this because Gordian Knot has suggested that I use a bitrate between 3500 and 5500 Kbps after I do the test. This may be true when it's not filtered, but I know that with FFT3dGPU I can encode this video at 1500-2000 kbps and it will still look good.

I'm not quite sure, but this seems to be a problem with Gknot rather than FFT3dGPU.

LordIntruder
24th May 2005, 22:53
Hi,


I don't know if this is what you are talking about but I use GordianKnot too to make the first calculations, bitrate, etc... I don't use it to encode, I use VDM manually, modify my script by hand, etc... My problem with GK and FFT3dGPU is whatever the resolution I select, I get the same result. Example:

- I do a comp test in 640 x 480, say I get 45%. So I move the slider to increase the resolution until GK display ~38%. Says the resolution is now 672 x 496. If I do a comp test again, I get 45% too. And to verify I selected 560 x 416 and same here, again 45% which doesn't make any sense. 720 x ... I was getting 45% too. Great! :)

The work around is quite simple: I use the original FFT3DFilter by Fizick to make my comp test and encode with the GPU version the whole movie.

The first version of FFT3dGPU didn't have this problem. I use 0.43 and there were 2 versions out since. I'll see if the problem still remains but I do not care about that.

Revgen
13th June 2005, 17:42
TSP,

I'm thinking about buying a Dual-Core CPU sometime in the near future.

I know that you have said that DirectX doesn't work well with more than one thread.

Would it be possible to create a version of FFT3dGPU that worked with OpenGL.

AFAIK OpenGL works well with multiple CPU's.

tsp
13th June 2005, 23:15
Revgen: It should be possible but the anoying thing about OpenGL is that I would have to write separate code for ATI and NVidia cards because they don't support the same OpenGL extensions. Also fft3dgpu will work fine with dualcore/processors/hyperthreading. It will only use 1 processor/core/thread like most of the other filters for avisynth (allthough some of them can be used with MT my new filter for the multiprocessor people)

Revgen
14th June 2005, 01:02
I'm sure it will work fine with dual cores. My issue is that using two cores(possibly working with your MT filter) can increase speed.

And I may be wrong but I believe that new Nvidia beta drivers are now 100% compatible with OpenGL 2.0. I don't own an ATI card so I don't know for sure if they have OpenGL 2.0 in their drivers. I'm going check up on it and report back.

If ATI and Nvidia both comply fully with OpenGL 2.0 I figure that it shouldn't be too hard to program for both of them. But then again I'm not a programmer, so what do I know :D.

EDIT

From the new information that I've gathered, Nvidia beta drivers 75.90 and up support OpenGL 2.0 completely.

Catylyst drivers 5.3 and up support OpenGL 2.0 for ATI.

Unfortunately ATI hardware currently CAN execute all OpenGL 2.0 parameters, but they CANNOT perform certain parameters up to OpenGL 2.0 performance specs.

An ATI software engineer explains it here (http://www.rage3d.com/board/showpost.php?p=1333565842&postcount=34).

I'm not sure if these limitations will affect what FFT3dGPU does or not. You would probably know better. :D

I hope this helps.

tsp
14th June 2005, 15:25
Revgen: I don't think it would be faster with OpenGL compaired to DirectX on a dualcore machine if the driver works in another thread(and I think it does) because the limiting factor would still be the graphics card.

Also I haven't tried using OpenGL

acrespo
14th June 2005, 18:36
I have some problems with FFT3DGPU. Sometimes I have a interrupt in frame sequence to show a old frame and sometimes the frame is green instead of the correct image.
Source is PIC MJPEG 3, 640x480 PAL-M (29.97 fps).
My script:


AviSource("d:\capture.avi")
Trim(0,18455)++Trim(19452,53420)

Crop(8,8,-8,-8, align=true)
LanczosResize(width,height*2)
TurnLeft()
SangNom()
TurnRight()
SangNom()
BilinearResize(640,480)

FFT3Dgpu(sigma=2,bt=3,plane=0)
FFT3Dgpu(sigma=2,bt=3,plane=1)
FFT3Dgpu(sigma=2,bt=3,plane=2)

RemoveDirt(repmode=16)
awarpsharp(depth=20)
LimitedSharpen(ss_x=1.0, ss_y=1.0)

Revgen
14th June 2005, 21:12
It might be a problem with the MJPEG codec. In my personal experience, MJPEG formats usually run into problems when they are edited or converted to other formats.

You also are using plane=2. FFT3dGPU doesn't use plane=2. Both Chroma planes are processed when you use plane=1.

Also try getting rid of the other filters and see if the problem still persists.

I hope this helps.

Zetto
19th June 2005, 21:59
It'll work just fine with dual-core, I have the next best thing - Intel HT CPU and it works... although I had some troubles initially ;) BTW, it is much faster with HT enabled rather than disabled - by about 30% in my case. However, my cpu is not 100% loaded, it seems that my videocard is the bottleneck, it's a fast one too - 6800 ultra.

AI
29th July 2005, 09:11
I think download frame from VRAM slowly than upload to VRAM

may be include downsize frame in GPU? (Lanczos for Luma and Bilinear for Chroma)
because many people after this filter use resize.

possible script:
--------------------
MergeChroma(fft3dgpu(plane=0,x=512,y=384),fft3dgpu(plane=1,x=512,y=384))
--------------------

original chroma (luma) only crop (not resize, becouse slowly)

or if I use fast CPU and fact GPU (or slow CPU and slow GPU)
I can use this script:
-------------
MergeChroma(fft3dfilter(plane=0).LanczosResize(512,384),fft3dgpu(plane=1,x=512,y=384))
------------

PS Excuse me my english (my language is russian)

tsp
29th July 2005, 18:53
It should be posiible to implement that as a post processing filter before downloading the result to main memory. But currently my spare time to code this filter and the current multithreaded version of avisynth is very limited until late august.

AI
5th August 2005, 07:28
while you busy,
may be I say several my ideas?
(I am a generator ideas :D)

I think your first versions be only one buffer
New version is double buffering (first buffer coding in GPU, second coping to memory and then coding in CPU)

I suggest 3-buffering (first - coding in VRAM, second coping to RAM from VRAM and simultaneously third buffer coding in CPU next filters or encoder (for instance XviD))

i.e. we have 3 parallel proceses
1) fft3dGPU in GPU
2) Download from VRAM to main RAM
3) other proceses in CPU

What you thin about this?

tsp
6th August 2005, 00:04
well currently fft3dgpu does process the filters before fft3dgpu in the next frame while the gpu is working on the current frame. I don't know how well the gpu handles simultaneously downloading from the gpu and proccessing on the gpu at the same time.

AI
8th August 2005, 04:46
I think you understand me.
(In a complicated way write on unacquainted language)

I want to elaborate that I bore in mind:

1) current your version: (algorithm steps)
- download from VRAM already ready frame (N)
- upload to VRAM next frame (N+1)
- run GPU (N+1 frame)
- end (send management AVISynth)

2) I offer: (N = integer, number curent frame)
- upload to VRAM N+2 frame
- run in GPU N+2 frame
- run download from VRAM already ready frame N+1
- send AVISynth already downloaded frame N

PS say you so have understood previous my post?
PPS if I use DePanInterleave, I want every third frame... What you think about this optimization?

tsp
9th August 2005, 15:59
Slight corection currently fft3dgpu works like this:

-check if needed frame is in the gpu cache(bt=1 uses 1 frame at a time bt=2 uses 2 and bt=3 uses 3 frames at a time) if not shift pixels(because the order the pixels are stored are different when uploaded in a texture compared to in an avisynth frame) and upload frame to GPU and do a 2d fft
-start processing in GPU
-while this is running get the next frame needed. Currently the frame is NOT uploaded to the GPU but this is a thing I'm thinking to implement.
-when this is done and if the GPU is not done then suspend avisynth until the GPU is done so if the result us encoded the encoder gets cpu time to work
-download the result to main memory and return it

AI
31st August 2005, 08:40
why fft3dfiltre(plane=0).fft3gpu(plane=1) faster,
then fft3gpu(plane=1).fft3dfiltre(plane=0)

i.e. use CPU before fft3gpu faster,
then use CPU after fft3gpu...

tsp
31st August 2005, 12:59
because when the fft3dGPU is using the GPU the CPU is fetching the next frame, that is all the filters before fft3dGPU is running concurrent with the GPU. Because fft3dGPU doesn't know about the filters after fft3GPU it is not pissible to run these concurrent with fft3dgpu. To understand this you need to understand how avisynth works. If you script looks like this:

Avisource("c:\test.avi")
fft3dfilter(plane=0)
fft3dGPU(plane=1)

when virtualdub ask avisynth to deliver a frame it first ask ft3dGPU to return a frame. fft3dGPU then ask fft3dfilter to deliver a frame that again asks Avisource to return a frame. Avisource load the frame and returns it to fft3dfilter that process it at returns the result to fft3dgpu. fft3dGPU then works on the frame but because it uses the GPU the CPU is free so fft3dGPU ask fft3dfilter to deliver the next frame while the GPU works so when avisynth asks fft3dGPU to deliver the next frame fft3dGPU already have the result from fft3dfilter. You can see if fft3dfilter and fft3dgpu was used in the reverse order fft3dGPU would only call AVISource to deliver the next frame.

Fizick
2nd September 2005, 19:52
tsp,
please edit this line in your FAQ (first post):
A: fft3dGPU(mode=1,usefloat16=false) is similair to fft3dfilter(oh=bh,ow=bw)

to correct line:
A: fft3dGPU(mode=1,usefloat16=false) is similar to fft3dfilter(oh=bh/2,ow=bw/2) for same bt and power 2 bw,bh

LordIntruder
8th October 2005, 08:25
Hi,

Tsp is there any new update planned? Thanks a lot. :)

tsp
9th October 2005, 16:11
LordIntruder: I'm nearly done with the MT version of avisynth so I will turn my attention to fft3dGPU again and after Fizick released the sourcecode for fft3dfilter(Fizick thank you very much) I will try to convert fizick's code to a GPU version (by using my own fft code instead of fftw and convert fft3dfilter_c.cpp to directx 9 HLSL) also the cachecode will need a minor rewrite. I have my last 3 large exams in the next 3 month before I'm done at the university so my time might be rather limited :sly:

aberforthsgoat
10th October 2005, 07:59
Hiya guys!

What's the lowdown on fft3dgpu and interlaced source material? With fft3dfilter you can set it to interlaced=true - but we don't seem to have an option like that here. I've run some searches but haven't found much so far. What would you guys recommend?

Mike

Backwoods
10th October 2005, 16:24
Have you tried,

SeparateFields()
FFT3DGPU()
Weave()
?

tsp
10th October 2005, 18:04
sf=SeparateFields()
Interleave(sf.selecteven().FFT3DGPU(),sf.selectodd().FFT3DGPU())
Weave()

will be better else the even and odd field will be mixed

Mug Funky
11th October 2005, 05:49
wouldn't that only happen if bt=3?

tsp
11th October 2005, 06:58
or bt=2 yes that's right

aberforthsgoat
11th October 2005, 14:12
sf=SeparateFields()
Interleave(sf.selecteven().FFT3DGPU(),sf.selectodd().FFT3DGPU())
Weave()

will be better else the even and odd field will be mixed

Thanks - that seems to be giving me a great start. I'm now running into some trouble, however. I've put together the following script to work on a DVD of a football game:

LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\fft3dgpu.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")

mpeg2source("D:\Football4\Chargers-Pats.d2v")

sf=SeparateFields()
Interleave(sf.selecteven().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=1),sf.selectodd().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=1))
Interleave(sf.selecteven().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=2),sf.selectodd().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=2))
Interleave(sf.selecteven().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=0),sf.selectodd().FFT3DGPU(bt=3, sigma=4, sharpen=0.4, mode=1, plane=0))
Weave()

TomsMoComp(1,5,1)

crop(2,6,348,568)

Lanczos4Resize(1024,768)

Undot()



I thought I was doing things exactly right - first processing, then deinterlacing. But it's not working right. Without the TomsMoComp line, the output is rather amazing - except for bad combing artifacts. (Which my on-the-fly deinterlacers in ZP only make worse.)

*With* TomsMoComp I get an error message from ps.hlsl about an unexpacted #else following #else (X1514) and redefinition of "o" (X3003).

If I'm asking a stupid question (i.e., one that a million people have already asked), please feel free to direct me to the nearest FAQ and/or residential facility for the criminally dense.

Best,

Mike

acrespo
11th October 2005, 14:33
If you need deinterlace your video, put FFT3DGPU after deinterlacer. Also, try TDeint instead TomsMoComp.
FFT3DGPU don't have plane=2. plane=1 denoise all chroma planes.

aberforthsgoat
11th October 2005, 14:49
If you need deinterlace your video, put FFT3DGPU after deinterlacer. Also, try TDeint instead TomsMoComp.
FFT3DGPU don't have plane=2. plane=1 denoise all chroma planes.

Oh - OK! I carried that over from the fft3dfilter, thinking it would work here. Back to R-ing TFM ...

And I also just discovered that simply not re-weaving at the end takes care of my combing problem. GSpot say I've upped the ante to 50 FPS, which doesn't seem like a bad thing anyway, aprticularly since this is fast moving sports stuff. (Or am I making a fool of myself again? Sigh.)

Mike

tsp
11th October 2005, 20:24
aberforthsgoat: You will only have half the vertical resolution(and double framerate) if you don't weave the result.

Ferux
21st October 2005, 15:42
Hi,

Thank you for this great filter, the speed is x3 here (AMD Athlon 64 3500+ and Radeon 9800). The only problem for me is that I can't set the system in standby when using your filter. After resuming I receive the following message:

Unexpected error encountered

File:
Line: 387
Error Code: D3DERR_DEVICELOST (0x88760868)
Calling: ResetDevice
Do you want to debug the application?

When I hit 'No':

fft3dGPU

Direct3D device lost. Please restart the application



I use Avisynth 2.5.6 and VirtualDub 1.6.11.

tsp
22nd October 2005, 00:46
Do you have any other program running that are using directx 3D? The filter should handle resuming from standby without that error. It only happends if fft3dGPU can't reinitialize the graphics card. I did a resume from suspend with fft3dGPU and vdub 1.6.11 and what worked. You are using the latest version of fft3dgpu right?

Ferux
22nd October 2005, 01:54
I think that my Windows logon screen (which appears when resuming from standby) uses directx, because I have the same problem when switching users. :(

Leak
23rd October 2005, 12:19
I think that my Windows logon screen (which appears when resuming from standby) uses directx, because I have the same problem when switching users. :(
Ummm... making your system go into standby mode will completely power off the graphics card, which means you need to completely re-initialize both the driver and the part of the application that was using the card, so without tsp handling this gracefully in fft3dGPU it simply can't work - which is a pity, of course, if you happen to try to sleep next to a machine chugging away on a long encoding job; nothing like sending it into standby mode until breakfast... ;)

@tsp: where does the need to restart the application come from? Shouldn't it be enough to just re-init DirectX and upload all the needed data again, which might include re-processing a few earlier frames, if their data is needed for the current frame?

np: Stockfinster - Verge (All Becomes Music)

tsp
23rd October 2005, 14:42
leak: I do reinitialize DirectX. That error only occurs if the reinitializing fails for some reason. On my machine fft3dGPU handles a suspend/standby/hibernate without problem. In this case the error occurs because the directx device can't be reset. se this link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/IDirect3DDevice9__TestCooperativeLevel.asp And fft3dGPU is not a fullscreen application so it doesn't need focus to work. Currently in fft3dGPU there is a 120 sec timeout before the error is reported. So maybe I set this value to low in this case?

Ferux could you post the script you use.

Leak
23rd October 2005, 21:26
Currently in fft3dGPU there is a 120 sec timeout before the error is reported. So maybe I set this value to low in this case?
I'm just going out on a limb here, but could it be that in his case the timeout triggers because it starts right before/during going into standby (as the applications aren't stopped, but the drivers have to be), so that if you wake the machine after more than 2 minutes it will have already timed out?

If he gets the message right after waking his machine instead of about 2 minutes later that's probably the case...

(All speculation, of course... ;))

np: Stockfinster - Last Report (All Becomes Music)

Ferux
24th October 2005, 23:30
Ferux could you post the script you use.


AVISource("E:\Video's in productie\Prullebak\4de video ffvfw quant1.avi",pixel_type="yuy2")

Trim(0,6303) ++ Trim(6422,12260) ++ Trim(12295,19201) ++ Trim(19218,21088) ++ Trim(21104,21508) ++ Trim(21573,23771) ++ Trim(23799,25292) ++ Trim(25327,29465) ++ Trim(29475,31139) ++ Trim(31143,31348) ++ Trim(31509,32302) ++ Trim(32657,33452) ++ Trim(33496,45127) ++ Trim(45149,51298) ++ Trim(51489,52859) ++ Trim(52911,58559) ++ Trim(58659,67096) ++ Trim(67113,73240) ++ Trim(73314,75169) ++ Trim(75192,81295) ++ Trim(81348,97794) ++ Trim(97905,108199) ++ Trim(108242,115934) ++ Trim(115980,119239) ++ Trim(119260,120939) ++ Trim(120986,122388) ++ Trim(122526,126301) ++ Trim(126415,141354) ++ Trim(141364,153625) ++ Trim(153690,155834) ++ Trim(155907,156938) ++ Trim(156961,174748) ++ Trim(174873,180006) ++ Trim(180029,200628) ++ Trim(200675,206831) ++ Trim(206854,207221) ++ Trim(207239,207567) ++ Trim(207810,211420) ++ Trim(211528,211639) ++ Trim(211670,219630)

AssumeTFF()
SeparateFields()
AssumeFieldBased()
SmoothDeinterlace(tff=true, doublerate=true)

ConvertToYV12()
FFT3DGPU(plane=0,bt=3,sigma=2.0,bw=48,bh=48,mode=1)
FFT3DGPU(plane=1,bt=3,sigma=2.0,bw=48,bh=48,mode=1)

Crop(12,0,-12,-12)

FadeIO2(150)

Subtitle("Video 4",first_frame=0,last_frame=350,align=5,size=60,text_color=$FFFFFF,y=225)
Subtitle("31-01-1991",first_frame=0,last_frame=350,align=5,size=60,text_color=$FFFFFF,y=315)
Subtitle("tot",first_frame=0,last_frame=350,align=5,size=60,text_color=$FFFFFF,y=370)
Subtitle("17-02-1992",first_frame=0,last_frame=350,align=5,size=60,text_color=$FFFFFF,y=425)
Subtitle("SPEELDUUR 2:24", first_frame=0,last_frame=275,align=5,size=14,text_color=$FFFFFF,y=495)
Subtitle("ZET DEBLOCKING OP IN DE DECODER", first_frame=0,last_frame=275,align=5,size=14,text_color=$FFFFFF,y=510)
Subtitle("CAPTURE DOOR VIRTUALDUB & DIVX QUANTIZER 93%", first_frame=0,last_frame=275,align=5,size=14,text_color=$FFFFFF,y=525)
Subtitle("POSTPROCESSING DOOR AVISYNTH: TRIM, SMOOTH DEINTERLACE, FFT3DGPU, CROP, FADE EN TITELS", first_frame=0,last_frame=275,align=5,size=14,text_color=$FFFFFF,y=540)
Subtitle("VIDEO CODERING: XVID (MPEG4-ASP) 2PASS 3300KBPS, GECODEERD IN OKTOBER 2005", first_frame=0,last_frame=275,align=5,size=14,text_color=$FFFFFF,y=555)



After the 'smooth deinterlacer', the video has 50 fps. This took 24h for a 2:24 homevideo. If I process this with FFT3DFILTER, it takes 3 days. So I open this script in Virtual Dub 1.6.11, check 'fast recompress' and save it to FFVFW Quantizer 1 (latest version). (and later on, I encode it to XviD in 2 passes).

My system is:
Athlon 64 3500+
MSI Neo2 Platinum
1024MB Ram
Radeon 9800 Pro

The OS is Windows XP SP2 (not an x64 edition)

I noticed that the problem also occurs when I touch the PC when the screensaver is on and when I switch to another WinXP-user.

Currently in fft3dGPU there is a 120 sec timeout before the error is reported. So maybe I set this value to low in this case?

When I switch to another WinXP-user, it comes just after loging on. And that's much faster than 120 sec.


Thanks


nothing like sending it into standby mode until breakfast...

²!!!

Boulder
25th October 2005, 08:00
A little sidenote: you don't need SeparateFields() and AssumeFieldBased() in your script.

Ferux
25th October 2005, 12:16
A little sidenote: you don't need SeparateFields() and AssumeFieldBased() in your script.

I know, but without those 3 lines SmoothDeinterlace doesn't work! I have that problem since I use SmoothDeinterlace in AVISynth 2.56 instead of 2.08. But whatever, this makes no difference for FFT3DGPU.

Boulder
25th October 2005, 13:23
How about trying some other smart bobber such as LeakKernelBob (in LeakKernelDeint.dll) or TDeint(mode=1)? Seems weird that you need to separate the fields because in my logic the result won't be the same as you already have a 50fps stream before bobbing. Maybe it simply resizes the fields to full height?

LeakKernelBob should be quite a bit faster as well ;)

Ferux
25th October 2005, 23:21
How about trying some other smart bobber such as LeakKernelBob (in LeakKernelDeint.dll) or TDeint(mode=1)? Seems weird that you need to separate the fields because in my logic the result won't be the same as you already have a 50fps stream before bobbing. Maybe it simply resizes the fields to full height?

LeakKernelBob should be quite a bit faster as well ;)


I have tested a lot of deinterlacers for myself, and I found that SmoothDeinterlace was the best. So I used that deinterlacer already in Virtualdub and AVISynth 2.08. Last week I changed to AVS 2.56 and my previous script didn't work anymore (of course, I downloaded the right plugin for this new version). I searched a bit and found that the results after doing this:

AssumeTFF()
SeparateFields()
AssumeFieldBased()
SmoothDeinterlace(tff=true, doublerate=true)
has exactly the same result as this:

SmoothDeinterlace(tff=true, doublerate=true)

Why? I don't know (and I don't care), but it works.

Wilbert
26th October 2005, 00:05
Try the following version of SmoothDeinterlacer. It should work without any problems.

Attachment needs to be approved :)

Ok, here: http://www.geocities.com/wilbertdijkhof/SmoothDeinterlacer_25.zip

Revgen
26th October 2005, 03:06
To Nvidia users with dual-core systems:


The new 81.85 dual-core optimized drivers slow down FFT3DGPU.

I encoded a Huffyuv file and got about 10FPS with the older non-dualcore 81.26 driver. I got about 8fps with the 81.85's. Thats about a 20% decrease in performance. Which is about the same performance decrease that running FFT3DGPU using the MT filter does.

It does, however, improve performance in games that are CPU bound. So make sure to change your driver if you plan to encode.

tsp
26th October 2005, 19:44
Ferux: Could you try this (http://www.avisynth.org/tsp/FFT3dGPU.zip) version. I disabled the timeout so it might hang instead of reporting an error.

Ferux
28th October 2005, 18:42
Ferux: Could you try this (http://www.avisynth.org/tsp/FFT3dGPU.zip) version. I disabled the timeout so it might hang instead of reporting an error.

It doesn't work, but maybe something went wrong when uploading the file? This file is 390KB, the original FFT3DGPU is 1,02MB.




Try the following version of SmoothDeinterlacer. It should work without any problems.

It works, thanks!


Sorry for not answering more quickly, but I was already encoding for 3 days. Today it just finished..

tsp
28th October 2005, 20:23
It doesn't contain the source or the directx 9.0b version. Did it refuse to start or just showed the same error?

acrespo
30th October 2005, 03:25
Can be implement BT=-1 as described in fft3dfilter documentation:

Sharpening

At sharpening stage (after denoising) the plugin amplifies high spectrum (spatial, 2D) frequencies .
There is also sharpen-only mode without denoising (bt=-1).
Since version 1.1, some special limited sharpening method is used :

* the weakest frequencies (with small amplitudes) are not amplifyed to prevent noise increasing;
* the strongest frequencies (with large amplitudes) are not amplifyed to prevent oversharping and haloing.

The sharpening strength is maximal for frequencies with middle-range amplitudes. Of course, you can control both these margins and general sharpening strength.

Since v.1.7, Gaussian High Pass Filter with variable cutoff frequency is used for sharpening.
----------

I need a very fast sharpening plugin but all filters run very very low speed in my computer.

Ferux
30th October 2005, 10:18
It doesn't contain the source or the directx 9.0b version. Did it refuse to start or just showed the same error?

It refused to start:
"This application can't be started because d3dx9_2 can't be found."

The AVS error message:
"Script error: there is no function named "FFT3DGPU"

tsp
30th October 2005, 13:01
Ferux: I hoped that wouldn't happend. Same problem as with the new virtualdub. You can solve it by installing the latest version of directx: http://www.microsoft.com/downloads/details.aspx?FamilyId=9930EFA6-9F7B-4C8A-AEA2-97DD6AB307A2&displaylang=en
if you have a slow connection (the file is about 34 MB!) I have compressed the neccesary files in this (http://www.avisynth.org/tsp/directx.zip) zip file (2 MB). Just exctract them to windows\system32

acrespo: I'm working on it. But it will take a while

Ferux
30th October 2005, 22:03
I installed that DirectX.

When I open a AVS-script in AVISynth, I get these messages (about 20 of them):

C2R (The title is always different)

C:\Program Files\AviSynth2\plugins\ps.hlsl(524): warning X3083: Truncating 4-vector to size 1


After clicking these messages away, I can use VirtualDub like always. So, I save and AVS starts processing. No problems, until I trie to go to another Windows-user. When I log on to this Windows user (where AVS is running), it gives a lot of errors like these:


File:
Line: 1249
Error Code: S_OK (0x00000000)
Calling: FFT3p
Do you want to debug the application?

File:
Line: 1047
Error Code: S_OK (0x00000000)
Calling: WFilter
Do you want to debug the application?

File:
Line: 1317
Error Code: D3DERR_INVALIDCALL (0x8876086c)
Calling: iFFT3p
Do you want to debug the application?

File:
Line: 684
Error Code: S_OK (0x00000000)
Calling: BitReverseButterFlyV
Do you want to debug the application?

File:
Line: 947
Error Code: S_OK (0x00000000)
Calling: ButterflyCollectV
Do you want to debug the application?


...and many more.

After clicking those messages away, the processing continues! But AVS changed the color of 4 frames (it must have been at the time those errors occured).

When I'm "in" the other Windows user, I see that the CPU usage is about 0%, so FFT3DGPU doesn't do anything at that moment.

tsp
2nd November 2005, 21:53
Ferux: Just to prove that I'm not dead here is a new version that might fix the corrupted frames after recovering (should also fix the popups).

You can get it here (http://www.avisynth.org/tsp/fft3dgpu_47.zip)

Ferux
4th November 2005, 17:48
And... it works! But I'm still having those colored frames. That's not really a problem because it's possible to replace those 4 frames in Virtualdub.


Many thanks for the support, tsp!

tsp
6th November 2005, 23:05
Ferux: Could you try this (http://www.avisynth.org/tsp/fft3dgpu_47.zip) version. It shouldn't produce those colered frames.

Ferux
7th November 2005, 20:06
Congrats, it works!

The messages in the beginning 'Truncating 4 vector size to 1' (+/- 20 of them) still apear, but the rest of the plugin seems to work normal.

Again, many thanks.

AI
8th November 2005, 06:52
tsp

I can not loadplugin your new plugin version fft3dgpu_47.zip from 6-november and FFT3dGPU_047.zip from 2-november

In both versions dll have small size - 400Kb, but ver 0.46.1 900kb

PS Excuse me, my very bad English

tsp
8th November 2005, 12:19
Ferux: Just replace the ps.hlsl file with the ps.hlsl file in the version in fft3dgpu_47.zip archive. If you did that and you still get the error could you post the line number it reports.

AI: Did you put the file d3dx9_25.dll in the your c:\windows\system32 directory? else try installing the latest directx version:
http://www.microsoft.com/downloads/details.aspx?FamilyId=9930EFA6-9F7B-4C8A-AEA2-97DD6AB307A2&displaylang=en

Ferux
8th November 2005, 16:52
Oh, sorry I forgot that ps.hlsl. Everything is OK now.

Great job tsp!

tsp
9th November 2005, 21:44
good I posted the new version 0.47 at the first post. Only new is the above fix and the readme.txt has been renamed to fft3dgpu.txt

aberforthsgoat
21st November 2005, 09:41
Hmm.

I just tried installing the latest version of fft3dgpu - and AVS says it cant load. I copied *both* the new version of ps.hlsl and the new version of fft3dpgu into my plugins directory. As soon as I revert back to the version 0.42 stuff, everything is fine again.

Any tips?

Mike

tsp
21st November 2005, 11:31
aberforthsgoat: from the first post:

if you don't have the latest version of directx installed (october 2005) you can get it here: http://www.microsoft.com/downloads/...&displaylang=en(34 MB)
or extract the file d3dx9_25.dll to the c:\windows\system32 directory or use the directx 9.0b version.

Did you try that?

AI
21st November 2005, 12:04
2 tsp

add string about "d3dx9_2x.dll" to change list, and bold this text in first post

(becouse this is not obviously)

PS Excuse my very bad English :(

tsp
21st November 2005, 14:32
added a comment to the changelog about reading the install instructions. Also I got the degrid working for bt=1 but it seems to only work well with mode=1. I will release the next version then degrid has been added to bt=2,3 (might also change the sharp code to)

ariga
25th November 2005, 14:36
Version 0.46 with a GeForce FX 5600 Ultra, I get

Line: 605
Error Code: D3DERR_INVALIDCALL (0x8876086c)
Calling: Create TextureM:Texture

Line: 380
Error Code: D3DERR_INVALIDCALL (0x8876086c)
Calling: FFT2dRR::Create R2CLUT

Using DirectX 9c, 2.6GHz P4 HT.

tsp
26th November 2005, 03:01
ariga: I will post the next version shortly but please post your script else it is very difficult to figure out that is wrong.

tsp
26th November 2005, 15:57
ok version 0.5 is ready to download. Includes Kalman, sharpening, bt=4, degrid from fft3dfilter. Degrid only works well with mode=1. Also currently Kalman filtering is not supported on the geforce fx 5xxx. Rewrote some of the code so it might be faster than the last version.

Chainmax
26th November 2005, 16:39
Thanks for this much expected update, keep up the good work :).

Fizick
26th November 2005, 17:33
degrid: ... (but it does degrid sharpening with kalman
What is degrid sharpening?

tsp
26th November 2005, 18:16
sharpening with degrid.

tsp
26th November 2005, 23:06
Uploaded version 0.5a. It fix a bug with bt=2. Only file changed is fft3dgpu.hlsl.

Revgen
26th November 2005, 23:59
What is degrid sharpening?

sharpening with degrid.

LOL :D

I'll eventually try it out and see how it works, once I find some time.

Kopernikus
27th November 2005, 19:13
@tsp: Is there somewhere more information about shader programming available? Perhaps a sort of SDK?

AssassiNBG
27th November 2005, 19:57
Umm ... am I blind or is there no new version on http://www.avisynth.org/tsp/ ?

tsp
27th November 2005, 20:33
Sorry forgot to update the index page. It should be fixed now. Also I uploaded a new version 0.51 that fixes a bug where the parameters after NVPerf was shifted one place so degrid=scutoff,scutoff=svr, etc. Improved download speed from GPU and Kalman should work with geforce fx 5xxx.

I created a special version of fft3dGPU that reports the time it takes to download the final image from the gpu. You can get it here (http://www.avisynth.org/tsp/bwtest.zip). Just run the included download speed.avs after the included fft3dgpu.dll has been extracted to the plugin directory. On my computer with a AGP Geforce 6800GT it takes ~4.3 mikrosec to download it. That's about 100 MBytes/sec 92MBytes/sec (the other is million bytes/sec). AGPx8 speed upload speed is about 2100 MBytes/sec. So if anyone with a PCI-express GPU would run the test to compare the result.

Kopernikus: There are the DirectX SDK (http://msdn.microsoft.com/directx/sdk/) that contains some sample. Also both NVidia (http://developer.nvidia.com/object/sdk_home.html) and ATI (http://www.ati.com/developer/radeonSDK.html) have SDK available. Most of the sample is game orientatet but there are also some image/video and general purpose GPU (GPGPU) shader examples. The sample chapters (http://www.ati.com/developer/shaderx/index.html) from the ShaderX bookseries contains some nice sample for image manipulations on the GPU.
www.gpgpu.org is also a good site although mostly OpenGL.

Kopernikus
27th November 2005, 20:58
Thank you

ariga
28th November 2005, 11:02
ariga: I will post the next version shortly but please post your script else it is very difficult to figure out that is wrong.

It's a simple
AviSource("dv.avi")
LeakKernelDeint(order=0)
FFT3DGPU() # no params

Doesn't matter what params i pass, the error is the same.

BTW, I tried 0.47 and it complained about missing d3dx9_27.dll

Just d/l 0.51. Will see if it works.

acrespo
28th November 2005, 14:57
I am trying a compare between FFT3Dfilter and FFT3DGPU.

FFT3Dfilter is more efficient than FFT3DGPU in my anime captures. The parameters I used:

FFT3DFilter(sigma=5, sharpen=1.0) << version 1.8.3
FFT3DGPU(sigma=5, bh=48, bw=48, mode=1, sharpen=1.0) << version 0.5a

I still have some grid lines with fft3dgpu in some frames and fft3dfilter don't have any grid in all video. I guess the only thing is different in the parameters above is the overlap. The default overlap in fft3dfilter is bw,bh/3 and I don't know the default overlap of fft3gpu.

tsp
28th November 2005, 15:16
all: I made an installer. It might be more userfrindly ;)

acrespo:the default overlap is ow=bw/2 oh=bh/2 currently that can't be changed. Also there where a bug in 0.5a that assigned the value from svr to degrid. So the default value was 0.3. That might explain it. That is fixed in 0.51. Another difference is the precision used. By default fft3dgpu uses 16 bit floating point precission while fft3dfilter uses 32 bit precision. You can change that by setting useFloat16=false. This slows down the filter and uses more memory on the GPU.

ariga: I don't get any errors with 0.51, fft3dgpu() and a Geforce fx 5200.

AI
29th November 2005, 05:16
I created a special version of fft3dGPU that reports the time it takes to download the final image from the gpu. You can get it here (http://www.avisynth.org/tsp/bwtest.zip). Just run the included download speed.avs after the included fft3dgpu.dll has been extracted to the plugin directory. On my computer with a AGP Geforce 6800GT it takes ~4.3 mikrosec to download it. That's about 100 MBytes/sec. AGPx8 speed upload speed is about 2100 MBytes/sec. So if anyone with a PCI-express GPU would run the test to compare the result.

ATI x700 DDR(I) 128bit, A64 3000+ S939

if core ratio = 4 (i.e. 800Mhz - min) = 7,5e-4 (sec?)
if core ratio = 9 (i.e. 1800Mhz) 1,2e-3 (sec?)

I can test in PIII800 fx5200, but later.

tsp
29th November 2005, 14:14
Ai : thanks for the report. The time is reported in seconds. Strange that increasing the core ratio slows the download down. The x700 is pci-express?

AI
30th November 2005, 05:27
The x700 is pci-express?
Yes, of course... (buy special for fft3dGPU and upgrate CPU special for FFT3DFilter)

Strange that increasing the core ratio slows the download down
Becouse "CPU more busy memory" (or "memory more busy from CPU" - my English is very bad)

in A64 memory controller integreted in core (more exactly in CPU chip)

PS What about speed? (How many Mb/s on my timings(?))

PPS Why "bt=2 uses the current and next frame",
but "bt=4 uses the two previous frames, the current and next frame"?

ariga
30th November 2005, 07:57
ariga: I don't get any errors with 0.51, fft3dgpu() and a Geforce fx 5200.
Still no change with 0.51 and 5600 Ultra. I'll try installing the latest DirectX update and drivers. Just 9.0c with the d3dx9_27.dll may not suffice. :(

acrespo
30th November 2005, 12:22
fft3dfilter 1.8.4 include muti-plane option (luma + all chroma planes > plane=4). Can be develop in fft3dgpu too?

acrespo
1st December 2005, 05:50
acrespo:the default overlap is ow=bw/2 oh=bh/2 currently that can't be changed. Also there where a bug in 0.5a that assigned the value from svr to degrid. So the default value was 0.3. That might explain it. That is fixed in 0.51. Another difference is the precision used. By default fft3dgpu uses 16 bit floating point precission while fft3dfilter uses 32 bit precision. You can change that by setting useFloat16=false. This slows down the filter and uses more memory on the GPU.


The new 0.51 version degrid is function correctly now. Also I think bw and bh defaults is producing grid. When I try 48 (fft3dfilter defaults) I don't have grid, so I think that change bh,bw defaults to 48 is good.

AI
1st December 2005, 09:14
The new 0.51 version degrid is function correctly now. Also I think bw and bh defaults is producing grid. When I try 48 (fft3dfilter defaults) I don't have grid, so I think that change bh,bw defaults to 48 is good.

RTFM


bw,bh: blockwide and block height. It should be a power of 2 ie valid values is 4,8,16,32,64,128,256,512. Default=32

IMHO

i.e. then you use bw=bh=48 - realy bw=bh=64 (possible)

ariga
1st December 2005, 12:33
Still no change with 0.51 and 5600 Ultra. I'll try installing the latest DirectX update and drivers. Just 9.0c with the d3dx9_27.dll may not suffice. :(

Updated to the latest Nvidia drivers and it works ! Sorry for the trouble. However it's still slow (~4fps). Will update DirectX too and see if it makes any difference.

tsp
1st December 2005, 17:28
PS What about speed? (How many Mb/s on my timings(?))

to find the speed divide 0.39551 (=720*576/1024/1024) with the time i took. So 7.5*10^-4 sec becomes ~530MBytes/sec and 1.2*10^-3 sec is ~330MBytes/sec.

PPS Why "bt=2 uses the current and next frame",
but "bt=4 uses the two previous frames, the current and next frame"?

sorry bt=2 does use the current and the previous frame. An error in the documentation (maybe it did use the next frame in version 0.1?)

Updated to the latest Nvidia drivers and it works ! Sorry for the trouble. However it's still slow (~4fps). Will update DirectX too and see if it makes any difference.

Good to hear. Just curious what version did you use before? Also I think the main reason you are seeing such a low speed is because a Geforce FX 5600 Ultra is very slow. It does only have 2 pixel pipeline(Meaning it can only process two pixel at a time) running at 350 MHz. It doesn't support MRT(Multiple Render Targets) meaning it needs more passes to do the fft (and kalman filtering). The good thing about having a slow videocard is the cpu-utilization should also be very low so it is possible to run some very slow filters before fft3dgpu(like a deinterlacer) or use a slower codec ;)

fft3dfilter 1.8.4 include muti-plane option (luma + all chroma planes > plane=4). Can be develop in fft3dgpu too?

sure no problem (but it will become plane=3 because plane=1 process both the U and V chroma plane)

The new 0.51 version degrid is function correctly now. Also I think bw and bh defaults is producing grid. When I try 48 (fft3dfilter defaults) I don't have grid, so I think that change bh,bw defaults to 48 is good.

As AI said fft3dGPU uses bw=64 and bh=64 instead. Also the default setting is mode=0 that does produce some nasty griding(but is faster). When I implement the variable overlap I think I will use mode=1 as the default. If you use:
FFT3DGPU(sigma=5, bh=32, bw=32, mode=1, sharpen=1.0)
Does the griding appear?

acrespo
1st December 2005, 20:53
I need some more tests but I think mode=1 and useFloat16=false can avoid grids with bw=bh=64. I will take some screenshots to compare side by side with bw=bh=32, but with useFloat16=true I see grids with all bw/bh and modes (less than v0.47 and 0.5a).

I have a doubt about other planes. In readme.txt you wrote about fft3dgpu in plane=0 and other instance in plane=1 can decrease speed more than fft3dfilter. Is it correct to all situation/video cards?

For your information, I have forceware 81.89 and the speed is great.

Fizick
1st December 2005, 21:47
tsp,
IMHO, for FFt3dFilter plane=4 you may consider using plane=4 too,
and for plane=3 consider plane=3 (as alias of your 1 and 2).

tsp
1st December 2005, 21:50
I need some more tests but I think mode=1 and useFloat16=false can avoid grids with bw=bh=64. I will take some screenshots to compare side by side with bw=bh=32, but with useFloat16=true I see grids with all bw/bh and modes (less than v0.47 and 0.5a).

So it seems like it is more the Float16 that are causing it. Could you post a screenshot with the grid artifacts? I made a special version for you that might produce better result with useFloat16=true. Get it here (http://www.tsp.person.dk/fft3dgpu0.51_acrespo_edition.exe)

I have a doubt about other planes. In readme.txt you wrote about fft3dgpu in plane=0 and other instance in plane=1 can decrease speed more than fft3dfilter. Is it correct to all situation/video cards?

I think it mainly was a problem with some of the older versions. It shouldn't cause any problem with the current version. You can also mix fft3dfilter and fft3dgpu and let one of them process the luma plane and the other the chroma plane (just remember to place fft3dgpu after fft3dfilter). BTW what GPU do you use?

IMHO, for FFt3dFilter plane=4 you may consider using plane=4 too,
and for plane=3 consider plane=3 (as alias of your 1 and 2).

Might be a good idea.

acrespo
1st December 2005, 22:46
Well here is some screens using bh=bw=32 and bh=bw=64 and the original without fft3dgpu.
fft3dgpu_screens.rar (http://rapidshare.de/files/8457526/fft3dgpu_screens.rar.html)

edit:Your special version is slight better than v0.51.

tsp
1st December 2005, 23:20
acrespo: I'm not sure that the grid you are seeing is the same grid artifact that I'm talking about. For me it looks like the gridsize is about 4x4 pixels when using bh=bh=32 and if you look closely at the original the 4x4 grid is ever sligtly present. If you want to see how the grid artifacts looks like with fft3dgpu try this (the grid that then appears has a gridsize of bw/2, bh/2):
fft3dgpu(mode=1,sigma=1000,degrid=0.0)
But you are right about the grid disappears when using bw=bh=64. It looks like the the image is more blurry with that setting. What codec is the capture file saved in? It could be that the grid is caused by enhancing the artifacts from the compression.

acrespo
2nd December 2005, 02:02
I always capture with PIC MJPEG 3 quality 19 (or decrease some chrominance and luminance to between quality 18 and 19).

I understood the grid you explain now.

Well I don't understand why bh=bw=64 resolved my problem, because this setting have closely to fft3dfilter with bh=bw=48 (defaults). Can be something wrong with 32 setting?

ariga
2nd December 2005, 10:54
Good to hear. Just curious what version did you use before?Don't know, since I don't have the original CDs right now. The Nvidia tab in graphics panel, didn't display the version earlier. The UI seems to have changed a little now and the version is also being displayed. The good thing about having a slow videocard is the cpu-utilization should also be very low so it is possible to run some very slow filters before fft3dgpu(like a deinterlacer) or use a slower codec ;) You make even the bad sound so good! (Marketing depts anywhere would love to have you :p )
Slower codec ? Hmm... DivX at "Insane quality" ?
Until an upgrade, it's fft3dfilter for me...

Mug Funky
2nd December 2005, 11:13
slower codec like snow or dirac...

x264 is always good (it's pretty fast too).

definitely not divx at insane quality... it's not worth it (the insanity lies in wondering why something could take so long while not looking as nice as an xvid encode...)

puffpio
2nd December 2005, 22:40
x264 w/ Sharktooth's HQ Insane profile... :)

AI
5th December 2005, 13:57
tsp, I have guestions for you... (best phrase on my bad English :rolleyes: )
1) I can't found reduceCPU on last docs
2) I found about you comment "reduceCPU"

3) CPU busy 100% -
--------------
FFT3DFilter(bt=4,plane=0)
FT3DGPU(bt=4,mode=1,plane=1)
--------------
my CPU busy 80% -
--------------
FT3DGPU(bt=4,mode=1,plane=1)
FFT3DFilter(bt=4,plane=0)
--------------
I undestend about it... (You sad about it already)
but earlier 20% busy kernel (in taskmanager)

4) --------------------
i=DePanEstimate(Last,dxmax=24,dymax=0,fftw=True)
Pre2=DePan(Last,i,offset=+2,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)
Prev=DePan(Last,i,offset=+1,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)
Next=DePan(Last,ir,offset=-1,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)

Clip

Interleave(Pre2,Prev,Last,Next)
FFT3DFilter(sigma=5,sigma2=4,sigma3=3,sigma4=2,bt=4,plane=0)
SelectEvery(4,2)

Interleave(Pre2,Prev,Last,Next) # a) Busy 80%
#Interleave(Last,Pre2,Prev,Last,Next) # b) Busy 80%
#Interleave(Last,Pre2,Prev,Last) # c) Busy 100% - Good!
#Interleave(Pre2,Prev,Last,MergeLuma(Next,Trim(1,0))) # d) Busy 100% - Good! - My Idea about a+c (or b+c)

FFT3DGPU(sigma=7,bt=4,mode=1,plane=1)
SelectEvery(4,2) # a)
#SelectEvery(5,3) # b)
#SelectEvery(4,3) # c)
#SelectEvery(4,3) # b)
-------------------

tsp
5th December 2005, 15:12
AI:
1 and 2: I removed reduceCPU in version 0.5 so that is why you can't find it.
3: That is because fft3dGPU is about 6-7 times faster than fft3dfilter in that script so the reason you see a 80% cpu utilization is that fft3dfilter uses most of the time. In this case it might be worth it to set UseFloat16=false to increase the quality. This shouldn't affect the process time very much but try and see:

FTT3DGPU(bt=4,mode=1,plane=1,usefloat16=false)
FFT3DFilter(bt=4,plane=0)

or compare it to this(try useFloat16=false if you have 256 or 512 MB ram on the graphics card):

FTT3DGPU(bt=4,mode=1,plane=1)
FFT3DGPU(bt=4,mode=1,plane=0)


4:
a) look right to me. Might be a little faster like this:

i=DePanEstimate(Last,dxmax=24,dymax=0,fftw=True)
Pre2=DePan(Last,i,offset=+2,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)
Prev=DePan(Last,i,offset=+1,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)
Next=DePan(Last,ir,offset=-1,subpixel=1,matchfields=false,mirror=3).Crop(80,0,-80,0)

Clip

Il=Interleave(Pre2,Prev,Last,Next)
MergeChroma(il.FFT3dFilter(sigma=5,sigma2=4,sigma3=3,sigma4=2,bt=4,plane=0),il.
FFT3DGPU(sigma=7,bt=4,mode=1,plane=1))
SelectEvery(4,2)


acrespo: I think some of the grid might come from interlacing.

AI
6th December 2005, 06:36
next question:

FFT3DGPU().FFT3DFilter() - GPU first, CPU secont (in script, realy on the contrary)

Why v0.47 Busy Kernel = 20% (i.e. wait when work GPU, and CPU busy = 100%)
now (v0.51) CPU idle = 20% (Kernel Busy =1-2%, i.e. I/O only)

tsp
6th December 2005, 11:33
AI: I change the inner working of this filter somehow in version 0.5. The frame is now uploaded to the GPU while the GPU is working on the frame and the number of passes needed to process the frame is also reduced(that might save a switch to the kernel to process the commands to the GPU). But I think it is a good thing that the kernel and cpu utilization is lower now.

AI
6th December 2005, 13:56
ask again: (possible error on your optimize algoritm)

usual script:i=DePanEstimate(Last,fftw=True)
Pre2=DePan(Last,i,offset=+2,subpixel=1,matchfields=false,mirror=3)
Prev=DePan(Last,i,offset=+1,subpixel=1,matchfields=false,mirror=3)
Next=DePan(Last,i,offset=-1,subpixel=1,matchfields=false,mirror=3)

Interleave(Pre2,Prev,Last,Next)
MergeChroma(FFT3DFilter(bt=4,plane=0),\
FFT3DGPU(bt=4,mode=1,plane=1))
SelectEvery(4,2)(then FFT3DGPU ask from AVISynth next frame, work only DePan)

optimize script:i=DePanEstimate(Last,fftw=True)
Pre2=DePan(Last,i,offset=+2,subpixel=1,matchfields=false,mirror=3)
Prev=DePan(Last,i,offset=+1,subpixel=1,matchfields=false,mirror=3)
Next=DePan(Last,i,offset=-1,subpixel=1,matchfields=false,mirror=3)

Interleave(Pre2,Prev,Last,Next)
FFT3DFilter(bt=4,plane=0)
SelectEvery(4,2)

Interleave(Last,Pre2,Prev,Last,Next)
FFT3DGPU(bt=4,mode=1,plane=1)
SelectEvery(5,3)When GPU work in VRAM n-2,n-1,n and n+1 frames...
FFT3DGPU ask from AVISynth frame n+2, (on this script n+1 after Interleave().FFT3DFilter().SelectEvery())
But this script not use 100% CPU

not right,but realy optimize script:i=DePanEstimate(Last,fftw=True)
Pre2=DePan(Last,i,offset=+2,subpixel=1,matchfields=false,mirror=3)
Prev=DePan(Last,i,offset=+1,subpixel=1,matchfields=false,mirror=3)
Next=DePan(Last,i,offset=-1,subpixel=1,matchfields=false,mirror=3)

Interleave(Pre2,Prev,Last,Next)
FFT3DFilter(bt=4,plane=0)
SelectEvery(4,2)

Interleave(Last,Pre2,Prev,Last)
FFT3DGPU(bt=4,mode=1,plane=1)
SelectEvery(4,3)now CPU busy 100%...

And I fount decision:
First script string
"Interleave(Pre2,Prev,Last,Next)" change to
"Interleave(Pre2,Prev,Last,MergeLuma(Next,Trim(1,0)))"
now CPU use 100% and all frames (n+1 too) is compensation.

PS very difficult write on not native language :(

tsp
6th December 2005, 15:17
What about the framerate? Also how does my script above perform?

tsp
7th December 2005, 01:13
from my latest development. Guess what it is (texture is missing).
http://img524.imageshack.us/img524/6992/fft3dgpu3sy.th.png (http://img524.imageshack.us/my.php?image=fft3dgpu3sy.png)

puffpio
12th December 2005, 09:42
from my latest development. Guess what it is (texture is missing).
http://img524.imageshack.us/img524/6992/fft3dgpu3sy.th.png (http://img524.imageshack.us/my.php?image=fft3dgpu3sy.png)
hmm the new plane in fft3dfilter where it process YUV all at once?

tsp
12th December 2005, 23:49
Nope. Compare it to the overlap picture (http://www.avisynth.org/fizick/fft3dfilter/fft3dfilter.html) in the fft3dfilter documentation. Yellow= 4 block overlap. red=2 block overlap and turquoise=no overlap.
the YUV option will be implemented as it is in fft3dfilter so the filter converts:
fft3dgpu(plane=4)
to
fft3dgpu(plane=0)
last.fft3dgpu(plane=1)

puffpio
13th December 2005, 10:17
the YUV option will be implemented as it is in fft3dfilter so the filter converts:
fft3dgpu(plane=4)
to
fft3dgpu(plane=0)
last.fft3dgpu(plane=1)

Is that really how fft3dfilter does it? because in the fft3dfilter doc it has an example for how to do it w/o using plane=4 like this:

YToUV(fft3dfilter(sigma=3, plane=1).UToY,\
fft3dfilter(sigma=3, plane=2).VToY,\
fft3dfilter(sigma=2, plane=0))

Is that equiv to what you are saying is the way to process all planes?

tsp
13th December 2005, 13:18
sorry didn't look closely at the fft3dfilter sourcecode. Fizick implemented it like you said but I don't understand why because it produces the same result as my script just with more copying from one plane to another. Try this script. It should be grey if the result is the same:

src=avisource("f:\20051210-143802.avi")
motion=src.DepanEstimate(trust=2.5, fftw=true)

src.DepanInterleave(data=motion)
YToUV(fft3dfilter(sigma=3, plane=1).UToY,\
fft3dfilter(sigma=3, plane=2).VToY,\
fft3dfilter(sigma=2, plane=0))
a=SelectEvery(3,1)


src.DepanInterleave(data=motion)
fft3dfilter(sigma=3, plane=1)
fft3dfilter(sigma=3, plane=2)
fft3dfilter(sigma=2, plane=0)
b=SelectEvery(3,1)

subtract(a,b).Levels(127, 1, 129, 0, 255)

AI
14th December 2005, 05:39
tsp
What about speed?
first script faster!

Give "filter" with matrix 121 (as Convolution3D but only temporal)
filter.filter = "filter" with matrix 14641
filter.filter.filter = "filter" with matrix [1 6 15 20 15 6 1]

if pre filter = matrix [1] then
1
1 2 1
1 4 6 4 1
1 6 15 20 15 6 1
i.e. triangle Pascal (SelectEvenString :) )

i.e. if use several temopral filters, it more temporal

i.e. needDePanInterleave(...)
filtre1()
selectevery(3,1)
DePanInterleave(...)
filtre2()
selectevery(3,1)
DePanInterleave(...)
filtre3()
selectevery(3,1)orDePanInterleave(prev=3, next=3)
filtre1()
filtre2()
filtre3()
selectevery(7,3)or
if filters "independent"DePanInterleave(prev=1, next=1)
MergeChroma(filtre1(),filtre2())
selectevery(3,1)
PS my English is bad up to this date

tsp
14th December 2005, 13:17
AI: that is what the build in cache is for. So in my script the filterchain really look like this:
src.DepanInterleave(data=motion)
InternalCache()
fft3dfilter(sigma=3, plane=1)
InternalCache()
fft3dfilter(sigma=3, plane=2)
InternalCache()
fft3dfilter(sigma=2, plane=0)
InternalCache()
b=SelectEvery(3,1)
Most of the pascal triangle is in the cache so the same amount of work is done by fft3dfilter compaired to the YToUV approach just with less copying from one colorspace to another=second script is faster.
[EDIT]
sorry you're right. The InternalCache reduces the number of extra calls to fft3dfilter(plane=2) and fft3dfilter(plane=1) to 4. But the YtoUV is still inefficient with the copying from one plane to another. I will implement it better in fft3dgpu so they write to a common frame.

tsp
16th December 2005, 02:49
new version ready:
Added wintypes, plane=4 and variable overlap size (ow,oh). Change useFloat16 to precision. Changed default value for mode to 1

in the next version I will see if I can add support for interlaced frames (time to experiment with the stencil buffer).

puffpio
16th December 2005, 03:32
AWESOME..will try it out tonight (w/ my 5900 non ultra...hopfully still faster than using fft3dfilter)

puffpio
16th December 2005, 09:28
FFT3DFilter(sigma=3, plane=4, bt=4, degrid=1, sharpen=0.7)
2.6FPS encoding with x264 first pass

FFT3DGPU(sigma=3, plane=4, bt=4, precision=1, degrid=1, sharpen=0.7)
3.7FPS encoding with x264 first pass

AWESOME!
Athlon XP 3000+, Geforce 5900

tsp
16th December 2005, 13:34
Forgot to add support for the Geforce FX 5xxx in variable overlap. That is fixed now.

puffpio: Hopefull that is not a 4 hour video you encode with that blazing speed ;)

tsp
16th December 2005, 14:39
:angry: Forgot to change the default for mode to 1. Changed that and reuploaded the file. (I couldn't understand how puffpio could run that script with only 128 MB ram if mode=1 but that was because of that little error. So two bugs fixed thanks to puffpio)
I guess that this thing happends when you release a new version at 3 AM.

puffpio
19th December 2005, 06:59
well..what worked with 0.6 doesn't work with 0.6.1

video = video.FFT3DGPU(sigma=3, plane=4, bt=4, mode=1, precision=1, degrid=1, sharpen=0.7)

I tried setting precision to 0 and bt to something smaller but it still doesn't work (thinking I was attempting to use more video memory than I have)

it looks like only the top row of macroblocks gets written, and everything else turns out black

puffpio
19th December 2005, 07:01
btw I set the plane to something else like 0 or 1, the result seems to only be one plane (ie the planes don't get recombined)

tsp
19th December 2005, 14:05
puffpio: I get the same error on my Geforce fx 5200. Will try to see what goes wrong and fix it.

tsp
19th December 2005, 15:41
ok I sort of figured out what the problem is. The Geforce FX doesn't support repeating a non power of two texture so the analysis window only got applied to the first block. The wierd thing is that the texture that the analysis window is stored in is a Power Of Two texture so it should work but it doesn't.
The radeon 9x00 also have the same limitation so if someone with a radeon 9x00 would try to see if they get the same error I could figure out if it's a bug in the driver or my code.

ok know I know whats wrong. Always a good thing to read the manual. From nvidia's gpu programming guide:
A32B32G32R32F*
*Exposed in DX9.0c without wrapping or mipmapping capability
will make a fix for that.

TEB
20th December 2005, 12:06
Hi. I started testing ure filter on my ATI x700 pcie GFX card.. works fine.. But i have some questions i hope someone can anwser in this thread:
1.How do u benchmark the fps of the encode besides taking the time manually?
2.My source material is of a very noisy kind, interlaced (all frames are interlaced, no need for ivct), in a framebased structure. Any reccomendations for a fast interlacer that would work good with fftgpu noise removal? Should one deinterlace before or after fftgpu does its work?

best regards teb

tsp
20th December 2005, 16:30
1) Sometimes I add this to my script for shorter clip:

l=last
global ts="%X"
WriteFile(l,"time.txt","current_frame",""" " " ""","Time(ts)",append=false)

this will create a file called time.txt that contains the time each frame where created so subtracting the first frame time from the last and divide it with the number of frames produces the framerate (that will be a little lower due to the overhead but for relative difference that doesn't matter.). Else there are two filters Kronos and AvsTimer that can be used.
2. you should deinterlace before fft3dgpu. LeakKernelDeint (http://forum.doom9.org/showthread.php?t=81322&page=1&pp=40) and TDeint (http://forum.doom9.org/showthread.php?t=82264) are two good deinterlacers else take a look at this (http://forum.doom9.org/showthread.php?t=101395) thread (please don't turn this thread into a discussion about with deinterlacer is best). And remember if your cpu utilization is not 100% when encoding with fft3dgpu it is safe to use slower filters before fft3dgpu.

TEB
20th December 2005, 16:40
1. Thx, ill check that out..
2. Np, ill not turn it into a deint thread :) I just want the best possible baseline for ure filter to work on :)

My current test is :

MPEG2Source("h:\46391.d2v")
tdeint()
fft3dGPU(bt=3,sigma=2,precision=2) which works pretty good on my ATI x700 and P4 3,6EE with HT on. The noise in the picture is gone, but i need to sharpen it a bit and try to kill some of the colour bleeding..
Keep up the good work.. Ill retest on my machine at home (nvidia 7800gt+dualcore amd)

aberforthsgoat
20th December 2005, 16:49
Say -

Has anyone had any luck getting the filter to run in real time? I have Radeon 9500 that I've softmodded and overclocked - but mostly just for the heck of it, since all it's doing is spitting out DVDs from zoomplayer. So it seems like using fftgpu would be a grand chance to make it work for its keep while I enjoy myself.

My first tests haven't been very encouraging, though. I get the impression that it's not very happy about playing along with zp. In overlay and VMR9 normal, it worked, but with a very peculiar stutter. When I tried to jump out to renderless, I got a crash.

Any hope here?

Mike

tsp
20th December 2005, 21:27
TEB: please report back what framerate you're getting with the latest version of fft3dgpu and a geforce 7800 GT. I'm really curiuous how fast that is. Try the build in sharpening in fft3dgpu(sharpen=1) or lower it if it's to much.

aberforthsgoat: The framerate are a little unstable on my machine to. I captured a screenshot with zoneplayer, FFT3DGPU(sigma=8,bt=1, mode=0, precision=0, nvperf=true) and NVPerfTool.
http://img45.imageshack.us/img45/6307/zp6mt.th.png (http://img45.imageshack.us/my.php?image=zp6mt.png)
The yellow line is the time per frame. It should be 0.40 sec or below for 25 FPS and as you can see the line is not very stable. I don't know what causes this (yet).
Also could you be a little more specific about what you do to crash zoneplayer?

tsp
21st December 2005, 01:08
puffpio: I made a new version that should fix the error with mode=1. Unfortunately I'm stil getting artifacts with ow or oh values other than the default also the chroma plane cleaning is somewhat bugged (very high values of sigma should result in a greyscale frame but with the geforce fx it result in a green frame.). I can't reproduce these two errors on my geforce 6800 and it is not clear what is wrong (like the other error).
You can try the new version here:
http://www.avisynth.org/tsp/fft3dgpu0.6.1.9.exe
and if someone with a radeon 9x00 couldt test if the following produces a greyscale image or a green image:
fft3dgpu(sigma=2500,plane=1,mode=1)
and this one produces black boxes:
fft3dgpu(plane=0,mode=1,ow=8,oh=8)
with the above version.

puffpio
23rd December 2005, 01:07
I will test it over the weekend...no time to spend doign fun stuff at home till then :P

puffpio
25th December 2005, 10:27
tried the new version and it works now
although gridding is more pronounced than it used to be

I used: FFT3DGPU(sigma=3, plane=4, bt=4, mode=1, precision=1, degrid=1, sharpen=0.7)

The video is 512x384 so somehow it manages to work w/ 128mb of video ram

tsp
25th December 2005, 13:37
puffpio: What setting did you use before, that produced less griding?

puffpio
25th December 2005, 18:51
I used the exact same setting as before

well, you didn't have a plane 4, so I used a 2 step process with both planes, luma plane first followed by the chroma planes. sigma, bt, precision, degrid, and sharpen are all the same

BigDid
25th December 2005, 19:58
puffpio: ...and if someone with a radeon 9x00 couldt test if the following produces a greyscale image or a green image:
fft3dgpu(sigma=2500,plane=1,mode=1)
Not completely greyscale, more greys for sure and greenish sometimes

and this one produces black boxes:
fft3dgpu(plane=0,mode=1,ow=8,oh=8)
with the above version.
No black boxes

I also tried Puffpio script: not working. Extracted this one that works: FFT3DGPU(sigma=3, plane=4, mode=1, degrid=1, sharpen=0.7)

GPU is an Asus 9600 pro, 128Mb ram, overclocked: 418/594
Hope that helps, continue the good work, happy holidays to you.

Did

tsp
25th December 2005, 22:56
puffpio: ok I will try to see if I forgot to enable something. It might just be the change in default values. useFloat16=true is equal to precison=0 and UseFloat16=false is equal to precision=2 and precision=1 is a new option. Also mode=0 was the default. Try and see if some of these settings make any difference (or try wintype=1 or 2).

BigDid: Thanks for reporting. So it seems to work fine on the radeon. (Could you post a screenshot of this scirpt? BlankClip(color_yuv=$7c7c7c,pixel_type= "YV12").fft3dgpu(sigma=2500,plane=1,mode=1))

I will continue working on this filter when I get back from the holidays.

BigDid
26th December 2005, 03:26
Sure,

It's not green, it's not grey, it's in between, see 640*480 attached jpg. :)

Did

puffpio
26th December 2005, 09:29
hmm maybe that's why...i thought precision = 1 is the 32 bit float mode...

puffpio
26th December 2005, 09:39
http://img365.imageshack.us/img365/889/snapshot200512260037007uv.jpg

this is the artifact i'm noticing..it looks like vertical banding, when I comment out the 3dfilter, the banding goes away....here is my full avisynth script:

-------------------

LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")

video = mpeg2source("srf0001.d2v")
video = video.DeDot()
interp = video.separatefields().selecteven().EEDI2(field=1)
video = video.tdeint(order=1, field=1, edeint=interp)
video = video.FFT3DGPU(sigma=3, plane=4, bt=4, mode=1, precision=0, degrid=1, sharpen=0.7)
video = video.Lanczos4Resize(512, 384)
video = video.ColorMatrix()

return video

InsulinJunkie
26th December 2005, 11:15
this is the artifact i'm noticing..it looks like vertical banding


I started getting that on the newest versions, too, with a Radeon 9700 and latest ATI drivers. Lowering the sharpening a bit - to about .50 - helped somewhat in my case.

My files are usually old B&W movies, captured from analog cable to MJPEG (Q=19). (Sorry, I don't have any projects on my hard drive at the moment, so I can't post a screenshot.)

After IVTC, I usually do something like:
-----------------------------------------------------
Greyscale()
Undot()
DeGrainMedian(limitY=3,limitUV=0,mode=1,norow=true)
DeGrainMedian(limitY=3,limitUV=0,mode=1,norow=true)
FFT3DGPU(sigma=3, bt=3, mode=1, sharpen=0.7)

tsp
26th December 2005, 13:13
I can't do something about before I get back from my vacation but I think I know what is wrong (misalignt texture). Wintype=2 might help.

Dark Alchemist
1st January 2006, 11:24
fft3dGPU is unavailable because avisynth.org STILL has exceeded their bandwidth limits.

Really we need to get a mirror up or get these plugins off of that site because today Jan 1 marks over a week I have been trying to get this plugin and no copies exist on the net (that I could find) outside of that site. That is a pity.

Wilbert
1st January 2006, 14:57
Really we need to get a mirror up or get these plugins off of that site because today Jan 1 marks over a week (...)
We need to discuss that when Richard is back.

Btw, the latest fft3dGPU i have is 0.5 (i don't think it is the most recent one):

http://www.geocities.com/wilbertdijkhof/fft3dgpu_05.zip

tsp
1st January 2006, 16:23
You can get version 0.6.1.9 from www.tsp.person.dk/fft3dgpu0.6.1.9.exe until avisynth.org gets back online.

Dark Alchemist
1st January 2006, 19:27
thank you thank you. :)

edit: OMG. :O

FFT3dFilter(bh=32, bw=32, oh=16, ow=16, sigma=1, plane=3) so low media player was having to drop down to a point I was getting 5 frames instead of 1 so was 5, 10, 15,... instead of 1,2,3,...

FFT3dGPU(bh=32, bw=32, oh=16, ow=16, sigma=1, plane=3) was 30fps with not a dropped frame one on my 9800pro AMD 2700+

I am impressed but it is so high (in real time) I wonder if I did something wrong.

I am starting to see a picket fence on FFT3dGPU(sigma=15). You know that picture you drew? I see that pattern on my work but not when using FFT3dFilter.

Any ideas?

Revgen
1st January 2006, 20:17
Try precision=2 and see what happens. This will run FFT3DGPU in fp32 instead of fp16.

Also set degrid=1.0

FFT3DFilter always sets degrid to this default.

tsp
1st January 2006, 21:14
Dark Alchemist: the default value for ow and oh is half the bw,bh. The fence appears because there are a bug in the current version and I still have to exams left before I will fix that (but don't worry. The last exam is the januar the 4.).
Until then try wintype=2 or download version 0.6:
http://www.tsp.person.dk/fft3dgpu0.6.exe
and remember to use mode=1.
FFT3dGPU(bh=32, bw=32, mode=1, sigma=1, plane=3)

Dark Alchemist
2nd January 2006, 11:15
Will do and as I said it is a damn nice piece of work you have.

See I have been saying for about 2 years that people could off load stuff to the video cards like this does and achieve a remarkable speed increase. So, I feel good to see it finally done to some degree. :)

FFT3dGPU(mode=1,wintype=2,precision=2,degrid=1.0,bh=32, bw=32, sigma=30) I have used all sorts of combinations of this and only wintype gets rid of the grids *BUT* it leaves a weird type of ghost as if my source went from 25mbps down to 2kbps.

I am going to try .6 now and see if it works.

I can report that .6 still has the grids as does .6.1

tsp
2nd January 2006, 18:54
Hmm it does look like there is something wrong with degrid. It's a larger gridsize than the one that appears with degrid=0.0 . Will try and see if I can fix that.

tsp
3rd January 2006, 15:56
I found the error.
the fix until I release the next version is to open the file fft3dgpu.hlsl that are in the
same directory as fft3dgpu.dll (usual the avisynth plugin directory) in a texteditor and go to line 574 where the following text:

float4 Minimize( PS_INPUT In) :COLOR
{
return tex2D(Src,In.texCoord);
}

should be changed to

float4 Minimize( PS_INPUT In) :COLOR
{
return tex2D(Src,In.texCoord).xyxy;
}



See I have been saying for about 2 years that people could off load stuff to the video cards like this does and achieve a remarkable speed increase. So, I feel good to see it finally done to some degree.

thanks for the kind word currently it's only some of the floating point heavy filters(like most of fizicks filters) that will benefit from the fast GPU but as the videocards gets faster I think more filters could benefit from offloading work to the gpu. But it is still difficult to program GPU filters compaired to the normal cpu only filters.

Dark Alchemist
3rd January 2006, 16:43
Do the drivers get in the way of your work or are you shielded from them via an api like directx? Would directx just complicate matters ever worse?

Nothing worse then every month having to worry if the latest driver updates from ATI/Nvidia will bust what you had previously done.

My main theory is that off loading 3d rendering so the GPU can share with the CPU would greatly increase the speed of working in something like Maya. This filter proves, to some extent, that to do that would help but by how much I do not know.

tsp
4th January 2006, 00:48
Do the drivers get in the way of your work or are you shielded from them via an api like directx? Would directx just complicate matters ever worse?

Nothing worse then every month having to worry if the latest driver updates from ATI/Nvidia will bust what you had previously done.

My main theory is that off loading 3d rendering so the GPU can share with the CPU would greatly increase the speed of working in something like Maya. This filter proves, to some extent, that to do that would help but by how much I do not know.
Currently I use directx so different driver version isn't such a big problem because the directx api doesn't change with each driver version(and it seems like the directx driver is more stable than OpenGL) unlike openGl where new extensions can be added. This means that new features are faster made available but it is difficult to program for both nvidia and ati hardware.
A bigger problem is that the different GPU support different features and produces slightly different result making it rather painfull to make sure this filter works on most directx 9 hardware(especially the geforce fx is giving me some headache).
Also it is more difficult to debug the program and more stuff can go wrong(like misalignt textures).

As the GPU gets faster there should be a good chance that more application will use it as a coprocessor (take a look at www.gpgpu.org for some different implementations(including 3d rendering))

Dark Alchemist
4th January 2006, 01:24
I will look at that link shortly but I must report that I am getting some picket fences still even with your fix (especially if I lower bw and bh). :(

Oh, and one other thing when, if ever, will this command be available in gpu (meaning all of these choices)?

fft3dfilter(sigma=3, sigma2=5, sigma3=10, sigma4=20, plane=0, bt=3, bw=16, bh=16, ow=8, oh=8, sharpen=0.3, smin=20, smax=1000, wintype=2, kratio=1.0, measure=true, interlaced=false, degrid=1)

tsp
4th January 2006, 21:36
I will look at that link shortly but I must report that I am getting some picket fences still even with your fix (especially if I lower bw and bh). :(

same here. I hope the fix will be just as easy.


Oh, and one other thing when, if ever, will this command be available in gpu (meaning all of these choices)?

fft3dfilter(sigma=3, sigma2=5, sigma3=10, sigma4=20, plane=0, bt=3, bw=16, bh=16, ow=8, oh=8, sharpen=0.3, smin=20, smax=1000, wintype=2, kratio=1.0, measure=true, interlaced=false, degrid=1)
well the only thing missing is the different sigma values. In the next version interlaced will be supported. Also measure wouldn't be nessecary because fft3dgpu doesn't use fftw.

Dark Alchemist
4th January 2006, 23:04
Cool beans but right now the two main concerns are (in order) the picket fences and the different sigmas.

Keep up the good work. :)

Oh, I looked at that link and very interesting and I can imagine in 1-2 more years when the newer cards come out that are made for trig/physics (supposedly they will come out on the video cards very soon).

Dark Alchemist
7th January 2006, 23:59
Seems we are closer than I thought to the physics cards (still I give it 2 years before everyone that counts has one).

http://www.devhardware.com/c/a/Video-Cards/Physics-Processing-Unit

MfA
8th January 2006, 01:22
The manufacturer has never even given the slightest hint that they will expose the programmability of the PPU, it seems unlikely it will happen since they want to make money on the software side too. Even if they weren't so suicidally proprietary I doubt PPUs would be a big hit.

With stream output DX10 level hardware will be able to implement most image filters. That's far more interesting for us than PPUs.

Dark Alchemist
8th January 2006, 04:06
I dunno the industry does seem hyped about the PPU's though and besides is DX10 going to be for we who refuse to downgrade to Vista and stay on XP?

Vista may make me switch my desktop over to Linux I hate it so badly (mostly because it is a hog and is too controlling concerning stuff doom9 talks about etc...).

MfA
8th January 2006, 18:39
Without a way to program them they won't do us any good. OpenGL extensions will probably expose everything DX10 does too.

Dark Alchemist
8th January 2006, 19:55
They should allow us to program them since it is to off load all of the math the games use for physics.

We will see how it goes because if they slap a PPU onto the card with no way to program for it then it would serve very little.

MfA
8th January 2006, 21:26
If you want to use the PPU you have to use the PhysX SDK. That's how you use it for physics, and that's why you can't use it for anything else.

lexor
14th January 2006, 19:21
hey is it a known bug that switching users under WinXP causes fft3dgpu to blow up in your face? I'd think people with winxp would notice by now :)

tsp
15th January 2006, 02:46
hey is it a known bug that switching users under WinXP causes fft3dgpu to blow up in your face? I'd think people with winxp would notice by now :)
That bug should be fixed after version 0.46.

lexor
15th January 2006, 06:41
That bug should be fixed after version 0.46.
you mean upcoming 0.46.0 or old 0.4.6? if the later than I have 0.6.1 and I still get insta crash if I switch users.

tsp
16th January 2006, 02:04
lexor I can't reproduce it at my end so please post your script, program and graphics card used and driver version.

lexor
16th January 2006, 15:25
I use gForce 6600 GT (no overclock or anything) with nv drivers ver.81.98 under Windows XP SP2. I use x264 through MeGUI

mpeg2source("path")
leakkernedeing(order=1)
crop(0,0,0,-8)
fft3dGPU(sigma=2, plane=4,sharpen=0.7)


encode goes flawlessly and I can switch users if I remove fft3d instruction, otherwise switch user causes crash, but encodes no problem if I don't switch and let it finish.

tsp
2nd February 2006, 19:43
version 0.6.2 is released. Degrid works better and vertical banding is gone when using mode 1. Right edge artifacts gone when using non mod 8 width and plane>0.

puffpio
2nd February 2006, 20:39
thanks so much!

Fizick
2nd February 2006, 22:17
tsp,
did you fix FFT3dGPU only, or these bugs exist in FFT3DFilter too?

tsp
2nd February 2006, 22:33
tsp,
did you fix FFT3dGPU only, or these bugs exist in FFT3DFilter too?
They were only in fft3dGPU. Don't worry I will tell you if I find any new bugs in fft3dfilter.

Boulder
6th February 2006, 15:37
FFT3DGPU won't work with HC v0.17. It could be HC specific as it works with v0.16 but when I reported the problem to hank315, he said that he couldn't get FFT3DGPU working on his card, GF5200FX IIRC. Maybe you could work something out together?

OEG
6th February 2006, 19:39
Most processing on interlaced material is done on the separate top and bottom field streams.
Is FFT3DGPU capable of running on two streams in parallel like this?

SeparateFields()
Top=SelectEven().SomeOtherProcessing().FFT3DGPU(parameters)
Bottom=SelectOdd().SomeOtherProcessing().FFT3DGPU(same set of parameters)
Interleave(Top,Bottom)
Weave()

Or is it better to run the filter like this?

SeparateFields()
Top=SelectEven().SomeOtherProcessing()
Bottom=SelectOdd().SomeOtherProcessing()
Interleave(Top,Bottom).FFT3DGPU(parameters)
Weave()

For SomeOtherProcessing() read "resize", etc."

My computer has a P4 Prescott, and hyperthreading is on.
The video card has a Radeon 9800 on AGP bus.

Thanks in advance.

tsp
6th February 2006, 20:24
Boulder: I got the same error with HC 0.17.

OEG: for now use the first version else you will blend the two fields if bt>1 unless you run out of gpu memory. In the next version support for interlaced frames should be added so you can use this:

SeparateFields()
Top=SelectEven().SomeOtherProcessing()
Bottom=SelectOdd().SomeOtherProcessing()
Interleave(Top,Bottom)
Weave().FFT3DGPU(parameters,interlaced=true)

tsp
8th February 2006, 11:45
Found what caused the error with HC 0.17. Will be fixed in the next release.

OEG
12th February 2006, 23:11
The Radeon 9800 card in my computer has 128 MB, and when I want to use any more complicated FFT3dGPU filtering than default settings on separated fields I get an error message which I think has to do about memory.

Since I haven't found any specs on memory usage and consumption by FFT3dGPU I am curious to its requirements.

tsp
13th February 2006, 01:37
it depends on what resolution the clip has. Higher resolution=more memory usage. Increasing bt, higher precision, mode=1, higher bw,ow,bh,oh, using sharpen and/or degrid also means higher memory usage. Every instance of fft3dgpu uses increases the memory used. So you can never have to much (gpu) memory.

bira
4th March 2006, 21:57
Why does this make my video shake up and down?

separatefields()
vid_e=selecteven()
vid_o=selectodd()
vid_e=FFT3DGPU(parameters)
vid_o=FFT3DGPU(parameters)
interleave(vid_e,vid_o)
Weave()

Why does this NOT make my video shake up and down?

SeparateFields()
Top=SelectEven().SomeOtherProcessing().FFT3DGPU(parameters)
Bottom=SelectOdd().SomeOtherProcessing().FFT3DGPU(same set of parameters)
Interleave(Top,Bottom)
Weave()

Thanks!

foxyshadis
4th March 2006, 22:26
Your first script is wrong, you left a few variables off:

vid_e=vid_e.FFT3DGPU(parameters)
vid_o=vid_o.FFT3DGPU(parameters)

Thus you're filtering the separatefields() output in both, which mucks things up.

bira
5th March 2006, 04:18
Thanks!

zlab
5th March 2006, 16:35
For YV12 format, what is the suitable plane=? if I also want to process the color?

Boulder
5th March 2006, 16:59
plane=0 filters luma
plane=1,2 or 3 filters both chroma channels
plane=4 filters all channels

tsp
12th March 2006, 01:30
I did a small speed test with my new computer with an Gainward Geforce 7800GT Golden Sample Goes like Hell (core/mem clock = 450/1300 MHZ) and an opteron 165 overclocked at 2250 MHz (stupid motherboard will only give me 50 milivolt extra so that is why it's not clocked higher).
the source was a 720x576 simpsons clip.
the following script where used (fft3dgpu version 0.6.2, fft3dfilter version 1.8.5 and mt version 0.5):

AVISource("e:\sim.avi").converttoyv12().trim(65410,-2000)
FFT3dGPU(mode=1,bt=4,precision=2,sharpen=1,degrid=1,bw=64,bh=64,plane=4)

fft3dgpu: average 11.4 fps

AVISource("e:\sim.avi").converttoyv12().trim(65410,-2000)
mt("FFT3dfilter(bt=4,sharpen=1,degrid=1,ow=32,bw=64,oh=32,bh=64,plane=4)")

fft3dfilter+mt: average 3.7 fps

AVISource("e:\sim.avi").converttoyv12().trim(65410,-2000)
FFT3dfilter(bt=4,sharpen=1,degrid=1,ow=32,bw=64,oh=32,bh=64,plane=4)

fft3dfilter: average 2.3 fps


AVISource("e:\sim.avi").converttoyv12().trim(65410,-2000)
s.FFT3dGPU(mode=1,bt=4,precision=2,sharpen=1,degrid=1,bw=256,bh=256,plane=4)

average 5.8 fps (it has 512 mb memory. A very nice card)

AI
12th March 2006, 20:59
tsp
talanted works!

Once more question:
Have you plan to implement in GPU all my other plugins? :D
What you think about GPU version DePanEstimate?
1) DePanEstimate use FFT too
2) DePanEstimate upload more than download
or possible include on fft3dGPU
full algoritm with "compensation of global motion":mdata=DePanEstimate
DePanInterleave(Last,data=mdata, prev=2, next=1)
fft3dfilter(bt=4)
selectevery(4,2)more ideas about future development:
- What I know, new GPUs can Code in MPEG2/4
- most time need for find similar blocks
What you think about use GPU for mvAnalyse?

Boulder
13th March 2006, 07:15
What you think about use GPU for mvAnalyse?
I think porting MVTools would be really useful, if it just is possible at all :)

Backwoods
13th March 2006, 08:40
That would be great if possible.

tsp
14th March 2006, 18:52
VagueDenoiser would be the "easiest" filter to make a gpu version of because it is similair to fft3dfilter and the source is GPL'ed.
DepanEstimate is harder to do because the source is not public available so I would have to guess how the filter is implemented(and it is not based on an article like fft3dfilter) and the current GPU fft is limited to power of 2 size(2,4,8,16,32,64,128,256,512 etc).
While I have read about gpu version of motion compensation it would require a lot of work to implement. And the tool for MPEG4 encoding on the gpu by ATI still does the motion compentaion/estimation on the cpu also the videoengine build in the latest GPU from nvidia and ati is not programable.

AI
14th March 2006, 20:25
tsp:
the current GPU fft is limited to power of 2 size(2,4,8,16,32,64,128,256,512 etc).DePan manual:
winx - number of columns (width) of fft window (must be power of 2 if not fftw, default = maximum within frame width).
winy - number of rows (height) of fft window (must be power of 2 if not fftw, default = maximum within frame height).that I know, realy DepanEstimate always use "power of 2", if not "use hands for change it"
(i.e. always default)

ATI say that them GPU x1000 serial is physical coprocessor
(i.e. can be if use)
possibe in Radeon x1000 can be use for over development...

tsp
15th March 2006, 15:30
ATI say that them GPU x1000 serial is physical coprocessor
(i.e. can be if use)
possibe in Radeon x1000 can be use for over development...
they still ned to expose it somehow to the developer

hwti
16th March 2006, 16:13
I have a problem with FFT3dGPU and x264 CLI.
I don't know if the problem is related to x264 or FFT3dGPU, but if it is x264, it is probably linked to something uncommon in this filter

I use a simple script :
MPEG2source("...")
LeakKernelBob(order=1)
FFT3dGPU(sigma=2,bt=1,mode=0)

I only get 20fps in pass 1 with only 55% CPU used (sharktooth HQ-Slow profile), without FFT3dGPU I get 33fps (with 100% CPU)
In pass 2, I get 8.16fps instead of 10fps. (with 85% CPU)

I tested the avs script in virtual dub in direct stream copy mode : 64 fps
So I conclude that my 6800GS isn't the problem

I tested in virtualdub using x264 vfw (I can't test with same settings, since I don't understand the link between all vfw parameters and MeGUI/CLI parameters)
I always get 100% CPU with vfw interface.

Did someone have this problem or an explanation ?

PS : In all tests my 6800GS was in 3D high-speed mode (clocks 425/500)

tsp
16th March 2006, 18:32
it might be because that x264 CLI is singlethreaded so that the x264 encoder must wait on fft3dgpu to finnish each frame and while fft3dgpu works the cpu isn't used very much that would explain the low cpu utilization. Virtual dub is multithreaded so one thread runs the AVS script and produces frames for the other thread that encodes them usinf x264. This releases the free cpu time from the AVS thread to the x264 codec. So try and see if you can get the x264 CLI developeres to confirm if that is the case and change it if so.

aichan
21st March 2006, 01:44
tsp, fft3dgpu is not support for interlaced video yet. but if i deinterlace the video using TDeint and then denoise it with fft3dgpu, would it work fine??

so the script look like this :
...
TDeint()
FFT3dgpu()
...

edit : script sample

Boulder
21st March 2006, 07:11
Yes, it will work just fine.

aichan
25th March 2006, 14:37
okay, then i'll try it. thx..

Boulder
27th March 2006, 07:14
tsp,

could you please release the version which works with HC v0.17? It appears that the problem with the ffdshow, AVISource and HC combo is fixed in v0.17 but I can't use it until FFT3DGPU works since I need it for fast chroma denoising;)

Mug Funky
27th March 2006, 07:38
not sure if this has been reported yet, but there's a bit of a bug when running:

fft3dgpu(bw=8,bh=8,ow=0,oh=0,bt=0,sigma=xxx,plane=xxx) where xxx is any number you care to think of.

the 8x8 blocks seem to get put back together in the wrong order. it's quite strange.

i'm running it on a nvidia 6600GT, PCI-e (nicely enough i have the same card at work and at home, but i've only tried this on the work one).

tsp
27th March 2006, 17:25
Boulder: sure but you will have to wait until saturday before I can compile it.

Mug Funky:; I didn't expect anyone to set ow or oh to zero so it is kind of unsupported but I will see what I can do about it. (just curious doesn't it produce a lot of grid artifacts or is it part of a more complicated script?)

Mug Funky
30th March 2006, 06:55
more a matter of seeing how fast it can go. the grids aren't bad if the sigma is low, and bt=0 gets a lot of smoothing out of a low sigma.

of course, for stuff i care about overlapping is a must. i was just playing with it to see what i could get out of it. if you set the block sizes really small (2), then it acts like a basic temporal filter, which can be fun to have on a GPU. of course it's not the best usage for a filter like this...

tsp
1st April 2006, 21:05
new version that should fix the HC 0.17 bug. version 0.6.2.1 (http://www.avisynth.org/tsp/fft3dgpu0.6.2.1.exe)

Boulder
1st April 2006, 21:07
Thanks!

:)

Firesurfer
5th April 2006, 07:34
Thank you, too! :thanks:

I was waiting for that...

swaaye
3rd May 2006, 03:53
FFT3DGPU is only hitting my dual core at 50%. Is this right? I don't understand why Divx isn't even using some of the 2nd core with FFT3DGPU in use. It's like it restricts everything to a single thread. I disable FFT3DGPU and I get back up to 100 fps, with it I can't do better than 25 fps!


MPEG2Source("aaa", idct=3)
tfm(d2v="aaa")
tdecimate(hybrid=1)
FFT3dGPU(sigma=2,bt=3,sharpen=0.7,precision=1)
Crop(2,0,-2,-0)
BicubicResize(640,352,0,0.75)


I'm running a dual core Opteron 165 @ 2.6 GHz. Radeon X850 XT. Playing the .AVS back in MPC shows that it can definitely playback at realtime 24fps. I suppose the video card could be maxed out.

edit: with precision at 0 I get 40-50fps. CPU usage is slightly higher. I figured that since my GPU is the bottleneck I'll use the extra CPU cycles for higher DIVX quality settings.

TSP you should post on the Beyond3d.Com forum about optimizing the shader code. A lot of engineers from ATI and NV, along with some extremely talented graphics programmers, hang out there and I bet they'd welcome a challenge with such an ingenious use of their hardware. :)

swaaye
3rd May 2006, 19:34
I ran into a strange problem last night. One the 2nd pass of my 2nd encode I lost half of my framerate. I went back and re-ran the first encode and it was also half speed. Rebooted, no help. Reset video driver settings to defaults. Nothing. It seems to be FFT3DGPU that's causing the issue, somehow the video card and it aren't getting along now. I am totally baffled. I underclocked and overclocked my GPU and saw no speed change.

Tonight I will reinstall drivers for the video card and see if that helps. Sorta bummed here cuz it was going so well at 50 fps, but 30fps just isn't going to cut it for how many things I have to encode.

tsp
3rd May 2006, 19:59
swaaye: The only limit FFT3dgpu has about restriction multithreading is it only allows 1 thread to execute code inside fft3dgpu. This shouldn't cause any problems so as you noted the limiting factor might be your GPU. It also depends on what program you use to encode with as some are only singlethreaded. VirtualDub works well as the encoding codec and avisynth runs on different threads.
As you have a dualcore processor you shouldn't expect to get 100% cpu utilization unless you're using a multithreaded codec as fft3dgpu alone rarely will use 50%.
As for optimizing the slowest part of my gpu code is the fft. It relies heavly on more or less random texture lookups so it is very bandwidth limited. I'm working on an improved version that shouldn't requere as many texture lookups and should have more linear texture reads.

About your second problem I don't know how fft3dgpu should cause that. Is the framerate stable or does it fluctuate a lot?

AI
3rd May 2006, 21:05
swaaye:
good idea for fast CPU and fast GPU
first - Luma in CPU
second - Chroma (U and V) in GPU
tsp
no problem with it, I am only recommend ;)

swaaye
3rd May 2006, 21:39
About your second problem I don't know how fft3dgpu should cause that. Is the framerate stable or does it fluctuate a lot?

I don't know what happened. It has me totally baffled. I didn't change anything between the encodes. Same settings for all. I use StaxRip for encoding and that uses VDubmod. It's definitely multithreaded. I've been encoding with it for months now and I can usually pull 90-100fps with what I'm doing and multithreaded Divx 6.2.

FFT3DGPU dropped me to exactly 50% CPU when I enabled it with the settings above. So, it was doing something making DIVX not use the 2nd core at all. I upped the DIVX quality settings in the codec and managed to pull 80-90% usage while maintaining the same encoding 40-55fps framerate. This worked for 1.5 encodes, on the second pass of the 2nd encode it dropped to 35fps inexplicably.

Now, I can not get that speed back at all and it is using 50% CPU no matter what. I am totally baffled. GPU clock speed had little to no effect which was extremely strange, signifying some other problem. Disabling FFT3DGPU in the filter stream brought speed up to the normal 100fps with both cores working. So it's gotta be something between the video card and the software.

Like I said I'll try reinstalling the video drivers tonight. I updated DirectX 9c to the April 2006 release. Could that be a prob? It worked fine for 3 passes of Divx though.

tsp
3rd May 2006, 21:46
AI: what is wrong with

fft3dfilter(plane=0)
fft3dgpu(plane=1)

??

swaaye:
How does it behave if you replace fft3dgpu with fft3dfilter? Does it makes any difference using an older version of fft3dgpu? What if you use VDub without StaxRip? Installing the april edition of Dx shouldn't make any difference(as it only installs a single dll file that doesn't overwrite older versions). Has the cpu affinity been changed somehow so it only runs on 1 core (look in the taskmanager)

swaaye
4th May 2006, 03:01
I got a monstrous speedup by moving resize from AVISynth to the DIVX codec's internal resize option. VERY odd. But that filter was the problem. I went from 35fps to 50+fps!

Now there are no filters after FFT3DGPU. So perhaps having filters after it can mess it up performance-wise?


edit: it's back to its old slow self again. Something strange is sure happening here. It's like DIVX gets locked to a single thread sometimes. But it's only with FFT3DGPU in use... and then there are the random times when it works and I get up to 90% CPU and 50+fps!

tsp
4th May 2006, 15:13
Swaaye: Try this (http://www.avisynth.org/tsp/fft3dgpu0.6.2.2.exe) version and see if it behaves better. I disabled the part of the code that only allows fft3dgpu to run in one thread at a time.

swaaye
5th May 2006, 00:36
Okay I tried a bunch of tests with the new version. I think I've narrowed the problem down to bt=3.

FFT3dGPU(sigma=2,bt=2,sharpen=0.5) = 45-60 fps
FFT3dGPU(sigma=2,bt=3,sharpen=0.5) = 32-40 fps


MPEG2Source("ddddd", idct=3)
tfm(d2v="ddddd")
tdecimate(hybrid=1)
FFT3dGPU(sigma=2,bt=2,sharpen=0.5)


Basically there is a huge difference in speed with bt=3 vs. bt=2 or lower. What's odd is that I'm fairly sure I saw bt=3 doing that faster speed in an earlier run, but I don't see it now.... Interestingly, running my X800GTO2 at 400/500 vs. 500/610 has an almost unnoticeable impact on speed at the bt=3 setting whereas with the bt=2 speed it gets me 10fps more or so. bt=4 runs at about the same speed as bt=3.

Also, having filters after FFT3DGPU drops the framerate to the level of bt=3 regardless of the actual filter settings, even default settings (ie FFT3DGPU() ).

tsp
5th May 2006, 23:07
well higher bt means more to do for the GPU allthough it is somewhat strange that you don't see any difference when overclocking it. On my comp(opteron 165 currently @ 1.8GHz and a Geforce 7800GT 500/700(GPU/Mem) I get 45-48fps with bt=2 and 47-50 fps with bt=3. This is with no encoding.
One of the reason you might see a framedrop with filters after fft3dgpu is that they are not executed parralel with fft3dgpu.
Is there any change with the cpu utilization between bt=2 and bt=3?

swaaye
6th May 2006, 02:53
I tested the bt=3 and overclocking again and there does seem to be a difference after all. During encoding it'll vary between 30 and 50fps. Quite a range. I upped the DIVX quality slider to 7 (!!!) and with that I saw about 80% CPU.

I think I was getting thrown off by the initial slow 30fps. It starts off a lot faster at bt=2.

G_M_C
10th May 2006, 10:21
Up till now i've been using FFT3D filter to clean op my video before processing, and upon encoding i get avg. 7 fps using XviD (very slow for a dual Xeon, but hey . . . im still learning. SMP is next on the list for instance).

This is a very simple script im running now

LoadPlugin("C:\Program Files\Video-Programs\DLLs\DGDecode.dll")
mpeg2source("C:\AVI-Forge\Input.D2V",idct=3)
Crop(0,16,0,-16)
Tweak(sat=1.1, bright=1.4, cont=0.96)
LanczosResize (688,384)
fft3dfilter(sigma=2, plane=4)


But today my new Graphics Board has arrived, a Gainward BLISS 7800GS GoldenSample plus with 512 Mb and the full 24 pipelines :) (AGP btw).

Later today ill adapt my script to use FFT3DGPU in stead of teh "non GPU" version. Im very curious to see what a difference it will make.

As said my sctipt is running @ 7 fps now and its doing the 1st pass of a 2-pass encode . With the second pass ill use the GPU version. So it will be a "honest" compere betweet the two :)

PS: Is this filter more dependend on the "number op pipelines" or "the number of shaders" ?

tsp
10th May 2006, 13:13
fft3dgpu is mainly limited by memory bandwidth (memory clock and width). So I would say that more pipelines is better than more shaders per pipeline but faster memory is even better.
To get the most fair compairison between fft3dfilter and fft3dgpu use
fft3dgpu(sigma=2,plane=4,precision=2,bw=64,bh=64,ow=24,oh=24)
and I will recomend using the same script for both passes as the are minor differences between the output from fft3dgpu and fft3dfilter.

G_M_C
10th May 2006, 16:03
Thx for your answer :)

Anyway, using GPU now, and fps is up by 300% (21 ~22 fps in stead of 7) :D

So basically, its faster to do a new 1st pass and then a new 2nd pass. Because 2 passes with FFT3DGPU is faster then 1 pass with "regular" FFT3D (wow).

I'm very impressed http://gathering.tweakers.net/global/smileys/worshippy.gif

Very many Kudo's to you man. Amazing stuff !

Btw. did you mean System memory or Graphics memory in your post before ?

tsp
10th May 2006, 20:51
Is that speed with fft3dgpu(sigma=2,plane=4,precision=2,bw=64,bh=64,ow=24,oh=24)?
The Geforce 7900 is a rather fast card.
I mean Graphics memory. The fft version I work on now should be less memory bandwidth dependent as I have cut down the number of texture lookup

G_M_C
10th May 2006, 21:53
Is that speed with fft3dgpu(sigma=2,plane=4,precision=2,bw=64,bh=64,ow=24,oh=24)?
The Geforce 7900 is a rather fast card.
I mean Graphics memory. The fft version I work on now should be less memory bandwidth dependent as I have cut down the number of texture lookup

Yes, I've modified my script exactly as you specified in your posting, with fft3dgpu(sigma=2,plane=4,precision=2,bw=64,bh=64,ow=24,oh=24). I was amazed too at the very big speed gain.

And speaking of the GPU; I've bought my card as a 7800GS GoldenSamplePlus, BLISS edition. I allways thought the 7800 series had a G70 class GPU.

But when i removed the cooler today (to change the heatpaste&heatpads to Arctic Silver 5) i saw that my card actually had a G71 on it. I mention this because its indeed a 7900GTX in AGP format. The difference between my version and the "real" 7900GTX is slower mem (512 Mb GDDR3 @ 1250 MHz). So im sort a lucky I guess buying a 7800 and getting a 7900 (BLISS indeed ;) )

I never would have guessed it would be this fast, even with my AviSynth scripts this new Graphics board speeds things up (guess what it does to my 3DMark scores :P).

But as i said; Hope you keep developing filters that use GPU, and I hope others follow suit. Because results are absolutely amazing. Many complements on your work, and i'll keep using your filter (and hopefully more GPU filters in the future) :)

swaaye
11th May 2006, 22:31
So would SM2b add anything useful for FFT3DGPU & ATI's Xx00 series? Or do you think that would be a waste of your time (TSP) to implement?

I'd also like to see some of the favorite settings of the forumgoers here. I've settled on:
FFT3dGPU(sigma=2,bt=2,sharpen=0.5)
for speed and quality. My overclocked X800GTO2 at 510/610 can pull about 55fps with this. I run this with DIVX set at quality=4 on the slider and use DIVX's internal resizer that's multithreaded. Gives me about 90% CPU so I don't slow down because of either GPU or CPU.

tsp
11th May 2006, 23:02
So would SM2b add anything useful for FFT3DGPU & ATI's Xx00 series? Or do you think that would be a waste of your time (TSP) to implement?

well it is allready implemented. The code in fft3dgpu.hlsl is compiled and optimized by directx using the best shader model your card support (that is0 SM 2.0 for Radeon 9xxx,SM 2a for geforce fx 5xxx, SM 2b for Radeon Xxxx, SM 3 for Geforce 6xxx,7xxx and Radeon X1xxx)

G_M_C
12th May 2006, 08:28
[offtopic & Brainstorm]
Reading one of you previous postings, i understood that you treat the AviSynth fram an a texture for processing with FFT3DGPU.

That would mean you've implemented a system to transfer the avisynth fram to the texture-buffer and back.

But now the brainstorm: Since you've got a frame into the texture buffer, it would be "kind of easy" toe implement a rezise to it, wouldn't it ? Rezising textures is one of the main functions of a graphics card after all.

This would be a usefull function, because a Graphics card has much more advanced functions for resizing than AviSynth. All GPU's support trilinear resizing for instance, and AviSynth doesn't up till now. And modern GPU's even have more advanced methods than trilinear allone ("called advanced" or "optimal" or such). And added to the advanced methods, most modern GPU's can do a AntiAliasing stage when resizing, if i'm not mistaking.

And this all would be bazingly fast, since it is one of the most optimized functions of any GPU.

So: What would your thoughts be on a "GPUresize ()" function ?
[/offtopic & Brainstorm]

Egh
12th May 2006, 17:20
[offtopic & Brainstorm]

So: What would your thoughts be on a "GPUresize ()" function ?
[/offtopic & Brainstorm]

Called "Haali renderer" :) As for advanced resizing, I dont' think cards natively support Lanczos. And even bicubic resizing is not straightforward and require quite a lot of GPU resources.

Fizick
12th May 2006, 19:32
http://www.avisynth.org/JapanesePlugins

G_M_C
12th May 2006, 23:57
http://www.avisynth.org/JapanesePlugins

Thx,

never thought of looking in that section ... because my Japanese isn't up to spec atm :D

Guess i missed something ;)

Called "Haali renderer" :) As for advanced resizing, I dont' think cards natively support Lanczos. And even bicubic resizing is not straightforward and require quite a lot of GPU resources.

GPU resources I have enough (I think) since my new card arrived ;)

But what i meant is that there are some "standard" filtering / resizing methodes build into the hardware of any GPU that have a equivelant command in AviSynth (bilinear). Those could be "transferred" to the GPU to gain speed, at least that was my thought. And doing so could gain at least one extra resizing method; Trilinear, wich isnt in AviSynth, but is standard in all GPU's.

foxyshadis
13th May 2006, 00:25
Trilinear isn't made for the totally planar video frames, though. It'd be interesting if someone came up with a good way to use it, but the way trilinear works is that it uses prerendered larger and smaller textures, interpolates both to the desired size, and averages them, weighting based on how close the result is to each prerendered size. (The gpu has certain efficiency requirements, like each step up being a power of two.) Thing is, how often do you have two videos, one twice the size of the other, that you can pass to the gpu?

I can only name one: When using eedi2 reconstruction.

You'd be better off implementing spline or gaussian, or even some crazy vector/fractal resize, in the gpu if you want the top quality, or bilinear/bicubic for hardware asic speed.

G_M_C
13th May 2006, 02:20
Ive been watching GPU programmabillity for some time now, and awaiting the first atual uses it would have for me personally. FFT3DGPU is one of the first more "gereral" apps designed to take advantage of the computational power of the GPU.

Stanford univerety has been doing a lot of research in to the usage of GPU's in geberal progamming. Much of their research is open sourced, and might be of some use.

So i give the link: http://graphics.stanford.edu/projects/brookgpu/index.html

Egh
13th May 2006, 02:25
Ive been watching GPU programmabillity for some time now, and awaiting the first atual uses it would have for me personally. FFT3DGPU is one of the first more "gereral" apps designed to take advantage of the computational power of the GPU.


I would call Haali renderer much more "general app" than FFT3DGPU. Besides, even older builds of mpc used bicubic resizing implemented with PS 2.0 (i.e. GPU was used).

foxyshadis
13th May 2006, 02:41
3D renderers, like Maya, and video software like Combustion and AE, have been able to use them for years too, although mostly limited to the Quadro/FireGL lines of pro cards (because the GeForce/Radeon drivers are slightly crippled, though hardware is nearly identical, a bit of a scam). AGP also wasn't really suited to GPU computation at all - returning to main memory is painfully slow - so the PCIe transition has started the evolution now.

tsp
14th May 2006, 00:26
Another GPU filter by antitorgo: http://forum.doom9.org/showthread.php?t=86793
As foxyshadis stated trilinear filtering wouldn't be all that usefull even if non power of two textures can be used (as on geforce 6xxx/7xxx and maybe radeon X1xxx) more advanced resizers can be used as postprocesing using shaders (and is used in virtualdub) but currently it is not one of my highest priority.
G_M_C: The first two versions of fft3dgpu was created with brook.

swaaye
15th May 2006, 01:37
Well honestly the GPU is tapped out pretty much just doing fft3DGPU. If you're running a dual core setup the GPU quickly becomes the bottleneck, unless of course you were using fft3dfilter or some such. I didn't even bother with noise filtering until this GPU filter. Speed is fairly critical for me. The normal resizers don't seem to have that much overhead relatively, especially DIVX's multithreaded resizers in their codec.

I'd like to hear from someone endowed with a SLI/Crossfire setup. :)

tsp
15th May 2006, 15:55
You can use another GPU filter after fft3dgpu without interfering with it. Unfortunatly SLI/Crossfire doesn't work with fft3dgpu as there would be excesive texture transfers from one GPU to anhother when running in Split frame rendering and Alternative frame rendering wouldn't work because fft3dgpu needs the result from the previous frame.

tsp
20th May 2006, 19:59
new test version 0.6.2.9 that includes new fft code. Should improve speed for larger bw, bh size(>32). Doesn't work with geforce fx 5xxx card currently. Please try it and report back if you experience slowdown or other problem with.
Link:
http://www.avisynth.org/tsp/fft3dgpu0.6.2.9.exe

modsoul
26th May 2006, 10:50
i ried using this simple scriupt as a beginnig test
directshowsource("C:\anime\black

cat\[Ani-Kraze]_Black_Cat_-_01_[C93856CD].avi")
ConvertToYV12()
fft3dgpu (sharpen=3)

but i get this error
error X1507 failed to open source file C:\program file\ avi synth 2.5\plugins\ps.hlsl

what am i doing wrong.

Boulder
26th May 2006, 11:02
Do you have the ps.hlsl file in your Avisynth plugins directory?

modsoul
26th May 2006, 11:06
NOPE. its not there. where can i find. it.

modsoul
26th May 2006, 11:30
ok i renamed fft3dgpu.hlsl to ps.hlsl ( i did not remove fft3dgpu.hlsl)
is that what i am supposed to do
forgot to mention. now it gives error
"sharpen entry point not found.
is my script ok ?
ok i downloaded version 0.47 and that seems to have the pd.hlsl file. usingthat file and the dlls from the latest version i can run it. am i doing this all wrong ?

AI
26th May 2006, 16:28
where can i find. it.see first message in this thread

PS manual (http://avisynth.org.ru/docs/english/externalfilters/fft3dgpu.htm)

modsoul
26th May 2006, 16:52
see first message in this thread

PS manual (http://avisynth.org.ru/docs/english/externalfilters/fft3dgpu.htm)

i've read that post and dl'ed every file it list. the newer files just don't have ps.hlsl (but i use the ps.hlsl from the older versions it does work). and the only referewnce to ps.hlsl in the first post is a changelog. same with the manual you linked.

tsp
26th May 2006, 17:15
modsoul: what version did you install?

Not related to your problem. This is what you got if you overclock the GPU to much with fft3dgpu(upper left corner)
http://img101.imageshack.us/img101/8528/ocgpu1il.th.jpg (http://img101.imageshack.us/my.php?image=ocgpu1il.jpg)

modsoul
27th May 2006, 03:13
modsoul: what version did you install?

Not related to your problem. This is what you got if you overclock the GPU to much with fft3dgpu(upper left corner)
http://img101.imageshack.us/img101/8528/ocgpu1il.th.jpg (http://img101.imageshack.us/my.php?image=ocgpu1il.jpg)

the latest version. 0.6.2.9 beta. then since that did not work 0.6.2.
then since that did not work i took the ps.hlsl file from one on the much older (0.4) versions.

tsp
27th May 2006, 13:35
ok I tried to recreate the problem but couldn't. I even search the memory used by ftt3dgpu.dll for the string ps.hlsl and it doesn't show up. Maybe you got an old installation of fft3dgpu laying around somewhere (try searching for fft3dgpu.dll and see if there is more than one on your computer). Try this srcipt to see what version of fft3dgpu is loaded:

blackness().subtitle(LoadPlugin("fft3dgpu.dll"))

it should report version 0.6.2.9 if you use the latest beta.

Ps: Is there really a whitespace in front of avisynth 2.5 in the path "C:\program file\ avi synth 2.5\"?

AI
27th May 2006, 16:32
May be version DirectX isn't right?

Boulder
27th May 2006, 16:37
Doesn't the installer automatically install the needed DirectX dll file as well?

tsp
28th May 2006, 08:47
yes but it requeres directx 9.0c to be installed. Anyway the errormessage looks different if it was a missing directx file. The missing ps.hlsl file message should only popup on the older versions of my filter so I suspect that an old version is loaded instead.

tsp
28th May 2006, 19:52
Released version 0.6.3. It includes the new fft code that should give a performanceboost for larger blocksize(>16) and when using precision>0 also includes a html doc

Adub
29th May 2006, 04:13
Great! Thanks for the update tsp. Keep on coding man, we all need you!

Alain2
29th May 2006, 18:09
This new version doesn't seem to work on my computer (with a X1600pro gpu):
unfiltered:
http://img140.imageshack.us/img140/3041/temp9bq.jpg

fft3dgpu(sigma=3,bt=4,plane=4) (v0.6.3)
http://img140.imageshack.us/img140/8801/temp1ui.jpg

fft3dgpu(sigma=3,bt=4,plane=4) (v0.6.2.1)
http://img516.imageshack.us/img516/294/temp6hf.jpg

Boulder
29th May 2006, 18:12
Doesn't work on my GeForce 6600GT either. v0.6.2.9 does work but v0.6.3 doesn't.

I tried FFT3DGPU(sigma=3,plane=1,mode=1,degrid=1,bt=3,bw=16,bh=16) and also without bw and bh.

tsp
29th May 2006, 19:48
Boulder: What driver version are you using? I tested it using 84.21 on a geforce 7800GT.

Alain2: Does version 0.6.2.9 (http://www.avisynth.org/tsp/fft3dgpu0.6.2.9.exe) produces the same result?

All: If you got this version working could you post what card and driver version you are using?

Warpman
29th May 2006, 19:50
Released version 0.6.3. It includes the new fft code that should give a performanceboost for larger blocksize(>16) and when using precision>0 also includes a html doc
do you plan to make it working on geforce 5XXX again?
would be nice though ^^'

tsp
29th May 2006, 19:54
Warpman: It should work on geforce fx 5xxx (at least I added the code. I first have my comp with geforce fx 5200 on next monday so I can first test it there)

Warpman
29th May 2006, 20:30
okay it works on my 5900 (just tested it). Great improvment in Speed here. ^^

But i have Croma shifting :/ i have a smple clip here-->
http://rapidshare.de/files/21713411/conan3dgpu2.mkv.html

tsp
29th May 2006, 20:54
Warpman: what setting did you use?

Warpman
29th May 2006, 21:07
Warpman: what setting did you use?
fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8)

Boulder
29th May 2006, 21:13
Boulder: What driver version are you using? I tested it using 84.21 on a geforce 7800GT.

I've got 78.01 installed, haven't had the need to upgrade yet. I could try upgrading to the latest official version tomorrow and see if that fixes things. I actually thought that the newer versions were slower what comes to FFT3DGPU than the old ones, there's a post about that somewhere in this thread.

tsp
29th May 2006, 21:35
Boulder: Revgen tested it with a dualcore athlon X2 processors and found it to be slower. Don't know if it still applies. I don't know what should cause it if it is not the driver as fare is I know only transparency AA was added to the Geforce 7xxx series and it isn't used by fft3dgpu.

Warpman: I can't reproduce it here. Is the chroma lagging 1 frame or is the luma 1 frame forward? If the chroma is lagging try this script:

MergeLuma(fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8))

Just to be sure is the filter working?

Warpman
29th May 2006, 21:48
Boulder: Revgen tested it with a dualcore athlon X2 processors and found it to be slower. Don't know if it still applies. I don't know what should cause it if it is not the driver as fare is I know only transparency AA was added to the Geforce 7xxx series and it isn't used by fft3dgpu.

Warpman: I can't reproduce it here. Is the chroma lagging 1 frame or is the luma 1 frame forward? If the chroma is lagging try this script:

MergeLuma(fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8))

Just to be sure is the filter working?
Your right Luma is 1 frame ahead ... sorry my bad
MergeLuma sadly did not help

about the speed i did upgrade from a old version of ff3gpu to 0.6.3 so this explains the speed gain...

http://img304.imageshack.us/img304/5278/shift9ep.png (http://imageshack.us)

tsp
29th May 2006, 21:58
MergeLuma(trim(1,0).fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8))

When I get my geforce fx back I will make a proper fix.

Warpman
29th May 2006, 22:14
thx ^^

but with this workaround luma is now 2 frames ahead (sorry to bother you with this)

Edit: MergeChroma(fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8)) fixed it....

Edit2: im a bit confused now ... it´s defenitly the luma which is 1 frame "to ealy" ... but MergeChroma Fixed it...

tsp
29th May 2006, 22:42
that is because you take the unfiltered Chroma from fft3dgpu and merge it into the untoched luma so basicly you skip the filtering so try this:

t=last
t.trim(1,0).MergeLuma(t.fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8))

easy to mess up the trims. Sorry for that.

Chainmax
30th May 2006, 00:55
Would FFT3DGPU have any issues on a 64-bit, 128MB, AGP (i.é: no turbocache) GeForce 6200?

Alain2
30th May 2006, 03:35
Alain2: Does version 0.6.2.9 (http://www.avisynth.org/tsp/fft3dgpu0.6.2.9.exe) produces the same result?

All: If you got this version working could you post what card and driver version you are using?

Yes, same problem. Versions up to 0.6.2.1 are ok, 0.6.2.9 and 0.6.3 are not on my config (ATI X1600pro pci-e)
http://img415.imageshack.us/img415/6295/temp0oz.jpg
(I think it's the catalyst drivers from january 2006, 6-1_xp-2k_dd_29602.exe)

Warpman
30th May 2006, 09:54
that is because you take the unfiltered Chroma from fft3dgpu and merge it into the untoched luma so basicly you skip the filtering so try this:

t=last
t.trim(1,0).MergeLuma(t.fft3dGPU(sigma=3, plane=0, bt=3, bw=16, bh=16, sharpen=0.8))

easy to mess up the trims. Sorry for that.
no problem ;) works... thx again ^^


Would FFT3DGPU have any issues on a 64-bit, 128MB, AGP (i.é: no turbocache) GeForce 6200?

if it works with my 5900 (agp, 128Mb, 128bit) a 6200 should work too.

AI
30th May 2006, 11:17
tsp
May be easy add aviable GPUFFTW (http://gamma.cs.unc.edu/GPUFFTW/download.html) in fft3dfilter? ;)

tsp
30th May 2006, 17:50
AI: not that easy because:
1) It's OpenGL and I use directx
2) It doesn't work on ATI cards
3) It's only a 1d transform (and I need a 2d transform)
4) It doesn't support multiple strides(meaning it can only transform one block)
5) It returns the output in main memory and I need a texture to work with
6) I'm not sure it's released under the GPL license

But I might be able to use some of the code in the fft but the new fft algorithm I also use a Stockhamn autosort fft like gpufftw

most of the above points also applies to fft3dfilter

AI
30th May 2006, 17:59
tsp,Thanks for detailed answer my question.

I hope my link help you :)

tsp
30th May 2006, 18:11
AI: sure. BTW does your x700 work with the new version?

For those of you that have problem with the new version could you try this (http://www.avisynth.org/tsp/fft3dgpu0.6.3D.exe) version that reports back error(only thing new) if any in the fft code. Also try precision=2 and if it helps.

Alain2
30th May 2006, 19:31
no, not better for me. Can't see any error report either

It's strange, reloading the same script several times will bring a different first image everytime, but it's getting messier, starting with something like the picture I posted, and now it's more like:
http://img171.imageshack.us/img171/6474/temp8er.jpg

Hope it's not clogging my cards memory (256Mo, forgot to mention) ^^

I reduced my script to a simple one:
mpeg2source("01.d2v",idct=7)

tfm(d2v="01.d2v")
tdecimate(mode=1)

crop(4,2,-4,-2)
BicubicResize(704,528,0,.5)

fft3dgpu(precision=2)

No apparent change with/without precision=2

Lemonzest
30th May 2006, 23:15
i'm getting the above also with 0.6.3

Boulder
31st May 2006, 08:26
Upgrading to the latest beta ForceWare drivers (v91.28) fixed the problem. I guess it was time to upgrade :p

AI
31st May 2006, 16:01
v0.6.3 (w/o "d") not work.

tsp, I can't download 1Mb every time, becose I use GPRS :(
do you can give me link do archive dll and hlsl only?

tsp
31st May 2006, 22:28
So until now 3 ATI users that can't get version 0.6.3 to work. That's enough for me. Just ordered a X1300 pci card to test the code (and add support for multiple cards for the SLI freaks out there). And please tell me you used the latest drivers right (I think I will add that to the FAQ part of the manual)

AI: You can be glad that I didn't add the full 52 MB directx installation to the installer. But I can make a light version that only includes the dll, html doc and hlsl for those people that doesn't have flatrate or slow connections(Do you use a cellphone for your internet connection?)

Lemonzest
31st May 2006, 23:37
Yes, ATi User here, using the latest Catlyst Version 6.5 garbled display.

G_M_C
1st June 2006, 11:30
Boy, am i glad i bought myself a 7900GTX in AGP deguise (aka 7800GS GS+) :p

But to make shure all is fine; I'll test the new version the next few days, and will report back afterwards.

hartford
2nd June 2006, 03:52
Having the same problem as Alain2.

Version 0.6.2 works, 0.6.2.9 does not.

Specs:

Graphics: Ati 9700

DirectX: 9.0c with December Update

Motherboard: Gigabyte GA-7DPXDWP (dual processor)

OS: Windows 2000 sp4 with updates.

blubberbirne
2nd June 2006, 17:03
Hi, same problem here.

Still using Version 0.6.1.9 and with this one it works perfekt :)
ATI is CAT6.5 with X850XT (Maybe Powerfull enough)

Use the Filter to sharpen my DVB Caps. The Result looks Amazing :)

Nice work for the Filter

tsp
2nd June 2006, 17:23
I just got my x1300 card. Unforfunatly it didn't fit in my second PCI-express slot because of my watercooling kit. So I replaced my Geforce with the ati card and will try to trackdown what's going wrong.

Wilbert
2nd June 2006, 19:37
@tsp,

Just curious. Did you turn it into a closed source filter?

tsp
2nd June 2006, 21:28
Wilbert: No the source is included in the installer. You can select only to extract the source or install both the source and filter or only the filter(the default). The sourcecode are extracted to a directory called fft3dgpu_src in the install directory.

All: I found the bug that was causing problem with the ati card (and reference render but not on nvidia cards) so a new version should be released shortly.

tsp
2nd June 2006, 23:24
version 0.6.4 ready. Should now work on ati card. (also contains limited support for interlaced source. use interlace=true to enable it. currently on works correctly with ow=bw/2 and oh=bh/2(the default value).

blubberbirne
2nd June 2006, 23:59
*hm* Ok its work, but performance is bad :(

Going back to 6.2 an waiting for new release ;)

InsulinJunkie
3rd June 2006, 09:11
0.6.4 does now work on an ATI 9700, but it is a bit slower than 0.6.2 using a fairly simple:

FFT3dGPU(sigma=2,bt=3,mode=1,sharpen=0.62)

On my XP2400, running FFT3DGPU alone - no other filters - and going from MJPEG to MJPEG, it runs at about ~12-13FPS, vs ~16FPS using 0.6.2.

Not a big deal, but just wanted to pass that along...

tsp
3rd June 2006, 11:04
hmm yes performance seems to be worse on lower end hardware using the default value for precision(0 = 16 bit float) with the new code. I will enable the old fft in the next release (that will include support for interlaced frame processing and sigma2,sigma3 and sigma4).

blubberbirne
3rd June 2006, 11:50
hmm yes performance seems to be worse on lower end hardware using the default value for precision(0 = 16 bit float) with the new code. I will enable the old fft in the next release (that will include support for interlaced frame processing and sigma2,sigma3 and sigma4).

lower end hardware? i got a X850XT and a X2 3800+, don't think this is lower end Hardware :devil:

Alain2
3rd June 2006, 14:36
tsp, is it faster on your X1300 card than the old fft code of 0.6.2?

tsp
3rd June 2006, 16:10
average time(2000 frames average) to calculate a frame in fft3dgpu with a geforce 7800GT

FFT3dGPU(sigma=1,bt=-1,sharpen=1.0,degrid=1.0,precision=0)
New fft code 0.0271 sec per frame(spf)
Old fft code 0.0258 spf
new code 5% slower

FFT3dGPU(sigma=1,bt=-1,sharpen=1.0,degrid=1.0,precision=1)
new fft:0.0390 spf
old fft:0.0463 spf
new code 16% faster

FFT3dGPU(sigma=1,bt=-1,sharpen=1.0,degrid=1.0,precision=2)
old fft: 0.0472
new fft: 0.0404
new code 14% faster

FFT3dGPU(sigma=1,bt=-1,bw=256,bh=256,sharpen=1.0,degrid=1.0,precision=2)
new fft: 0.0904
old fft: 0.114
new code 21% faster

FFT3dGPU(sigma=1,bt=-1,bw=256,bh=256,sharpen=1.0,degrid=1.0,precision=0)
old fft: 0.0556
new fft: 0.0521
new code 6% faster

Higher precision or blocksize favours the new fft code. The old code is faster at the default blocksize and precision (but use more GPU memory). This is the same result I got on my X1300. I will see if I can make a hybrid version between the new and old code. Anyway I will add an option to use the old code instead of the new code and if not specified fft3dgpu will time what code is fastest and use that.

Chainmax
3rd June 2006, 16:52
Is FFT3DGPU v0.6.4 missing anything from FFT3DFilter v1.8.5 regarding features or stability?

tsp
3rd June 2006, 22:19
features:
Still missing in fft3dgpu compared to fft3dfilter v 1.8.5:

* YUY2 support
* interlaced support (will be in next version. Partially implemented in current version)
* noise pattern method (don't know if anyone is actually using this?)
* sigma2,sigma3,sigma4 (hopefull in next version too)

stability:
I think the most difficult part is to get fft3dgpu running. If you succed in that stability should be okay. Part of the problem is that the different graphics cards are not entirely compatible (and currently I only have a Geforce fx 5200, geforce 7800GT and a radeon X1300 to test with)

G_M_C
4th June 2006, 09:56
I want to give you a http://gathering.tweakers.net/global/smileys/thumbsup.gif for all the work you punt into your filter-development & -support.

Anyway; its a pleasure testing the new versions, if needed :)

AI
4th June 2006, 16:46
tsp, mode=0 not work on my x700

tsp
4th June 2006, 22:58
AI: Is it from versio 0.6.4 mode 0 stopped working and what settings did you use. I'm thinking about dropping mode 0 and 2 in favour of using mode 1 and ow,oh like fft3dfilter as adding support for interlaced content and other stuff will be easier for me (and dropping mode 0 and 2 will make the code nicer and easier to maintain).

G_M_C: thanks I'm trying my best.

zambelli
14th June 2006, 09:08
Out of curiosity: What exactly does the installer do? Where does it copy files and what registry modifications does it do if any?

tsp
14th June 2006, 10:53
The installer doesn't add anything to the registry but looks up the default avisynth plugin directory to use as the default install location. It copies fft3dgpu.dll fft3dgpu.hlsl and fft3dgpu.html to the install directory and copies d3dx9_30.dll (directx utility dll for the april 2006 sdk) to the windows system directory unless the file already exist. If the source should also be extracted a subdirectory called fft3dgpu_src is created in the install path and the sourcecode is extracted here (including the fft3dgpu.nsi script that is used the create the installer so you can see exactly what is done). No spyware/adware is installed but maybe I should add it as a feature in the next release(not).

tsp
14th June 2006, 15:01
new version 0.7 ready. Now includes sigma2,sigma3 and sigma4 plus support for interlaced filtering. Uses whatever fftcode is fastest. And (hopefull not) new bugs.

Revgen
21st June 2006, 23:35
Would this help with FFT3dGPU?

http://www.nvidia.com/object/IO_32131.html

Terrazini
22nd June 2006, 20:29
Thank you, tsp, great job!

tsp
24th June 2006, 23:58
Revgen: Great tool indeed. Here is a screenshot from NVPerfHUD 4 that shows the gpu utilization when rendering a single frame using
fft3dgpu(bt=3,sharpen=1,degrid=1,bw=128,ow=32,bh=128,oh=32,nvperf=true,oldfft=false)
http://img144.imageshack.us/img144/8370/perfhud5pz.th.jpg (http://img144.imageshack.us/my.php?image=perfhud5pz.jpg)
the light blue line is the total time it takes to draw each object (or in this case a part of the filtering, as you can see the fft calculation needs to draw many "objects" compared to the wiennerfilter). The red and yellow line is how long it takes to draw the triangles each object consist of(in % of total time to draw each object), the green line is how long it takes to calculate the color the object(using the pixelshader), the puple line is how long it takes to read from the textures while the dark blue line is how long it takes to save the final object to gpu memory.
Most of the time is used in the pixelshader not surprising but more surprising is it that it takes so long to write the result back to memory

Revgen
25th June 2006, 00:14
I'm glad it's working for you.

I read about it on HardOCP and thought it might be something you'd be interested in.

Zazzybud
25th June 2006, 17:21
I am currently using MeGUI to encode TV eps into x264. When I use the Avisynth creation tool I can create about 5 avs files and then I get the out of memory error.

If I only create 4 and then start processing the files it will get the error after the 1st one is encoded. Not knowing how to read code that well, does the filter reserve a piece of vram when creating an avs?

I'm currently user a 7800GT w/ 256MB.

Heres what I'm using for avisynth

crop( 0, 0, -2, -2)
LanczosResize(608,336) # Lanczos (Sharp)
FFT3dGPU(sigma=1,sharpen=1.0,degrid=1.0,precision=2)

I know I could lower the precision but I shouldn't should I? :) Is there a way to make the program flush the vram used?

Boulder
25th June 2006, 17:45
I've had the same problem myself as well. It usually happens when I fiddle with a script in VDubMod, editing it and refreshing with F5 to see the effects. At some point, FFT3DGPU reports the out of memory error, which can be fixed by closing and restarting VDubMod.

tsp
25th June 2006, 18:03
Not as much a bug in fft3dgpu as in the program that doesn't close one avi file before opening a new. The same can be observed with fft3dfilter but because windows can flush the memory to disk not much will happend (other than increasing memory usage). I will see if I can release unused memory from inactive instances of fft3dgpu.

Zazzybud
25th June 2006, 18:36
:thanks: for the quick explaination. This filter is great tsp! I will just make sure I only encode a couple videos at a time. As it take about 2hr per 45 min ep I guess I shouldn't queue to much up :)

tsp
27th June 2006, 23:18
released version 0.8. Includes support for YUY2 colorspace. Textures will now be swaped to main memory if there is not enough GPU memory. It will increase the system memory usage and causes severe slowdown if it happends every frame (but if it happends only when the avs file is open it should make a big difference in speed)

Adub
27th June 2006, 23:34
Great! Thanks TSP.

Zazzybud
29th June 2006, 15:12
I will get to test the new memory mode tonight. I can't wait! Will let everyone know how much speed I loose, if it falls over to system memory.

Fizick
14th July 2006, 22:50
tsp,
thanks for new version.
I got repaired Radeon 9550.
Probably you must change documentation a little (what "is not implemented" in introduction) :)

surprisingly, the speed of yuy2 mode is the same as for YV12: about 4.14 fps for bt=3, plane=4, mode=1, 720x576 size. Why?
But oldfft=false is slower, about 3.75fps.
Why? :)

And what is default values of "bt" and "mode" ?

Fizick
18th July 2006, 00:33
If I press Ctrl-Alt-Del (to call Task manager), fft3dgpu crashed with error message:

unexpected error encoured
Line: 272
errorCond: D3DError_InvalidCall (0x8876086c)
Calling: Reset Device

tsp
18th July 2006, 13:47
Default values for bt and mode are 1. I don't know why YUY2 isn't slower than YV12.
For some reason the old fft code works better with 16 bit floating point precision than the the new fft code on most cards when using the default low bh and bw (fft3dgpu uses the fastest of the two if oldfft is not defined). I will try to combine the two versions in the next release.
I'm not currently at home so I can't test the CTRL-ALT-Delete thing but I will see if I can fix it (and the docs too). What version of windows do you use?

Fizick
19th July 2006, 09:47
win2k

gizmotech
29th July 2006, 01:52
TSP,

I'm not sure if anyone has ever posted this(24 pages is alot of reading). 720x480 video, run w/ the following setting:
fft3dgpu(sharpen=0.9,bt=3,mode=2,sigma=0.7) will produce odd grid artifacts on the X800XT line of graphic cards with default precision of 0. Adjusting mode mages no difference. Adjusting Sigman just changes the visual pattern (on largely even surfaces) in design. Adjusting precision to 2 removed the grid artifacts entirely.

Is this normal behaviour on the ATI Xx00 line of cards?

Gizmo.

tsp
30th July 2006, 22:32
gizmotech: I don't remember anyone mention that kind of problems with fft3dgpu and Xx00 cards. Could you post a screenshot that shows the grid artifacts and maybe a 5 frame unfiltered clip? You do use the lastest drivers? The different cards handle rounding differently so it could explain why it appears on the ATI Xx00 cards.

Fizick: I don't have win2k installed and I can't reproduce it on Windows XP. Do running a screensaver or suspend also trigger the error or is it only CTRL-ALT-DELETE that causes it. What avisynth script did you use?

Fizick
31st July 2006, 23:09
tsp,
today i te-check, and the problem almost disappear :)
(may be I change a Radeon driver to 6.3 some time ago?)

Now I have a problem with this script only:

avisource("file.avi")
converttoyv12()
fft3dgpu(plane=4)

I open and play this script in media plyer.
If I press CTRL-ALT-Delete, and then click to "Task Manager" button, Avisynth is aborted with a message :
access violation at 0x054b88479
attemp to read from 0x0000000

I have no roblem with plane=0,1,2,3
may be some timeout?

It is not dependent from frame size (I tried Reduceby2)
Screen server works normal.
I do not know how to suspend :) (I disabled ACPI).

tsp
2nd August 2006, 23:20
Found the bug that crashed fft3dgpu when recovering a lost device when using plane=4. It was caused by fft3dgpu getting a NULL dst pointer. I aslo changed the default value for bt to 3 like fft3dfilter's default.
The new version 0.8.1 is available at first post or my website

foxyshadis
3rd August 2006, 00:00
Manual install leads to http://wwww.avisynth.org/tsp/fft3dgpu0.8.1.7z (http://wwww.avisynth.org/tsp/fft3dgpu0.8.1.7z) :p Thanks for the update.

tsp
3rd August 2006, 00:08
yes it's getting late here. But thanks for pointing it out:rolleyes:

Fizick
3rd August 2006, 16:30
tsp,
Thanks for update! Now it works well. I can press Ctl-Alt_Del as crasy man. :)

DarkFoon
5th August 2006, 11:34
tsp,
one quick question.
When using kalman mode, does kratio reset the block or the entire frame when the threshold is passed?
From what my eyes tell me, it appears that only the block that has exceeded the threshold is reset, not the entire frame.
I just want some clarification.
Thanks

Edit:
this might be better suited at fizick's FFT3D thread... Opps :p

tsp
5th August 2006, 18:24
DarkFoon:
well it's in fact only the frequency that exceeds the threshold that is reset. And as the frequencies are calculated per block it appears as the block is reset.

Fizick
22nd August 2006, 19:11
tsp,
sorry for bad news. :)
Can you fix the same bug (abort when switch to task manager) with interlaced=true mode (for any plane, bt)?

Am I the only person with this problem?

tsp
24th August 2006, 00:23
Sure, shouldn't be a problem. The interlaced code is still pretty rough so the code to reset the depth texture is missing. Will fix that.

tsp
25th August 2006, 01:31
should now be fixed including bug with bt=0 and only sigma defined caused a crash.

Fizick
25th August 2006, 04:49
Will try. Thanks!

Fizick
25th August 2006, 21:22
thanks, interlaced now works.
I always run coder, and then switch to task manager to decrease pprosess priority.

Sorry, next problem:
fft3dgpu(bt=4,plane=3,sigma=3,interlaced=true)

I get this message window:

Wienner3d4
...ff3dgpu.hlsl(733): error x5608: Compiled shader code uses too many arithmetic instruction slots (83).
Max alowed by target (ps_2_0) is 64.

so, i can not use bt=4 (bt=3 works fine).

tsp
25th August 2006, 22:02
hmm yes that is a problem with the radeon 9x00. They only support pixelshader 2.0 that only allows 64 arithmetic instructions(and 32 texture lookups) per shader. Two ways to solve this could be to a)handoptimize the asm code/rewrite the shader to help the compiler more
b)split the shader in two to reduce instruction count but takes two passes instead of 1.
Looking at the shader output I think a) is possible, Something like this:

mad r3.x, r6.z, c2.x, -r2.x
mad r3.y, r6.w, c2.y, -r2.y
mad r3.z, r6.x, c2.z, -r2.z
mad r3.w, r6.y, c2.w, -r2.w

could easy be written like this:

mov r6.zwxy, r6
mad r3, r6, c2, -r2

saving two instructions. (each register contains a 4d vector, mad multiplies second and third register and add the third and store the result in the first.)

Fizick
26th August 2006, 04:57
It is interesting,
may be some day I shall code GPU. :) But not now :(
So, please fix it.
Anyway, the question: Can I use older DirectX SDK December 2004?

boombastic
8th September 2006, 22:02
is tsp'site down?I can't get the 0.8.2 installer

tsp
8th September 2006, 22:49
Fizick: Yes you can use that SDK though there might be some missing function from the Direct3D Extension Library (if that is the case you can use the fix for the directx 9.0b version).

boombastic: The avisynth.org site was down today including my homepage. It should be up and running now.

G_M_C
11th September 2006, 08:55
Fizick: Yes you can use that SDK though there might be some missing function from the Direct3D Extension Library (if that is the case you can use the fix for the directx 9.0b version).

boombastic: The avisynth.org site was down today including my homepage. It should be up and running now.

Hope it wasn't slash-dotted ?

I managed to get my faforite site (and Hollands biggest) tweaker-site to finaly put AviSynth is their software-update-list.

They actually didn't have even 1 (one) version of AviSynth listed. A situation that absolutely needed to to be corrected ;)

But the site (http://tweakers.net/) gets approx 100K visitors @ a couple of hundered views per minute. An if only 5% of all those views try to read about AviSynth, and then click on the link provided in said article (avisynth.org) ...

So hope I didn't couse too mush of a hassle ;)

PS: Their 1st mention of AviSynth -> http://tweakers.net/meuktracker/13527/AviSynth-2.5.7-alpha-3.html

JnZ
5th October 2006, 10:30
Nice work TSP, my little benchmark:

Video 720x384@25fps:

FFT3Dfilter(sigma=3) at 11fps
FFT3DGPU(sigma=3) at 34fps
FFT3dGPU(sigma=3,mode=1,precision=2,bt=4) at 18fps

(no codec used)

Machine: Opteron 144@2700MhZ, Gf7600GT

EDIT: I compared filtered frames from FFT3Dfilter and FFT3Dgpu and it seems that sigma=3 from fft3dfilter is almost the same like sigma=2 from fft3dgpu...

Jumbie
14th October 2006, 17:23
Any way to have this filter posted elsewhere temporarily (the manually installed dll and hlsl only) since avisynth.org is down?

I'd like to try it out on some footage I have and there's no way to get it that I can find.

Thanks.

JnZ
14th October 2006, 17:41
Any way to have this filter posted elsewhere temporarily (the manually installed dll and hlsl only) since avisynth.org is down?
Try this link: http://www.jnz.wz.cz/files/fft3dgpu0.8.2.7z

Jumbie
14th October 2006, 17:59
Try this link: http://www.jnz.wz.cz/files/fft3dgpu0.8.2.7z

Thanks. It's downloading now. Very, very slowly but it's still downloading. :)

Morpheus_xx
4th November 2006, 09:03
Hi,

is it possible that windows energy saving (turn off monitor) can impact fft3dgpu's performance???

I have this scenario:
- converting a tv capture (40 min length), using fft3dgpu for filtering
- if I'm using my pc, I get ~ 13 fps conversion speed (VDub)
- I left the pc running over night, now 10 h are over and I'm at 39% and the 13 fps are back :confused:

I use an ATI X1300 Pro card on WinXP SP2, Athlon X2 3800+

Any comments?

Morpheus

JnZ
4th November 2006, 13:53
Hi,
is it possible that windows energy saving (turn off monitor) can impact fft3dgpu's performance??? ...

Yes, it's possible, I've noticed, when encoding and filtering via fft3dgpu, all things depends on graphics card (video playing,scrolling in internet browser,etc...) is very choppy. It's understoodable, coz GK is filtering video noise. So there are possibility, this things can slow down fft3dgpu filtering procedure (IMHO).
I recomended turn off all energy savings (like screensaver etc...) while whole processing. Only turn off CRT or LCD (at night).
J.

tsp
4th November 2006, 19:46
It might happen. I mean it doesn't make a lot of sense to waste energy on running the GPU at fastest speed when it has turned off the display. The easiest way to check if it is the case might be to try disable windows energy saving and see if the problem disappear. If this is the case please post back so that I might disable the turn off monitor for ATI cards while fft3dgpu is running.

Morpheus_xx
4th November 2006, 20:53
Yes it seems that the power saving is the problem. After I made my post I've disabled the "turn off monitor" option and the conversion was fast as expected. The screensaver is also off.

So if you have the chance to disable this behaviour during encoding, this would be a nice option ;-)

InsulinJunkie
5th November 2006, 02:41
If looking for a new AGP video card from the low end (like sub-$80US) to replace my dying ATI 9700 Pro, how much should I weigh memory bus vs. memory speed vs. pipelines, etc. for fft3dGPU performance?

I don't game any more, so fft3dGPU would probably stress the video card more than anything else I'd use. The system is an A64 3000+ w/ 1GB RAM on a socket-754 board.

Reading through some old posts in this thread, TSP mentioned the importance of memory bandwidth (the 9700 was 256-bit @ 620, I think).

Most of the cards in my price range are 128-bit (with a few 64-bit cards lurking around), but have faster types of memory, support for PS3.0, etc.

Two cards I was looking at were a vanilla x1300 w/256MB of DDR2 at 128bit@ 500Mhz and 4 pixel pipelines, or, for about the same price, an older 9800 Pro w/128MB of DDR1 at 256bit@680Mhz and 8 pixel pipelines. With AGP, my options are a bit more limited than PCI-E cards....

Strictly for fft3dGPU, what specs should I be weighing most heavily?

JnZ
5th November 2006, 12:05
If looking for a new AGP video card from the low end (like sub-$80US) to replace my dying ATI 9700 Pro...
You are an ATI fan? If You aren't, You may try something like GF 7600 GS. It have good oveclock potencial and low price (something around like X1300). I own Gainward 7600 GS with GDR3, and tweak it to the 7600GT. I don't know, how important is memory speed for FFT3DGPU, but I can make some real tests (normal and overclocked MEM on GK), if You want.;)
J.

EDIT: I have PCX card, but AGP 7600 GS are still in shops.

InsulinJunkie
6th November 2006, 01:52
I own Gainward 7600 GS with GDR3, and tweak it to the 7600GT. I don't know, how important is memory speed for FFT3DGPU, but I can make some real tests (normal and overclocked MEM on GK), if You want.;)

Thank you for the offer.

However, the AGP version of the 7600 is more expensive than the x1300 (at least here), and more than I'm looking to spend on a video card (since I don't game).

I do appreciate the offer, though.

Egh
6th November 2006, 14:24
You are an ATI fan? If You aren't, You may try something like GF 7600 GS. It have good oveclock potencial and low price (something around like X1300). I own Gainward 7600 GS with GDR3, and tweak it to the 7600GT. I don't know, how important is memory speed for FFT3DGPU, but I can make some real tests (normal and overclocked MEM on GK), if You want.;)
J.


In fact I've upgraded my system recently and looking for a proper GFX card as well.

For instance, for this plugin, is the number of pixel shaders and pixel pipelines important? If we take two similar cards with same core frequency, how faster will be the one with let's say 12 pixel pipelines over the one with only 8 pipelines?

And concerning memory datarate, if we take 7600GS and 7600GT, will be the latter roughly twice as fast for fft3d gpu? (GS has DDR2 at 800-900Mhz, GT has GDDR3)

tsp
6th November 2006, 22:25
well the memory and core clock must be somewhat balanced so it is difficult to say if memory speed is more important than core clock. And again if you only have few pixelshaders fast memory doesn't matter as much as they can't work on as much data. I will try making some measurements with different core and memory clock and number of pixelshaders to see what matters the most. I reduced the number of pixelshaders to 4 from 20(80% reduction) on my geforce 7800GT this reduced the performance from ~40 fps to ~12(70% reduction) fps for fft3dgpu(precision=2,bt=4) while retaining the core/memory speed of 450/1400 MHz.

Egh: (G)DDR2 and GDDR3 running at the same clock frequency should be running at the same speed while GDDR3 uses less power.

JnZ
6th November 2006, 23:20
I make small test, use fft3dgpu on test clip with 2000 frames, then saved to avi with Huffyuv 2.1.1 (coz of very high biterate for uncompressed video, so try to exclude HDD performance influence). You can now imagine, which factor is important (fast core, memory or both on GK).

Here is my test:
Graphics card: Gainward Gf7600GS with GDR3
Test clip: 720x288
Frames: 2000
Settings: fft3dgpu(sigma=2)

Default frequencies GPU/MEM: 400/400 (800)?

Results:
[GPU/MEM] [time] [fps]
==================
400/400 71s 28fps
---------------------
500/720 48s 42fps
400/720 55s 36fps
300/720 65s 31fps
200/720 87s 23fps
128/720 127s 16fps
---------------------
500/600 52s 39fps
500/500 57s 35fps
500/400 68s 29fps
500/300 76s 26fps
================

This is my test results with latest FFT3DGPU and X2 3800+.

Egh
7th November 2006, 15:13
Results:
[GPU/MEM] [time] [fps]
==================
400/400 71s 28fps
---------------------
300/720 65s 31fps
---------------------
500/300 76s 26fps
================


Hmm, that gives some hint that video memory speed
is moar important.

Although of course in order to have considerable effect
you need to alter the frequency to by a rather high amount.

InsulinJunkie
11th November 2006, 13:26
You may try something like GF 7600 GS. It have good oveclock potencial and low price (something around like X1300). I own Gainward 7600 GS with GDR3, and tweak it to the 7600GT.

Revisiting this.... after checking out the horrible price/performance ratio on AGP cards (and realizing I wouldn't be able to re-use a new AGP card in my next system), I ordered a cheap open-box socket754 board with a PCI-E slot.

By moving to PCI-E, the 7600GS is definitely now in my price range. On the other hand, 7600GT prices seem to be in the process of falling fast to the $100US mark (some of them are almost there already after rebates).
UPDATE: Yikes...and now the 7900GS is already hitting $150US *AT RETAIL* with no rebates (Best Buy ad). That didn't take long.

The ATI x1650XT is supposed to be out next week in the US, too. If pixelshading power is a major part of ff3dGPU, it's got the 7600GT beat handily in that area, spec-wise (13800 ops/per sec vs. 6720 (http://www.gpureview.com/show_cards.php?card1=385&card2=472)). Core/memory specs are roughly the same on the two models' stock configs. Don't know what the real-world price will be on the x1650 yet, though.

Hmm...

DDogg
11th November 2006, 15:53
fyi - I have the ATI 1600XT and fft3dGPU works flawlessly.

huang_ch
15th November 2006, 09:49
I found this filter today and trying it with an old anime, the result is pretty good: (cpu: Conroe E6600, gpu: 7900GS at 475/1400)
w/o fft3dGPU:
~20fps, 735Kbps, PSNR (avg/global): 45.046/43.844
w/ fft3dGPU: (sigma=3,bt=3,plane=4,precision=2)
14.67fps, 542Kbps, PSNR: 46.431/44.920

It improves bitrate & PSNR hugely, that's great, also the noise is reduced a lot.

But the performance is not quite good, I found the bottleneck is the GPU, when I use VirtualDub to open that AVS and run the video analysis to check the maximum fps of only apply the fft3dGPU, I found the result is about 16~17fps, but if I test it with only sigma=2, it runs about 65fps, and it seems that sigma=3 will cause it reduce to about 50fps, while plane=4 or precision=2 is the most each will cause about 40%~50% loss. So this keeps my CPU always running around 30%~70%...
Hope these data will be useful to all of you, and hope the performance will be improved continuously. Anyway, thanks for bringing us such a wonderful filter~~~

huang_ch
15th November 2006, 10:28
And another question is, I found the video processed by fft3dgpu is a bit blur/smoothed, so what kind of sharpen filters do you usually use with fft3dgpu? I've tried SeeSaw, but the result is terrible:
1. I didn't see any obvious sharpen happened, maybe my fault not tuning the parameters...
2. It brings the PSNR & bitrate back a lot which win by fft3dgpu...

tsp
15th November 2006, 17:23
huang_ch: thanks for the input, to enable the build-in sharpener, use the shapen parameter. Try for example
fft3dgpu(sigma=3,bt=3,plane=4,precision=2,sharpen=10)
usually it is not a good idea to set the sharpen value this high.
The problem with sharpener is that they enhance the noise fft3dgu (and other denoisers) reduce(and by reducing the noise it usually produce a more blurry picture) so it is kind of expected that the PSNR decrease when using a sharpener. You can try to reduce the denoising of the high frequency by setting sigma lower than sigma2,sigma3 and sigma4 like:
fft3dgpu(sigma=2,sigma2=2.5,sigma3=3,sigma4=3,bt=3,plane=4,precision=2)
About the speed buying a geforce 8800 GTX would help. seriously this filter does a lot of complex math so it will never be as fast as temporalsoften. You can try compair it to fft3dfilter(used with my filter mt, it should be "fast" on a core2 processor not sure if it is faster than fft3dgpu though)

huang_ch
16th November 2006, 02:32
tsp: Thanks for your quick reply, I'll try your suggestions today.
About sharpening, I've tried buildin sharpener of fft3dgpu last night with param 0.3 or even 1.0, but don't have obvious visual effect to my eyes, while applying a LimitedSharpenFaster with strength=50/80, I could tell the difference easily, so I want to ask what kind of sharpen algorithm used in fft3dgpu? Is it similar to LimitedSharpenFaster?

And about the significant increase of bitrate, as you explained, I realized that this is as expected because sharpener also enhance the noise which decrease by denoisers, so a question is that is it possible to do another round of denoiser after sharpener by some settings only reduce the noise bring by sharpener? (high frequency or low frequency? I'm not familiar with them...)

Also, I'm not quite understand the goal of your suggestion about "You can try to reduce the denoising of the high frequency by setting sigma lower than sigma2,sigma3 and sigma4 like:....", what is this for?

About the performance, I've tried fft3dfilter once and fft3dgpu is really much faster than fft3dfilter(I don't remember the exact number, but at least 2x I think), but I'm just talking about optimization, and also some posts are claiming that GPU is xx times faster than CPU, so I'm dreaming for a xx times faster fft3dgpu than fft3dfilter.:D And I don't know how much extra performance could be gained if a fft3dgpu could be optimized special for a specific model (e.g. 7900gs), because different models have different number of registers, pixel/vertex shaders, etc.

And talking about the precision, do anyone get any difference with precision=0/1/2? I didn't get the visual difference myself, but the difference in performance is really big, so if no major difference, I think I'll go with precision=0.

tsp
16th November 2006, 22:25
the "high" frequency in the images represent sudden change in pixel intensity like edges and such while "low" frequency represent soft pixel intensity changes so lowering(=denoising) the high frequency blurs the image while increasing(=sharpen) the high frequency makes the edges look sharper. So lowering the denoising of the high frequency(sigma and sigma2) should make the image look less blurry.

the pixelshaders are compiled at runtime by directx so they are optimized depending on which pixelshader level that are supported. I develop fft3dgpu using a geforce 7800GT so it is "optimized" for the G70

huang_ch
17th November 2006, 02:35
tsp, got the meaning of high/low frequency, thanks.

huang_ch
18th November 2006, 09:04
tsp, I'm reporting another strange issue on my machine.
when I run with below script with VirtualDub's run analysis to test the performance, it always report a 30-32fps:
video=fft3dgpu(video,sigma=1,sigma2=1.5,sigma3=2,sigma4=2,plane=4,precision=0)
And if I run below script, it always report a 60-64fps:
video=fft3dgpu(video,sigma=1,sigma2=1.5,sigma3=2,sigma4=2,plane=0,precision=0)

What I mean "always" is that whatever core/mem frequency of my 7900GS I overclock or underclock, the highest is always 32/64fps. For example:
default is 475/1400, and I got 32/64fps max.
And for below settings they're always 32/64fps:
400/1400, 550/1400, 550/1560, 400/1560
And with below ultra low frequency, fps does reduced to about 28/58 fps: 360/1400, 400/1200
So it is strange that the maximum fps seems to be locked at ~60fps when plane=0, while ~30fps when plane=4.
Does anyone meet this kind of issue?
And I've tested at least with 91.47 or 93.71 nvidia drivers.

G_M_C
18th November 2006, 12:09
tsp, I'm reporting another strange issue on my machine.
when I run with below script with VirtualDub's run analysis to test the performance, it always report a 30-32fps:
video=fft3dgpu(video,sigma=1,sigma2=1.5,sigma3=2,sigma4=2,plane=4,precision=0)
And if I run below script, it always report a 60-64fps:
video=fft3dgpu(video,sigma=1,sigma2=1.5,sigma3=2,sigma4=2,plane=0,precision=0)

What I mean "always" is that whatever core/mem frequency of my 7900GS I overclock or underclock, the highest is always 32/64fps. For example:
default is 475/1400, and I got 32/64fps max.
And for below settings they're always 32/64fps:
400/1400, 550/1400, 550/1560, 400/1560
And with below ultra low frequency, fps does reduced to about 28/58 fps: 360/1400, 400/1200
So it is strange that the maximum fps seems to be locked at ~60fps when plane=0, while ~30fps when plane=4.
Does anyone meet this kind of issue?
And I've tested at least with 91.47 or 93.71 nvidia drivers.


Wait for tsp for a definitieve anwer; But I think you mistaken, and don't have a complete view of the whole idea. The 60 fps / 30 fps you report are not only limited by your graphics board.

See it as this (extremely simple version based on my assumptions); AviSynth sends a frame to the filter, the filter compiles the data to shaderops and raw data. It then sends it on to the GPU, wich does its work. The GPU sends the completed frame back tothe filter, wich "gives it back" to AviSynth. And AviSynth gives it to the application thats running the script.

As you can see the GPU only does a part of the whole prosess. Actuallly the biggest part relies on your system; The shader-compiling and the sending of all data from memory to the gpu, back to memory, further processing of the app. thats running the script, AviSynth itself; All that relies solely on you CPU and main system-memory. And dont forget much of the data has to thru a system-buss (AGP of PCI-E) wich generates CPU and Operating-System overhead (more for AGP then for PCI-E, but still).

But that's only my idead of whats happening. I'll leave it to tsp to give yoy the definitive answer (wich is probably even more complex than i can understand anyway ;) )

huang_ch
18th November 2006, 13:13
to G_M_C, but the cpu usage at that time is definitely below 50% (or even 30%) at that time, and my hardware is a E6600 with 1G*2 DDR2 800 memory, so I'm afraid that I can't be convinced by your explanation. :p Anyway, thanks for a quick reply. :)

huang_ch
29th November 2006, 02:07
Is there anyone could explain what I've met?

tsp
29th November 2006, 03:48
sorry no obvious explanation. Does lowering the resolution of the input video(by placing a reduceby2 before fft3dgpu()) helps and what resolution is the video?

huang_ch
29th November 2006, 04:12
The resolution is 720x480, I'll try lowering the resolution to see the FPS when I got back to home.

huang_ch
30th November 2006, 13:26
Just tried adding reduceby2 before fft3dgpu, the fps increased from 30/60 to about 80/150, but still doesn't see any obvious impact by changing the core/mem frequency... pretty strange

huang_ch
1st December 2006, 10:59
And another question is that, is there anything like pre-render in fft3dgpu? Which means when current frame is sent out through AVIsynth to the encoder, will the GPU continue render the next frame instead of waiting for the encoder asked for the next frame? If it has, what's the maximum frames will be pre-rendered?

Because I've found that, just like what I mentioned previously, when using VirtualDub to test the pure fft3dgpu process, it may have a 30fps result, but when using X264 to encode the video, it will usually drop to 14~16fps even with multi-threaded X264 on my Conroe, and the CPU usage usually between 60~80%, not always full, but if I didn't use fft3dgpu or replace it with fft3dfilter, CPU usage is mostly above 90%, so I think there may still be some cpu time wasted on waiting for the GPU to finish the filtering, but since I can get a maximum 30fps without encoding, I think the CPU waiting time could be reduced by something like pre-rendering.

John_He
2nd December 2006, 14:21
I have a problem while using fft3dGPU on a high-resolusion clip(1280 x 720), that is it sometimes doesn't provide the correct picture. I ran such script
AVISource("an_avi_file.avi")
fft3dGPU(sharpen=-0.5)
and get some wrong frames look like (pic1) - a mix of the previous(pic2) and the next frame(pic3). I also tryed fft3dFilter, which doesn't have such problem(pic4).

Is this a bug or just my mistake in using fft3dGPU?

foxyshadis
2nd December 2006, 15:16
Do you OC your video card at all? Do you have the latest drivers? It might be a problem with the filter, but video cards are notoriously less stable, often boosting speed by sacrificing accuracy and stability. Since they normally run specialized stuff, they can get away with that.

tsp
2nd December 2006, 17:31
I must admit that I didn't test fft3dgpu with sharpen values less than zero as they blur the image(that could be archived by increasing the sigma value). If the error occuring at the same place every time you open the script could you upload a 5 frame sample with include the bad frame as the third frame. Also please use something like www.imageshack.us to post the images so that we don't have to wait on approval.
Also what card and driver do you use?

huang_ch:
fft3dgpu uploads the next frame to the GPU while it process the current frame(sort of prerendering) but while the filters after fft3dgpu is running the GPU is idle. So if you increase the complexity of the filters before fft3dgpu or increase the complexity of the encoder you should see higher cpu utilization while retaining the same framerate.

John_He
3rd December 2006, 06:21
I must admit that I didn't test fft3dgpu with sharpen values less than zero as they blur the image(that could be archived by increasing the sigma value). If the error occuring at the same place every time you open the script could you upload a 5 frame sample with include the bad frame as the third frame. Also please use something like www.imageshack.us to post the images so that we don't have to wait on approval.
Also what card and driver do you use?

Thanks tsp and foxyshadis for replying.

The problem seems to appear in the same place when I run the script from the begining to the end of the clip. Then I open the script with VirtualDub and skip the first some frames then step forward, most of the bad frames remain bad, but a few bad frames fixed and a few good frames become bad.

I restore the parameters to default value but errors still occur.

My system: WinXP sp2
CPU: PD 820 no OC
memory: 1GB
video card: GF 7600GS 128M GDDR3 (driver: 93.71 WHQL)
DirectX: 9.0c Oct.2006

Here is a 5 frames sample, in this position error always occurs.
http://img141.imageshack.us/img141/9341/1co6.th.jpg (http://img141.imageshack.us/my.php?image=1co6.jpg)1

http://img141.imageshack.us/img141/3960/2ek2.th.jpg (http://img141.imageshack.us/my.php?image=2ek2.jpg)2

http://img152.imageshack.us/img152/2526/3sl5.th.jpg (http://img152.imageshack.us/my.php?image=3sl5.jpg)3(bad)

http://img247.imageshack.us/img247/4731/4gj2.th.jpg (http://img247.imageshack.us/my.php?image=4gj2.jpg)4

http://img167.imageshack.us/img167/1503/5ts3.th.jpg (http://img167.imageshack.us/my.php?image=5ts3.jpg)5

http://img152.imageshack.us/img152/171/3originaq4.th.jpg (http://img152.imageshack.us/my.php?image=3originaq4.jpg)3(origin)

huang_ch
3rd December 2006, 14:10
tsp, what you mean uploads the next frame is only uploading or uploading+do the filtering?

tsp
3rd December 2006, 22:15
huang_ch: I only upload the next frame(meaning the filters before fft3dgpu are used to get this frame). It might be possible to render the next frame while the rest of the script is running but the penalty of rendering the wrong frame will be higher than now.

John_He:
I can't reproduce the bad frame when running this script(1.jpg to 5.jpg is the 5 frames you provided).

ImageReader("F:\fft3dgpu_test\1.jpg",end=0)+ImageReader("F:\fft3dgpu_test\2.jpg",end=0)+ImageReader("F:\fft3dgpu_test\3.jpg",end=0)+ImageReader("F:\fft3dgpu_test\4.jpg",end=0)+ImageReader("F:\fft3dgpu_test\5.jpg",end=0)
converttoyv12().fft3dgpu(sharpen=-0.5)

do you overclock the video card and does it also happens with fft3dgpu()?

huang_ch
4th December 2006, 02:25
tsp, Let me test my understanding, the common process is like below:
some filters: process current frame
fft3dgpu: process current frame
fft3dgpu: upload next frame
some filters: process current frame
Is this the correct process?
But if there's really some filters before fft3dgpu which will change the frame, the "next" frame you uploaded when processing current frame is invalid after those filters filtering the next frame, so you'll need to upload it again, right? So this is what you mean, if you upload+process the next frame, the whole upload+process will be invalid and this will be totally a waste of time, right?
If my previous guess is right, then I think this situation will mostly happen when there's some filters which will change the frame before fft3dgpu, if there's no filters doing this kind of work, the upload+pre-render should work correctly, right? If so, will it possible to add a parameter to turn on a pre-render option? Just like pre-render=1 means it will upload and pre-render one frame ahead, if pre-render=5, it will upload and pre-render 5 frames ahead. Since the GPU are becoming more powerful, I think this could be useful to make full use of CPU+GPU. :)

John_He
4th December 2006, 07:20
I can't reproduce the bad frame when running this script(1.jpg to 5.jpg is the 5 frames you provided).
do you overclock the video card and does it also happens with fft3dgpu()?

I don't overclock my video card manually but I don't know if it is overclocked by default.

The error generally don't occurs at the begining but at, for example, after 100 frames(the sample I provided are frame 139-143). The script run at about 10fps at first, than after dozens of frames it slow down to 2fps, than turn back to 10fps, than 2fps...... Errors start to occur after the first 10->2fps changing and most posibly on I frames. The different start positions also cause different positions of the bad frames, for example, if I skip the first 130 frames using Trim(130,0), then frame 138 become a bad frame. Not all clips produce error, I use the filter on another clip in the same resolution, no errors occur, but also have 10fps->2fps->10fps.

I tested the script on my friend's PC and the same things happened. (his card: GF 7300GT 256M, driver: 84.66, using VirtualDubMod 1.5.10.2)

PS: the size of the JPGs I provided is reduced by 2, they are originally 1280x720.

tsp
4th December 2006, 21:36
John_He:
hmm could you create a small sample where the problem appears on your computer and upload it to ftp://richardb_tempclips:QfJY(86m@avisynth.org/
so I can try to reproduce it.

huang_ch:
it works like this currently:
virtualdub: request frame from avisynth (GPU idle)
filters after fft3dgpu: request frame from fft3dgpu (GPU idle)
fft3dgpu: start processing current frame
fft3dgpu: fetch the next frame from the filter before fft3dgpu
filter before fft3dgpu: process the next frame and return it to fft3dgpu
fft3dgpu: upload next frame to the GPU
fft3dgpu: wait for the gpu to finish processing the current frame while doing this the cpu is free to do other stuff like encoding (some cpu time is used in the gpu driver though).
fft3dgpu: download frame and return it to filters after fft3dgpu
filters after fft3dgpu: process frame and return it to virtualdub (GPU idle)

It might be possible to do it like this:
fft3dgpu: check if requested frame is currently being processed if not process it.
fft3dgpu: start processing next frame
fft3dgpu: wait for the requested frame is done and return it

It wouldn't make sense to prerender more than 1 frame as the GPU would still need the filters before fft3dgpu to return the source frame and they are limited by the cpu.

huang_ch
5th December 2006, 03:02
tsp, Thanks for a detail explanation, after thinking I agree that it doesn't make sense to prerender more than 1 frame.

John_He
5th December 2006, 08:58
John_He:
hmm could you create a small sample where the problem appears on your computer and upload it to ftp://richardb_tempclips:QfJY(86m@avisynth.org/
so I can try to reproduce it.


Well, I think I've found the critical point. That clip is a 120fps hybrid AVI.

* When I load the avi and change its framerate to delete the duplicated frames
AVISource("sample_120fps.avi")
ChangeFPS(24)
fft3dGPU()
errors occur.

* When I load the avi without changing its framerate
AVISource("sample_120fps.avi")
fft3dGPU()
errors occur.

* Then I recompress it to a 24fps avi, load it an apply fft3dGPU
AVISource("sample_24fps.avi")
fft3dGPU()
NO errors occur!

I've upload the beginning of the original 120fps avi, named "fft3dgpu_sample_120fps.avi"

tsp
5th December 2006, 22:28
John_He:
Thanks for uploading the clip. I also get corruption with it (and a couple of access errors) replacing avisource with directshowsource also seems to solve the problem (might be quicker than converting it to constant frame rate).

DarkNite
7th December 2006, 21:11
I just built my 8800 GTX based gaming system and all I have to say is... WOW! I might be playing less games, and doing more encoding on this box now. ;)

For now I have to RMA the matched pair I purchased for this board, but as soon as I get functional replacements I'll put up some benchmarks if anyone is interested in seeing how well an 8800 GTX handles fft3dGPU. Just let me know what conditions and parameters you'd prefer for the tests.

Are there any plans for dehalo in fft3dGPU? That would be really useful for me.

tsp
7th December 2006, 23:22
DarkNite: Could you try benchmarking this script:

ColorBars (width=1284,height=1024,pixel_type="YV12")
fft3dgpu(bt=4,sigma=2,sharpen=1,bw=128,bh=128,plane=4,precision=2,degrid=1,sigma3=5,oh=64,ow=64)

it runs about 4.3 fps on my geforce 7800GT 450/1400MHz
the fft3dfilter version below runs about 2 fps(1.2 fps without mt) on an opteron 165 2400 MHz

ColorBars (width=1284,height=1024,pixel_type="YV12")
mt("fft3dfilter(bt=4,sigma=2,sharpen=1,bw=128,bh=128,plane=4,degrid=1,sigma3=5,oh=64,ow=64)")

And yes the dehalo will be implementet at some time but when I can't tell.

DarkNite
8th December 2006, 01:52
Athlon 64 X2 5200+ ( 2.6 GHz )
GeForce 8800 GTX ( 575 / 1800MHz )

Min FPS: 12.002
Max FPS: 12.801

Notes:

Script loaded in VirtualDub, set to Direct Stream Copy, saved to AVI.

Memory usage was all over the board. No errors were caused, but may have been if the test was more than 10,000 frames. Haven't looked into where the leak/problem is yet.

huang_ch
8th December 2006, 05:59
Interesting, 8800 performs about 3x than 7800, is there anyone using ATI cards to perform the benchmark? It is said that ATI has a better generic computation performance over NVIDIA.

tsp, I've just seen a GPU FFT library posted in another thread, don't know you've seen it or not, maybe you could compare yours with this to see if it worth to try.
http://gamma.cs.unc.edu/GPUFFTW/results.html

G_M_C
8th December 2006, 09:46
Interesting, 8800 performs about 3x than 7800, is there anyone using ATI cards to perform the benchmark? It is said that ATI has a better generic computation performance over NVIDIA.

tsp, I've just seen a GPU FFT library posted in another thread, don't know you've seen it or not, maybe you could compare yours with this to see if it worth to try.
http://gamma.cs.unc.edu/GPUFFTW/results.html

@huang_ch:
Actually, i hope tsp leaves development the way it is now. Because we do not use this filter as a benchmark, to show off our GPU. And i sencerely hope FFT3DGPU doesnt get transformed into this kind of benchmark-stuff.

Actually, we use this filter to .... filter. And it does that very well, and we're fortunate it does it quite quickly. And also; If tsp manages to make it even better, but slower, I wouldn't mind at all.

IMHO (mind you, my opinion) i dont give a sh*t about fps, like meny other people here. We're all about video-quality. Even if sometimes scripts run at 1 fps because of all the filters; I still don't give a sh*t. Video in high quality is slow buisyness.

So (still my opinion), if you want to benchmark with it; Fine by me, but pleas do not do that in this thread. Because this one is for troubleshooting, information and notices from tsp about new versions (the last one is some time ago, are you working on something atm. tsp ?). At least that is how I understood it, and not wanting to sound like a moderator.

huang_ch
8th December 2006, 10:13
G_M_C, I didn't mean to turn this into a benchmark thread/filter, I just mean 2 things:
1. About the ATI VS NV: if anyone could provide some results here (though it is really like benchmarking), it will help others who interested in using FFT3DGPU in the future to choose which video card they should choose to buy. (I've already got a 7900GS and no plan to buy a new one in one or two years) If ATI really performs much better than NV with FFT3DGPU, why not suggesting the others to buy a ATI card if they want more speed?
2. About the GPUFFTW: I just saw this library, and it claims to be really fast, so I just suggest tsp may take a look at it, in case it is really fast than the current implementation in FFT3DGPU and if tsp is willing to switch to this library. I think doing FFT is just one transforming functionality of FFT3DGPU, it has nothing to do with how to remove the noises, so replace its implementation shouldn't hurt the quality(if that FFT is done correctly), why not have a try?
I think everyone switch from FFT3DFilter to FFT3DGPU has a bit consideration on performance, so all I mean is just optimization, no others. :)

DarkNite
8th December 2006, 11:40
@huang_ch

There wouldn't be any comparison to this card from the ATI camp yet. The only comparable ATI card as far general computing prowess goes would be their next generation flagship, which is very similar to the 8800 GTX in both transistor count and several areas of architecture.

It will be months before that question is answered, and even longer if you consider driver based issues and the fact that both of these cards are going to spend the first few months of their existence without proper, or even WHQL certified drivers.

Ask any folding team 4-6 months from now and I'm sure you'll get a clear answer.

@G_M_C

I don't care about speed. I care about end results. On the flip side: If a filter has the functionality I need, and produces results acceptable for use, then why not be happy it's going 3x faster? That's just one more positive for my purchase evaluation, and a little less buyer's remorse. Honestly, I'm not trying to turn this into a "benchmarking thread". Just sharing the answer to a question I had asked myself.

tsp
9th December 2006, 23:50
huang_ch: about gpufftw see previous answer here (http://forum.doom9.org/showthread.php?p=834288#post834288)

DarkNite:
using "run video analysis pass" in virtualdub with the testscript uses about 900 mb of memory that remains constant so no memory leaking here. Rather amazing that the geforce 8800 GTX are so much faster than my geforce 7800GT.

It could be nice with some result from ati card to make a better recommendation on what card to buy for fft3dgpu. I could add the result to the first post if people PM the result to me to reduce post cluttering.

I have been rather busy in real life(tm) so it might explain the lack of update.

Thunderbolt8
26th December 2006, 04:47
is the server currently down, I cant get any file from it :S

Thunderbolt8
29th December 2006, 19:40
recently I always get an error when trying to use fft3dgpu or fft3dfilter, megui complains somehow about the sigma value.

script is:

LoadPlugin("C:\Programme\VIDEOBEARBEITUNG\AviSynth 2.5\plugins\FFT3dGPU.dll")
# Set DAR in encoder to 37 : 20. The following line is for automatic signalling
global MeGUI_darx = 37
global MeGUI_dary = 20
DGDecode_mpeg2source("D:\DVD\Projects\OLD_BOY_VTS_01_PGC1\OLD_BOY.d2v",info=3)
ColorMatrix(hints=true)
fft3dgpu(sigma=2,plane=4,sharpen=0,5)
trim(17000,17600)
#deinterlace
#crop
#resize
#denoise


error message:

the file ...avs cannot be openend. error message for your reference: script error: the named argument "sigma" was passed more than once to fft3dfiltergpu (D:\....avs, line 7)

tsp
29th December 2006, 21:45
try this script :) (using . instead of , as decimal seperator)

LoadPlugin("C:\Programme\VIDEOBEARBEITUNG\AviSynth 2.5\plugins\FFT3dGPU.dll")
# Set DAR in encoder to 37 : 20. The following line is for automatic signalling
global MeGUI_darx = 37
global MeGUI_dary = 20
DGDecode_mpeg2source("D:\DVD\Projects\OLD_BOY_VTS_01_PGC1\OLD_BOY.d2v",info=3)
ColorMatrix(hints=true)
fft3dgpu(sigma=2,plane=4,sharpen=0.5)
trim(17000,17600)
#deinterlace
#crop
#resize
#denoise

Thunderbolt8
29th December 2006, 22:07
omg, now it works -.-

thanks

G_M_C
29th December 2006, 23:13
try this script :) (using . instead of , as decimal seperator)

[...]


LOL, i'm using AviSynth (and onther progs.) for a while now, and still frequently make that mistake :P

Warpman
30th December 2006, 19:56
btw tsp i have still the problem that the luma is 1frame ahead of the croma...
im stil using your "workaround" ... just to remind you :P

i have a Geforcefx 5900xt...

barbapapa5800
11th January 2007, 14:48
what i usally do is converting a avi to mpeg with diko.
i use the following script to do so.
can i replace a filter with this one for better results in time and/or quality?

converttoyv12()
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1)
Deen("c2d",2,4,6,4,6,0.5,9,"")
asharp(1,4)
UnDot()
DivXResize(WIDTH, HEIGHT, 0, "BicubicResize",WIDESCREEN)
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=2)
DivXBorders(HEIGHT,OVERSCAN)
AddAudio()

G_M_C
11th January 2007, 15:07
what i usally do is converting a avi to mpeg with diko.
i use the following script to do so.
can i replace a filter with this one for better results in time and/or quality?

What's the point of this question ? If you wanna try FFT3DGPU, then do so, but just putting a script here and asking us to improve it .... hmmm

I'm also just a noob in AviSynth; I think ive just learned to understand the tip of the iceberg, but i do try stuff myself and try to refrain from questions like this ...

barbapapa5800
11th January 2007, 16:13
oke, maybe i didn't use the right words to explane myself.
i have the FFT3dGPU working (diko allows me to this time) but the speed is only 1.
but i can tell by the temp of the GPU that it is doing something.
where do i put fft3dgpu(sigma=2,plane=4,sharpen=0.5)

putting is anywhere in the above script gives me no speed profits.
even try'd using onle the fft3dgpu(sigma=2,plane=4,sharpen=0.5) in a script.
nothing of a speed increase...

G_M_C
11th January 2007, 16:32
Well start off by editing out all other noise-filters; And rewrite the scrip that is only calls for blockbuster() once, and AFTER the noise filters; Now your adding noise, and subsequently filtering it out, before adding some new noise ? And if I read blockbuster's readme, I understand that it isnt SSE/MMX optimized ... so it's probably quite slow; If there is no specific reason for adding noise (why should there be) i would loose it from the script alltogether.

Also try use AviSynth's commands in stead of the DivX-versions; For instance replace the resizer and the borders-thingy; When encoding to XviD i might not even be needed to add borders. Is there a special reason for doinig it, encoding for DVD/full PAL and/or NTSC reso's for instance ?

But you still have the chance is will run slow, because youre graphics board isnt too fast. When you have a fast CPU the regular version (fft3DFilter) might even be faster.

I think your script could do better looking like this;


converttoyv12()
Spline16Resize(WIDTH, HEIGHT) # fill in the desired size
FFT3DGPU (sigma=2,plane=4,sharpen=1.1) #filter noise and sharpening a little
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=2) # might not even be nesessary
AddBorders(HEIGHT,OVERSCAN) #look in AviSynths manual for the correct syntax
AddAudio() #Add what audio ?

barbapapa5800
12th January 2007, 06:57
i'll give it a try this afternoon.
i have a E6600 @ 3.5 ghz and a 6800GT.

Also try use AviSynth's commands in stead of the DivX-versions; For instance replace the resizer and the borders-thingy; When encoding to XviD i might not even be needed to add borders. Is there a special reason for doinig it, encoding for DVD/full PAL and/or NTSC reso's for instance ?

i use a divx as a source and make a mpeg out of it.
i never make a dvd with a divx as source.

barbapapa5800
13th January 2007, 07:08
this is the script that diko makes:


*knip - all the plugins*
Import("C:\Program Files\DIKO\avisynth plugins\addaudio.avsi")
Import("C:\Program Files\DIKO\avisynth plugins\fmin.avsi")
Import("C:\Program Files\DIKO\avisynth plugins\jdl-interlace.avsi")
Import("C:\Program Files\DIKO\avisynth plugins\jdl-util.avsi")
Import("C:\Program Files\DIKO\avisynth plugins\resize.avsi")
#
# Script begins here... #
#########################
#
Avisource("C:\Program Files\DIKO\Temp\American.avi",false)
AssumeFPS(25)
WIDESCREEN=0
Overscan=1
source_widescreen=1
WIDTH=480
HEIGHT=576
INTERLACED=false
addborders(8,0,0,0)
addborders(0,14,0,0)
converttoyv12()
Spline16Resize(WIDTH, HEIGHT)
FFT3DGPU (sigma=2,plane=4,sharpen=1.1)
AddBorders(HEIGHT,OVERSCAN)
Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=2)
addaudio()
Subtitle("@ SKVCD.NL - CREW @", 130, 450, 75, 150, font="verdana", size=18, text_color=$ffFFFF)letterbox(8,8,8,8)
TextSub("C:\Program Files\diko\Temp\movie0.srt")
MonitorFilter
Converttoyv12()



when i leave the AddBorders(HEIGHT,OVERSCAN) out of the script, all the work is done by the GPU and the ripo takes about an hour of 10.

when i put the command back in nothing is done by the GPU and the rip is done in 15 minutes @ speeds of 30.

a normal rip with my old script is about 1 hour.

tsp
13th January 2007, 12:24
barbapapa5800: the GPU is only used to do the filtering inside fft3dgpu so the rest of the script is still processed by your cpu. So it will of course be slower with fft3dgpu than without it. Especially when you have a very fast cpu and a mid-end GPU. You might try my mt plugin if your cpu utilization is below 100% when encoding instead of fft3dgpu.

barbapapa5800
13th January 2007, 12:31
oke, thnx.
i have tried it before, but without succes.
maybe i'll try it again.

i know there whas a problem because diko genarates a script.

huang_ch
19th January 2007, 14:51
tsp, I ran into another problem these days, may be somewhat related to the strange FPS problem I described in a previous post (http://forum.doom9.org/showthread.php?p=901772#post901772)
The problem is also about FPS, when I try fft3dgpu with plane=4 for a video, I test its performance with VirtualDub, it gives about 33-36fps, but when I replace the plane=4 with plane=0 and a plane=3, the fps increased to ~65fps. If I only run plane=3 or plane=0, I got ~80fps.
Anyone met this kind of issue?

HeadBangeR77
19th January 2007, 15:52
tsp, I ran into another problem these days, may be somewhat related to the strange FPS problem I described in a previous post (http://forum.doom9.org/showthread.php?p=901772#post901772)
The problem is also about FPS, when I try fft3dgpu with plane=4 for a video, I test its performance with VirtualDub, it gives about 33-36fps, but when I replace the plane=4 with plane=0 and a plane=3, the fps increased to ~65fps. If I only run plane=3 or plane=0, I got ~80fps.
Anyone met this kind of issue?
The same by me, only the speeds are worse because of my hardware. As I'm not a prof, I can only assume the filter does its job for every plane separately (?). The default plane=0 (luma processing) is always the fastest for me, more or less the same speed as processing both chroma planes (plane=3). When I decide to process all possible planes (plane=4) it gets almost two times slower.

So I've got the same issue. The question is, should it really be like that? :confused:

EDIT: I get it now (banging his head against the nearest wall ;)) - plane=0 & plane=3 at the same time are plane=4, so there shouldn't be any difference in speed, should it?

tsp
19th January 2007, 22:28
hmm yes it seems like it is slower with plane=4 than with plane=0 and plane=3. I will see what is going on.

HeadBangeR77
19th January 2007, 23:54
I've just tested 'n I can confirm the above issue, although the difference by me is not so large as by huang_ch.

totya
20th January 2007, 11:15
Hi all!

My video card is ATI x1950Pro (580/1400)

Speed example :

Source : TV (captured video), PAL, 720x576
script line : FFT3DGPU(sigma=2, interlaced=false)
Speed is 31,94FPS

Good plugin, thank you.

Warpman
20th January 2007, 18:53
so tsp keeps ignoring me :/

my luma is 1 frame ahead of crome using
fft3dgpu()

but not with fft3dgpu(oldfft=true), so its a bug in the new code i guess

System
Geforce fx 5900xt 128mb (gainward)
Winxp Pro
Detonator tried 64.xx 84.xx 72.xx (all certified) even some omega drivers --> makes no difference

:thanks:

tsp
22nd January 2007, 00:30
Warpman: Thanks for figuring out that the problem lies in the new fft code. I will try testing if it is the lack of multiple render target in the fx code that are causing it. does interlaces=true also solve it?

Warpman
22nd January 2007, 21:18
i used
fft3dGPU(interlaced=true)

on a progressive clip (because i had no interlaced content atm)

did not change anything :(

webzeb
31st January 2007, 23:10
Hi,

I'm pure newbie.
So, please, be forbeading. ;)

I tried FFT3DGPU inside FFDShow :
FFT3DGPU (sigma=2,plane=0,sharpen=1.2)
playing HD x264 movies (resized to 1024*576px before FFT3D filering).

CPU Usage is OK (about 50% per core).
But framerate is really unstable.
Sometimes the video freezes, and restart playing smoothly for 1 or 2 seconds.
More suprisingly, sometime the video freezes, go backward of several frames (!), and the it start again to play smoothly.
No problem without FFT3DGPU...

Regards,

Fred

PS : I've nVidia 7900GTX. ForceWare 93.71 WHQL.

HeadBangeR77
31st January 2007, 23:29
I'm not sure, if even the strongest video cards could denoise (using fft3dgpu) in realtime, especially when it's HD content. I doubt it, sorry. Nevertheless a few tips to check:

1) Play some other video (DixV, XviD, lower resolution) and see, if it stattres or freezes, and if so, then how it is compared to the clip you've tested.

2) Download and open your aviscript with AVSP editor and do the same using the preview function (MPC required), If everything is ok, then blame ffdshow & avisynth cooperation, not the filter itself ;)

3) Try fft3dfilter (non-gpu version) using both of the above methods.

And report back, soldier :D
good luck!

Adub
31st January 2007, 23:38
Actually, yes, my ATI 1950 pro card runs fft3dgpu fine in realtime.

Also, webzeb, are you getting 50% total cpu usage or 50% per core, for a 25% total?
I ask because sometimes you need to multithread a little, or else the threads will all build up on one core, which to the program will look like it is using 100% total, and results in frame dropping and so on.

Although that backwards play is kind of weird.

webzeb
31st January 2007, 23:59
Actually, yes, my ATI 1950 pro card runs fft3dgpu fine in realtime.

Also, webzeb, are you getting 50% total cpu usage or 50% per core, for a 25% total?
Hi

About 50% usage for each core -> 50% total usage.
(Charge is corrrectly divided between the two cores of my overclocked E6300.)

I was think about the fact that my video card uses reduced frequencies (250Mhz instead of 650MHz) in 2D mode.
I increse GPU frequency which seems to reduce the problem...

Merlin7777
Does it runfine with HD material ?
(In my case, it's "only" a 1024*768px @23.976fps material...)

Thanks,

Fred

HeadBangeR77
1st February 2007, 00:21
I was think about the fact that my video card uses reduced frequencies (250Mhz instead of 650MHz) in 2D mode.
I increse GPU frequency which seems to reduce the problem...
How could I forget about that? :D
Well, in my case starting fft3dgpu switches on 3D mode (my custom one), so I totally forgot about such a possiblity.

Have you tried the original fft3dfilter?

cheers

Btw. sssss, it's a developement thread ;)

foxyshadis
1st February 2007, 11:30
About 50% usage for each core -> 50% total usage.
(Charge is corrrectly divided between the two cores of my overclocked E6300.)

I'm not sure why this myth keeps popping up lately, but 50% of each core is exactly the same as 100% of one core, for single threaded apps. Just because the scheduler distributes the requests across all the cores doesn't mean it has extra headroom; it's still limited to 100% of a single core, however that gets split up. (Maybe because in some cases XP splits them between cpus, and in others keeps it all to one.)

If you actually have multiple threads interacting and no single one is using 100% of one core (50% on dual-core), then you aren't cpu-limited, unless the threads are totally linear and can't parallelize anything. The only way to determine that is perfmon or process explorer.

The best advice I can tell is to ensure ffdshow is up to date for the most bug fixes, make sure some other filter isn't driving it over the limit, and try playing with some of the settings (esp. bt) if you still can't get smooth playback.

webzeb
1st February 2007, 12:36
I'm not sure why this myth keeps popping up lately, but 50% of each core is exactly the same as 100% of one core, for single threaded apps. Just because the scheduler distributes the requests across all the cores doesn't mean it has extra headroom; it's still limited to 100% of a single core, however that gets split up. (Maybe because in some cases XP splits them between cpus, and in others keeps it all to one.)

If you actually have multiple threads interacting and no single one is using 100% of one core (50% on dual-core), then you aren't cpu-limited, unless the threads are totally linear and can't parallelize anything. The only way to determine that is perfmon or process explorer.

The best advice I can tell is to ensure ffdshow is up to date for the most bug fixes, make sure some other filter isn't driving it over the limit, and try playing with some of the settings (esp. bt) if you still can't get smooth playback.
Hello,

Thank you for the advice. :)

However my filters (except resize) are multithreaded using MT.
My video decoder uses multihtreading too (CoreAVC Pro).

I thought I found what causes the problem.
If I disable LimitedSharpen, everything goes smoothly.

I keep you inform of the new tests (with lower resolution, etc.)

Regards,

Fred

fofwp
6th February 2007, 16:44
Can someone help me out?

I am trying to get this to work with the following script, but it either gives me an out of memory error or freezes Megui

DGDecode_mpeg2source("...")
trim(10000,11000)
crop( 0, 0, -2, -2)
LanczosResize(720,384)
fft3dgpu(sigma=2,plane=4,sharpen=0.5)
MT("LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=50, overshoot=1)", 3)

Anyone have any suggestions?


Thanks.

Boulder
6th February 2007, 16:57
Have you tried disabling filters one by one to see which one causes the issue? You might also want to try using LSF without MT.

fofwp
6th February 2007, 20:38
Have you tried disabling filters one by one to see which one causes the issue? You might also want to try using LSF without MT.

If I remove LFS then it is able to encode the video, but there is a line or a tear going down the middle of the image. I tried playing it in MPC w/ ffdshow and VLC, and both show the same effect.

Boulder
6th February 2007, 20:39
Uhm, what was your script like when that occurred?

fofwp
6th February 2007, 20:45
same as before, but with LSF commented out.

Boulder
6th February 2007, 20:53
Have you tried with plane=0, or different values for bw and bh in FFT3DGPU? Does the error occur when you load the script in VirtualDub?

fofwp
6th February 2007, 21:08
I can't really test anything right now (at work...), but I will play around with those settings when I get home.

When I view the avisynth script in VirtualDub I see some banding, is this normal?

Boulder
6th February 2007, 21:27
Banding should be visible only during playback, otherwise the video should look as it is.

webzeb
7th February 2007, 15:21
Hello,

I did more tests playing HD stuff, with FFDShow.

Hardware :

Core 2 Duo E6300 @3.3Ghz
1GB DDR2 @470Mhz
GeForce 7900GTX @667/907MHz (PCIe @105MHz)


Software :

Windows XP Professionnel Service Pack 2
DirectX 9.0c (4.09.0000.0904)
nVidia ForceWare 96.89 Beta
Media Player Classic 6.4.9.0
CoreAVC 1.2.0 Professional (for h264 and x264) / FFDShow Mpeg4 Decoder (for XviD)
FFDShow Tryout build 885 SSE
Avisynth 2.5.7
WMR9 Renderless (RGB32; YV12->RGB32 conversion made by FFDShow)


FFDShow config' (filters are given by order of use) :

Resize : Spline->1024*768px
Avisynth :
FFT3DGPU(plane=0,sigma=1.0,sigma2=1.0,sigma3=1.0,sigma4=4.0,precision=0,mode=2)
ColorMatrix(source=0,dest=2,threads=2,opt=2)
Sharpen : aSharp 1/4/0
DeBand : 1.1


Results :
Performance could vary in a HUGE proportion. It seems to be depending on CPU usage, as if FFT3DGPU was waiting for the other filters (or reciprocally).
For example :

Underworld 2 720p Xvid playback is perfectly smooth (Core #1 : ~20% / core #2 : ~55%)
Domino 1080p x264 playbak is very jerky : it freezes and go back of several frames about every second (Core #1 : ~40% /Core #2 : ~70%). If I take off FFT3DGPU from the filter chain, everything goes smoothly, and CPU usage remains almost the same.
In the same way, if I introduce a "CPU time eater" filter in the avisynth script (LSF for example, as mentioned in my previous post), playback becomes again jerky. Without FFT3DGPU, no problem.

I do not understand how filters interact under FFDShow. I thought FFT3DGPU simultaneously runs with other filters of the avisynth script...

Regards,

Fred

PS : I forgot an important thing : thank you for that great plugin !

tsp
7th February 2007, 19:34
webzeb: It is a known issue that the framerate can be erratic at times with fft3dgpu. This does unfortunately makes it rather hard to use it for realtime filtering. It also appears when not using directshow. I don't know what causes it (the GPU driver uses a rather large amount of cpu resources at times so it might be sensitive to the current cpu utilization (maybe)). Also fft3dgpu runs simultaneously with the filters before fft3dgpu (it simply request what it believes is the next needed frame while the GPU is working on the current frame.

webzeb
7th February 2007, 19:46
webzeb: It is a known issue that the framerate can be erratic at times with fft3dgpu. This does unfortunately makes it rather hard to use it for realtime filtering. It also appears when not using directshow. I don't know what causes it (the GPU driver uses a rather large amount of cpu resources at times so it might be sensitive to the current cpu utilization (maybe)). Also fft3dgpu runs simultaneously with the filters before fft3dgpu (it simply request what it believes is the next needed frame while the GPU is working on the current frame.
Hi,

Thank you for your quick answer.

I'll correct filter order.

I noticed that sometimes FFT3DGPU ran out of memory with HD stuff (always resized in 1024*xxx).
However it never did it the first time I lauched the player. Overall the performances seem to be better for the first played file.
It's pure speculation (of a pure newbie ;) ), but isn't it possible that a part of the video memory wouldn't be free as it should after FFT3DGPU was used ?

Regards,

Fred

HeadBangeR77
8th February 2007, 19:01
@ tsp
Just a short question (yet not so easy, I suppose ;)): has anyone reported much different results as to the strenght of denoising between fft3dgpu (I'm using the latest 0.8.2) and fft3dfilter (I'm using the latest 2.1.0), while using identical sigma values?

I'll describe the matter briefly:
I'm doing some very gentle denoising on a very noisy and grainy source (I would like to preserve most of the grain). I've been using fft3dgpu all the time, since it's running a bit faster on my hardware, with my current avs scripts (packed with Didee's stuff ;)). Today I wanted to try the latest fft3dfilter, mostly to compare the speed, and finished with differently denoised clips, what surprised me totally! :eek:

1) Resizing only (Lanczos3) : 163 MB.

2) Deblocking, BlindDeHalo3 PP, LimitedSharpenFaster, Soothe + a few more small things : 188 MB.

3) As above +
fft3dgpu(sigma=0.5,bt=3,plane=3,mode=1,degrid=1.0)
fft3dgpu(sigma=0.5,bt=3,plane=0,mode=1,degrid=1.0)
167 MB.

4) As above +
fft3dfilter(sigma=0.5,bt=3,plane=3)
fft3dfilter(sigma=0.5,bt=3,plane=0)
177 MB!

The difference isn't mariginal imo. I've tried the fft3dfilter also with just plane=4, as well as with the script:
YToUV(fft3dfilter(sigma=0.5, plane=1).UToY,\
fft3dfilter(sigma=0.5, plane=2).VToY,\
fft3dfilter(sigma=0.5, plane=0))
and the results are always identical, though much different from those of fft3dgpu. (?)

I've checked the default parameters: bw=bh=32 for both your gpu version and the normal one (used to be 48, was changed with 1.9.2). The only ones that differ are:

ow=bw/2 ,oh=bh/2 for yours vs. X/3 by Fizick's plugin
16 bit default precision by the gpu version

Could those two settings lead to more than 5% difference in the filesize?

cheers,
HDBR77

webzeb
8th February 2007, 21:39
webzeb: It is a known issue that the framerate can be erratic at times with fft3dgpu. This does unfortunately makes it rather hard to use it for realtime filtering. It also appears when not using directshow. I don't know what causes it (the GPU driver uses a rather large amount of cpu resources at times so it might be sensitive to the current cpu utilization (maybe)). Also fft3dgpu runs simultaneously with the filters before fft3dgpu (it simply request what it believes is the next needed frame while the GPU is working on the current frame.
Hello,

I'm sorry to mess around with you again.

Could you remove all doubt ?:confused:
If I run the following script in the Avisynth filter of FFDShow :
MT("Spline16Resize(1024,last.height)",threads=2,splitvertical=false)
MT("Spline16Resize(last.width,768)",threads=2,splitvertical=true)
FFT3DGPU(plane=4,sigma=0.5,sigma2=0.5,sigma3=1.5,sigma4=0.5,mode=2,precision=0)
will FFT3D GPU proceed resized frame (i.e. 1024*768px), original-sized frame ?

It might look stupid, but I'm not sure... :D

Thank you,

Fred

tsp
8th February 2007, 22:00
HeadBangeR77: yes for some reason even with the 32 bit precision and same overlap fft3dgpu and fft3dfilter produces different result (with fft3dgpu producing a slight worse signal to noise ratio). It might be something to do with the floating point math not being as precisely implemented on the GPU (if this was the case a geforce 8800 should fare better).

webzeb: It will produce resized frames as spline16resize comes before fft3dgpu.

HeadBangeR77
8th February 2007, 22:23
HeadBangeR77: yes for some reason even with the 32 bit precision and same overlap fft3dgpu and fft3dfilter produces different result (with fft3dgpu producing a slight worse signal to noise ratio). It might be something to do with the floating point math not being as precisely implemented on the GPU (if this was the case a geforce 8800 should fare better).
First of all, thanks for the quick reply. :)

Secondly, I'm not sure if I get you correctly ... "slight worse signal to noise ratio"(?) But those were fft3dfilter's sample-encodes, that always came out with larger filesize. Should I assume that the gpu version swallows some details instead of noise, due to the probable worse precision? I can't mark that, I would have to analyze still frames, yet over sigma=1 (luma filtering only) I've marked some very slight details' loss with sharp & detailed sources, and I'm a quality-freak. :D

Btw. I've got Radeon 9800 PRO @ XT, if it matters.

tsp
8th February 2007, 22:43
HeadBangeR77: I used the test from this (http://forum.doom9.org/showthread.php?t=114582) thread and fft3dgpu produced slightly worse result than fft3dfilter. But if it was because not as much noise was removed or some of the original details was removed I don't know. But as fft3dgpu creates a small compressed file it suggest that something is removed. It is up to your eyes to judge if it noise or something you want to keep. (and remember to look at the final compressed result when comparing the two filters). It might also depend on what encoder you are using (h264/xvid/mpeg2) and quantization matrix used.

HeadBangeR77
8th February 2007, 23:37
HeadBangeR77: I used the test from this (http://forum.doom9.org/showthread.php?t=114582) thread and fft3dgpu produced slightly worse result than fft3dfilter. But if it was because not as much noise was removed or some of the original details was removed I don't know. But as fft3dgpu creates a small compressed file it suggest that something is removed. It is up to your eyes to judge if it noise or something you want to keep. (and remember to look at the final compressed result when comparing the two filters). It might also depend on what encoder you are using (h264/xvid/mpeg2) and quantization matrix used.
Thanks again.
As to metrics, I've got similar attitude as Didee has, so judging on the base of metrics, with artificially added noise (or grain), isn't for me (and never would I turn my back on fft3dgpu from this reason ;) ;) ;)).

Guess I must have a look at still frames to mark the difference, although I really haven't seen any details loss using the gpu one with sigma values 0.5-0.8. That's why the difference I described in my posts above surprised me so much.

XviD 1.1.2, Heini's 6of9, preserves grain better than Didee's, and thus gives me less compressable results - good for testing denoisers. ;)

cheers,
HDBR77

ianken
10th February 2007, 08:13
Any chance of getting a version that uses SLI or Crossfire if its there? Right now on my system one GPU is smokin hot, the other is bored and twiddling its thumbs. :-)

webzeb
10th February 2007, 12:20
Any chance of getting a version that uses SLI or Crossfire if its there? Right now on my system one GPU is smokin hot, the other is bored and twiddling its thumbs. :-)
Hi,

As far as I'm concerned I think that making performances more constant between two sessions would be the first step.

I tested ~10 denoisers, and I love what FFT3DGPU gives.
I really appreciate the fact I could filter even lower frequency that other filters leave...

Edit : I did more tests with the latest Beta ForceWare (i.e. 96.89 Beta). I noticed a HUGE performance drop when playing the video on secondary screen (WMR9 Renderless is used). Nothing like that without FFT3DGPU.
It really has a strange behavior !
May be I have a software configuration/setup problem ?

tsp
10th February 2007, 15:18
webzeb: Sometimes there are some problem with hardware acceleration on the secondary display. It might be that you are experiencing.

As far as I'm concerned I think that making performances more constant between two sessions would be the first step.

you mean a more consistent framerate?

ianken: It is not high on the TODO list as I don't have a SLI configuration to test it with.

Fizick
10th February 2007, 15:36
The only ones that differ are:

ow=bw/2 ,oh=bh/2 for yours vs. X/3 by Fizick's plugin


It is the key difference,
try compare with explicit same ow, oh

webzeb
10th February 2007, 16:52
webzeb: Sometimes there are some problem with hardware acceleration on the secondary display. It might be that you are experiencing.

you mean a more consistent framerate?

ianken: It is not high on the TODO list as I don't have a SLI configuration to test it with.
Yep,

Framerate changes too much from one time to another, which (as you previously highlighted it) makes it uneasy to use for realtime playback.

Regards

PatchWorKs
19th February 2007, 10:33
Dunno if can help, but seems that NVIDIA released an interesting SDK:
NVIDIA® CUDA™ technology is a fundamentally new computing architecture that enables the GPU to solve complex computational problems in consumer, business, and technical applications. CUDA (Compute Unified Device Architecture) technology gives computationally intensive applications access to the tremendous processing power of NVIDIA graphics processing units (GPUs) through a revolutionary new programming interface. Providing orders of magnitude more performance and simplifying software development by using the standard C language, CUDA technology enables developers to create innovative solutions for data-intensive problems. For advanced research and language development, CUDA includes a low level assembly language layer and driver interface.

NVIDIA CUDA Homepage (http://developer.nvidia.com/object/cuda.html)

tsp
19th February 2007, 16:57
PatchWorKs: Yes CUDA is very cool but unfortunately it only works with geforce 8xxx and later. When I get my hands on a geforce 8800 I might try using CUDA to rewrite fft3dgpu for it.

devaster
28th February 2007, 21:19
try rapidmind more better as brookGPU...
i have a good experiences with it (setiGPU)

ianken
13th March 2007, 09:59
ianken: It is not high on the TODO list as I don't have a SLI configuration to test it with.


That's fine. Just asking.

FWIW it does not run on Vista. Surprise. Whose fault? NVIDIA (the drivers are WEAK) or MS? Dunno. Another low priority item to add to the list I guess.

G_M_C
13th March 2007, 11:20
PatchWorKs: Yes CUDA is very cool but unfortunately it only works with geforce 8xxx and later. When I get my hands on a geforce 8800 I might try using CUDA to rewrite fft3dgpu for it.

Since i use this filter on allmost every encode i do, i'm itching for news about update ... are there any in your planning atm ?

AssassiNBG
20th March 2007, 16:51
Hello,

I have a big problem. VDub keeps crashing with an Access Violation caused by d3dx9_30.dll associated with fft3dgpu. I have updated to the latest drivers for my 6600GT, and the latest DirectX version from February 2007, but I still get this error which prevents me from finishing a two pass encode in virtualdub (I've tried both stable and latest beta versions, I also tried the MPEG2 mod version, no use).

I hope someone could help me, or at least, upload the dll you have and is supposed to work fine.

Thanks!

tsp
20th March 2007, 17:17
G_M_C: I don't have enough money for a geforce 8800 GTS yet so not much progress here.

AssassiNBG: I need a little more information before I can do anything about it. Like what script you are using. What codec is you using for encoding. Does it happen instantly or after a while. What are the exact error message.

AssassiNBG
20th March 2007, 18:10
Yeah, sorry, I figured I should describe my problem better.

It only happens when using vdub's job control to do a 2pass encode. I use XviD for encoding and the following script:

Import("aa.avs ")
Import("F:\DVDRips\2ndtry\masktools-v2.0a30\masktools\LimitedSharpenFaster.avsi")
Loadplugin("F:\DVDRips\2ndtry\RemoveGrain\RemoveGrainSSE3.dll")
Loadplugin("F:\DVDRips\2ndtry\MaskTools-v1.5.8\masktools.dll")
Loadplugin("F:\DVDRips\2ndtry\masktools-v2.0a30\mt_masktools.dll")
Loadplugin("F:\DVDRips\2ndtry\WarpSharp.dll")
Loadplugin("F:\DVDRips\2ndtry\FFT3dGPU.dll")
Loadplugin("F:\DVDRips\2ndtry\RemoveGrain\RepairSSE3.dll")
Loadplugin("F:\DVDRips\2ndtry\RemoveGrain\RSharpenSSE3.dll")
Loadplugin("F:\DVDRips\2ndtry\RemoveGrain\DenoiseSharpen.dll")
Loadplugin("F:\DVDRips\2ndtry\SangNom.dll")
Loadplugin("F:\DVDRips\2ndtry\eDeen.dll")

LoadPlugin("F:\DVDRips\2ndtry\Decomb.dll")

AVISource("F:\DVDRips\2ndtry\project_d2v_vfapi.avi")
ConvertToYUY2()
AssumeTFF()

Telecide(guide=0,post=2,vthresh=43,blend=true)
Decimate(5)

antialiasing()
FFT3DGPU(sigma=3, bt=1)

Crop(8,0,-6,0)
LanczosResize(640,480)
LimitedSharpenFaster()

And when I manually do the first pass, then go and choose second pass, save as avi, and it is fine.

So the crash occurs at the end of the first pass, somewhere around the beginning of the second one. The status of the second one in the job control says Aborted.

The error from the crashdump is the following:
An out-of-bounds memory access (access violation) occurred in module 'FFT3dGPU'...

...writing address 00000059.

Maybe someone could try and reproduce the error by running the script I am using on a small file just for the sake of reproducing the crash. That would really help out in seeing whether the problem is in conflicting DLLs from the script, or just a problem in my configuration. (Although I have no idea what it might be caused by, since I installed the latest versions of DirectX and the ForceWare drivers.)

tsp
20th March 2007, 21:58
AssassiNBG: ok I can reproduce it or maybe a variant of it. It looks like the script from the first pass isn't properly been shut down and that it casing problem with the creating of the script for the second pass. I will try to see if I can fix that. Else maybe Megui might be an option until then.

AssassiNBG
20th March 2007, 22:01
That is some relieving words you have man! I hope you can fully identify and manage to fix the problem.

In the meantime, I'll check that MeGUI out. :)

Thanks!

tsp
21st March 2007, 00:22
It turns up that it is masktool that are causing the problems as the clips before mt_inpand is not destroyed. This simple script causes the same error if the script is opened in virtualdub, closed and reopened without closing virtualdub:

blackness().converttoyv12()
FFT3DGPU(sigma=3, bt=1)
mt_inpand()

I use version 2.24 of masktools. I will try and see if upgrading helps

[EDIT]
Yes it seems like the bug was fixed in 2.26 so get the latest version from the masktools thread (http://forum.doom9.org/showthread.php?p=701539)

AssassiNBG
21st March 2007, 14:52
Hey there,

Did you mean v2.0a30 ? That is the latest version I found in the thread. And it's from June 2006. Also I have it loaded in my script, but perhaps it is conflicting with MaskTools 1.5.8. I'll comment the line loading masktools 1.5.8 and try again.

Thanks!

PS. I tried without masktools 1.5.8 but apparently the antialiasing script requires it. Specifically it requires the EdgeMask function from MaskTools 1.5.8. I would like to ask what the alternative for EdgeMask is in masktools 2.0+ ? Also if it might help here's the antialiasing function I got from another thread here on doom9 forums:

function antialiasing(clip orig,int "th_luma",int "th_croma",string "type",int "aath") {

# "th_luma" & "th_croma" are the edge detection thres.: lower values=more edges filtered
# "type" is the matrix used for edge detection: with "sobel" (default) only the
# hi-contrast edges, where artefacts are more noticeable, are filtered. If you want
# to test other matrices, read the MaskTools Guide for more info.
# "aath" = anti-aliasing strenght (default should be fine)

th_luma = Default(th_luma, 20)
th_croma = Default(th_croma, 20)
type = Default(type, "sobel")
aath = Default(aath, 48)
ox = orig.width
oy = orig.height
dx = orig.width * 2
dy = orig.height * 2
clp = orig.IsYV12() ? orig : orig.ConvertToYV12()

a=clp
b=clp.Lanczos4Resize(dx,dy).TurnLeft().SangNom(aa=aath).TurnRight().SangNom(aa=aath) \
.LanczosResize(ox,oy)
c=clp.EdgeMask(th_luma,th_luma,th_croma,th_croma,type)
MaskedMerge(a,b,c)

}

Please help me tweak/fix this function to work with masktools 2+. Thanks!

G_M_C
21st March 2007, 20:51
G_M_C: I don't have enough money for a geforce 8800 GTS yet so not much progress here.

AssassiNBG: I need a little more information before I can do anything about it. Like what script you are using. What codec is you using for encoding. Does it happen instantly or after a while. What are the exact error message.

I dont have one either, and dont plan on getting one. I was merely asking, and hoping for, updates since i use FFT3DGPU a lot :)

Boulder
21st March 2007, 21:51
AssassiNBG: did you try using MPEG2Source instead of AVISource (i.e. VFAPI)?

AssassiNBG
23rd March 2007, 20:58
Yeah, I did, but the problem is still present. I guess it's not because of the source. And it is also definitely not because of masktools since I was helped modifying the function so it now works with masktools 2+. But the crashing still occurs.

@tsp Which version exactly works ok for you ? Apparently the latest one doesn't fix the problem for me. :(

tsp
23rd March 2007, 21:31
AssassiNBG: fft3dgpu 0.8.2 with virtualdub 1.6.17 using a two pass job file encoded with xvid 1.2 -127. with you script. Does this script also fail?

Loadplugin("F:\DVDRips\2ndtry\FFT3dGPU.dll")

AVISource("F:\DVDRips\2ndtry\project_d2v_vfapi.avi")
ConvertToYUY2()
FFT3DGPU(sigma=3, bt=1)

if not try commenting out 1 filter at a time in our script until you find out what is causing the problem.

AssassiNBG
26th March 2007, 20:41
Hmm, I tried commenting out each filter since the script above worked fine numerous times. You're probably not going to believe it, but it was LimitedSharpenFaster that causes the crashing.

The cartoon I'm encoding right now can go without a sharpener, but I'm sure I'll need a sharpener for other encodes in the future. Does anyone know any substitute for LSF ? No matter how slow it is, I'm only concerned about quality. Or could someone try fft3dgpu along with LSF please ? Or should I turn Didee (he's written the function right ?) for help ?

Or perhaps if both the developers of LSF and fft3dgpu could team up to try identifying and fixing the problem. I'm willing to provide crashdumps of VDub for the errors, but I'm sure you'll be able to reproduce the effect yourself.

Thanks so far for the help whatever happens!

tsp
26th March 2007, 20:55
seesaw (http://forum.doom9.org/showthread.php?t=104701) might be worth trying.
I will create a version of fft3dgpu that should provide a little more usefull error message.
Does it still appears when you use blackness(length=8) instead of AVISource("F:\DVDRips\2ndtry\project_d2v_vfapi.avi")
?

AssassiNBG
27th March 2007, 05:56
seesaw (http://forum.doom9.org/showthread.php?t=104701) might be worth trying.
I will create a version of fft3dgpu that should provide a little more usefull error message.
Does it still appears when you use blackness(length=8) instead of AVISource("F:\DVDRips\2ndtry\project_d2v_vfapi.avi")
?

I hvaen't tried with blackness=8, but I will after school later today.

SeeSaw I've tried and didn't really like, because it created jitter (is that what it's called - dots around edges) which makes the otherwise smoothed picture back to what it was (almost). But I'll have to try with a few more denoisers as I've only tried with another fft3dgpu() in the script.

All right, off to school for me.
Later.

UPDATE:
So it crashes with blackness(length=8) too.

I tried SeeSaw with a few denoisers but it crashed with each and one of them. It seems that the clip doesn't want to get sharpened. :P I tried degrainmedian, vaguedenoiser and the one that gave me the best result (no jitter) was hqdn3d. But the script crashed VDub with all of them. This is really weird. What could both LSF and SS have in common (except that they're sharpeners) in terms of processing the clip, that causes the crashing ?

swaaye
18th April 2007, 01:15
I picked up an 8800 a month ago and realized that it would be fun to give FFT3DGPU a shot now. I've used the filter with a X800GTO2 (which is basically a underclocked X850XT) previously.

So, I've found that with a 720x480 source off a DVD, I see about 60-85 fps (in VDubMod). I'd say the average is around 70fps. Running a very simple script and doing just a preview of output with no compressor:


MPEG2Source("source",idct=3)
FFT3dGPU(sigma=1.5)


I thought the speed was a bit disappointing as I think my X800GTO2 at 510/600 was more than half as fast. So, I loaded up ATITool and underclocked the 8800 GTX down to 200 MHz core. I saw a very minimal change of at most 10 fps. I'm using the NV 158.19 and tried some unofficial 101.02 drivers (they fixed some game issues I was having with the 97.92s).

Very strange...... GPU temp doesn't really go up. Stays around its idle temp (in games it'll hit 85C sometimes and the fan will spin up to keep it there). CPU usage is only about 10-20%. Core 2 Duo.

Leak
18th April 2007, 09:47
So, I've found that with a 720x480 source off a DVD, I see about 60-85 fps (in VDubMod). I'd say the average is around 70fps. Running a very simple script and doing just a preview of output with no compressor:
That would be because VirtualDub limits the preview frame rate to some value (Screen refresh rate? Dunno...). Try turning off input and output video and just look at the statistics instead.

foxyshadis
18th April 2007, 10:11
The quick way to benchmark either decoding or decoding+encoding in vdub is "run video analysis pass", which bypasses the preview. It renders to the encoder chosen, if that's uncompressed it's as if there wasn't one.

swaaye
18th April 2007, 17:56
That would be because VirtualDub limits the preview frame rate to some value (Screen refresh rate? Dunno...). Try turning off input and output video and just look at the statistics instead.

Well, I did uncheck the boxes to view the input and outputs. And yeah, when those are on, it was locked to like 30 fps or so.

swaaye
18th April 2007, 18:05
The quick way to benchmark either decoding or decoding+encoding in vdub is "run video analysis pass", which bypasses the preview. It renders to the encoder chosen, if that's uncompressed it's as if there wasn't one.

Doing this I still see ~65-70 fps. My refresh rate is 60 Hz (LCD).If I just run the test with MPEG2Source("source",idct=3), I see over 300 fps.

In practice, the speed isn't a real issue though. I can run:

MPEG2Source("source",idct=3)
tfm(d2v="source")
tdecimate()
Crop(2,0,-2,-0)
LanczosResize(640,464)


at the same speed with or without FFT3DGPU and with Divx at quality preset 5.

Oh, and I tried full 32-bit mode (precision=2) and didn't see a major speed loss. It was only a few fps.

tsp
18th April 2007, 22:13
how does it compare to darknite's result here (http://forum.doom9.org/showthread.php?p=913875#post913875)?
I suspect that there are a bottleneck somewhere in the driver maybe with upload or download to/from the gpu as it is obvious nether cpu or gpu limited.

swaaye
18th April 2007, 23:53
how does it compare to darknite's result here (http://forum.doom9.org/showthread.php?p=913875#post913875)?
I suspect that there are a bottleneck somewhere in the driver maybe with upload or download to/from the gpu as it is obvious nether cpu or gpu limited.

using:

ColorBars (width=1284,height=1024,pixel_type="YV12")
fft3dgpu(bt=4,sigma=2,sharpen=1,bw=128,bh=128,plane=4,precision=2,degrid=1,sigma3=5,oh=64,ow=64)


200/900 MHz, 8.0-8.3 fps
400/900 MHz, 12.8 - 13.7 fps
574/900 MHz, 12.8-13.7 fps
574/300 MHz, 5 fps
574/600 MHz, 9-9.5 fps
574/700 MHz 9.1-10 fps
574/1000 MHz, 13-14.5 fps
630/1000 MHz, 13-14.5 fps
temp rose to 80C on the GPU.

Fascinating stuff. I wish we could get ahold of that neat NVIDIA Developer Toolkit! :)
http://www.beyond3d.com/content/articles/10/4

Adub
19th April 2007, 01:34
you should be able to, just search for it on google. Nvidia even has a link to it on their site if I remember. Or maybe that was just the performance viewer.

bill_baroud
19th April 2007, 07:19
Doing this I still see ~65-70 fps. My refresh rate is 60 Hz (LCD).

Do you have something like "wait for vsynch" always activated in your drivers config ? It could be an explanation :)

swaaye
19th April 2007, 17:01
No, I tried forcing vsync off too. Besides, if it was vsync related, it would never hit 70 fps.


http://developer.nvidia.com/page/home.html
I went ahead and tried out NVPerfKit but its built-in "instrumented driver" didn't detect my 8800. I set the NVPerfHub var for FFT3DGPU anyway, to see if it would work anyway, but all that came up was an empty black window.

I also looked at FX Composer, but I really don't have a clue how to set that up with FFT3DGPU.

photoguy123
19th April 2007, 19:09
swaaye,

have you tried processing from your hard drive instead of directly from the DVD?

the data rate is so small it shouldn't make a difference, but at least it would remove one variable from the equation.

swaaye
19th April 2007, 20:01
I'm not processing from the DVD. I always go from the HDD.

With tsp's suggested benchmark I did earlier, I do think the GPU was going full tilt. It got warmer than it does with the processing I'm doing with it normally. And the speed was several times higher than tsp reported for his 7800. So, I think it is working ok. I do think there are some significant bottlenecks that result in the GPU's utilization being not really optimal, but I'm sure these aren't something he can work around easily.

But, I'm only going off the fact that the GPU isn't heating up much. When 8800 is being utilized well you can tell because it heats up to 85C and the fan will spin up a bit to keep it from going higher. I can hear this when playing Oblivion. It's interesting because it literally depends on what you're looking at in the game. The workload apparently changes dramatically and 8800 really reacts to it.

Also interesting is that even with the 8800's massive memory bandwidth, it does seem to be a bit limited by it.

DarkNite
21st April 2007, 13:05
So, I've found that with a 720x480 source off a DVD, I see about 60-85 fps (in VDubMod). I'd say the average is around 70fps.

Something is definitely not right. I get ~108fps with the same script.

ianken
22nd April 2007, 08:57
FWIW it does not run on Vista. Surprise. Whose fault? NVIDIA (the drivers are WEAK) or MS? Dunno. Another low priority item to add to the list I guess.

With the 158.18 drviers fft3dgpu now runs on Vista. Perf rocks on my 8800GTS setup.

shadowhaze
7th July 2007, 20:14
tsp - AWESOME program :thanks: Such an ingenious idea. GPUs are true workhorses. I'm sure you know that NVDA is now launching software for people to use their graphics cards instead of their CPUs for heavy calculations. By using my GPU, I've increased my encoding speed about 3x. It's still relatively slow, but at least it's managable.

Are you still working on the updates? I'd love to be able to use bt=5 like in FFT3DFilter along with a DeHalo option.

A couple of questions. First, I've got my GPU (7900GS) overclocked for 3D @ 595Mhz/1600Mhz, but 2D GPU is at the 525Mhz base clock. Does the program take advantage of my OC? I'm going to download NV Tools - performance since I saw an optimization for that and try to OC the 2d mode (doesn't work right now). Any suggestions for the performance settings?

Second, my card has 256MB of GDDR3. I think that's enough (barely) for one thread encoding, but if I try 2 threads, do I need to put some sort of memory setting in my script? I saw some postes scripts with something like "mem=128".

Thanks again for your help and a great program.

DarkNite
7th July 2007, 23:32
You only need to worry about the memory settings in your script if you have a filterchain that uses copious amounts of memory. If your script isn't that complex you probably won't have to worry about it. Then again, using SetMemoryMax(128) wouldn't harm anything if you didn't need all that memory.

fjhdavid
8th July 2007, 16:52
Dear all,

I use fft3Dfilter from a long time and it is perfect for me but slow!

I tried fft3dGPU with my intel gma 915 graphic card (with direct x 9.0c) and it doesn't work. I use DVD-RB with HC encoder. These card support the pixelshader 2.0 in hardware.

Do I have something special to do? a special tweak?

thanks
francois

shadowhaze
8th July 2007, 21:03
You only need to worry about the memory settings in your script if you have a filterchain that uses copious amounts of memory. If your script isn't that complex you probably won't have to worry about it. Then again, using SetMemoryMax(128) wouldn't harm anything if you didn't need all that memory.

DarkNite - I think I need it. My script is as follows:

Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\FastLineDarken v1.3.avsi")
AVISource("C:\Documents and Settings\pc owner\My Documents\Bleach to Dvd files\FLCL to DVD\converted video\FLCL 01 Furi Kuri.avi")
DeDot()
VagueDenoiser(threshold=1.5,method=1,nsteps=6,chromaT=2.0)
FFT3DGPU(sigma=2.3,bw=32,bh=32,bt=3,sharpen=0.3,mode=1,precision=2,ow=16,oh=16,wintype=0)
LimitedSharpenFaster(Smode=4)
FastLineDarken(strength=32,thinning=0)

Where do I put "SetMemoryMax(128)" in the script? Also, if my video card has 256mb of GDDR3, should I use 128 or 256? I really don't want to slow anything down, but I do need more stability.

Thanks.

Thanks.

shadowhaze
8th July 2007, 21:16
Dear all,

I tried fft3dGPU with my intel gma 915 graphic card (with direct x 9.0c) and it doesn't work. I use DVD-RB with HC encoder. These card support the pixelshader 2.0 in hardware.

Do I have something special to do? a special tweak?



I'm assuming when you say you have an Intel 915 graphics card, you mean you have Intel integrated graphics (on the motherboard) rather than a discrete video card.

I haven't been using this program long, but I understand the idea behind it. Unless you have a separate graphics card (ex. NVidea 7900GT or 8800GTs, or ATI x1950XT), you can't use this program effectively, if at all. Integrated graphics are not designed for heavy work or hard core gaming - just picture and basic video stuff. You need a stand alone (discrete) graphics card for this program to work effectively, if at all. The better your graphics card, the faster your processing (ex. you'll get much higher FPS w/ a nVidia 8800GTS than with a nVidia 7800GT). There's a list of "good" and "bad" graphics cards in the read me file.

Hope this helps.

tsp
8th July 2007, 21:25
fjhdavid: There are no such thing as intel GMA 915. The intel 915 chipset contains the intel GMA 900. It doesn't support hardware vertex processing and I think that it might cause the problems. Anyway I think it would be faster to use fft3dfilter than fft3dgpu with an integrated intel GPU :)

shadowhaze: As fft3dgpu uses directx 3d the Geforce will run at the 3d speed so you will see some improvement by overclocking. Just be carefull not to overclock too much as fft3dgpu is very sensitive to it (it will produce artifacts that will be saved in the final video)

Also SetMemoryMax only affects how much mainmemory avisynth will use for its cache not how much gpu memory fft3dgpu will use. If fft3dgpu runs out of GPU memory it will swap some of the textures to main memory. This might cause some slow down. So SetMemoryMax should not be necessary. Best thing to do is to try running two threads.

Prim3
9th July 2007, 05:55
lol

1.40FPS


Mpeg2Dec3_Mpeg2Source("C:\Documents and Settings\Makaveli\Desktop\Test Vob 1\test1.d2v")
SetPlanarLegacyAlignment(true)

FFT3DGPU(sigma=3.0, bt=3, bh=128, bw=128, mode=1)

ConvertToYV12


It's probably my x264 settings. What would you recommend for best settings tsp? Time, is not a problem for me. It's all about the quality, for me. Can it also be the bh, bw?

Also, with Fizick's filter, it's about the same. Around 1.40FPS. So, I'm pretty sure it's my x264 settings.

And I'm running 8800 GTS 320MB.

shadowhaze
9th July 2007, 20:24
lol

1.40FPS

OUCH! I've refined my script a little (see below) as I was having trouble with LimitedSharpenFaster, and now I'm averaging 20FPS encoding avi w/ HCenc. That's about 3 times faster than FFT3dfilter in the same chain.

[DeDot()
VagueDenoiser(threshold=1.5,method=1,nsteps=6,chromaT=2.0)
FFT3DGPU(sigma=2,bw=32,bh=32,bt=3,sharpen=1,mode=1,precision=2,ow=16,oh=16,wintype=0)
FastLineDarken(strength=32,thinning=0)]

It's probably my x264 settings. What would you recommend for best settings tsp? Time, is not a problem for me. It's all about the quality, for me. Can it also be the bh, bw?

Also, with Fizick's filter, it's about the same. Around 1.40FPS. So, I'm pretty sure it's my x264 settings.

And I'm running 8800 GTS 320MB.

8800 GTS - Nice! :) That should be twice as fast as mine - 7900GS (assuming same CPU, etc.). I've tried x264 encoding and got weird results. I suggest you do a comparison of FFT3dGPU vs FFT3dfilter using XVID instead of x264. That way you can determine whether it's x264 or something else.

Also, your antialiasing and anisotropic settings may cause problems. I have mine set at application controlled for encoding. Maybe tsp can comment on what effect, if any, these have on FFT3dGPU.

shadowhaze
9th July 2007, 20:39
shadowhaze: As fft3dgpu uses directx 3d the Geforce will run at the 3d speed so you will see some improvement by overclocking. Just be carefull not to overclock too much as fft3dgpu is very sensitive to it (it will produce artifacts that will be saved in the final video).

Oops :rolleyes: I have mine just about maxed out (595MHz GPU/1.68Ghz DDR3). I didn't see any artifacts in the vob file during a quick scan, but I'll drop it down a little just in case.

Also SetMemoryMax only affects how much mainmemory avisynth will use for its cache not how much gpu memory fft3dgpu will use. If fft3dgpu runs out of GPU memory it will swap some of the textures to main memory. This might cause some slow down. So SetMemoryMax should not be necessary. Best thing to do is to try running two threads.

I'm using HCenc so I can't run two threads, but I could try it w/ QuEnc as test since HCenc is supposed to support multi-threading in the next version.

Please see my post above re: the question on antialiasing and anisotropic settings. Also, after reading the FFT3dfilter thread, I thought bw & bh = 32 (default) were usually the best settings. Any thoughts? Finally, please let me know if you're planning to update FFT3dGPU anytime soon. I'd like an option to use bt=5 (bt=4 doesn't see that great), and I'm not sure if this version has the Gaussian High Pass Filter for sharpening introduced in FFT3dfilter v1.7. In fact, I'm not sure what version of FFT3dfilter equates with FFT3dGPU version 0.8.1.

Thanks for the reply and great program.

tsp
11th July 2007, 22:06
shadowhaze: It is best to set the antialiasing and anisotropic to application controlled as it is not used by fft3dgpu.
Also when the encoder uses more than 1 thread it usually only fetch one frame at a time from avisynth so there shouldn't be such a big difference from avisynth's perspective.
Also fft3dgpu 0.8.1 is closest to fft3dfilter 1.8. I plan to introduce the dehalo and bt=5 some day (but no ETA yet)

Prim3: if you only get 1.4 FPS it sounds like it is x264 that are the limiting factor. The best settings depends very much on the source so you will have to experiment (but do use precision=2 for best quality).

survivant
15th July 2007, 02:29
I try fft3dgpu 0.8.2 but I can't get it to work form me. THe image is corrupted. I have a screenshot here

http://24.202.22.217:8282/fft3dGPU.png

I have Windows XP, ATI X800 Pro 256 megs. DirectX 9.0c.

the script is simple.. it work if a remove the line for fft3dpgu and replace it by fft3d

G_M_C
15th July 2007, 10:59
I try fft3dgpu 0.8.2 but I can't get it to work form me. THe image is corrupted. I have a screenshot here

http://24.202.22.217:8282/fft3dGPU.png

I have Windows XP, ATI X800 Pro 256 megs. DirectX 9.0c.

the script is simple.. it work if a remove the line for fft3dpgu and replace it by fft3d

:script:

survivant
15th July 2007, 11:21
movie = mpeg2source("C:\DVD\encode\automkv\intro.d2v",info=3)
function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
Return order }
#filter1start

#test3

movie = tfm(movie,d2v="C:\DVD\encode\automkv\temp\movie.d2v").tdecimate()
#resizestart

#test4

last = movie
#filter2start

#test5

crop(16,16,-16,-16)
Spline36Resize(704,400)


fft3dGPU(mode=1,precision=2)

ColorMatrix(mode="Rec.709->Rec.601")

G_M_C
15th July 2007, 13:34
movie = mpeg2source("C:\DVD\encode\automkv\intro.d2v",info=3)
function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
Return order }
#filter1start

#test3

movie = tfm(movie,d2v="C:\DVD\encode\automkv\temp\movie.d2v").tdecimate()
#resizestart

#test4

last = movie
#filter2start

#test5

crop(16,16,-16,-16)
Spline36Resize(704,400)


fft3dGPU(mode=1,precision=2)

ColorMatrix(mode="Rec.709->Rec.601")

When you try this one, do you get better results ?

mpeg2source("C:\DVD\encode\automkv\intro.d2v",info=3)
ColorMatrix(mode="Rec.709->Rec.601",hints=true)
tfm(d2v="C:\DVD\encode\automkv\temp\movie.d2v").tdecimate()
crop(16,16,-16,-16)
Spline36Resize(704,400)
fft3dGPU(sigma=0.20,sigma2=0.25, sigma3=0.35,sigma4=0.50,precision=2)

Else try to get newest version of DX9c and/or updated drivers; And try my script again.

PS: Used low settings for sigma's. when your source is allready clean enough you really should not have to use sigma's > 1. For DVD and/or HD sources i allway use settings < 1 when the source is clean allready.

survivant
15th July 2007, 13:46
PS: Used low settings for sigma's. when your source is allready clean enough you really should not have to use sigma's > 1. For DVD and/or HD sources i allway use settings < 1 when the source is clean allready.

thanks.

I posted the last script that I use.. but even the simplest one won't work.. look at the image I posted.

movie.avs

DGDecode_mpeg2source("C:\DVD\encode\megui\intro.d2v",info=3)

the line for fft3dgpu

fft3dgpu()

or fft3dgpu(movie)

or I try the line from the manual

fft3dGPU(mode=1,precision=2)

it give me always a corrupted image.

I have recent DirectX and Drivers.

there is a way to launch fft3dGPU with debug information or verbose mode.. I could run it and post the result.

thanks

survivant
16th July 2007, 22:44
Reinstall my drivers.. and still the same problem

survivant
17th July 2007, 00:57
I jsut install DirectX 9.0c June 2007

and when I try to script in AVSP, I obtain an error : Error Creatind Direct3D Device

G_M_C
17th July 2007, 13:09
Hopefully TSP has the time to look at it soon, cause it seems to be a problem witch no-one else can adress. You might wanna use the non-gpu FFT3D in the mean time, as a slow (but hopefully temporary) work-around.

survivant
17th July 2007, 15:21
exactly. I'll continue to use FFT3D for now.. but it's 2fps :(

tsp
17th July 2007, 18:57
survivant: could you try different mode=0,1,2 and/or oldfft=false/true and see if it makes any difference?

survivant
17th July 2007, 19:28
OK, I'll tonight. send my all the tests that you want that I do and I'll send you the results.

I try all the combinaisons but give the same results.

here the avs (with few lines in comments)

mpeg2source("C:\DVD\encode\automkv\temp\movie.d2v",info=3)

#FFT3dGPU()
#FFT3dGPU(mode=0)
FFT3dGPU(mode=1,oldfft=true)

G_M_C
19th July 2007, 06:55
OK, I'll tonight. send my all the tests that you want that I do and I'll send you the results.

I try all the combinaisons but give the same results.

here the avs (with few lines in comments)

mpeg2source("C:\DVD\encode\automkv\temp\movie.d2v",info=3)

#FFT3dGPU()
#FFT3dGPU(mode=0)
FFT3dGPU(mode=1,oldfft=true)

Didn't work ? Hmmm, then i really dont know anymore :confused:

Archiver
20th July 2007, 01:27
@survivant

I just came by to see if there is an updated version of fft3dgpu.

I use fft3dgpu (0.8.2.0) since some time with different Nvidia cards. When there was any (visual) output issue, it did not matter what card-model, driver and directx version i used, i always got some weird output. Replacing fft3dgpu with fft3dfilter solved the symptoms, but was not useable, due to poor performance.

The video-output issues simply had either to do with the input format and or the usage of fft3dgpu parameters. My experiences led me to the following:

- use mode=1
- use bt=3 (bt=4 -> can worsen results)
- use precision=0 (precision=2 -> can worse results)
- make sure you set the "interlaced=" parameter properly !!
- bh, bw values higher than default 32 can lead to decreased quality

These hints are more likely to get max. quality, except that the correct interlaced parameter value is vital.

I saw your sample pic, even i do not know what the original should look alike, it reminds me of the fact that fft3dgpu is very sensitive for "input modulos" !!

Make sure you do not have "weird" input resolutions, always make sure that you always have (at least !) modulo 4 = 0.

tsp made a great tool, but in some cases it needs some experience and or experimenting with it's quirks, to get the "same" results as with the usage of fft3dfilter.

Hope you can make it run properly, fft3dgpu is really a fantastic tool, especially when it denoises in such quality and much faster than real-time. ;-)

I hope these hints can help solve your problems, if not, they might help others. At least they made me love fft3dgpu ;-)

survivant
20th July 2007, 01:34
Make sure you do not have "weird" input resolutions, always make sure that you always have (at least !) modulo 4 = 0.


It's really a % 4. It's ok I'll have to continue to use fft3.. it's really slow.. but do a great job.

Maybe tsp will contact me to test a new version :)

Archiver
20th July 2007, 01:42
It's really a % 4. It's ok I'll have to continue to use fft3.. it's really slow.. but do a great job.

Maybe tsp will contact me to test a new version :)

I see.

Ehm, did you upload some sample clip ?

G_M_C
20th July 2007, 08:32
I use fft3dgpu (0.8.2.0) since some time with different Nvidia cards. [...]

Me too, In fact i use a Gainward Bliss 7800GS; Wich actually has a 7900GT chip with 24 pipelines on it (on AGP).

I haven't had any problems what-so-ever with FFT3DGPU and my NVidia-card. So i cant confirm your expiriance with you NVidia's.

3ngel
20th July 2007, 11:39
Sorry for the (pheraps already replied) question :) but:
1) ATM with the same params the result is the same as normal FF3DFilter?
2) There is a considerable speed improvement comparing the cpu=2 of normal FF3D and this FF3DGPU on a X1950?
Thanks

survivant
20th July 2007, 16:22
ATI just release a new set a drivers 7.7. I'll try if it's solve the problem. Maybe FF3DGPU been tested with old drivers, and it doesn't work with my ATI X800 Pro anymore

Archiver
20th July 2007, 20:42
Me too, In fact i use a Gainward Bliss 7800GS; Wich actually has a 7900GT chip with 24 pipelines on it (on AGP).

I haven't had any problems what-so-ever with FFT3DGPU and my NVidia-card. So i cant confirm your expiriance with you NVidia's.

I mostly use an XFX Geforce 7900 GT (std. clocks) and it gives me about 35 fps at Full-PAL (768x576, interlaced). :)

Before FFT3DGPU, i could not really use FFT3DFILTER, because it is just so slow on any machine setup. I can say from my experience with tests i did with my setup, that with the use of the 7900 GT my denoising is much faster than real-time, something i could only dream about before.

By the way, you were just lucky not to experience some problems, because you did not have the same circumstances. It is not due to a particular Nvidia chip, at least the ones i used so far.

Archiver
20th July 2007, 21:16
ATI just release a new set a drivers 7.7. I'll try if it's solve the problem. Maybe FF3DGPU been tested with old drivers, and it doesn't work with my ATI X800 Pro anymore

Yes, ATI .. lol ... don't get me wrong, they made great GPUs, BUT they did not learn how to deliver "proper" drivers in 20+ years !
Just watch the update frequency compared to Nvidia ... and be sure it is not because Nvidia belongs to those companies who's policy is like ... "we give a driver, if it does not work, let the customer write one himself" .. no, their software in general is just superior and that's what counts in the end.

p.s.
and yes, i also was victim of "ATI Technologies Ltd." for years.

Archiver
20th July 2007, 21:33
Sorry for the (pheraps already replied) question :) but:
1) ATM with the same params the result is the same as normal FF3DFilter?
2) There is a considerable speed improvement comparing the cpu=2 of normal FF3D and this FF3DGPU on a X1950?
Thanks

I cannot speak for your system obviously, but i can give you an idea of the performance relations:

with fft3dfilter (ncpu=1) -> 11 fps
with fft3dfilter (ncpu=2) -> 12 fps

with fft3dgpu -> 35 fps

Following commands used (system with core2 duo 2.4 CPU and 7900 GT GPU):

FFT3DFILTER(sigma=4, sharpen=1.2, bw=32, bh=32, ow=16, oh=16, bt=3, interlaced=true, ncpu=1)
FFT3DFILTER(sigma=4, sharpen=1.2, bw=32, bh=32, ow=16, oh=16, bt=3, interlaced=true, ncpu=2)

FFT3DGPU(sigma=4, sharpen=1.2, mode=1, bw=32, bh=32, ow=16, oh=16, bt=3, precision=0, interlaced=true)

I know, to compare fft3dgpu to fft3dfilter i should use "precision=2", but i do not anymore, since i mostly got weird or clearly worse results (precision=2 results in about 1-2 fps less than with the use of precision=0).

The X1950 (Pro, or better) is quite a fast card, so should make sense to give it a try.

survivant
21st July 2007, 13:56
and yes, i also was victim of "ATI Technologies Ltd." for years.

I'll not enter this game :)

The point is the fft3dgpu doesn'T work with my video card..

survivant
27th July 2007, 18:57
if I bought a new graphics card. Which card should I choose, to be sure that it's supported in FFT3DPGU ? Could be ATI or Nvidia (but it will be a PCI-E card and a recent one :) )

tsp
27th July 2007, 20:49
nvidia geforce 7800GT on windows xp as that is what I use. geforce 8800 would of course be faster and someday I will get one of those.
Rather annoying that the different cards aren't more compatible with each other.

TheRyuu
27th July 2007, 22:30
nvidia geforce 7800GT on windows xp as that is what I use. geforce 8800 would of course be faster and someday I will get one of those.
Rather annoying that the different cards aren't more compatible with each other.

I've used fft3dgpu on an 8800GTS 640. It was slightly faster then using fft3dfilter with SetMTMode(2) on a dual core Opteron @ 2.7ghz.

However, I was overclocking my 8800GTS which made fft3dgpu give off a lot of artifacts. fft3dgpu seems to be rather sensitive to overclocks since pretty much no other game or benchmark or any 3d app shows any signs of artifacts.

So when I use it I just have to lower my overclock or I just go and use fft3dfilter since it's not that much slower with setmtmode(2).

survivant
27th July 2007, 23:14
OK thanks. I don't think that I'll buy a 8800.. don't have enough money :)

if tsp have a Nvidia I'll go with that :)

TSP do you have a debug version that I can test trying to figure what is the problem with my ATi X800 pro ?

I'll reinstall XP this week, and see if that solve the problem

Zach
1st August 2007, 10:29
However, I was overclocking my 8800GTS which made fft3dgpu give off a lot of artifacts. fft3dgpu seems to be rather sensitive to overclocks since pretty much no other game or benchmark or any 3d app shows any signs of artifacts.

I'm wondering if that's my problem. I have a factory overclocked 8800GTX, but when I got it a couple of months ago, I torture-tested it with a 15 hour 3dMark06 loop, and needless to say, I haven't had a lick of trouble with this card.

With that said, I can't get fft3dGPU to run more than two minutes before my entire system freezes. :( No errors... no crashes... explorer just locks up. Mouse still works and the keyboard sort of works (but laggy), but the OS is so locked up that it won't accept input from either so I have to manually reboot the machine.

Since the overclock is hard-coded in the card's firmware, I guess I can try using RivaTuner or something to down clock it and see if that fixes the problem.


Update: For reasons mostly unrelated to this, I restored an image of my system drive from two days ago. I've only tried one thirty minute clip, but using fft3dgpu did not lock up my system this time. <crossing fingers hoping I repaired my apparently corrupt system.>

TheRyuu
5th August 2007, 04:33
It might of had something to do with drivers or driver settings like AA/AF.

Rivatuner can downclock a card although it shouldn't freeze (somehow the freezing seems software related).

Zach
7th August 2007, 02:39
It might of had something to do with drivers or driver settings like AA/AF.

Heh... I seen that "advice" before, but explain to me how to set the AA/AF settings for a 2D application. :p (This is a trick question, so answer carefully. :))


Anyway, I processed another thirty minute clip with no problems, so as I indicated in my "Update:", I'm pretty sure that it was just my system, as a whole, that was messed up. Since I've restored my system, everything has been working flawlessly, knock on wood. :)

Leak
7th August 2007, 08:13
Heh... I seen that "advice" before, but explain to me how to set the AA/AF settings for a 2D application. :p (This is a trick question, so answer carefully. :))
If you're using FFT3DGPU, it's no longer a 2D application... simple as that... :D

totya
7th August 2007, 08:57
Sorry..I don't know these information, if I set AA OFF, 2X, 4X in the VGA control panel, the fft3dgpu noise filter quality is change?

aqualung99
21st August 2007, 00:34
I just wanted to send a big "Thank You!" to tsp!
I have some very, very noisy 1080p source -- and to my eye a little bit smoother is way better than sharper with dots. So, for me, a simple:

FFT3dGPU(sigma=6, precision=1)

gives me dramatic noise reduction (I know 6 sounds high, but believe me it needed it) and works in real time. Booyah!

I'm basically getting all the power (well, all I care about) of the FFT3DFilter for free. It's like my own little slice of heaven...

FYI I have Intel Core2 x6800 and dual 8800 GTX in SLI (though not sure if FFT3dGPU is utilizing both cores or not -- don't really care since I'm already getting real-time or better...)

My only "complaint" (and I wouldn't even call it that) is that if I try to use "precision=2" then I get an E_OUTOFMEMORY error from fft3dgpu. But again, I don't really care that much since I'm not doing any sharpening I don't think I'm losing anything. Just a little surprised about the memory error when these 8800 GTXs each have 768MB on-board...

Thanks again tsp!!! You the man!

DarkNite
21st August 2007, 12:26
FYI I have Intel Core2 x6800 and dual 8800 GTX in SLI (though not sure if FFT3dGPU is utilizing both cores or not

That's a good question... Have you tried looking at the nVidia temperature monitoring applet yet to look for any indications of activity? It's doubtful that there is (something comes to mind about the lack of an SLI profile), but worth knowing for those with more than one GPU.

aqualung99
21st August 2007, 20:09
That's a good question... Have you tried looking at the nVidia temperature monitoring applet yet to look for any indications of activity?

I have now :) By default, it looks like only one GPU is used. By I can force both GPUs to get used by using the nVidia control panel ("Manage 3D settings") and adding a new entry for VirtualDubMod.exe in the Program Settings. Then I just have to set "SLI Performance Mode" to "Force split-frame rendering" and there we go -- both GPUs go up in temperature by about 5 degrees while running.
Hope that helps somebody...:)

DarkNite
22nd August 2007, 10:04
Well let's see if it helps YOU first. ;)

We can determine that by comparing your benchmark scores against mine (http://forum.doom9.org/showthread.php?p=913934#post913934) (a single 8800 GTX).

Run this script through VirtualDubMod using a video test pass, or direct stream copy and save as avi, and let us know what your minimum and average fps are.

ColorBars (width=1284,height=1024,pixel_type="YV12")
fft3dgpu(bt=4,sigma=2,sharpen=1,bw=128,bh=128,plane=4,precision=2,degrid=1,sigma3=5,oh=64,ow=64)

It would also be useful to know what your results are with a single GPU first.

aqualung99
23rd August 2007, 02:50
Well let's see if it helps YOU first. ;)

We can determine that by comparing your benchmark scores against mine (http://forum.doom9.org/showthread.php?p=913934#post913934) (a single 8800 GTX).

Run this script through VirtualDubMod using a video test pass, or direct stream copy and save as avi, and let us know what your minimum and average fps are.

ColorBars (width=1284,height=1024,pixel_type="YV12")
fft3dgpu(bt=4,sigma=2,sharpen=1,bw=128,bh=128,plane=4,precision=2,degrid=1,sigma3=5,oh=64,ow=64)

It would also be useful to know what your results are with a single GPU first.

I'll have to wait about 12 hours before trying this (just started a big transcode) but I'll let you know. All 3 planes will probably be slower than what I'm used to only doing 1 :)

aqualung99
23rd August 2007, 16:25
I don't really trust the numbers I'm seeing. Can you tell me exactly how you got your min FPS/max FPS figures? Assume I know nothing....
Also, doing a "Save as AVI" seems like a bad idea right? I don't want to be limited by my hard-drive speed for the benchmark....(as rediculous as that might sound)
Other than that, you mention a "video test pass", which I thought I had interpreted correctly but again lead me to suspect figures.
Sorry if this seems dumb, just want to compare apples to apples...more details for the newbie please! :)

:stupid:

Tanma
23rd August 2007, 20:57
FFT3dGPU doesn't have support yet for MT use?

Fizick
23rd August 2007, 22:30
Do you have multi GPU? ;)

DarkNite
23rd August 2007, 23:31
Can you tell me exactly how you got your min FPS/max FPS figures?



1) Open script in VirtualDub, go to "File" menu, select "Run video analysis pass"... Watch status screen to get a feel for how your results should look, and then repeat three times (using kronos in script) and refer to dump file for reports after each pass. Average the results for lowest fps values returned from each pass, and highest fps values returned from each pass. Close to "real world" results, but technically a synthetic benchmark.

2) Open script in VirtualDub, go to File menu, select Save as AVI... Same methods for monitoring and results. "Real world" results since I would never encode and not have an output file saved.

If your storage arrangement can't handle the minimal output from this benchmark that does a fine job of stressing the GPU and not your disk throughput you have much larger problems to worry about than idealism.

I ran the test as I had seen it mentioned before (in VirtualDub) otherwise I would usually run a script for benchmarking through avs2avi with the -c null switch and check the average reported at the end of each pass. Min and max fps results are a bit more useful to me though (got spoiled by them doing gaming benchmarks and spotting bottlenecks), and it's easy to get the average from them for those who want that.

The test will be useful enough (no matter how you do it) as long as you do both single GPU test runs, and multi GPU test runs.

aqualung99
24th August 2007, 01:25
Thanks for the instructions. I'm no expert at doing this stuff, so take these figures with a grain of salt...

Here are my results:

Single GPU:
Best FPS: 16.00
Worst FPS: 14.42
Notes: 2nd GPU stays cold. The average was closer to 16 than it was to 14.42...


Dual GPU (Split-frame):
Best FPS: 16.02
Worst FPS: 15.45
Notes: Increase temp of both GPU confirmed. The average was maybe ~0.1 fps higher than the single GPU configuration.


Dual GPU (alt-frame 1):
Best FPS: 15.53
Worst FPS: 15.07
Notes: 2nd GPU stays cold. Lower average than single GPU configuration.


Dual GPU (alt-frame 2):
Best FPS: 15.53
Worst FPS: 14.43
Notes: Increase temp of both GPU confirmed. Lowest average of all configs (usually 14.something)


Conclusion? Probably save some electricity by sticking with single GPU config...:)

[Edit: FYI when I use my "simple" setting (fft3dgpu(sigma=1.5,precision=1)), I get Min 38.00fps and Max 39.26fps. Very sweet :) ]

DarkNite
24th August 2007, 10:22
Well, if the min is rising that at least tells you it's doing something right. It's encouraging just to know it doesn't crash and present an access violation. ;)

Your results actually make me want to test my card out again since my numbers were from one of the initial drivers, and they were horribly glitched in certain areas. I was also running on a single stick of value RAM I salvaged from a slave box until my matched pairs came back from RMA.

Oh well, I'll just assume the results are better then they were. Thanks for taking your time to let us know how it worked out for you. I call my card the 8800 FTW ;)

aqualung99
25th August 2007, 11:48
[Kind of Off-topic]

Well, this could have something to do with it as well:

http://www.tomshardware.com/2006/11/29/geforce_8800_needs_the_fastest_cpu/

Or, that may be bull-sh*t :) But it at least *appears* to be true here...I leave it to the readers to decide.

[/Kind of Off-topic]

Haven't seen a post from tsp in a while. In theory, his stress-test might actually achieve 24 fps (or maybe even 30!) on dual 8800 GTX cards if configured properly. I think the key is acting more like a video game (SLI is pretty much automatic for most games.)
For the record, I'd be happy to test any builds and report the results. (I'm definitely in love with the fft3dgpu filter :) )

[Edit: Not sure that came out right. Tsp, if you never want to touch this filter again that's ok by me. You've already delivered a wonderfull filter to this community. I just wanted to make it clear that I would help any way I can if you would like.]

DarkNite
26th August 2007, 12:06
I'll wait for real quad core. Somehow pasting two dual core dies together with no integrated cache just doesn't do it for me.


Your post made me think about what's left to be done for this filter IMHO. There's nothing I can think of that I actually use within this filter that doesn't already work for me.

Well, now that I have Bioshock and Shivering Isles, I might not be posting for ages as well. :D

TheRyuu
22nd September 2007, 17:13
I finally started using this filter and I love it.

It is faster then fft3dfilter, although not by much.

I have it running stable on my 8800GTS at 600/1800 for the clocks. Anything higher then that and it starts to get unstable. Anything lower, and well, it's slower. :p

Thanks and great work on the filter.

Jeremy Duncan
27th September 2007, 00:36
I can't use dehalo with the version available today.

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

May i ask that the FFT3DGPU be updated to include the parmeters of the FFT3DFILTER version 2.1.1

Why do you change the default parameters in the gpu version from the cpu version ?

tsp
27th September 2007, 22:00
Jeremy Duncan: well I plan to include in the next version but I don't know when that will be ready (could be a while). Also the default parameters is the same as fft3dfilter 1.8.5 that the current version of fft3dgpu is based on (expect bw,bh,ow,oh value as they need to be a power of two in fft3dgpu)

CruNcher
22nd October 2007, 14:05
Hi tsp did you read this yet ?
http://www.gpgpu.org/s2007/
wouldn't it be better (faster, less error prone to buggy windows drivers) to implement fft3dgpu (interface for Avisynth to CUDA/CTM or GPGPU) directly via Nvidia (CUDA) and ATI/AMD (CTM) own APIs or maybe GPGPU instead of going over the limited shaders ?
i think such a version would be especialy beneficial for all the users with the Newer GPGPU capable cards but im not sure how it looks with backward compatibility for ATI/AMD it seems to support pretty much every older Chip (just performance differences) but for Nvidia it seems only starting with the new G8x at least thats what the Marketing says on CUDA but GPGPU shows results based also on older cards like the G7x generation (GPUBENCH). FFT is said to be upto 16x faster this way (special FFT math librarys), sure it would still be limited by the GPU to HOST and HOST to GPU speed so im not sure if we really could gain all this 16 times faster really as the bandwith seems limited for HD 1080p i doub't it, with PCI Express 2.0 maybe ?.
ATI/AMD presented Realtime 720p Mpeg-2 Encoding on the GPU tough so at least 720p seems quite doable, im sure alot of other Avisynth filters could also benefit from this direct interface to the GPU, thx for all your amazing work on this GPU stuff for Avisynth.

MfA
22nd October 2007, 16:26
NVIDIA already has a CUDA FFT library modeled on FFTW (so you give your parameters and it picks the best plan/implementation). Unfortunately it doesn't have a real-FFT so you have to work on 2 buffers at a time for good performance (you can do 2 real FFTs with 1 complex one).

tsp
22nd October 2007, 19:13
CruNcher: yes it would probably be faster. The problem is that I would have to create to version one for ATI and one for Nvidia and as you wrote only geforce 8x00 and better would be supported. Currently I don't have a geforce 8x00 card so it makes it difficult to test :-) and I only have 1 computer so I would have to change the graphics card to test the ATI part.

MfA: The fft implemented in fft3dgpu currently does two real FFT's at a time so that is not a problem

Boulder
27th October 2007, 13:50
This script often causes problems, just like what is mentioned in the first paragraph of this post: http://forum.doom9.org/showthread.php?p=1058471#post1058471

MPEG2Source("path\file.d2v",cpu=4)
den=FFT3DGPU(sigma=1.5,plane=4,mode=0)
DegrainFFTC(last,den,sad=400,pl=0)
FFT3DGPU(sigma=1.5,bt=3,plane=1)

The function Degrain is in a file called degrain.avsi, which is in the Avisynth 2.5 plugins folder. The contents of the file are:global idx_counter = 10
global idx_counter_2 = 50

function Degrain( clip c, int "blk", int "ol", int "sh", int "sad", int "pl", int "div", int "limy", int "limuv" )
{
global idx_counter = idx_counter + 1
global idx_counter_2 = idx_counter_2 + 1
blk = default( blk, 16 )
ol = default( ol, 0 )
sh = default( sh, 2 )
sad = default( sad, 200 )
pl = default( pl, 4 )
div = default( div, 0 )
limuv = default( limuv, 255 )
vbw1=MVAnalyse(c,isb=true,truemotion=true,delta=1,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw1=MVAnalyse(c,isb=false,truemotion=true,delta=1,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vbw2=MVAnalyse(c,isb=true,truemotion=true,delta=2,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw2=MVAnalyse(c,isb=false,truemotion=true,delta=2,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
nolimit = MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter,plane=pl)
defined(limy) ? LimitChange(MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter,plane=pl),c,limy,limuv) : nolimit
}

function DegrainC( clip c, int "blk", int "ol", int "sh", int "sad", int "pl", int "div", int "limy", int "limuv" )
{
global idx_counter = idx_counter + 1
global idx_counter_2 = idx_counter_2 + 1
blk = default( blk, 16 )
ol = default( ol, 0 )
sh = default( sh, 2 )
sad = default( sad, 200 )
pl = default( pl, 4 )
div = default( div, 0 )
limuv = default( limuv, 255 )
vbw1=MVAnalyse(c,isb=true,truemotion=true,delta=1,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw1=MVAnalyse(c,isb=false,truemotion=true,delta=1,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vbw2=MVAnalyse(c,isb=true,truemotion=true,delta=2,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw2=MVAnalyse(c,isb=false,truemotion=true,delta=2,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
nolimit = MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter,plane=pl)
defined(limy) ? LimitChange(MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter,plane=pl),c,limy,limuv) : nolimit
}

function DegrainFFTC( clip c, clip cleaned, int "blk", int "ol", int "sh", int "sad", int "pl", int "div", int "limy", int "limuv" )
{
global idx_counter = idx_counter + 1
global idx_counter_2 = idx_counter_2 + 1
blk = default( blk, 16 )
ol = default( ol, 0 )
sh = default( sh, 2 )
sad = default( sad, 200 )
pl = default( pl, 4 )
div = default( div, 0 )
limuv = default( limuv, 255 )
vbw1=MVAnalyse(cleaned,isb=true,truemotion=true,delta=1,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw1=MVAnalyse(cleaned,isb=false,truemotion=true,delta=1,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vbw2=MVAnalyse(cleaned,isb=true,truemotion=true,delta=2,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw2=MVAnalyse(cleaned,isb=false,truemotion=true,delta=2,pel=2,chroma=true,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
nolimit = MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter_2,plane=pl)
defined(limy) ? LimitChange(MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter_2,plane=pl),c,limy,limuv) : nolimit
}

function DegrainFFT( clip c, clip cleaned, int "blk", int "ol", int "sh", int "sad", int "pl", int "div", int "limy", int "limuv" )
{
global idx_counter = idx_counter + 1
global idx_counter_2 = idx_counter_2 + 1
blk = default( blk, 16 )
ol = default( ol, 0 )
sh = default( sh, 2 )
sad = default( sad, 200 )
pl = default( pl, 4 )
div = default( div, 0 )
limuv = default( limuv, 255 )
vbw1=MVAnalyse(cleaned,isb=true,truemotion=true,delta=1,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw1=MVAnalyse(cleaned,isb=false,truemotion=true,delta=1,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vbw2=MVAnalyse(cleaned,isb=true,truemotion=true,delta=2,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
vfw2=MVAnalyse(cleaned,isb=false,truemotion=true,delta=2,pel=2,chroma=false,blksize=blk,idx=idx_counter,sharp=sh,overlap=ol,divide=div)
nolimit = MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter_2,plane=pl)
defined(limy) ? LimitChange(MVDegrain2(c,vbw1,vfw1,vbw2,vfw2,thSAD=sad,idx=idx_counter_2,plane=pl),c,limy,limuv) : nolimit
}Is it just that I shouldn't call FFT3DGPU twice like this, using it for pre-denoising in an external function and then for chroma cleaning when the motion-compensated denoising is done?

DarkNite
4th November 2007, 07:46
I have most of my issues with fft3dgpu when I call it twice in a script. For example, I can guarantee you MeGUI's bitrate calculator will crash upon opening if I use fft3dgpu twice in a script to process seperate planes (which I was doing because it was faster than plane=4, and I wanted a large batch of encodes done quickly).

smok3
13th November 2007, 13:18
:thanks:

btw, some usage examples (with speed notice) would be really cool (in docs i mean).

btw2, on radeon X1950pro i get real-time playback with 720x576/25fps using "FFT3DGPU(sigma=2,sharpen=0.1)".

steve77
14th December 2007, 14:54
Hi there,

I've read through many of the pages on this tread but couldn't find my answer... maybe I'm blind.

Anyway, does FFT3DGPU work with the ATI 2600XT series graphics cards? I really hope it does, as I will be getting one for xmas and use FFT3DFilter religiously. I'd like to offload some of the processing from my Core 2 Duo as for most 720x400 content I encode I manage a 10FPS~15FPS per second in Vista w/some basic deinterlacing (TDEINT).


SO, does the 2600XT work with FFT3DGPU?

Cheers,

Chris

Fizick
14th December 2007, 17:20
It should work properly with any modern card.
How fast? You will tell us about it :)

EasyStart
15th December 2007, 02:25
Hi guys,

I don't know what I've done wrong. My AVS scripts produces distorted video most of the time when I run avisynth in multi-threaded mode. Single thread is ok. Here's my pc spec

nVidia 8800GTX
Q6600
2GB DDR2-800 ram
2x500GB SATA HDDs
Win XP Pro with SP2 (no additional Windows Updates)
Directx is updated with latest Nov2007 redist
Latest version nVidia driver v163.75
Avisynth v2.5.7 MT
Video card is never overclock.


LimitedSharpenFaster( ss_x=2.5, ss_y=2.25, strength=90, smode=4 )

SetMTMode(6)

#fft3dGPU( sigma=5, plane=0 ).fft3dGPU( sigma=6, plane=3 ) #don't work with MTmode 5 or 6, use plane=4

( last.height > 288 )
\ ? fft3dGPU( sigma=6, plane=4 )
\ : fft3dGPU( sigma=6, bt=2 )

SetMTMode(2)

a = last
b = a.degrainmedian( mode=1 ).cnr2()
SeeSaw( a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20 )



Running 4 threads is a lot faster than single thread. A lot of times, I have to re-load the AVS file 5 to 7 times into ProCoder before it gets itself right.

Thanks in advance,

Easystart

TheRyuu
18th December 2007, 20:13
Don't thread fft3dgpu. Just thread what's around it.


SetMTMode(2)
blahfilter1()
blahfilter2()
SetMTMode(0)
fft3dgpu()
SetMTMode(2)
blahfilter3()
blahfilter4()
etc...

or

MT("
blahfilter1()
blahfilter2()
",4,8)
fft3dgpu()
MT("
blahfilter3()
blahfilter4()
",4,8)

I currently use the latter since it seems to offer the greatest amount of compatibility with the different filters that I use.
IIRC using mtmode(6) is slower then not using it at all I think. Never tested it though.

tsp
18th December 2007, 22:33
wizboy11: Don't use SetMtmode(0) use SetMtmode(5) or SetMtmode(6) instead as setmtmode(0) does nothing. But you are right that MT() is more flexible.

EasyStart
19th December 2007, 11:52
I agree. Mt("filter()",2,4) is more flexible and stable. It works everytime but using SetMTMode(2,4) is faster in my case. I mainly encode VCD. One TV episode of 40 minutes takes 17 minutes with SetMTMode() and over 24 minutes with MT() to do a 2 pass encoding. Not sure what I will try next. Probably try installing Windows XP SP3 RC this weekend.

Easystart

TheRyuu
19th December 2007, 20:04
wizboy11: Don't use SetMtmode(0) use SetMtmode(5) or SetMtmode(6) instead as setmtmode(0) does nothing. But you are right that MT() is more flexible.

I know (that's why everything BUT fft3dgpu was multi-threaded) I was saying that fft3dgpu doesn't work well with multi-threading so why bother using it on it if it'll make it crash. Plus, it's gpu bound so why have it multi-thread at all.

Sagekilla
20th December 2007, 03:03
I know (that's why everything BUT fft3dgpu was multi-threaded) I was saying that fft3dgpu doesn't work well with multi-threading so why bother using it on it if it'll make it crash. Plus, it's gpu bound so why have it multi-thread at all.

Yeah, since FFT3DGPU literally runs on the gpu, isn't there like no point at using multithreading since there's very little interaction given by the cpu except maybe sending data + instructions and not the actual number crunching?

bokonon
5th January 2008, 00:21
I have already posted in the useage forum, but I thought it might be more likely that I encounter someone with a similar problem to mine in this thread.

Basically, running fft3dGPU encodes at about 0.29 FPS and completely screws up my PC (causes a lot of lag, rendering my PC pretty much useless during the encode). fft3dfilter, on the other hand does not lag my PC and gives me a better rate of around 1.0 - 1.7 FPS

If FFT3DGPU is slower, it means your graphics card is too slow.

Is my graphics card the problem, or can it be solved without replacing it?
http://www.hisdigital.com/newimages/products/X1950XTIceQ3T-card_500.jpg
X1950 XT (http://www.hisdigital.com/html/product_sp.php?id=268)

please refer to
this thread (http://forum.doom9.org/showthread.php?t=133396) for further details

grennis
30th January 2008, 14:21
I'm having an odd problem with precision=2. At about 2 seconds into most videos I encode, there is a corrupted frame (black bars across the top). It only happens with precision 2, if I drop it to 1 then the problem goes away.

I would chalk this up to my graphics card not being fit for the task, but (a) it is a very powerful card and (b) it always happens in the same place in the video and in the same manner.

So this makes me think it's more of a bug in the filter. If my hardware were a problem I would expect the corruption to be random and unpredictable. But it's not, it's always just after 2sec into the clip and always appears as black bars across the top.

My filter arguments look like this

c = FFT3dGPU(c, sigma=3.75, bw=32, bh=32, oh=16, ow=16, precision=2, sharpen=1)

Thanks

Dreassica
30th January 2008, 20:44
That looks liek you are using it in QMF, may very well be this filter not liking to be used within QMF.

grennis
31st January 2008, 06:08
That looks liek you are using it in QMF, may very well be this filter not liking to be used within QMF.

I have no idea what QMF is, so I don't think I'm doing that :)

I have also noticed that I get D3D errors when using FFT3DGPU over remote desktop and disconnect/reconnect. There probably isn't much you can do about it?

Is the sigma value exactly the same as in the fft3dfilter? It seems like I need to use a higher sigma in fft3dgpu to get the same result.

rkalwaitis
7th February 2008, 16:58
TSP or someone else in the know.

I really like what I can do with this filter, Im very impressed by the quality I can achieve and results when compressing.

Just a few questions? I like to use x264. Are the cqm/cqf (Sharktooth's) matrixes necessary since the filter is so efficient?

I also seem to notice that the colors, (at least for me) tend to be a bit different? Is this a setting I'm dorking up? Perhaps a correction I can make? The colors seem to lend themselves to a slight blueish-green and the picture seems to brighten up a bit resulting in a slightly bleached look. I can tweak filter it and get back some of it. Is this another setting Im messing up!

Well anyways I like it. I wonder if using this filter with say 'snow' or 'msu' it would work faster?:stupid:

Adub
13th February 2008, 07:18
Matrices are not specifically designed for the removal of noise, that's what denoisers are for. Sure a matrix can be tuned to help in the removal of noise, but not like a denoiser can. So, yes, as long as the quality is better than not using one, keep using a matrix.

If you get better results without a matrix then don't use it. These instances have nothing to do with fft3dgpu however, as it is a denoiser. Denoise your source until it looks as good as you want it to, and then encode it (with or without a matrix, your choice).

As to the colors, it maybe that you need to add ColorMatrix() to your script. It depends on what your source is and what you are doing with it.

For instance, if you are converting a DVD to mp4 or mkv, then chances are you will need to edit your script to look something like this:


DGDECODE_Mpeg2Source("video.d2v", info=3)
Colormatrix(hints=true)
...other filters...

It's correct use depends on the source, as I said above.

rkalwaitis
14th February 2008, 07:17
Thanks for the info. Adding the color matrix as you suggested worked. It was a dv2 source. Lots to learn. I can't tell a difference with the matrix I was trying to use, so Ill just not use it. They are confusing to me, ulr, vlr, .....and so on. I thought they could help me crunch a bit more, but in the end it is not that important. I like the best possible picture, then worry about size.

Thanks again.

XBoy
19th February 2008, 23:03
I'm trying to compile the latest source for x64 but it seems to be missing a few files, mainly

filtersps.h, filtersps.cpp, dxinput.h, dxinput.cpp

Where do these come from??

Leak
20th February 2008, 13:28
filtersps.h, filtersps.cpp, dxinput.h, dxinput.cpp

Where do these come from??
The latter 2 definitely come from the DirectX SDK, and I wouldn't be surprised if the same goes for the former...

tsp
20th February 2008, 18:32
sorry I have updated the file to include all 4 files although dxinput might cause problem the the latest version of directx SDK as support for dxinput has been removed.

http://www.avisynth.org/tsp/fft3dgpu0.8.2a.exe

Mosfetov
23rd April 2008, 04:55
Oh, nice filter. It's very fast and gives high quality filtered image with minimum artifacts (even at high sigma). At 720p this filter works with my X800XT in realtime (framerate more than 24fps). There is only one restriction - size of GPURAM. It must be at least 256MB to work at 720p. Otherwise, speed will downgrade, because speed between GPU and aperture memory (System RAM) more-more slower than between GPU - GPURAM. But even in this case, FFT3DGPU works faster than FFT3DFilter. By default, i use bw=32, bh=32, ow=16, oh=16, or in some cases bw=64, bh=64, ow=32, oh=32. This takes approx up to 200+MB of GPURAM at 720p. If GPURAM only 128 MB, it's possible to use bw=64, bh=64, ow=16, oh=16. It reduces GPURAM utilization to 100-120MB at 720p and speed will boost. But quality will a little bit less.

Fizick, tsp, thank you for this useful filter! :thanks:

PS: My box - X800XT 256MB, Athlon XP 2300MHz (FSB 192MHz, sync to RAM), nF2U400, RAM 2048MB

murrsturr
28th April 2008, 03:01
Thanks to both TSP and Fizick!

This stuff is very much appreciated by myself and thousands of others.. and at this point in time... I speak for them all! ;)

Blue_MiSfit
29th April 2008, 21:33
Yeah seriously. I use this filter on practically every single stupid thing I encode - to kill chroma noise.

Amazingly effective, and basically free, since it runs on the GPU!

I like free!!!! Thanks guys!

~MiSfit

Quark.Fusion
19th June 2008, 15:20
I know you can assume that GPU-based filter isn't benefit from multithreading, but think about next filter in chain — while thread one doing it's part on GPU thread two still can do CPU part, and when it is thread two time for GPU, thread one can continue on next CPU part.

So is it possible to make thread-safe GPU filter? What about using CAL/CUDA?

Example:

MTsource(input)
MT("""
FFT3DGPU()
DeBlock_QED()
""")
in this example script can do deblock on first part while second is processing on GPU by using extra thread.

Why not just use mutex for synchrotisation?

Terka
20th June 2008, 09:07
2>tsp
on page 1 of this thread:
Have you plan to implement in GPU all my other plugins?
Only the FPU heavy filter

Could you please implement mvtools in GPU too? :)

Zep
22nd June 2008, 06:43
2>tsp
on page 1 of this thread:

Could you please implement mvtools in GPU too? :)

yeah MVtools is the main filter I wish was GPU also :)

Terka
22nd June 2008, 11:26
everybody wishes :p

Underground78
24th June 2008, 10:37
Hello,

Is there a way to take advantage of a CrossFire system with fft3dGPU ? I've made some searches in this thread but I can't find anything new about that ...

Underground78
27th June 2008, 14:11
Hello,

There is something that puzzled me a bit, when using a script without fft3dGPU, x264 first pass runs at ~100 fps with a CPU usage near 100%, the same script with fft3dGPU (default settings) runs at ~45 fps but with a CPU usage of about 35% and a GPU usage of about 50% so I assume it could be faster ... What could explain this ?

Thanks in advance

talen9
27th June 2008, 15:11
Do you have a dual-GPU video adapter? If so, then I think FFT3DGPU is using only one of the two GPU cores, and the processing speed of that one core is lower than the one you can obtain using your (dual/quad core) CPU ... your best using that, I'm afraid, if my analysis is correct.

Underground78
27th June 2008, 15:14
Do you have a dual-GPU video adapter? If so, then I think FFT3DGPU is using only one of the two GPU cores, and the processing speed of that one core is lower than the one you can obtain using your (dual/quad core) CPU ... your best using that, I'm afraid, if my analysis is correct.

The GPU occupation I've given is normally for one GPU only.

Quark.Fusion
28th June 2008, 04:16
I think that because GPU have many different blocks (ROPS, Shaders, etc) and fft3dGPU uses only vertex shaders. Look at shaders usage in GPU profiler.

Underground78
28th June 2008, 09:35
I think that because GPU have many different blocks (ROPS, Shaders, etc) and fft3dGPU uses only vertex shaders. Look at shaders usage in GPU profiler.

I will test this, thanks ! But where can I find this ? It seems to be a quite uncommon tool ...

Quark.Fusion
29th June 2008, 15:21
For nVidia card try NVIDIA PerfHUD and enable support in fft3dGPU, don't know about Radeons profiling. BTW, where you look at GPU usage?

Underground78
29th June 2008, 15:58
For nVidia card try NVIDIA PerfHUD and enable support in fft3dGPU, don't know about Radeons profiling. BTW, where you look at GPU usage?

I have Radeon cards, I look at GPU usage in GPU-Z ...

Quark.Fusion
30th June 2008, 12:15
Where it show that? Or it's supported only for Radeons?

Underground78
30th June 2008, 12:25
It's in the "Sensors" tab but it may be not always available ... I'm not sure my problem is only related to vertex shaders because it seems that using TimeCodec I can obtain a GPU usage near 80% ...

Quark.Fusion
1st July 2008, 11:00
If I understand GPU architecture right, then it isn't necessary to reach 100% of GPU usage to get optimum performance. I'm running folding@home at GPU and my current problem is what clocks to underclock to lower noise level and don't hurt folding performance too much :)

Quark.Fusion
1st July 2008, 11:48
Also there can be GPU idle sensor — do you have that? If it means time when GPU doesn't do anything then it's must be possible to optimize GPU-CPU code. And I spotted that fft3dGPU spend much time in GPU driver — maybe moving to CAL/CUDA can also speed up things.

lexor
4th July 2008, 16:12
Sup everyone, I'm getting a weird issue with fft3dgpu. Blocks on fairly solid background (with slight gradient), but not all such backgrounds, as the following picture illustrates:

dss("movie")
fft3dgpu() #also tried pretty much any combination of settings

produces:
http://img390.imageshack.us/img390/7860/fryedblocksba3.png

brightness/contrast pumped to show that walls are artifacts free:
http://img368.imageshack.us/img368/7691/brightfryedblockszu3.png

This is on XP SP3 running ATI 2600 XT with catalyst 8.6 and filter 0.8.2 under avisynth 2.5.7

type1encryption
5th July 2008, 09:24
atm I'm using fft3dgpu a lot, but a downside (possible bug) is: when I lock down vista, the filter seams to stop working

acrespo
8th July 2008, 03:36
Yes, I have the same problem with Vista. Lock computer and the enconding process freeze.

Mystery Keeper
8th July 2008, 08:31
Lexor, your sample seem gibbsed. Ever tried MSUCartoonRestore?

type1encryption
8th July 2008, 09:25
In "power options" I can choose to disable energy saving options for pci-e, but that won't work either.

Warpman
8th July 2008, 09:28
Sup everyone, I'm getting a weird issue with fft3dgpu. Blocks on fairly solid background (with slight gradient), but not all such backgrounds, as the following picture illustrates:

dss("movie")
fft3dgpu() #also tried pretty much any combination of settings

produces:


brightness/contrast pumped to show that walls are artifacts free:


This is on XP SP3 running ATI 2600 XT with catalyst 8.6 and filter 0.8.2 under avisynth 2.5.7

i experieced that, too. Sadly i didn't found a solution and switched to dfttest or tnlmeans(slow).
Same happens with ffd3dfilter as well if i remember right.

lexor
8th July 2008, 15:23
Lexor, your sample seem gibbsed. Ever tried MSUCartoonRestore?

Nope, first time I hear about that, I wasn't actually trying to restore the thing. I just noticed the artifacts, since I had fft3dgpu enabled in Avisynth section of FFDshow (so the artifacts are on playback, my source doesn't have that blocking). I posted this because it shows the problem the best.

fjhdavid
16th July 2008, 13:32
Dear all,

I planned to buy a new graphic card (and a new computer core2 duo at 3ghz).

Tsp told us that the filter efficiency speed relies on the number of shading processors.

But ATI give always shading processors figures bigger than nvidia (for the same price). So does I have to choose ATI?

Does shader processor V4.1 and directx 10.1 cards works with fft3dfilterGPU, or does I have to choose an older graphic cards (directx 10 and PS 4.0)?

what is your recommendation for speed graphic cards? (I have 250 old DVD to convert and to filter with dvdrebuilder and I will do a batch but I need speed!)

What fps should I expect today with a 3ghz core2 duo and a modern graphic card?

Thanks for your help!

Francois

Mystery Keeper
16th July 2008, 14:30
Dear all,

I planned to buy a new graphic card (and a new computer core2 duo at 3ghz).

Tsp told us that the filter efficiency speed relies on the number of shading processors.

But ATI give always shading processors figures bigger than nvidia (for the same price). So does I have to choose ATI?

Does shader processor V4.1 and directx 10.1 cards works with fft3dfilterGPU, or does I have to choose an older graphic cards (directx 10 and PS 4.0)?

what is your recommendation for speed graphic cards? (I have 250 old DVD to convert and to filter with dvdrebuilder and I will do a batch but I need speed!)

What fps should I expect today with a 3ghz core2 duo and a modern graphic card?

Thanks for your help!

Francois

Sad but true, nVidia cards always have better drivers, thus giving less problems. Also, nVidia has their CUDA technology, which allows to easily write programs for execution on GPU.

Leak
16th July 2008, 14:38
Sad but true, nVidia cards always have better drivers, thus giving less problems.
I can't say I agree - maybe because my last nVidia card was one of those PoS 5600 FX, but I haven't had a problem with the drivers for my Radeon 9800 Pro, my Radeon X1900 XT or my current Radeon 4850.

Also, the Radeon 4850 currently gets you the best bang for the buck.

Also, nVidia has their CUDA technology, which allows to easily write programs for execution on GPU.
And ATI has their own Stream SDK (http://ati.amd.com/technology/streamcomputing/sdkdwnld.html)... so what?

Q: Will the AMD FireStream SDK work on previous generation hardware?

A: To run the CAL/Brook+ SDK, you need a platform based on the AMD R600 GPU or later. R600 and newer GPUs are found with ATI Radeontm HD2400, HD2600, HD2900 and HD3800 graphics board.

np: Boards Of Canada - Pete Standing Alone (Music Has The Right To Children)

fjhdavid
16th July 2008, 15:14
ok, thanks for the info.

just a question.

I read that you can't use fft3dfilterGPU twice in the same script? is it true? (I need to denoise differently luma and chroma)

Blue_MiSfit
19th July 2008, 01:53
@fjhdavid
No, that's not true, I do it all the time.

Multithreading and fft3dgpu tends to be sticky - at least with SetMTMode. I tend to use MT("...") instead when using fft3dgpu in the same script.

@ Lexor:
Are you complaining about the banding on the wall, or the blocking below the lamp shade? I think the former is a result of using aggressive defaults and not dithering afterwards. Try rolling off sigma values like this:


fft3dgpu(plane=4, sigma=2, sigma2=.4, sigma3=.8, sigma4=1.1)
GradFun2DB(1.51)


If it's the latter (blocking), then that's probably in your source. Deblock if you must ;)

~MiSfit

Quark.Fusion
12th August 2008, 17:58
Problem with fft3dGPU: using filter 2 times in script with HD content crashing due to memory overflow (2 gb limit), how much memory filter really need and why using so much?

Blue_MiSfit
12th August 2008, 21:36
I get out of memory errors sometimes when I try to run two instances of fft3dgpu on 1080p content. I'm using a 9600gt at work with 512MB of memory, and RivaTuner shows almost all of it wired up for just one instance - I can't even imagine how much swapping must go on when I chain two instances!!! It's making a lot of sense why Quadros have 1.5 GB of memory :D

~MiSfit

Quark.Fusion
13th August 2008, 02:38
8 GB here :) and my best wish is 64-bit avisynch and filters :) I even tried to chain 2 processes, but problem is that my source can provide only linear seeking and it breaks with multiple processes. And i have no tools to remux into another format. (Only can recode to lossless, but don't have enought free space, lol) Memory is now cheap, but after my new PC i out of money :(

Blue_MiSfit
13th August 2008, 06:51
I meant VRAM :)

I have 4GB of RAM, but my video card runs out of RAM easily :)

~MiSfit

Blue_MiSfit
13th August 2008, 22:44
On that same note, when I'm encoding 1080p with fft3dgpu(plane=4, sigma=3) (aggressive, I know, it's a shit source), I have issues doing anything with my video card.

Trying to watch a 1080p movie (with software decoding, I'm not that masochistic) through MPC-HC with Haali renderer results in corrupted video and borken playback. I have to switch to overlay mixer to get clean results.

~MiSfit

Adub
13th August 2008, 23:37
Have you updated your drivers recently?

Blue_MiSfit
14th August 2008, 00:43
Yes, actually I just did a complete system reinstall and have the latest installed.

~MiSfit

Quark.Fusion
14th August 2008, 15:10
I meant VRAM :)

I have 4GB of RAM, but my video card runs out of RAM easily :)

~MiSfit

It's no problem in Vista as Memory Manager takes care of video ram too.

Quark.Fusion
14th August 2008, 15:13
On that same note, when I'm encoding 1080p with fft3dgpu(plane=4, sigma=3) (aggressive, I know, it's a shit source), I have issues doing anything with my video card.

Trying to watch a 1080p movie (with software decoding, I'm not that masochistic) through MPC-HC with Haali renderer results in corrupted video and borken playback. I have to switch to overlay mixer to get clean results.

~MiSfit

I have 8800GT 512MB — don't remember any problems with corruption. I was tested fft3dgpu in avisynth script, playing it in WMP11 with Aero interface on and 2 displays :)

Jeremy Duncan
14th August 2008, 20:46
i see there is still no dehalo in the fft3dgpu filter.

i use dehalo in my fft3d script, and i want to know when this filter will be updated to include dehalo and all the parameters in the code i will post below.

FFT3DFILTER(sigma=0.1, bw=10, bh=10, ow=5, oh=5, bt=0, dehalo=1, hr=1, sharpen=0.5)

no rush, take your time, but i am waiting. :)

Blue_MiSfit
14th August 2008, 22:01
I guess that's a good reason to move to Vista on my encoding workstation..

I have an 8800gt and Vista at home - and that works just fine... it's just the 9600gt on XP that chokes.. :(

~MiSfit

lexor
14th August 2008, 22:53
@ Lexor:
Are you complaining about the banding on the wall, or the blocking below the lamp shade? I think the former is a result of using aggressive defaults and not dithering afterwards. Try rolling off sigma values like this:
No I'm talking about the giant squares to the left and right of Fry's head.


If it's the latter (blocking), then that's probably in your source. Deblock if you must ;)

The source is not blocky, and deblocking does nothing to affect this problem. Notice how the walls are smooth, the headboard should be that smooth.

fft3dgpu creates those squares all by itself, it's not enhancing a preexisting condition.

nurbs
19th August 2008, 19:41
A question for the people running this filter on HD content: What speed do you get and what graphics card do you have? I'd like to know if it's possible to get 10 fps at 1080p with default or slower settings with a cheap graphics card like a Radeon HD 3850.

Adub
19th August 2008, 20:31
I don't think you'll have any problems. I can't say for sure, but I have used fft3dgpu on so HD material before, and it works realtime. That was 720p, but 1080p should work fine, provide you have enough memory.

Blue_MiSfit
19th August 2008, 21:59
On Vista, with an 8800gt, I can run two instances in very near real-time. Fast enough to not affect encoding speed at all (since I end up with ~10fps in CRF mode on my 3 GHz Q6600).

XP is a little slower, since it's not as good with managing video memory and has a tendency to do stupid things in this situation. For example, if you play a video while encoding with fft3dgpu, and are at near max memory usage (easily 512MB for one instance on 1080p), I often get corrupted video output from Haali renderer. Never happens on Vista ;)

~MiSfit

nurbs
20th August 2008, 11:31
Thank you. :)

Quark.Fusion
23rd August 2008, 08:31
fft3dGPU memory usage on HD content:
OS is Vista x64 with 8GB RAM, GPU is 8800GT with 512MB RAM

copying avfs mounted avi file with SetMemoryMax(128) and without fft3dGPU:
Working Set = 168 504, Private = 166 120, Virtual = 242 924

with FFT3DGPU(bt=4, plane=4, sigma=3, bw=64, bh=64, ow=32, oh=32, mode=1, precision=2):
Working Set = 275 164, Private = 1 131 660, Virtual = 1 228 644
Copy OK

with GrainOptimizer(last, FFT3DGPU(bt=4, plane=4, sigma=6, bw=64, bh=64, ow=32, oh=32, mode=1, precision=2)):
Working Set = 298 772, Private = 1 155 256, Virtual = 1 254 956
Copy OK

with GrainOptimizer(FFT3DGPU(bt=4, plane=4, sigma=2, bw=64, bh=64, ow=32, oh=32, mode=1, precision=2), FFT3DGPU(bt=4, plane=4, sigma=6, bw=64, bh=64, ow=32, oh=32, mode=1, precision=2))
Working Set = 263 280, Private = 1 928 716, Virtual = 2 029 430
Copy stalled at 0%, process hanged


You can see that fft3dGPU really need about 100MB of memory, but allocating around 1GB for each instance.

Avenger007
17th September 2008, 10:17
Does anyone have that problem of fft3dGPU pausing whenever Windows is locked (windows key + L)?

OS: Windows XP SP2
Graphics Card: ATI Radeon X800 XL

talen9
17th September 2008, 10:59
Well ... maybe you have a 3D Screensaver that kicks off soon after that, and *that* is very likely to collide with FFT3DGPU :)

Avenger007
17th September 2008, 11:08
No, screensaver is set to none.

Quark.Fusion
17th September 2008, 16:38
It pauses when desktop session changes — i.e. when Vista UAC appears or other protected windows like system password promt. I'm doubt that it can be solved with current way of using GPU (as 3D-accelerator, not external device).

Avenger007
17th September 2008, 16:55
OK. I do in fact have a password prompt. Since it's an OS issue I guess I'll just have to live with it. Thanks.

Undead Sega
19th September 2008, 13:27
Can MCBob work with this? If so, will it improve speed whatsoever?

Adub
20th September 2008, 19:43
What?? MCbob doesn't even use FFT3Dfilter, let alone need it.

So, no. MCbob won't work with this. However, if you want to improve speed, use the MVtools Multi-threaded version that is floating around.

Navalynt
1st October 2008, 17:17
File:
Line: 216
Error Code: D3DERR_INVALIDCALL (0X8876086C)
Calling: Creating Device

Staxrip gives the following error in the log:
x264 Encoder failed with exit code -1
avis [error]: unsupported input format (DIB )
x264 [error]: could not open input file 'E:\Ripped Discs\MainMovie\Enterprise\Disc 2\ENTERPRISE S2D2 E1\VIDEO_TS\VTS_01_1.avs'

I'm running Windows 2008 Server x64 on my home server. The administrative login auto logs and launches Mediaportal which is output to my TV. I use RDC to launch another session in which I do all of my compression which has served me well up until I tried using FFT3DGPU. I can start a project, it goes all the way through the first and second pass, but at the end of the second pass is when I get the pop-up error at the top.

AVI Synth Filters:
MPEG2Source("E:\Ripped Discs\MainMovie\Enterprise\Disc 2\ENTERPRISE S2D2 E1\VIDEO_TS\VTS_01_1.d2v")
Crop(4,0,-4,-0)
FFT3DGPU(sharpen=0.4)
LanczosResize(720,400)

Can anyone shed some light on this problem? I thought maybe it had to do with the CTRL -ALT - DEL issue reported earlier on this forum so I kept my laptop logged in and made sure the screensaver was off but it still did the same thing. My onboard video is a 780a SLI and I have it set in hybrid SLI with an 8400GS which essentially makes a 8500. I did try using a Radeon HD 3870 which yielded the same results so I'm really doubful it has anything to do with the hardware I'm using.

talen9
1st October 2008, 21:22
I think that the session you're opening via Remote Desktop can't directly access Direct3D "devices", hence the error.
I could be wrong, of course, but your setup is a bit .... unusual.

Blue_MiSfit
2nd October 2008, 03:30
yup - RDP breaks Direct3d, every time :(

~MiSfit

Leak
2nd October 2008, 09:54
Using VNC instead of Remote Desktop should do it...

VNC transmits and controls the existing display, while remote desktop creates a new display with a virtual graphics card.

swaaye
6th October 2008, 19:16
I've been playing around with filtering chroma as well as luma and have discovered that running two separate instances of fft3dgpu that do the filtering separately is much faster. I'm running a HD 3850 and a X800XL (two comps). Both showed a major speed gain. The HD 3850's GPU utilization is higher this way, which seems to mean that running separate instances somehow uses the GPU more efficiently.

fft3dgpu(sharpen=0.4).fft3dgpu(plane=3,sigma=1.5)

is much faster than

fft3dgpu(plane=4,sharpen=0.4)

I'd blame the sharpen that's happening on both chroma and luma with the lower call, but the GPU utilization being higher with the separate instances makes me doubt that. I tested performance by loading the AVS into Virtualdubmod and doing preview input and deselecting video output in the status window to let it go to max speed.

BTW, filtering chroma as well seems to be something that x264 really likes for compressibility. And it definitely cleans up some warbly/banded/ugly color in some darker scenes on the TV show I'm working on. I've also given up on using precision=2 because I simply can not see any visual improvement with it and it causes a serious speed loss. Anyone else have anything to say on this?

Quark.Fusion
7th October 2008, 07:18
Precision=2 is also causes huge speed loss for me (8800GT 512m, Vista x64), also both precision and second instance (if run on same data) uses more memory, which can cause memory overflow on HD content.

AFAIK, fft3dGPU uses parallel processing trick by requesting next frame while GPU work on current one.

swaaye
7th October 2008, 15:35
AFAIK, fft3dGPU uses parallel processing trick by requesting next frame while GPU work on current one.
That sounds similar to the double/triple buffering the GPU would do when doing 3D rendering as usual and for the same reason.

Avenger007
7th October 2008, 16:01
Do you notice a major slowdown when calling fft3dgpu twice when preceded by heavy CPU-bound filters, as opposed to calling it once?
I do.

swaaye
7th October 2008, 20:37
Well, the most CPU dependent filter that I use before fft3dgpu is TIVTC (tfm+tdecimate). So I don't load the CPU down much, thanks to the existence of fft3dgpu.

However, when I run a full speed test of the AVS w/o x264 hogging the CPU, the frame rate that the GPU pulls seems to be higher than it manages with x264 going too. For example, while within the virtualdubmod preview I may see ~40 fps from the script, during the encode process the GPU seems to struggle to manage 27 fps. CPU usage will be well under 100%, meaning the GPU is the speed bottleneck. So yes, some aspect of the CPU being busy, or all the threads being thrown around by x264, impacts how fast fft3dgpu can go compared to when it has the CPU mostly to itself.

3ngel
15th October 2008, 15:01
Hi,
i'm going to use fft3dGPU in conjunction with a CPU fft3d in order to obtain the most throughput from both.
I would like to know, the default parameters of the actual fft3dgpu correspond to the default parameters of standard CPU fft3d?
If so what are the parameters i have to pass to fft3dGPU in order to obtain the same defaults of the CPU version?
Moreover passing the same parameters to both does it gives the same results?
I read that sometimes can be differences.
The goal is to obtain the same frame result with both CPU and GPU fft3d
Thanks

totya
4th November 2008, 00:16
Hi! If source is very noised, which settings recommended?

sample (http://fapomatic.com/show.php?loc=0844&f=noise.png)

My avs now this:

Undot()
FFT3DGPU(mode=1, precision=2, sigma=30, interlaced=FALSE)

Thx :)

Adub
4th November 2008, 05:24
sigma=30????

Your video would turn into a soupy mess. I suggest you read up on further discussions in the Avisynth Usage section, and maybe take a look at some prebuilt denoising functions such as MCTemporalDenoise and MC_Spuds. They have special profiles that make it easier for selections to be made by people who are new to exact settings.

smok3
5th January 2009, 11:15
random finding;
if your source is animation with lots of ferlaufs then bt=4 reduces a lot of banding as it seems.

example;
#yuv2 video here
FFT3DGPU(sigma=4, sharpen=0.5, plane=0, mode=1, bt=4) # luma
FFT3DGPU(sigma=10, plane=3, mode=1, bt=4) # chroma

johnmeyer
27th January 2009, 05:27
I have a problem with horizontal lines. This doesn't happen with fft3dfilter.dll.

I am using fft3dGPU.dll version 0.8.2.0. I am using the fftw3.dll filter dated 1/30/2004. This picture shows the horizontal lines:

http://i177.photobucket.com/albums/w208/johnmeyer/FFT3dGPUscreenshot.jpg

Here is my simple test script:

AVISource("E:\Documents\Willian and Winks.avi")
fft3dGPU(plane=0,sigma=22,interlaced=true)

Yes, I know that is a really large value for sigma, but it makes it easier to see the problem. The problem is there even with smaller values.

My source video is 720x480 DV AVI.

Navalynt
27th January 2009, 05:47
Maybe try using a deinterlace filter before fft3dgpu? I always script as follows:

SOURCE
FIELD
CROP
RESIZE
NOISE (fft3dgpu)

I'm not sure if there is a better order but it seems logical to me that you would load your source, do any field work needed (deinterlace, ivtc), crop the black off, resize the picture, then run a noise filter (fft3dgpu) as the last step to clean up the output from the previous steps. I've never even heard of the interlaced option in fft3dgpu before but using fft3dgpu(sigma=1.5,sharpen=0.4) seems to be good enough to clean up DVD and BR sources during encoding.

johnmeyer
27th January 2009, 07:48
Well, if fft3dGPU doesn't support the "interlaced=true" function that is available in fft3dfilter, that would certainly explain it. I tried to search both this thread and elsewhere to get a list of which functions of the fft3dfilter are not supported in the latest fft3dGPU release, but I couldn't find a concise list. Having said that, fft3dGPU does throw an error message if I used "bt" and many other settings, and did NOT throw and error with the interlaced=true, which made me think it supported interlacing.

So, I'll try this generic way of handling interlaced material with a temporal filter:

SeparateFields()
even = SelectEven(last).fft3dfilter(plane=0,sigma=22)
odd = SelectOdd(last).fft3dfilter(plane=0,sigma=22)
Interleave(even, odd)
Weave()

Let's see how this works ...

Yup, that gets rid of the lines. However, when I benchmark doing a video analysis pass with the above script, I get lower fps than using the native fft3dfilter filter. I have a nVidia 9800GT, so I assume that it is supported by this GPU version of fft3dfilter.

Oh well, it was worth a try. With this new 3.2 GHz i7 computer the native fft3dfilter goes pretty fast, and I suspect the difference between the GPU and this processor is small.

Navalynt
27th January 2009, 08:15
Well, instead of deinterlacing the picture so it's progressive and feeding it into ff3dgpu once you're processing the fields separately. I think that's making the performance hit.

Is there any particular reason you are not using FieldDeinterlace or yadif? That way the picture is built as one full frame and processed once by ff3dgpu.

johnmeyer
27th January 2009, 08:34
I don't want to deinterlace. This is interlaced material and will be shown on an interlaced display, so it will look better if I keep it interlaced. As you know, deinterlacing always results in temporal degradation (and possibly spatial as well). If you have to watch on a progressive display, then that degradation is unavoidable, and you try to do the best deinterlacing possible. On a display that can display interlaced material, deinterlacing something that is interlaced is never the right thing to do. So, that's why I am not doing it in this case.

Navalynt
27th January 2009, 09:00
I don't want to deinterlace. This is interlaced material and will be shown on an interlaced display, so it will look better if I keep it interlaced. As you know, deinterlacing always results in temporal degradation (and possibly spatial as well). If you have to watch on a progressive display, then that degradation is unavoidable, and you try to do the best deinterlacing possible. On a display that can display interlaced material, deinterlacing something that is interlaced is never the right thing to do. So, that's why I am not doing it in this case.

Ahh, makes sense. Glad to hear you fixed the banding!

johnmeyer
27th January 2009, 10:03
Thanks for the tip on checking the interlacing. I guess I should have spotted that.

blubberbirne
5th February 2009, 21:03
File:
Line: 216
Error Code: D3DERR_INVALIDCALL (0X8876086C)
Calling: Creating Device

Staxrip gives the following error in the log:
x264 Encoder failed with exit code -1
avis [error]: unsupported input format (DIB )
x264 [error]: could not open input file 'E:\Ripped Discs\MainMovie\Enterprise\Disc 2\ENTERPRISE S2D2 E1\VIDEO_TS\VTS_01_1.avs'

I'm running Windows 2008 Server x64 on my home server. The administrative login auto logs and launches Mediaportal which is output to my TV. I use RDC to launch another session in which I do all of my compression which has served me well up until I tried using FFT3DGPU. I can start a project, it goes all the way through the first and second pass, but at the end of the second pass is when I get the pop-up error at the top.

AVI Synth Filters:
MPEG2Source("E:\Ripped Discs\MainMovie\Enterprise\Disc 2\ENTERPRISE S2D2 E1\VIDEO_TS\VTS_01_1.d2v")
Crop(4,0,-4,-0)
FFT3DGPU(sharpen=0.4)
LanczosResize(720,400)

Can anyone shed some light on this problem? I thought maybe it had to do with the CTRL -ALT - DEL issue reported earlier on this forum so I kept my laptop logged in and made sure the screensaver was off but it still did the same thing. My onboard video is a 780a SLI and I have it set in hybrid SLI with an 8400GS which essentially makes a 8500. I did try using a Radeon HD 3870 which yielded the same results so I'm really doubful it has anything to do with the hardware I'm using.

Same Error here, but i'm using Windows Vista x64 SP1 with nvidia Geforce gtx260 driver 181.22.

prokhozhijj
12th February 2009, 11:01
I've got following error message

File:
Line: 272
Error code: D3DERR_INVALIDCALL(0x8876086c)
Calling: Reset Device

This error constantly happens when I lock then unlock computer (Win+L
or Ctrl-Alt-Del -> Lock computer).

About me:
-------------------
OS Windows Vista SP1 Ultimate, 32bit

RAM: 3Gb
CPU: Intel Dual Core 6700

Graphic card: NVidia Geforce 8800 GTS (driver version: 181.22, Release
Date: January 22, 2009)

I think that Windows resets graphic card when I'm locking computer. Is this can be fixed in next release?

Leak
12th February 2009, 14:38
I think that Windows resets graphic card when I'm locking computer.
Exactly.
Is this can be fixed in next release?
If you're quick it can probably be fixed in the next release of Windows, yes.

np: Deadbeat - Night Stepping (Roots And Wire)

Dreassica
13th February 2009, 16:22
ON my 4870x2 it seems fft3dgpu adds a few pixels wide slice vertically in the middle of the frame when using plane 0 and 4.

swaaye
16th February 2009, 06:29
ON my 4870x2 it seems fft3dgpu adds a few pixels wide slice vertically in the middle of the frame when using plane 0 and 4.

Could be a crossfire issue. FFT3DGPU doesn't work with dual card setups. A single 4870 is overkill all by itself anyway.

swaaye
16th February 2009, 06:36
SeparateFields()
even = SelectEven(last).fft3dfilter(plane=0,sigma=22)
odd = SelectOdd(last).fft3dfilter(plane=0,sigma=22)
Interleave(even, odd)
Weave()

Yup, that gets rid of the lines. However, when I benchmark doing a video analysis pass with the above script, I get lower fps than using the native fft3dfilter filter. I have a nVidia 9800GT, so I assume that it is supported by this GPU version of fft3dfilter.

Oh well, it was worth a try. With this new 3.2 GHz i7 computer the native fft3dfilter goes pretty fast, and I suspect the difference between the GPU and this processor is small.

Your code snippet doesn't use FFT3DGPU. Am I right in assuming that you tested that script with FFT3DGPU and not FFT3DFILTER? I am confused by what you're saying there. And what's with sigma=22? That is an incredibly high value for sigma that will turn the frames into soupy mushy goo.

The advantage of using FFT3DGPU is that your Core i7 will be able to focus on everything other than noise filtering. That's a major time saver. A 9800GT should be a beast for processing with FFT3DGPU (my friend Navalynt uses one). With 480p material, it ought to be able to manage well over 60 fps running a single FFT3DGPU call with default settings.

Unfortunately, I've never messed with applying FFT3DGPU to interlaced material. One thing to note about FFT3DGPU however is that plane=4 is slower than running a separate plane=3 instance.

johnmeyer
16th February 2009, 18:36
Your code snippet doesn't use FFT3DGPU. Am I right in assuming that you tested that script with FFT3DGPU and not FFT3DFILTER?
Yeah, good catch. I definitely DID use FFT3DGPU when I did the comparison between it and the original FFT3DFilter (that's why I got different times!). However, I stupidly copied the wrong code snippet -- the two windows were open at the same time and I'm sure I just clicked on the wrong one. Probably late at night ...

swaaye
18th February 2009, 08:53
johnmeyer: are you cropping or resizing before running the video thru FFT3DGPU? I've found that feeding FFT3DGPU material that isn't in "compatible" multiples of width/height will give you those line distortions. I think it's related to the block width and height that FFT3DGPU uses (which are adjustable). Try running FFT3DGPU before both crop and resize so it's fed your 720x480 original.

johnmeyer
18th February 2009, 17:00
johnmeyer: are you cropping or resizing before running the video thru FFT3DGPU? I didn't do anything to the video. It was straight 720x480 DV AVI video.

totya
18th February 2009, 17:53
I didn't do anything to the video. It was straight 720x480 DV AVI video.

Sample video, please...

johnmeyer
18th February 2009, 18:14
Sample video, please...

I did post a still from my video in my initial post:

http://forum.doom9.org/showthread.php?p=1242253#post1242253

Here's a link to one second of video from the larger test clip. I just cut this with VirtualDub, using "direct stream copy." This link good for seven days:

https://www.yousendit.com/download/U0d4eFVYQzNCTWwzZUE9PQ

I'm not sure why anyone is interested in this. I think I pretty clearly identified the problem as being caused by the fact the fft3dGPU does NOT implement all of the functions of the original filter -- something that was already known -- and one of the things not implemented was the ability to deal natively with interlaced footage. Thus, if you include the extra steps for dealing with interlaced footage when using a temporal filter, the GPU version of the filter works without the horizontal line artifacts.

The remaining issue, however, is that on my new Intel i7-based computer, and nVidia 9800 GT video card, there was no speed advantage to using the GPU-based version of the filter. While initially surprising, it was in the end not that surprising, at least to me, because modern CPUs have added feature sets and architectures which make them much more able to deal with media in a manner which more closely resembles a GPU or DSP. Thus, I expect over time that the "GPU trick" used to gain performance will probably not provide as big an increase in speed as we saw a few years ago, when using older-architecture processors.

totya
18th February 2009, 22:10
Here's a link to one second of video from the larger test clip.

Hi, try mode=2 with your source.

johnmeyer
19th February 2009, 01:46
Hi, try mode=2 with your source. OK, I did that. Good news and bad news.

First the good news. This gets rid of the lines.

Further good news: the operation is MUCH faster than the native fft3d filter. I rendered a test clip in 17 seconds with fft3dGPU, but that same clip, using identical settings (except for mode=2 which is not available in the modern fft3d filter), took 44 seconds.

That is very impressive.

The bad news is that the quality of the video is not the same, and the GPU version is worse. Perhaps this has to do with the mode=2 setting, or perhaps it has to do with using older code (am I correct that the GPU filter is a few versions behind fft3d?).

Anyway, here is the magnified section of the armchair in the background (this is about 1/6 of the 720x480 clip). This first image is the original clip:

http://i177.photobucket.com/albums/w208/johnmeyer/Original-1.png

Now here is the clip filtered by the native fft3d filter:

http://i177.photobucket.com/albums/w208/johnmeyer/fft3d_01.png

and finally here is that same small section of the same frame, this time filtered with fft3dGPU:

http://i177.photobucket.com/albums/w208/johnmeyer/testfft3dGPU_01.png

In both cases, I used:

sigma=11, plane=0, sharpen=0.5, interlaced=true

(and mode=2 for the GPU version).

Now don't jump all over me. I know that this is way too high a sigma value, but I find that doing this helps me understand what artifacts to look for and, as in this case, lets me see problems in the filter that will still be there with smaller values, but might be overlooked at first glance. My usual procedure is to then use the individual sigma values (sigma2, sigma3, etc.) in order to tune the filtering even further.

Anyway, back to the point. What you will see is that both filters do considerable violence to the white spots on the chair, but the GPU version completely obliterates the spots on the front of the seat cushion, and actually blurs them vertically as well as horizontally.

I found similar problems with the texture on the oak table (see my original post).

Now, could the GPU version be made to look as good if I started changing other values? Perhaps. The speedup is pretty darned hard to pass up and ignore, but my pappy always said "the quality is remembered long after the price has been forgotten," the price in this case being the extra time to use the native filter.

[edit] I just did a little more testing, and the difference is far worse than the still image shows. If I magnify the video in Virtualdub and then actually play the video at normal speed, the GPU version of the filter shows all sorts of lag and smearing, like a temporal filter. One of the great things about the fft approach to filtering is that it is far less prone to this problem. So, the results are not acceptable at all, whereas the fft3d results are, as usual, absolutely brilliant.

swaaye
21st February 2009, 21:46
Try precision=2 with fft3dgpu. fft3dgpu does run at a low arithmetic precision by default and that could be the cause (or part of the problem). It's too bad that the author of fft3dgpu hasn't been around here in a long time.

I'm still unsure of why you were getting those lines to begin with. With a 720x480 image that shouldn't happen. I took a 720x480 DVD source here that's telecined and just fed it to fft3dgpu(interlaced=true) in Virtualdub. No problems. I'm on a Phenom II with a Radeon 4670.


MPEG2Source("blahblah.d2v")
fft3dgpu(interlaced=true)

As to the speed of a CPU vs a GPU for this math, well that all depends on how well the code fits with GPU architecture. The more powerful GPUs (like your 9800GT even) have massive mathematical throughput. That's all 3D rendering is. Your 9800GT has 112 floating point processors clocked at around 1.6 GHz (good for a theoretical rate of ~500 gigaFLOPS), and has around 60GB/s RAM bandwidth. The issue however is that GPUs reach their formidable speed by having specialized architectures with many limitations. 3D rendering doesn't need the level of flexibility a CPU has and 3D is extremely parallelizable so bunches of simple, separate processors are very easily kept busy unlike with CPU tasks.

Intel is actually building a CPU/GPU hybrid to try to find a middle ground, with various compromises of course. That's called "Larrabee" if you want to read about it. AMD and NVIDIA are very serious about GPUs evolving into more flexible mathematical processing powerhouses too. Things are a changing, that's for sure. The Radeon 4870 has somewhere between 140-220% more math power than your GPU. It's the current peak out there if you ignore the dual GPU cards that don't usually work with this kind of software.

johnmeyer
22nd February 2009, 01:36
Try precision=2 with fft3dgpu. OK, I tried it, but it gave me exactly the same, poor result.

Just to make sure I am using the "latest" version, mine is 0.8.2.

I took a 720x480 DVD source here that's telecined and just fed it to fft3dgpu(interlaced=true) in Virtualdub

Note quite sure what you mean by a "telecined" source. Don't get me wrong, I know what the word means, but it sounds like you may be looking at something that started as 24p. Just to be clear, the source for my footage was SVHS videotape, and was captured using the "pass-through" on my Sony FX1 camcorder. Thus, it is quite definitely NTSC 720x480 interlaced material, with odd fields having both different spatial AND temporal information than the even fields (i.e., I guess that's the definition of interlaced).

Something I never thought to ask: Are there any settings to program or "set" the GPU in some way? Perhaps this is something that happens because of the size of the "chunks" of data being fed to the GPU. The small amount of information on the "mode" parameter indicates that it may control how much information is sent for each computation.

So, do I need to open the nVidia control panel and change some settings?

swaaye
24th February 2009, 03:19
I just don't have any pure interlaced material on hand. Best I can do is NTSC TV that is interlaced from the telecine process. So yes it's film that was originally 24 fps. Instead of inverse telecining it, I just ran it through at the full 29.97 fps and FFT3DGPU seemed fine with it.

For GPU settings, I'd just make sure that everything is set to the defaults. And perhaps try getting the newest non-beta drivers from NVIDIA for your 9800GT. Not sure what else to suggest....

Best choice seems like you said: just stick with FFT3DFILTER if you can't get FFT3DGPU to work well enough. Especially the case if you don't have tons of material to process and speed is a total non-issue.

You might want to look up a deinterlacer called TDeint. I know you don't want to deinterlace because you're outputting the video on an interlaced device, but the future doesn't seem to be interlaced. :) TDeint is a superb deinterlace filter.
http://forum.doom9.org/showthread.php?t=82264
http://bengal.missouri.edu/~kes25c/

TheBigW
21st March 2009, 14:06
Hi am having an issue with the 0.82 version when encoding an avi file. The file is 46 mins long (something i recorded with a nice hd camera). When running with fft3dfilter i get the full length, but for some reason the fft3dGPUfilter thinks its only 6 mins long. (it cuts off after a few black frames- would this be a problem?). graphics card is Nividia 8500 1GB ram. Running script through megui.

settings are:

fft3dgpu(sigma=1.5, bt=3, bw=30, bh=30, ow=8, oh=8, sharpen=1.0, wintype=2)

Is this a bug??? (theres no error report im afraid as megui doesnt recognise the error :s

swaaye
25th April 2009, 09:39
Has anyone else become completely discouraged with the noise reduction the FFT method produces? I've been using it for over a year now and the banding it causes just sticks out to me more and more.. I recently was working on Hunt for Red October and had unsolvable banding problems during the underwater sequences, even with the aid of gradfunkmirror and gradfun2dbmod. I am starting to think that the FFT processing is fundamentally flawed with how I can still find color banding even with extremely low sigma of 0.5.

I decided to try out some new noise reduction methods and found the MVTools package. Using the motion compensated MDegrain2 noise reduction has just completely ruined FFT3DGPU and FFT3DFILTER for me. :) It's so much slower, but it's also so much better IMO! No banding. Noise is removed in a way that is both fascinating and extremely effective at maintaining overall image quality. It has worked wonders for super noisy sources I've tried it on. The slowness is tragic, but I love what I see with it so I'm going to just have to deal with it.

One very unfortunate problem with FFT3DGPU vs. FFT3DFILTER is the strangely bugged bt=4 mode. Instead of the smooth, temporally stable result of FFT3DFILTER, with FFT3DGPU the remaining noise seems to flow across the screen during playback in the strangest way that's not appealing at all. I tried a wide range of settings, including exactly identical ones, but FFT3DGPU simply doesn't come close to FFT3DFILTER's result.

BigDid
13th May 2009, 22:00
Hi,

Just re-read the thread to see if my problem was already identified but doesn't seems so.

Problem: when feeding job control in Vdubmod for a xvid encode (1 or 2 pass) with a complex script using
fft3dgpu(plane=4, precision=1, sigma=2.4) Vdubmod just exits with no error message right after clicking start in the job control

No problem same script feeded to mpc for previewing or in Vdubmod without job control (save directly so 1 operation at a time and no shut down after encoding from job control)

Script is application from this thread: http://forum.doom9.org/showthread.php?p=1283534#post1283534

No problem with fft3dgpu() before using this complex script, no change in config:
XP-SP3, 2gig Ram, GPU is ATI 4670 with 512Ram, driver is 9.2, fft3dgpu is 0.82

From reviewing the thread I suppose the problem may be related to Ram and/or Vram...

What I have tried so far with no change:
- use setmemorymax(512 or 768) at the beginning of the script; process explorer tells me I have 300Mb or more Ram available
- strictly use only MT(""".......""") before and after fft3dgpu with no setmtmode(2,0)
- use setmtmode(2,0) at the begining and setmtmode(5,0) just before fft3dgpu()
- Not use MT or setmtmode()

Only workaround is changing fft3dgpu by fft3dfilter(plane=4, sigma=2.4), which is slower but works.

Any hints or tips?

Thanks in advance.

Did

G_M_C
14th May 2009, 10:39
Ha,

Forgot all about this tread, but i still use this filter now and again. But with my QX9650 "regular" fft3dfilter works good enough too ...

But the reason i "butt into" this thread is the following. I've been readin up on the coming version of DirectX 11. With the coming of DX11, and new feature will be added; The compute Shader. And one of the features explicitly named as beeing ideal for the compute shader is .... FFT transformations (but also matrix transformations, onordered memory lookups/writes/multi-treading etc.).

And now offcourse the question: Will there be e update/rewrite/new version of FFT3dGPU, using these new features of DX 11? Cause I think this will be a big chance for great improvements, wich give new life to this great tool/filter!

BigDid
15th May 2009, 02:31
Hi,

Update from my previous post: http://forum.doom9.org/showthread.php?p=1285091#post1285091
In case someone wants the script here are some extracts:

setmemorymax(768)
...
Load_Stdcall_plugin("C:\PROGRA~1\AutoGK\filters\yadif.dll")

movie = mpeg2source("G:\FILMS\Episodes Wolverine\agk_tmp\Wolverine_03.d2v")
...
setmtmode(2,0)
yadif(movie)
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=2)
Spline64resize(out_width,out_height)

mt("""
fastlinedarkenMOD(thinning=0, strength=36)
deblock()
fluxsmoothst(5,5)
maa()
#fft3dfilter(plane=4, sigma=2.4)
""")
setmtmode(6,0)
fft3dgpu(plane=4, bt=4, precision=1, sigma=2.8)

mt("""
#cnr2()
tbilateral()
#hybridfupp(preset="anime2")
limitedsharpenfaster(smode=4, strength=60)
#fastlinedarkenMOD(thinning=0, strength=18)
#dehalo_alpha()
gradfun2db(1.51)
""")

What I have tried since last post:
- use bt=2
- use precision=0
to no avail...

Update: Changed ATI drivers from 9.2 to 9.4 and 9.5 no change...

Did

Arshad07
1st November 2009, 21:59
whats this error all about?

http://i37.tinypic.com/rjfdky.jpg

Script

SetMtMode(2)
import("E:\Encode\LSFmod.v1.8.avsi")
import("E:\Encode\MCTemporalDenoise.v1.3.00.avsi")
Import("E:\Encode\YLevels_mt.avsi")
Import("E:\Encode\plugins\plugins\MCBob.avsi")
LoadPlugin("E:\Encode\mvtools-v1.11.4.5\mvtools.dll")
LoadPlugin("E:\Encode\fft3dfilter211\FFT3DFilter.dll")
LoadPlugin("E:\Encode\MaskTools.dll")
LoadPlugin("E:\Encode\masktools-v2.0a36\mt_masktools-25.dll")
LoadPlugin("E:\Encode\mvtools-v2.5.3\mvtools2.dll")
LoadPlugin("E:\Encode\gradfun2db_25_dll_20060315\gradfun2db\gradfun2db.dll")
LoadPlugin("E:\Encode\medianblur084\medianblur.dll")
LoadPlugin("E:\Encode\EEDI2v092\EEDI2\EEDI2.dll")
LoadPlugin("E:\Encode\mvtools2.dll")
LoadPlugin("E:\Encode\Hdragc-1.8.7\AGC.dll")
AVISource("D:\Encoding Folder\KNPh\lag.avi", audio=false)
Spline64Resize(640,248) # Spline64 (Sharp)
ConvertToYV12(matrix="Rec601", interlaced=false)
YLevels(6, 1, 255, 0, 255)
Tweak(hue=0.0, sat=1.2, bright=0, cont=1.0, coring=true, sse=false)
SetMtMode(5)
fft3dgpu(sigma=.5, sigma2=1.5, sigma3=2, sigma4=1, bt=3, bw=30, bh=30, ow=8, oh=8, wintype=2)
SetMtMode(2)
LSFmod(Smode=3,Lmode=1,ss_x=1.0,ss_y=1.0,strength=50)

Chikuzen
2nd November 2009, 05:54
LoadPlugin("E:\Encode\fft3dfilter211\FFT3DFilter.dll")

FFT3DFilter and FFT3DGPU are different.

Leak
2nd November 2009, 12:29
whats this error all about?
If I were you I'd take a close look at the forum rules (especially #8) then either delete this post or the one in your other thread before one of the mods notices... *hint hint*

Arshad07
2nd November 2009, 16:07
FFT3DFilter and FFT3DGPU are different.

I've already installed fft3dgpu.

Maitreya
2nd November 2009, 21:39
LoadPlugin("E:\Encode\fft3dfilter211\FFT3DFilter.dll")

should be
LoadPlugin("E:\Encode\fft3dfilter211\FFT3dGPU.dll")
i guess

Zach
3rd November 2009, 21:04
It really sucks that nVidia's built-in auto-downclocking mechanism has made this filter useless (in terms of speed gain vs. the original FFT3DFilter filter). I've now switched back to the original FFT3DFilter because it's actually faster. :)

If it weren't for games, I'd actually consider switching back to my old 8800 GTX and ditch my newer GTX 275. Turning off this new "3D Performance" feature requires a convoluted and complicated series of registry hacks and then, of course, a reboot, all of which is annoying to do whenever the mood strikes me to encode a video.

Arshad07
6th November 2009, 23:53
Anyone knows whats causing these problems:-

http://i37.tinypic.com/iwsky8.jpg
http://i33.tinypic.com/wl5di1.jpg
http://i33.tinypic.com/2nteh44.jpg

Script:-


SetMtMode(2)
DGDecode_mpeg2source("D:\Encoding Folder\W.d2v", cpu=4, info=3)
ColorMatrix(hints=true, interlaced=true, threads=0)
tfm(order=1).tdecimate()
crop( 0, 58, -2, -58)

Spline64Resize(848,360) # Spline64 (Sharp)
YLevels(14, 1, 255, 0, 255)
LSFmod(Smode=3,Lmode=1,ss_x=1.0,ss_y=1.0,strength=30)
fft3dgpu(sigma=.5, sigma2=1.5, sigma3=2, sigma4=1, bt=3, bw=30, bh=30, ow=8, oh=8, sharpen=.5,wintype=2)

Atak_Snajpera
7th November 2009, 00:27
Anyone knows whats causing these problems:-
This SetMtMode(2). You canot use SetMTmode with GPU plugin!

Mystery Keeper
14th November 2009, 01:59
If it weren't for games, I'd actually consider switching back to my old 8800 GTX and ditch my newer GTX 275. Turning off this new "3D Performance" feature requires a convoluted and complicated series of registry hacks and then, of course, a reboot, all of which is annoying to do whenever the mood strikes me to encode a video.

Consider waiting a little and getting (terribly expensive) NVidia card with shader model 5 support. They are designed for parallel computing.

VincAlastor
25th November 2009, 08:19
And now offcourse the question: Will there be e update/rewrite/new version of FFT3dGPU, using these new features of DX 11? Cause I think this will be a big chance for great improvements, wich give new life to this great tool/filter!

yes, direct compute is out! nvidia cuda gpu's work with it. ati releases the first dx11 gpu's and no 3ddenoiser support until now. maybe dfttest is dead, but i were very grateful, when tsp update a dx11 fft3dgpu, too!

TSP please say us, can we count with a new fft3dgpu? (eehhhmmm... a banding protection were great, too ;) )

aegisofrime
25th November 2009, 09:32
This SetMtMode(2). You canot use SetMTmode with GPU plugin!

Additionally, I'm pretty sure you cannot use x264 with it. As in, for me to be able to use FFT3DGPU properly, I have to use the pre-rendering pass in MeGUI. Create a raw file first, before encoding with x264.

cogman
4th December 2009, 23:57
Additionally, I'm pretty sure you cannot use x264 with it. As in, for me to be able to use FFT3DGPU properly, I have to use the pre-rendering pass in MeGUI. Create a raw file first, before encoding with x264.

Ummm... No, this is just wrong. I've used FFT3dGPU with x264 all the time, Why would you think otherwise?

aegisofrime
5th December 2009, 01:37
Ummm... No, this is just wrong. I've used FFT3dGPU with x264 all the time, Why would you think otherwise?

In that case there's something wrong with my system, because I get the same errors if I encode with x264.

TheProfosist
20th January 2010, 07:27
i am currently having issues implementing fft3dGPU on MPEG2 content this is the code im using for anime:

FFT3dGPU(sigma=4,sharpen=1.0,plane=4,precision=2,degrid=1.0)

when i load i into MeGUI it crashes but when loading vc-1 material it does not

TheProfosist
20th January 2010, 14:28
may have been an issue with the content i will experiment a bit more

TheProfosist
21st January 2010, 11:02
ok i got it working but with my current setting i get a ton of blocking. current setting are as follows FFT3dGPU(sigma=4,sharpen=1.0,plane=4,precision=2,degrid=1.0) and i would like to use if for anime

Hiritsuki
16th February 2010, 12:50
hey guys
I had use fft3dgpu test qulity of anime video
Toaru Kagaku no Railgun (とある科学の超電磁砲)
and to compare with other filter

Source
http://www.Pixsup.com/uploads/fa97fcf9eb.png

WarpSharp()
http://www.Pixsup.com/uploads/97410b0733.png

WarpSharp()
16-235 => 0-255
http://www.Pixsup.com/uploads/8b2cd9d5a0.png

WarpSharp()
TNLMeans()
16-235 => 0-255
even if this filter is highest qulity but it's too slow to use
http://www.Pixsup.com/uploads/7b42c27bf6.png

WarpSharp()
fft3dgpu(bt=1,sigma=2)
16-235 => 0-255
http://www.Pixsup.com/uploads/b1c922f5d6.png

Konrad Klar
16th February 2010, 20:49
This SetMtMode(2). You canot use SetMTmode with GPU plugin!

But not all is lost. SetMTMode(5,0) may be inserted before line with FFT3DGPU and then script should be working.

rehny
15th March 2010, 13:42
Hellow.
FFT3dGPU doesn't work well.

Photo 1
http://tomorrow01.netfirms.com/fft3gpu_error.JPG
Photo 2
http://tomorrow01.netfirms.com/fft3gpu_error2.JPG

I don't understand why this error happens.

I'm Jpanese, so not good at English.
But I want to do my best cooperation wiht you.

My FFT3dGPU setting is FFT3DGPU(sigma=1.7 ,beta=1 ,plane=4 ,bw=16 ,bh=16 ,ow=8 ,oh=8 ,bt=4 ,mode=0 ,interlaced=false ,wintype=1 ),
however, the error happens on other settings

[PC 1]
Operating System: Windows 7 Enterprise 32-bit (6.1, Build 7600) (7600.win7_gdr.091207-1941)
Language: Japanese (Regional Setting: Japanese)
Processor: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (4 CPUs), ~2.8GHz
Memory: 4096MB RAM
Available OS Memory: 3328MB RAM
DirectX Version: DirectX 11
Card name: NVIDIA GeForce GTS 250
Manufacturer: NVIDIA
Chip type: GeForce GTS 250
Display Memory: 1905 MB
Dedicated Memory: 497 MB
Shared Memory: 1407 MB
Driver Name: nvd3dum.dll,nvwgf2um.dll,nvwgf2um.dll
Driver File Version: 8.16.0011.9107 (English)
Driver Version: 8.16.11.9107
DDI Version: 10
Driver Model: WDDM 1.1
Driver Attributes: Final Retail
Driver Date/Size: 9/28/2009 07:12:20, 7614056 bytes


[PC 2]
Operating System: Windows XP Home Edition (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_rtm.040803-2158)
Language: Japanese (Regional Setting: Japanese)
Processor: AMD Phenom(tm) II X4 955 Processor, MMX, 3DNow (4 CPUs), ~3.2GHz
Memory: 3072MB RAM
DirectX Version: DirectX 9.0c (4.09.0000.0904)
Card name: NVIDIA GeForce GTS 250
Manufacturer: NVIDIA
Chip type: GeForce GTS 250
Display Memory: 512.0 MB
Driver Name: nv4_disp.dll
Driver Version: 6.14.0011.9062 (English)
DDI Version: 9 (or higher)
Driver Attributes: Final Retail
Driver Date/Size: 8/17/2009 00:57:00, 5845760 bytes


[PC 3]
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7600) (7600.win7_rtm.090713-1255)
Language: Japanese (Regional Setting: Japanese)
Processor: AMD Athlon(tm) II X4 605e Processor (4 CPUs), ~2.3GHz
Memory: 4096MB RAM
Available OS Memory: 3582MB RAM
DirectX Version: DirectX 11
Card name: ATI Radeon HD 4200
Manufacturer: ATI Technologies Inc.
Chip type: ATI display adapter (0x9710)
Display Memory: 2124 MB
Dedicated Memory: 589 MB
Shared Memory: 1534 MB
Driver Name: atiumd64.dll,atidxx64.dll,atiumdag,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll
Driver File Version: 8.14.0010.0685 (English)
Driver Version: 8.641.0.0
DDI Version: 10.1
Driver Model: WDDM 1.1
Driver Attributes: Final Retail
Driver Date/Size: 7/30/2009 02:14:56, 4383744 bytes


[PC 4]
Operating System: Windows Vista? Ultimate (6.0, Build 6002) Service Pack 2 (6002.vistasp2_gdr.091208-0542)
Language: Japanese (Regional Setting: Japanese)
Processor: Intel(R) Xeon(R) CPU E5450 @ 3.00GHz (8 CPUs), ~3.0GHz
Memory: 4094MB RAM
DirectX Version: DirectX 11
Card name: NVIDIA GeForce 8600 GTS
Manufacturer: NVIDIA
Chip type: GeForce 8600 GTS
Display Memory: 2030 MB
Dedicated Memory: 239 MB
Shared Memory: 1791 MB
Driver Name: nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Driver Version: 8.16.0011.9107 (English)
DDI Version: 10
Driver Attributes: Final Retail
Driver Date/Size: 9/27/2009 23:12:22, 9441384 bytes


[PC 5]
Operating System: Windows XP Professional x64 Edition (5.2, Build 3790) Service Pack 2 (3790.srv03_sp2_gdr.091215-1207)
Language: Japanese (Regional Setting: Japanese)
Processor: Dual Core AMD Opteron(tm) Processor 275 (4 CPUs), ~2.2GHz
Memory: 2046MB RAM
DirectX Version: DirectX 9.0c (4.09.0000.0904)
Card name: NVIDIA GeForce 7800 GT
Manufacturer: NVIDIA
Chip type: GeForce 7800 GT
Display Memory: 256.0 MB
Driver Name: nv4_disp.dll
Driver Version: 6.14.0010.7777 (English)
DDI Version: 9 (or higher)
Driver Attributes: Final Retail
Driver Date/Size: 7/20/2005 21:07:00, 5767168 bytes

Only PC 5 has no problem.
If you want to know my PC's other specs, plase tell me.

Thank you.

osgZach
15th March 2010, 16:32
You may also want to post your entire AVS script, in case something in it is causing the problem.

rehny
15th March 2010, 17:21
I use AviSynth 2.5.8 and don't use MT.

one of my avs scripts.

SetMemoryMax(1024)
PPath = "C:\encode\AviSynth\"
TS = "F:\ts\"
ENCODE_NAME = "test"
LoadPlugin(PPath + "FFT3dGPU.dll")
LoadPlugin(PPath + "EEDI2.dll")
LoadPlugin(PPath + "TDeint.dll")
LoadPlugin(PPath + "TIVTC.dll")
LoadPlugin(PPath + "DGDecode.dll")
video = MPEG2Source(TS + ENCODE_NAME +".d2v")
audio = WavSource(TS + ENCODE_NAME + ".wav")
AudioDub(video, audio)
AssumeTFF()
Trim(a,b)++Trim(c,d)++Trim(e,f)
TIVTC24P2()
BlackmanResize(1280,720)
FFT3DGPU(sigma=1.7 ,beta=1 ,plane=4 ,bw=16 ,bh=16 ,ow=8 ,oh=8 ,bt=4 ,mode=0 ,interlaced=false ,wintype=1)
return last

function TIVTC24P2(clip clip){
Interp = clip.AssumeTFF().SeparateFields().SelectEven().EEDI2(field=1)
Deinted=clip.TDeint(order=1,field=1,edeint=Interp)
clip = clip.TFM(mode=6,order=1,PP=7,slow=2,mChroma=true,clip2=Deinted)
clip = clip.TDecimate(mode=1)
return clip
}

osgZach
15th March 2010, 17:46
I'm sure someone with the proper knowledge will be along, but have you tested by removing the first AssumeTFF() or putting it higher up the chain (maybe after loading the source) ? and have you tested calling FFT3DGPU before your IVTC instead ?

rehny
15th March 2010, 18:23
Thank you, osgZach.

have you tested by removing the first AssumeTFF() or putting it higher up the chain (maybe after loading the source) ?
I hadn't done, so I tried to remove the first AssumeTFF(), but the error happened. :(

have you tested calling FFT3DGPU before your IVTC instead ?
Yes.
For more information, please see below.

FFT3DGPU(sigma=1.7 ,beta=1 ,plane=4 ,bw=16 ,bh=16 ,ow=8 ,oh=8 ,bt=4 ,mode=0 ,interlaced=true ,wintype=1)
TIVTC24P2()
BlackmanResize(1280,720)

However, I was unable to solve the problem.

osgZach
15th March 2010, 18:33
In the meantime, I suggest doing the following.

Go through your script line for line, and disable one line at a time until the problem dissapears (or do you know for sure disabling FFT3DGPU will make it go away?).

Hopefully this will get you proper output at some point and you can start turning stuff back on..

If its without a doubt FFT3DGPU, start with the least custom options as possible (standard call " FFT3DGPU()") and add back custom values one at a time to see if you can find the problem.

rehny
15th March 2010, 19:06
I'm sure that FFT3DGPU causes the problem.
Unfortunately, I also made sure the error happens with FFT3DGPU().

osgZach
15th March 2010, 20:54
Then all you can do is call it without your custom options ( FFT3DGPU() ) and see if it still gives the corruption.

If it does, try redownloading it, or trying different video drivers. If the problems go away, you'll have to add your custom options to the call one by one, until you can isolate which setting, or combination of settings is doing it.. (or until someone who knows hopefully clues you in to what the problem is)

asarian
30th June 2010, 15:07
Is the GeForce GTX 260 supported? I'm getting the following error, using MCTemporalDenoise (with 'GPU=true'):


avs [info]: 1920x796p 1:1 @ 24000/1001 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
x264 [error]: malloc of size 6856704 failed/s, eta 19:40:54
x264 [error]: x264_encoder_encode failed


With 'GPU=false' is doesn't fail.

Thanks.

kemuri-_9
30th June 2010, 23:59
MCTemporalDenoise (with 'GPU=true'):

x264 [error]: malloc of size 6856704 failed/s, eta 19:40:54
x264 [error]: x264_encoder_encode failed

With 'GPU=false' is doesn't fail.

how is it saying anything about your gpu card being not supported?
all x264 said is "I can't allocate any more memory and thus failed to work".
sounds like using the gpu version uses more memory which is causing x264 to error like that.

asarian
1st July 2010, 00:40
how is it saying anything about your gpu card being not supported?
It isn't; which is why I'm asking. :)


all x264 said is "I can't allocate any more memory and thus failed to work".
sounds like using the gpu version uses more memory which is causing x264 to error like that.
Well, isn't malloc specified in bytes? So, x264 is telling me it can't allocate a measly 6MB? (out of 4G, of which it only use ca. 1.4G).

My understanding of fft3dGPU (which is nearly 0, as I'm just using it for the first time), is that it will try and allocate video memory. So, if an entire card weren't supported, I could see a 6MB chunk allocation fail too.

Adub
1st July 2010, 00:59
Hmmm...I've had issues with fft3dGPU and HD content. The main problem is that you can only call it once in a script. With a compound script like MCTemporalDenoise, I can see it being called on more than one occasion, which my be your problem.

Zep
1st July 2010, 17:57
It isn't; which is why I'm asking. :)

My understanding of fft3dGPU (which is nearly 0, as I'm just using it for the first time), is that it will try and allocate video memory. So, if an entire card weren't supported, I could see a 6MB chunk allocation fail too.

Make sure you put a SetMTMode(5,threads) before it. I do this and have never had a problem on 1080 stuff and I only have a 512 8800GT. Like the poster above me said you should only have 1 FFT3DGPU call. just that 1 call uses 90% of the ram on my card. (I use rivatuner to see what is happening)


This works well for me:

threads=8
SetMTMode(3,threads)
mpeg2source(whatever)

SetMTMode(5,threads)
FFT3DGPU(whatever)

SetMTMode(2,threads)
Mode2filters(whatever)

asarian
1st July 2010, 21:52
Make sure you put a SetMTMode(5,threads) before it. I do this and have never had a problem on 1080 stuff and I only have a 512 8800GT. Like the poster above me said you should only have 1 FFT3DGPU call. just that 1 call uses 90% of the ram on my card. (I use rivatuner to see what is happening)


This works well for me:

threads=8
SetMTMode(3,threads)
mpeg2source(whatever)

SetMTMode(5,threads)
FFT3DGPU(whatever)

SetMTMode(2,threads)
Mode2filters(whatever)
Thanks, Zep! I'll give that a try after the current 'regular' encoding job finishes.

My card is only a GTX260 (only one of its kind that would still fit on my Commando motherboard after my 8800GTX died). So, I'm not sure I could gain much from the GPU route (except,. maybe, an increase in decibel from the GPU fan); but it's worth finding out.

asarian
2nd July 2010, 00:09
Make sure you put a SetMTMode(5,threads) before it.
Hmm, just realized I don't use MT AviSynth. :) So, that's not going to work.

aegisofrime
2nd July 2010, 13:50
Hmm, just realized I don't use MT AviSynth. :) So, that's not going to work.

Is there a reason why you choose not to use it?

Zep
2nd July 2010, 16:39
Hmm, just realized I don't use MT AviSynth. :) So, that's not going to work.

well you should :D MUCH faster! (though you will need to tweak scripts to find the sweet spot for speed)
GPU version is much faster and it frees up ram and it mean less CPU used so more CPU for filters.

Anyway, my guess is your parms are too memory hungry. You need to change block size and get rid of overlap etc... to be able
to do 1080 (how much ram is on that GTX260? (I just looked 896. that should be enough even for defaults) hmmm...) I suggest you
get rivatuner and take a look at WHAT is going on.


good luck

asarian
3rd July 2010, 19:28
well you should :D MUCH faster! (though you will need to tweak scripts to find the sweet spot for speed)
GPU version is much faster and it frees up ram and it mean less CPU used so more CPU for filters.
To tell ya the truth, I briefly looked at MT AviSynth when it first came out; it was kindy buggy then. And besides, I figured the vast majority of CPU time is usurped by x264 anyway; so who cares whether the encoding takes 80 hours or 79.55? That thinking may need an overhaul, though. :)

Anyway, my guess is your parms are too memory hungry. You need to change block size and get rid of overlap etc... to be able
to do 1080 (how much ram is on that GTX260? (I just looked 896. that should be enough even for defaults) hmmm...) I suggest you
get rivatuner and take a look at WHAT is going on.
I'm not using it directly myself. It's part of the MCTemporalDenoise script. And to tell you the truth again, much as I love encoding speed, I like quality better. Meaning I'd hate to cripple brilliant scripts like MCTemporalDenoise, just to cater to the needs of a GPU plugin.

From what I currently understand, it actually really just looks to be a x264 memory issue (which is to say, x264 + AviSynth + MCTemporalDenoise all competing for the 1x 2GB-per-process limit on my 32-bit OS). At least, I no longer think it's really graphics memory I'm running out of. So, I'm going to experiment with avs2yuv and pipebuf a bit, and maybe directly try so on a 64-bit OS.

asarian
4th July 2010, 00:57
Yep, it was a x264 memory issue. :) Or rather, a Windoze 32-bit 2 GB-per-process limit issue. I solved it by letting avs2yuv.exe pipe its output to x264 (a very handy memory separation trick I learnt recently!).

Can't say 'GPU=true' is faster for me, though. In fact, it seems to make no difference at all, LOL, both memory + speed wise. So, maybe it's not even using GPU after all. Kinda weird, actually.

G_M_C
12th July 2010, 16:19
From this thread: SEt's Avisynth 2.5.8 MT compiled for *X86_64*, Latest Build 4/16/2010 (http://forum.doom9.org/showthread.php?t=152800)

I found that there is a 64 bit verion available of fft3dgpu. But it is also mentioned that (quote)

note:The hlsl (shader program) file is edited from the original to adhere to pixel shader 3.0 syntax rules.


I've take this PS3.0 HSL file, and i have been using it with fft3Dgpu version 0.82 (i installed 0.82, and copied the "new" hsl file over the original one). It seems to work, and i have the idea that it is much faster than the original HSL. At least on my HD5770.

Can someone confirm you can simply "update" the HSL on the original 32-bit fft3dgpu, without errors or problems ?

Hiritsuki
12th July 2010, 18:03
Wow!! thanks G_M_C, I will test it on 32-bit fft3dgpu tomorow
if it's usable, it's help me alot of encode time.

Hiritsuki
13th July 2010, 18:01
To G_M_C
it's can be used on 32-bit fft3dgpu
but I don't know it's faster or slower than original hlsl.

G_M_C
14th July 2010, 10:00
To G_M_C
it's can be used on 32-bit fft3dgpu
but I don't know it's faster or slower than original hlsl.

I've tested and you are right;

AviSynth test file

DirectShowSource("ïnput_1080p.grf",fps=23.976,audio=false) \ (grf opens blu-ray m2ts with CoreAVC2.0, output YV12)

fft3dgpu(precision=2,plane=???,bw=32,bh=32,ow=16,oh=16)

AssumeFPS (24000,1001)


Plane=4
HSL2.0 12.8~12.9 fps
HSL3.0 13.0~13.1 fps

Plane 1 & 3
HSL2.0 and HSL3.0 scored almost equal; 23.8 fps

This on my machine;
QX9650 @ non-OC 9x333 for fair comparison with other users
Ati HD5770 @ non-OC
XP 32-SP3

Boulder
14th July 2010, 10:48
Could you please run a comparison against FFT3DFilter with same settings?

Hiritsuki
14th July 2010, 11:48
I've tested and you are right;

AviSynth test file

DirectShowSource("ïnput_1080p.grf",fps=23.976,audio=false) \ (grf opens blu-ray m2ts with CoreAVC2.0, output YV12)

fft3dgpu(precision=2,plane=???,bw=32,bh=32,ow=16,oh=16)

AssumeFPS (24000,1001)


Plane=4
HSL2.0 12.8~12.9 fps
HSL3.0 13.0~13.1 fps

Plane 1 & 3
HSL2.0 and HSL3.0 scored almost equal; 23.8 fps

This on my machine;
QX9650 @ non-OC 9x333 for fair comparison with other users
Ati HD5770 @ non-OC
XP 32-SP3

Wow! I also test it, but I use no Plane to run it.
My video frame size is 1920*1080.

fft3dgpu() # used original to run

HSL2.0 15.7~16.4fps
HSL3.0 16.1~16.6fps

This on my PC
i7-980X @ oc 200*21
nVidia GTX275 @ oc 800-1680-1200
Win7 64bit (use with 32-bit avisynth)

G_M_C
14th July 2010, 12:05
Wow! I also test it, but I use no Plane to run it.
My video frame size is 1920*1080.

fft3dgpu() # used original to run

HSL2.0 15.7~16.4fps
HSL3.0 16.1~16.6fps

This on my PC
i7-980X @ oc 200*21
nVidia GTX275 @ oc 800-1680-1200
Win7 64bit (use with 32-bit avisynth)

fft3dgpu(), default uses plane=1 afaik ;)

@Boulder, i'll set it up.

Hiritsuki
14th July 2010, 16:27
Tomorow I will use new graphic card to run this test.
Is the MSI N465GTX TwinFrozer Gold Edtion (can update bios to GTX470).
Think that will more difference with HSL2.0 to HSL3.0.

Hiritsuki
15th July 2010, 17:52
I had try GTX465 to run this and find a result is HSL2.0 or 3.0 is can't run more than more faster in new Graphic Card than this FFT3DGPU devlop time.
Old Graphic Card that like 6600GT or 7600GT is the FFT3DGPU devlop time.
If HSL 4.0 or 5.0 or framework for renovation maybe run more than more faster.

New test below

My video frame size is 1920*1080.

fft3dgpu() # used original to run

HSL2.0 16.1~16.4fps
HSL3.0 16.5~16.7fps

This on my PC
i7-980X @ oc 200*21
nVidia GTX465 @ oc 800-1680-1000
Win7 64bit (use with 32-bit avisynth)

Hiritsuki
5th August 2010, 02:54
Anyone used NVperf?
Who can tell me what this effect is?

Chabb
29th August 2010, 15:12
Could somebody help with such bug in fft3dgpu?
http://i9.fastpic.ru/thumb/2010/0829/a4/_25e0e61ce01b77cbc0c0fd8f3e715ca4.jpeg (http://fastpic.ru/view/9/2010/0829/_25e0e61ce01b77cbc0c0fd8f3e715ca4.png.html)
It started since I've changed 8800GT to GTX460
All other things remains the same:
OS (WinXP SP3), video driver (258.96), fft3dgpu and avisynth (2.5.8) versions
It occurs not every time, mainly with HD sources.
Sometimes reboot helps.
Is it driver issue or something else?

Sharktooth
30th August 2010, 14:40
probably a driver issue

Beak
19th October 2010, 17:43
This is probably a dumb question but I am curious.

I have a Radeon 5770, Core clock is 860Mhz and the memory 1200Mhz.
I have a i720 quad core O/c to 3.6.

I can run fft3dfilter in any MT mode I can think of and still get no more than 9 frames per second on HD encodes ie 1280P.

With fft3dgpu I get up to 18fps with the same settings.

FFT3dGPU(sigma=2.0, bt=4, bw=32, bh=32, ow=16, oh=16)
MT("""LSFmod(smode=5)""", threads=4, overlap=8)

How is this possible? Not complaining, just curious. :)

Assassinator
20th October 2010, 02:54
I can run fft3dfilter in any MT mode I can think of and still get no more than 9 frames per second on HD encodes ie 1280P.

With fft3dgpu I get up to 18fps with the same settings.

The key word is "encode".

Ok, are you actually testing the speed of an encode, or are you simply testing the speed of the avs script.

If you are encoding it, it should be pretty obvious. Because fft3dfilter needs to share the CPU with x264 (slowing both down), while fft3dGPU does not (so x264 gets pretty much all the CPU). This is the main reason why people use fft3dgpu at all.

Beak
20th October 2010, 03:43
The key word is "encode".

Ok, are you actually testing the speed of an encode, or are you simply testing the speed of the avs script.

If you are encoding it, it should be pretty obvious. Because fft3dfilter needs to share the CPU with x264 (slowing both down), while fft3dGPU does not (so x264 gets pretty much all the CPU). This is the main reason why people use fft3dgpu at all.

Of course. But it is still only 1 thread on an 860 Mhz processor. Is there a different math language used by a GPU?

If just playing the script without GPU I cannot reach same speeds with 8 virtual cores at 3.6 gig.

Assassinator
20th October 2010, 10:58
Of course. But it is still only 1 thread on an 860 Mhz processor. Is there a different math language used by a GPU?

1 thread? Try 500 threads. You shouldn't even be comparing thead counts when talking about CPU vs GPU. They are so different it's meaningless.

And ofcourse CPU (x264) +GPU (fft3dGPU) will be faster than CPU alone (x264 + fft3dfilter). That makes sense, no? (Only way that wouldn't work is if you have a GPU bottleneck, which isn't the case here).

Try testing fft3dfilter vs fft3dGPU WITHOUT any encoding. That is, just the script, no x264/xvid/whatever.

woah!
23rd October 2010, 07:00
Could somebody help with such bug in fft3dgpu?
http://i9.fastpic.ru/thumb/2010/0829/a4/_25e0e61ce01b77cbc0c0fd8f3e715ca4.jpeg (http://fastpic.ru/view/9/2010/0829/_25e0e61ce01b77cbc0c0fd8f3e715ca4.png.html)
It started since I've changed 8800GT to GTX460
All other things remains the same:
OS (WinXP SP3), video driver (258.96), fft3dgpu and avisynth (2.5.8) versions
It occurs not every time, mainly with HD sources.
Sometimes reboot helps.
Is it driver issue or something else?

i get this now, upgraded from a 260gtx to a 460gtx.

seems the betas nvidia drivers dont fix this either... works after a reboot can open script many times in a row with no issue. then i open videoredo and edit a mpeg2 hd source and save. now without doing anythind more, open avs script and get the same as the pics show above?

weird stuff...

Beak
2nd November 2010, 03:37
Can anyone comment on whether there would be any visible difference between precision=0 vs precision 2 with this filter?

I can see nothing but my TV is not really the best.

ianken
27th November 2010, 00:39
From this thread: SEt's Avisynth 2.5.8 MT compiled for *X86_64*, Latest Build 4/16/2010 (http://forum.doom9.org/showthread.php?t=152800)

I found that there is a 64 bit verion available of fft3dgpu. But it is also mentioned that (quote)


I've take this PS3.0 HSL file, and i have been using it with fft3Dgpu version 0.82 (i installed 0.82, and copied the "new" hsl file over the original one). It seems to work, and i have the idea that it is much faster than the original HSL. At least on my HD5770.

Can someone confirm you can simply "update" the HSL on the original 32-bit fft3dgpu, without errors or problems ?

Is this available somewhere other than mediafire? I am unable to download from them and it'll be a cold day in hell before I disable the popup blocker on that place. I made that mistake ONCE. You have to task kill your browser to get it back from those assklowns.

Didée
27th November 2010, 01:18
somewhere other than mediafire? I am unable to download from them and it'll be a cold day in hell before I disable the popup blocker on that place.
You should configure the blocker to block only popups. Not the whole Internet! (I've no proplems to DL from MediaFire, and there's not one single popup ...)

Here it is on MultiUpload (http://www.multiupload.com/0UL9RFGZ0L). Hope you can DL from one of 'em without having to reinstall the OS. ;)

ianken
27th November 2010, 02:04
You should configure the blocker to block only popups. Not the whole Internet! (I've no proplems to DL from MediaFire, and there's not one single popup ...)

Here it is on MultiUpload (http://www.multiupload.com/0UL9RFGZ0L). Hope you can DL from one of 'em without having to reinstall the OS. ;)

Generally I CAN get stuff from mediafire. In this case however it's out to lunch.

tormento
2nd December 2010, 11:32
Any idea of why FFT3DGPU does not use the full power of modern video cards? I mean, they can move millions of triangles but they are so slow in fft.. I hope somebody starts using CUDA or OPENCL to deploy some really fast avisynth filters. =P

Hiritsuki
2nd December 2010, 14:27
I think fft3dgpu using DirectX is for any video card to runnig it.

raj1402
11th March 2011, 11:26
will using a better graphics card given better fps in using fft3dgpu?

i get around 10fps currently using 9600GT

will using 9600GT SLI give better fps? or there wont be any difference!!!

Mounir
17th March 2011, 04:43
The more Cuda cores the better as far as i know

TheRyuu
17th March 2011, 07:57
will using a better graphics card given better fps in using fft3dgpu?

Yes

will using 9600GT SLI give better fps?

No

Mounir
4th June 2011, 14:41
Is there a plan to support YUY2 inputs for the gpu and normal version? I'm tired of using YV12

Mounir
7th June 2011, 11:32
Hmm it seems to be working with YUY2 with both versions i don't know why i thought otherwise.

asarian
11th June 2011, 11:20
Do you still get horrible ghosting using fft3dGPU in combination with MCTemporalDenoise? Last time I checked fft3dGPU was pretty useless.

I have a GTX 580 now, though. Would be nice if something out there could acually make use of it. :)

wonkey_monkey
2nd August 2011, 20:12
Can fft3dgpu be made to work under Windows 7? It's first complaint on loading an AVS script was that it couldn't find d3dx9_30.dll, so I got that from somewhere and put in the plugins folder, but since doing that it instead says it's unable to load fft3dgpu.dll.

David

Beak
2nd August 2011, 22:38
Can fft3dgpu be made to work under Windows 7? It's first complaint on loading an AVS script was that it couldn't find d3dx9_30.dll, so I got that from somewhere and put in the plugins folder, but since doing that it instead says it's unable to load fft3dgpu.dll.

David

Works great for me. Windows 7 Pro 64 bit.

Vitaliy Gorbatenko
4th August 2011, 05:26
Can fft3dgpu be made to work under Windows 7? It's first complaint on loading an AVS script was that it couldn't find d3dx9_30.dll, so I got that from somewhere and put in the plugins folder, but since doing that it instead says it's unable to load fft3dgpu.dll.

David

Install DX9 or copy this file in to system32 dir.

wonkey_monkey
4th August 2011, 23:12
Thanks, that worked (I put it in SYSWOW64 as I'm on x64). I assumed that because I was getting different errors depending on whether d3dx9_30.dll was in plugins or not, that it was an okay place to put it.

David

Zero1
20th August 2011, 13:46
Thanks for this.

By the way, am I going crazy? It appears that the filter kind of stalls whenever my computer goes into locked mode (win key and L, or from screen saver), but continues as usual when back at the desktop.

I use Windows 7. I can provide any other information should you need it, but I wondered if this was a known limitation.

Mounir
7th December 2011, 07:16
I have trouble with Seven x64, error " can't find fftw3.dll". I have put the dll in the system32 folder so i don't understand.
Inputs are welcome.
I have put the dll in sysWOW64 now the normal version seems to work but i still have a hard time with the GPU version
error: unable to load LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3dGPU.dll")

What the hell ?!

edit:
Oh well, i've put the FFT3dGPU.dll in C:\ directly, seems to work now perhaps it's an issue with the blank in the path which is by default: C:\Program Files (x86)\

the_weirdo
7th December 2011, 11:27
I have trouble with Seven x64, error " can't find fftw3.dll". I have put the dll in the system32 folder so i don't understand.
Inputs are welcome.
I have put the dll in sysWOW64 now the normal version seems to work but i still have a hard time with the GPU version
error: unable to load LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3dGPU.dll")

What the hell ?!

edit:
Oh well, i've put the FFT3dGPU.dll in C:\ directly, seems to work now perhaps it's an issue with the blank in the path which is by default: C:\Program Files (x86)\
Is that a typo? Like you said, it suppose to be in C:\Program Files (x86)\AviSynth 2.5\plugins, right?

vampiredom
7th December 2011, 18:47
I have trouble with Seven x64, error " can't find fftw3.dll". I have put the dll in the system32 folder so i don't understand. Inputs are welcome.

C:\Windows\SysWOW64\

methead86
21st February 2012, 22:47
Hello there,

when i am using AviSynth Script Creator in MeGui using fftgpu, some vertical pixel lines appear as soon as i activate the preview. It happens with some avi, mp4 and wmv videos.

My Script:

LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("C:\Users\Christian\Rehearsal.mp4", threads=1)
#crop
ConvertToYV12()
#gradfun2db()
fft3dgpu(sigma=4.0, sigma2=4.0, sigma3=3.0, sigma4=2.0, beta=1.0, bw=32, bh=32, bt=4, plane=4, mode=1, bordersize=1, precision=2, degrid=1.0, scutoff=0.3, svr=1.0, smin=4.0, smax=20.0, kratio=2.0, ow=16, oh=16, wintype=0, interlaced=false)
#resize
#limitedsharpenfaster(smode=4, strength=72)
#fastlinedarkenmod(strength=48, threshold=8)
#AAA(US=1, DS=2, chroma=false)


What could be the reason?

VideoFanatic
21st August 2012, 16:47
I can't get fft3dGPU to work. This is my code:

McTemporalDenoise(settings="medium", interlaced=true, GPU=true)

McTemporalDenoise works on it's own but when I enable GPU=true I get the following error message when I try to encode a video: PROCESS EXITED WITH ERROR CODE: -1073741819

I ran the fft3dgpu0.8.2a.exe installer. I also have DirectX 11 installed. I see the following files in SysWOW64:

d3dx9_30.dll
d3dx9_31.dll
D3DX9_42.dll

Mounir
22nd August 2012, 22:01
does fft3dgpu work ok when used alone ?

VideoFanatic
22nd August 2012, 22:35
Yes. I just realised it doesn't work in MT mode. Thanks. Shame, I thought I get get a few more FPS in MT mode.

naoan
23rd August 2012, 11:27
It works with SetMTMode(5).

VideoFanatic
23rd August 2012, 11:28
I'm using this and it doesn't work:

setmtmode(5,12)
Mpeg2Source("J:\2 = New\Raw August 06 2001.d2v", CPU=6)
setmtmode(2,0)

What code should I use instead?

detmek
23rd August 2012, 11:47
Put SetMTMode(5) right before fft3dgpu().
It might be a problem if you use it with MCTD as MCTD script should internaly set SetMTMode(5) and I don't know if script does that. If it doesn't you could edit the script yourself.

Seedmanc
11th April 2013, 06:44
Does anyone know how to deal with videocard stopping processing as soon as I lock my PC, when leaving it (by Win+L)? When I return it resumes processing, but this essentially makes it impossible to leave encoding overnight or at any other time when I am away. Same happens with VirtualDub GPU-accelerated filters, though instead of pausing, they crash. What's also interesting, it doesn't look like videocard itself goes to sleep, because such GPU-related tasks like bitcoin mining work perfectly fine.
I have Win7 Ultimate 32bit and Nvidia GTX 560 with latest drivers.

Mounir
12th April 2013, 01:44
disable the locking feature and check the sleep options aswell in Win7 (control panel>power options>change plan>advanced)
put computer to sleep= never

zerowalker
2nd November 2013, 10:10
Is there a way to solve the "Out of Memory" issue?
It seems to occur in certain occasions, for me it happens after alot of repetitive use in an application, the solution is to close that application and reopen, probably to reset the memory or something?

I don´t get why i get the error, as my GPU has 2gb ram, which should be more than enough, PC has 8gb, and as Avisynth is 32bit, it´s more than enough there as well.

Only thing i can think of, is a bug. It probably doesn´t clear it´s buffer or something after it has been used in a script, so if another script is opened later and the script interpreter hasn´t closed, it will just use more memory instead of reusing the old memory.

kabster
12th January 2014, 21:17
I get the following error while encoding dvd using FFT3D filter !!

→ ERRor Creating direct3d device ← !!!

Now that error code all of sudden showed up midst during dvd playback while watching !! Righter after an certain chapter skip i get to see it !!

My gpu is faily new and is an HD7950 Saphire .

Any help woud be appreciated...

cheers

kalehrl
10th February 2014, 20:36
Does anyone have any idea how fast fft3dgpu would run on Intel processors with integrated graphics?

ultim
2nd March 2014, 19:00
fft3dgpu sometimes requests negative frames without any reason (e.g. when seeking to a positive frame far from zero), which some other filters do no happen to like (for somewhat understandable reasons). See https://github.com/AviSynth/AviSynthPlus/issues/38 .
In case anybody picks up development, please have a look at this behavior and correct if possible.

LilScrappy
22nd March 2015, 18:21
Please for help i have GTX 970 G1 and want to test to boost when i encoding, what i need to do to make original source untouched only boost speed with no lose of source quality, it is possible ?
Mostly i use ffvideosource to read source !

tuanden0
1st November 2016, 03:49
I'm using VGA: MSI NVIDIA GeForce GTX 650 Ti - directx 11

This is my x264 setting
--level 4.1 --preset veryslow --tune animation --crf 18.5

My AVS:
LoadPlugin("E:\Encoder\Tools\LSMASHSource.dll")
LWLibavVideoSource("E:\Download\MyVideo.mkv")
AssumeFPS(24000, 1001)
Toon(0.7)
Deblock(quant=33, bOffset=14)
fft3dgpu(bt=4,sigma=8,sharpen=0.8,plane=4,precision=2,bw=64,bh=64,ow=24,oh=24,NVPerf=true)
LimitedSharpenFaster(edgemode=1,strength=200)
deen("a2d",3,6,6)
Dehalo_alpha()

My CPU Usage just 20 ~ 24% when i use ffft3d filter and fps just 1.241 ~ 3.241, so how can i use more cpu to increase my encoding speed?

Sorry for my bad English :(

FranceBB
1st November 2016, 10:35
You can't.
It's not about x264, it's about avisynth.
Every filter is written to deal with multithreading itself, so if a filter doesn't fully use your CPU it's due to the way it has been written.
Generally, many old filters didn't bother about multithreading at all and since avisynth is meant to be single thread, they didn't fully use newer CPUs.
As a "workaround" to that, avisynth MT was created, so that you would have been able to manually specificy threads and use multithreading on filters that were not meant to use it.
Unfortunately, some filters worked flawlessly and some other didn't, and that led to the development of avisynth + which is multithreading itself.

In a nutshell: try avisynth MT if you don't want to switch to avisynth + and enable the multithreading, but if some filters don't work, there's nothing you can do about it.

Side note: keep multithreading disabled with filters that already have multithreading enabled themselves.

Avisynth MT 2.6.0.5: https://mega.nz/#!KVFhhByb!uJrA5sKXr7rGR4AYSpLlkhrcuOG0Kt7WeC1qdNMSCPc

Add "SetMTmode(mode, threads)" at the very beginning of each script (even before indexing).
Example: SetMTMode(6, 12) for mode 6, 12 threads.
Mode 6 is the safest.

Explanation of Mt mode here: http://avisynth.nl/index.php/MT#SetMTmode

tuanden0
1st November 2016, 12:34
You can't.
It's not about x264, it's about avisynth.
Every filter is written to deal with multithreading itself, so if a filter doesn't fully use your CPU it's due to the way it has been written.
Generally, many old filters didn't bother about multithreading at all and since avisynth is meant to be single thread, they didn't fully use newer CPUs.
As a "workaround" to that, avisynth MT was created, so that you would have been able to manually specificy threads and use multithreading on filters that were not meant to use it.
Unfortunately, some filters worked flawlessly and some other didn't, and that led to the development of avisynth + which is multithreading itself.

In a nutshell: try avisynth MT if you don't want to switch to avisynth + and enable the multithreading, but if some filters don't work, there's nothing you can do about it.

Side note: keep multithreading disabled with filters that already have multithreading enabled themselves.

Avisynth MT 2.6.0.5: https://mega.nz/#!KVFhhByb!uJrA5sKXr7rGR4AYSpLlkhrcuOG0Kt7WeC1qdNMSCPc

Add "SetMTmode(mode, threads)" at the very beginning of each script (even before indexing).
Example: SetMTMode(6, 12) for mode 6, 12 threads.
Mode 6 is the safest.

Explanation of Mt mode here: http://avisynth.nl/index.php/MT#SetMTmode

Thank you for your reply, i will try Avisynth MT. :)

pinterf
1st November 2020, 19:38
New build 0.8.5 (https://github.com/pinterf/FFT3dGPU/releases/tag/0.8.5) preserves frame properties for Avisynth 3.6+
plus a minor warning-fix.

kedautinh12
2nd November 2020, 00:33
New build 0.8.5 (https://github.com/pinterf/FFT3dGPU/releases/tag/0.8.5) preserves frame properties for Avisynth 3.6+
plus a minor warning-fix.

Can you support HBD in new ver??

pinterf
4th January 2021, 13:41
Happy New Year!
Check FFT3dGPU 0.8.6 (https://github.com/pinterf/FFT3dGPU/releases/tag/0.8.6) with 10+ bits support.
This time it was a bit time consuming since I have never used shaders or whatever thing is working in this plugin :)
The speed was not tested against the CPU based newer (neo) FFT3dFilter versions, but hey, anyway this was fun.

StainlessS
4th January 2021, 14:30
Not sure but think there were so many updates to CPU FFT3DFilter that is was faster than GPU (I aint used GPU for a decade, but think others that did use it said as much).
Happy New Year to you too P, lets hope its at least as good as 2020 :(

EDIT: I think ver$ before P took a shot at it was a VS 2002, or 2003 Dot Net compile.

kedautinh12
4th January 2021, 14:44
Thanks

Ceppo
7th February 2021, 21:08
The links to d3dx9_30.dll are down. Where can I get it?

StainlessS
7th February 2021, 21:43
See Sendspace in sig beneath this post, Apr2006_D3DX9_30_DLL_(x86 & x64).7z
x86 and x64 dll's from Microsoft DirectX SDK (February 2010)

Files inside the 7z, [~2.5MB]

Apr2006_d3dx9_30_x64.cab
Apr2006_d3dx9_30_x86.cab

Ceppo
8th February 2021, 12:49
Thank you.

EDIT: Even after trying to copy the 64bit dll to both system32/SysWOW64, it still gives me the error "there is no function named fft3dgpu".

Groucho2004
8th February 2021, 13:10
Thank you.

EDIT: Even after trying to copy the 64bit dll to both system32/SysWOW64, it still gives me the error "there is no function named fft3dgpu".Run AVSMeter/AVSMeter64 (https://forum.doom9.org/showthread.php?t=174797) with the switch "-avsinfo" and report any errors it may show. Alternatively, run the Avisynth Info Tool (https://forum.doom9.org/showthread.php?t=176079). Also, do not place 64 bit binaries in SysWoW64.

kedautinh12
8th February 2021, 13:34
Thank you.

EDIT: Even after trying to copy the 64bit dll to both system32/SysWOW64, it still gives me the error "there is no function named fft3dgpu".

Don't copy 64 bit dll to system32/SysWOW64. Please copy both 64 bit dll amd .hsls file to Program File (x86)/Avisynth+/Plugin64+

Ceppo
8th February 2021, 14:09
AVSMeter says that it needs d3dx9_43.dll, so I guess d3dx9_30.dll doesn't do the job? Where can I get d3dx9_43.dll?

Groucho2004
8th February 2021, 14:21
Where can I get d3dx9_43.dll?Here you go (https://www.dropbox.com/s/rf1bt6izoaiu8s1/DX9_Files.zip?dl=1). And yes, the fft3dgpu.dll plugin belongs into your 64 bit plugin directory, not system32/SysWoW64.

Ceppo
8th February 2021, 14:36
I think I was misunderstood.

Now I get a "system exception: access violation" and I found out in the first post that the NVIDIA GEFORCE GTX is not supported. I'm I wrong?

kedautinh12
8th February 2021, 14:37
Are you copy copy both 64 bit dll and .hsls file to same folder???

Ceppo
8th February 2021, 15:09
Yes in the plugins64 folder.

Groucho2004
8th February 2021, 16:04
I think I was misunderstood.

Now I get a "system exception: access violation" and I found out in the first post that the NVIDIA GEFORCE GTX is not supported. I'm I wrong?It works on all my NVIDIA GTX cards. What card do you have? Also, what driver version?

StainlessS
8th February 2021, 16:31
If you copied directX dll into system32/SysWOW64 by mistake, then remove them.
[System32 is for 64 bit, SysWOW64 for 32 bit].
I dont remember needing any directx dlls when using GPU version fft3dfilter, but was a long time ago.
[also was I think slower than CPU, for me]

kedautinh12
8th February 2021, 16:45
AVSMeter says that it needs d3dx9_43.dll, so I guess d3dx9_30.dll doesn't do the job? Where can I get d3dx9_43.dll?

D3dx9_43.dll (ver x64) must in system32 folder not syswow64

kedautinh12
8th February 2021, 16:47
If you copied directX dll into system32/SysWOW64 by mistake, then remove them.
[System32 is for 64 bit, SysWOW64 for 32 bit].
I dont remember needing any directx dlls when using GPU version fft3dfilter, but was a long time ago.
[also was I think slower than CPU, for me]

I don't think so
https://github.com/pinterf/FFT3dGPU/issues/4#issuecomment-759949442

StainlessS
8th February 2021, 16:58
Last time I tried it was probably a decade ago.

Ceppo
8th February 2021, 17:05
It works on all my NVIDIA GTX cards. What card do you have? Also, what driver version?
I have a laptop so it has two:
1) Intel(R) HD Graphics 520
2) NVIDIA GeForce GTX 950M
The driver is the latest available.

StainlessS
8th February 2021, 17:19
Do you still need d3dx9_43.dll, I got the lot up to June 2010. [final directX 9c]

Ceppo
8th February 2021, 17:55
No, it was gently given in the post above. Thanks.

pinterf
8th February 2021, 19:18
DirectX 9 is old stuff. This FFT3dGPU explicitely needs the above mentioned DirectX 9 even if we have DirectX 12 since then.
For some reasons Microsoft has removed the link, but if you search for "DirectX 9 Redistributable June 2010 download" then you get some links to the install package.
When you are successful with it, all you need is FFT3dGPU.DLL and the .hlsl file next to it (in the appropriate plugins folde).

Ceppo
9th February 2021, 14:36
Installing the whole thing makes it work. Thank you.

Arx1meD
24th March 2021, 14:02
When I used FFT3dGPU v0.8.6 (https://github.com/pinterf/FFT3dGPU) I noticed that when plane = 0 or 4 and sharpen > 0 a small mesh appears. Is this a bug in the filter or not?

Examples:
https://images2.imgbox.com/fd/0d/cD7KgODK_o.png
https://images2.imgbox.com/1d/20/TUbe1dOm_o.png

poisondeathray
24th March 2021, 17:47
When I used FFT3dGPU v0.8.6 (https://github.com/pinterf/FFT3dGPU) I noticed that when plane = 0 or 4 and sharpen > 0 a small mesh appears. Is this a bug in the filter or not?


probably a bug; the same call with fft3dfilter does not produce the grid

bt=1 (spatial only) instead of bt=3 does not produce grid either , at least on that single still image that was looped with imagesource

Fjord
3rd May 2021, 09:56
When I used FFT3dGPU v0.8.6 (https://github.com/pinterf/FFT3dGPU) I noticed that when plane = 0 or 4 and sharpen > 0 a small mesh appears. Is this a bug in the filter or not?
probably a bug; the same call with fft3dfilter does not produce the grid

bt=1 (spatial only) instead of bt=3 does not produce grid either , at least on that single still image that was looped with imagesource

@Arx1meD, I suggest that you open an issue on Pinterf's FFT3dGPU github site: https://github.com/pinterf/FFT3dGPU/issues, to make sure he is aware of this.

Dogway
18th September 2021, 12:17
Is there a way to match FFT3DGPU to fft3dfilter? The following calls give me very different results FFT3DGPU being worse with blurrier lines and also some halo. precision=0 is ok if the pipeline is in HBD.
fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=6,oh=6,bt=4,plane=4,ncpu=4)
FFT3DGPU(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=6,oh=6,bt=4,plane=4,precision=0)

StainlessS
18th September 2021, 14:39
Doggy, methinks that FFT3dFilter and the gpu version will often if not always give differing results, I seem to remember that
one good reason not to use gpu version was thats it uses less precision, and maybe truncation rather than rounding.
Although visible blurring and halo does sound disturbing.

pinterf
18th September 2021, 14:58
Less precision means that in 8 bits the default precision is using only 16 bit floating point type (half). At least for part of the algorithm. I suppose this was chosen because of speed reasons. For 10+ bits I made it using 32 bit float always as I remember. See docs.
I cannot tell you about other comparisons, I never used the plugin. I guess fft3dgpu was based on an earlier version of fft3dfilter but I don't know when this happened.

Reel.Deel
18th September 2021, 18:41
Is there a way to match FFT3DGPU to fft3dfilter?...

Does changing the values of bw,bh,ow,oh to a power of 2 change anything?

fft3dfilter 1.8.5 that the current version of fft3dgpu is based on (expect bw,bh,ow,oh value as they need to be a power of two in fft3dgpu)

Also there have been reports of decreased quality (https://forum.doom9.org/showthread.php?p=1026076#post1026076) in fft3dgpu when bt=4 and/or precision=2 (in pinterf's mod precision is always set to 2 when bitdepth is greater than 8).


--------

I guess fft3dgpu was based on an earlier version of fft3dfilter but I don't know when this happened.

According to tsp, fft3dgpu is based on fft3dfilter v1.8.5 (post #683) (https://forum.doom9.org/showthread.php?p=1049219#post1049219). But aside from delaho, it seems that most changes to fft3dfilter after v1.8.5 were optimizations and bug fixes:

v1.8.5 - 2005/12/04 - fixed bug with memory leakage (thanks to tsp).
v1.9.0 - 2006/04/25 - added dehalo options; corrected sharpen mode;
- re-enabled SSE optimization for degrid=0;
- added SSE optimization for bt=3,-1 with degrid>0 (faster by 15%)
v1.9.1 - 2006/05/10 - added SSE optimization for bt=4 with degrid>0 (faster by 30%).
v1.9.2 - 2006/09/11 - changed default bw=bh=32; added mode bt=5
v2.0.0 - 2006/11/29 - added experimental internal motion compensation mode;
- window reorganized; internal multithread support
v2.1.0 - 2007/01/17 - removed (temporary ?) experimental internal motion compensation mode.
v2.1.1 - 2007/02/20 - fixed bug with bw not mod 4 (restored v1.9.2 method).

Dogway
18th September 2021, 21:48
Thanks Reel.Deel, has some time to check what's going on.

So power of 2 only, 4, 8, 16... that leaves out 12.
FFT3DGPU(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=16,bh=16,ow=8,oh=8,bt=4,plane=0,precision=0)
fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=16,bh=16,ow=8,oh=8,bt=4,plane=0,ncpu=2)
Yes, this is a match.

This one though isn't:
FFT3DGPU(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=8,bh=8,ow=4,oh=4,bt=2,plane=0,precision=0)
fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=8,bh=8,ow=4,oh=4,bt=2,plane=0,ncpu=2)
This call just outputs garbage (bug?)
FFT3DGPU(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=16,bh=16,ow=6,oh=6,bt=2,plane=0,precision=0)
And here a comparison between fft3dfilter and FFT3DGPU, very different, background is blurred more on fft3dfilter, and lineart is cleaner. On FFT3DGPU you can see some halo and ringing, easily seen on the inner side of the glasses.
FFT3DGPU(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=4,oh=4,bt=2,plane=0,precision=0)

fft3dfilter
https://i.imgur.com/vjo1FOg.png
FFT3DGPU
https://i.imgur.com/RBxiplM.png

minusthebear
3rd May 2022, 02:42
I'm a bit at a loss for how to install and use FFT3dGPU. Does it replace FFT3d entirely? Does it only work with some plugins?

I'm looking to speed up my workflow in any way possible, can someone please direct me to a good guide/resource for using and installing FFT3dGPU?

Thanks!!

Reel.Deel
3rd May 2022, 03:24
I'm a bit at a loss for how to install and use FFT3dGPU. Does it replace FFT3d entirely? Does it only work with some plugins?

I'm looking to speed up my workflow in any way possible, can someone please direct me to a good guide/resource for using and installing FFT3dGPU?

Thanks!!

To autoload FFT3dGPU, copy both fft3dgpu.hlsl and FFT3dGPU.dll into the appropriate folder. Or load the plugin manually with LoadPlugin, just make sure fft3dgpu.hlsl is in the same folder as the dll. It does not replace FFT3DFilter since the function names are different. You can have both plugins installed/loaded and even used in the same script. Not sure what you mean by "Does it only work with some plugins?" but it works like a normal plugin and it is not dependent on what other plugins you use or not.

Lan4
6th May 2023, 21:37
The bug happened several times. At first, encoding with the FFT3DGPU filter proceeds normally. Then the encoding time starts to increase, from several seconds to several minutes. This problem has been around for about 2 months. This may be due to a video driver update. Has anyone had the same problem? And what could be its reason?

romangal
9th March 2026, 15:43
Yes, FFT3DGPU with bt=4 just stops filtering. Dots and crowls are present again. So the best settings ive got with fft3dgpu
are: bw-16, ow-8, bt-3. Never please set bt above 3 if you dont want just waste a time.