Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th March 2005, 13:57   #21  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Quote:
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.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 15th March 2005, 22:59   #22  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
Quote:
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
Backwoods is offline   Reply With Quote
Old 16th March 2005, 23:11   #23  |  Link
vinetu
Registered User
 
Join Date: Oct 2001
Posts: 195
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".

Quote:
|__ 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

Last edited by vinetu; 17th March 2005 at 00:29.
vinetu is offline   Reply With Quote
Old 16th March 2005, 23:57   #24  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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)).
tsp is offline   Reply With Quote
Old 17th March 2005, 00:22   #25  |  Link
vinetu
Registered User
 
Join Date: Oct 2001
Posts: 195
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
vinetu is offline   Reply With Quote
Old 18th March 2005, 08:35   #26  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Uhm, the latest version throws a error... :\

__________________

Visit my IRC channel

Last edited by Soulhunter; 18th March 2005 at 08:39.
Soulhunter is offline   Reply With Quote
Old 18th March 2005, 11:47   #27  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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\)
tsp is offline   Reply With Quote
Old 18th March 2005, 13:13   #28  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Ouch, I feel very stupid now...

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


Bye
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 18th March 2005, 21:10   #29  |  Link
Leo 69
Registered User
 
Join Date: Nov 2004
Posts: 227
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.
Leo 69 is offline   Reply With Quote
Old 19th March 2005, 00:10   #30  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Leo 69: Damn I hoped the new version would work on a Geforce Fx. Would you try this 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.
tsp is offline   Reply With Quote
Old 19th March 2005, 07:04   #31  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
@ Didee
Quote:
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
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 19th March 2005, 14:11   #32  |  Link
Leo 69
Registered User
 
Join Date: Nov 2004
Posts: 227
Quote:
Originally posted by tsp
Leo 69: Damn I hoped the new version would work on a Geforce Fx. Would you try this 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
Leo 69 is offline   Reply With Quote
Old 19th March 2005, 14:55   #33  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Leo 69: Also with fft3dGPU(bt=1)?? If that is the case it shouldn't be to hard fixing the error.
tsp is offline   Reply With Quote
Old 19th March 2005, 19:39   #34  |  Link
Leo 69
Registered User
 
Join Date: Nov 2004
Posts: 227
Quote:
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
Leo 69 is offline   Reply With Quote
Old 19th March 2005, 20:44   #35  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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)

Code:
//****************************************************************
#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:
Code:
//*******************************************************************
#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
Code:
//*******************************************************************
#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
//*******************************************************************
tsp is offline   Reply With Quote
Old 19th March 2005, 21:41   #36  |  Link
Leo 69
Registered User
 
Join Date: Nov 2004
Posts: 227
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.

Last edited by Leo 69; 19th March 2005 at 21:49.
Leo 69 is offline   Reply With Quote
Old 19th March 2005, 23:13   #37  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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).
Code:
//*******************************************************************
#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?)
tsp is offline   Reply With Quote
Old 21st March 2005, 05:09   #38  |  Link
LordIntruder
Registered User
 
Join Date: Jan 2003
Posts: 109
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

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

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
LordIntruder is offline   Reply With Quote
Old 22nd March 2005, 01:24   #39  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Quote:
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:


I will do two things about that:
1) Implement the 2:1 overlap(This will cut the speed in half ).
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.

Quote:

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 is offline   Reply With Quote
Old 1st April 2005, 20:16   #40  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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)
tsp is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.