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 1st December 2005, 21:50   #261  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Quote:
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? [EDIT]I made a special version for you that might produce better result with useFloat16=true. Get it here[/EDIT]
Quote:
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?
Quote:
Originally Posted by Fizick
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.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/

Last edited by tsp; 1st December 2005 at 22:31.
tsp is offline   Reply With Quote
Old 1st December 2005, 22:46   #262  |  Link
acrespo
Brazilian Anime Ripper
 
Join Date: Nov 2001
Location: Brazil
Posts: 237
Well here is some screens using bh=bw=32 and bh=bw=64 and the original without fft3dgpu.
fft3dgpu_screens.rar

edit:Your special version is slight better than v0.51.
__________________
Capture cards:
Compro VideoMate Gold+ (Philips SAA7134 based) (not active)
Hauppauge PVR 150MCE (not active)
ATI TV Wonder Elite (active)

Last edited by acrespo; 1st December 2005 at 23:08.
acrespo is offline   Reply With Quote
Old 1st December 2005, 23:20   #263  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 2nd December 2005, 02:02   #264  |  Link
acrespo
Brazilian Anime Ripper
 
Join Date: Nov 2001
Location: Brazil
Posts: 237
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?
__________________
Capture cards:
Compro VideoMate Gold+ (Philips SAA7134 based) (not active)
Hauppauge PVR 150MCE (not active)
ATI TV Wonder Elite (active)
acrespo is offline   Reply With Quote
Old 2nd December 2005, 10:54   #265  |  Link
ariga
Learning...
 
ariga's Avatar
 
Join Date: Nov 2005
Location: 12.97°N, 77.56°E
Posts: 135
Quote:
Originally Posted by tsp
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.
Quote:
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 )
Slower codec ? Hmm... DivX at "Insane quality" ?
Until an upgrade, it's fft3dfilter for me...
ariga is offline   Reply With Quote
Old 2nd December 2005, 11:13   #266  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
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...)
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 2nd December 2005, 22:40   #267  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
x264 w/ Sharktooth's HQ Insane profile...
puffpio is offline   Reply With Quote
Old 5th December 2005, 13:57   #268  |  Link
AI
Registered User
 
Join Date: Jul 2005
Location: Russia, Ural
Posts: 77
tsp, I have guestions for you... (best phrase on my bad English )
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)
-------------------
AI is offline   Reply With Quote
Old 5th December 2005, 15:12   #269  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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:
Code:
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):
Code:
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:
Code:
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.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 6th December 2005, 06:36   #270  |  Link
AI
Registered User
 
Join Date: Jul 2005
Location: Russia, Ural
Posts: 77
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)
AI is offline   Reply With Quote
Old 6th December 2005, 11:33   #271  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 6th December 2005, 13:56   #272  |  Link
AI
Registered User
 
Join Date: Jul 2005
Location: Russia, Ural
Posts: 77
ask again: (possible error on your optimize algoritm)

usual script:
Code:
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:
Code:
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:
Code:
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

Last edited by AI; 7th December 2005 at 05:18.
AI is offline   Reply With Quote
Old 6th December 2005, 15:17   #273  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
What about the framerate? Also how does my script above perform?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 7th December 2005, 01:13   #274  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
from my latest development. Guess what it is (texture is missing).
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 12th December 2005, 09:42   #275  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
Quote:
Originally Posted by tsp
from my latest development. Guess what it is (texture is missing).
hmm the new plane in fft3dfilter where it process YUV all at once?
puffpio is offline   Reply With Quote
Old 12th December 2005, 23:49   #276  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Nope. Compare it to the overlap picture 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)
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 13th December 2005, 10:17   #277  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
Quote:
Originally Posted by tsp
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?
puffpio is offline   Reply With Quote
Old 13th December 2005, 13:18   #278  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
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:
Code:
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)
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 14th December 2005, 05:39   #279  |  Link
AI
Registered User
 
Join Date: Jul 2005
Location: Russia, Ural
Posts: 77
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. need
Code:
DePanInterleave(...)
filtre1()
selectevery(3,1)
DePanInterleave(...)
filtre2()
selectevery(3,1)
DePanInterleave(...)
filtre3()
selectevery(3,1)
or
Code:
DePanInterleave(prev=3, next=3)
filtre1()
filtre2()
filtre3()
selectevery(7,3)
or
if filters "independent"
Code:
DePanInterleave(prev=1, next=1)
MergeChroma(filtre1(),filtre2())
selectevery(3,1)
PS my English is bad up to this date

Last edited by AI; 15th December 2005 at 05:16.
AI is offline   Reply With Quote
Old 14th December 2005, 13:17   #280  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
AI: that is what the build in cache is for. So in my script the filterchain really look like this:
Code:
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.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/

Last edited by tsp; 14th December 2005 at 18:19.
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 02:52.


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