digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Deen vs. Convolution3DYV12 ? (http://www.digitalfaq.com/archives/avisynth/6577-deen-vs-convolution3dyv12.html)

Boulder 11-07-2003 03:10 PM

Deen vs. Convolution3DYV12 ?
 
Does anyone have any suggestions regarding Deen? C3DYV12 doesn't do any temporal filtering (you can verify this by a simple Subtract() thingie) so Deen would probably be more powerful there - and it has the same C3D matrices incorporated too.

I was thinking of something along the lines of Deen("c3d",0,6,12,3) but has anyone made any tests? The result shouldn't be too blurry if the thresholds are low enough and the filter is quite fast too.

Dialhot 11-07-2003 04:00 PM

How can you view that ? I pretty sure it does but my impression is only based on the delay needed by convolution 3D before statring its effect when you put it in ffdshow. A spatial filter only starts immediatly, a temporal one need a lack of time (that is logical). And C3D enters in the second group.

And secondly, I tested other filters in the script and only spatio-temporal ones gave me good results. As C3D gives also good results, there is only one explanation for me.

Now, for deen, script V1 used it and you can try : it is too heavy on details.
I used it with default values, so you can try with some different one and tell us your impressions.

Note: Deen... fast ? humhum ;-)

Boulder 11-07-2003 04:45 PM

Deen is fast for an effective spatio-temporal filter, I meant :wink:

You can see that C3D doesn't do any temporal filtering with a script like this:

video=AVISource("path\clip.avi")
a=video.Convolution3d(0,6,12,24,24,3,0)
b=video.Convolution3d(0,6,12,24,24,-1,0)
Subtract(a,b).Levels(127,1,129,0,255)

There should be no difference between the two clips whatsoever, I just checked it with several clips.

Dav88 11-07-2003 05:21 PM

Found this bit of info at Doom9 under Avisyth Usage-Convolution3D results in yv12 or yuy2 error:



Be aware of the fact that there are three versions of Convolution3D:

1. Convolution3D for AviSynth 2.0.x, supports YUV2 only
2. Convolution3D for AviSynth 2.5.x, supports YUV2 only
3. Convolution3DYV12 for AviSynth 2.5.x, supports YV12 only

No. 3 has not been finished; the "temporal influence" parameter is not being used, and there are issues at scene changes, thus I wouldn't recommend it. Better use one of the YUV2 versions, depending on the AviSynth version you use (preferrably 2.5.x).

bb

Dialhot 11-07-2003 05:28 PM

Quote:

Originally Posted by Boulder
You can see that C3D doesn't do any temporal filtering with a script like this:

video=AVISource("path\clip.avi")
a=video.Convolution3d(0,6,12,24,24,3,0)
b=video.Convolution3d(0,6,12,24,24,-1,0)
Subtract(a,b).Levels(127,1,129,0,255)

There should be no difference between the two clips whatsoever, I just checked it with several clips.

That's because there is no temporal influence in YV12 (as told in the doc) and the 6th parameter (the one you change from 3 to -1) is the temporal influence value. So you can change it however you want, there is no difference !

I think there is a temporal filtering or... C3d is the slower spacial only filter I know :-)

But we have to find a good way to proof it. Someone has an idea ?

Edit: I didn't saw the post of dav. No proof needed it seems ;-)

incredible 11-07-2003 06:02 PM

Quote:

Originally Posted by DialHot
Quote:

Originally Posted by Boulder
video=AVISource("path\clip.avi")
a=video.Convolution3d(0,6,12,24,24,3,0)
b=video.Convolution3d(0,6,12,24,24,-1,0)
Subtract(a,b).Levels(127,1,129,0,255)

That's because there is no temporal influence in YV12 (as told in the doc) and the 6th parameter (the one you change from 3 to -1) is the temporal influence value. So you can change it however you want, there is no difference !


Don't we still belive in WYSIWYG? ...so I think "...Subtract(...)...." is the proof.?

Dialhot 11-07-2003 06:32 PM

Quote:

Originally Posted by incredible
Don't we still belive in WYSIWYG? ...so I think "...Substract(...)...." is the proof.?

It seems that you didn't understand what I said.

The two clips of Boulder example differ only with the 6th parameter (change from 3 to -1). But this parameter IS NOT USED by the filter in YV12 mode.
So that is normal that you do not find a difference between the two clips !

But this parameter is only the threshold that is normally used during temporal filtering to detect scene change. That's all !
Not using it does not mean "there is no temporal filtering at all". That's only means that the scene change sensibility can't be adjusted.
And that is what is explained in Dav88's post.

incredible 11-07-2003 06:44 PM

Thats well explained ....

Boulder 11-08-2003 04:07 AM

I based my assumption on this (from the C3D docs) :

Code:

Temporal influence :
        It's used especially to speed up a little this filter and to avoid using temporal informations when not needed
        (scene change, fade, ...)
        I first build a limit = Temporal Luma Threshold * Temporal influence
        For each 2 pixel computed (due to MMX, 2 pixel at the same time), I first check this :
        if
        (Abs (Y0 - Y0[Previous frame]) +
        Abs (Y0 - Y0[Next frame]) +
        Abs (Y1 - Y1[Previous frame]) +
        Abs (Y1 - Y1[Next frame])) > limit
        then
                do Spacial work (only 3*3 matrix)
        Else
                do Spacial and Temporal work (3*3*3 matrix)
        The lower it is -> the faster will be the filter but compressibility should be lower
        The higher it is -> the slower will be the filter but compressibility should be higher
        if temporal influence is set to -1 then only spatial work is done (high speed).
        This parameter is a float.

There was no difference between the values 3 and -1 naturally, but I wonder if there is a fixed value used every time? I noticed that changing the temporal thresholds do change the output so there is some temporal filtering done.

Boulder 11-08-2003 04:47 AM

I posted this on the Doom9 forum as well:

I did a small test with the YUY2 and YV12 versions, 2500 frames of a DivX source, conversion to YUY2 if needed.

Code:

YV12, time 1:29, size 10 662 659, temporal influence disabled
YUY2, time 1:37, size 10 609 956, temporal influence disabled
YUY2, time 2:11, size 10 300 208, temporal influence 3

When I look at those figures, I get a feeling that YV12 does spatial work only. The small differences between the encoding time and file size can be explained by the conversion to YUY2 and using different versions of the filter.

I tried doubling the temporal thresholds with the YV12 version and surprisingly I got a larger file, 10 868 414 bytes :?

Let's hope someone goes through the source code and finds out how the filter works. If nothing happens, I'll try to contact the author. Too confusing for me to understand right now :lol:

Dialhot 11-08-2003 07:48 AM

By the way boulder, your orignal question was : why do not use deen insteed of c3d. To that the answer is :

1/ C3D gave me the best results so far, that's why "my" V4 script uses it.
No matter is C3D is temporal or not on that point, just the results are important.

2/ test deen, find us the best values and we will do script V5 :-)

I will do some test also when I will have a little time.

Boulder 11-08-2003 12:03 PM

Yes, that's what I should do. I'll try to find the time next week.

Basically I'm trying to get some extra compression from temporal filtering without removing excess details. Therefore Deen _might_ be a better choice but the testing should show whether it is or is not :wink:


All times are GMT -5. The time now is 05:44 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.