Log in

View Full Version : deen("c3d")


Marc FD
30th December 2002, 16:03
my filter for xmas ^^

this is a preview, but "c3d" mode is fully functionnal.
i've a lot of new beta/alpha-code for deen, but i keeped my trusted c3d mode to have a solid basis. read the readme, enjoy, and report the results ^_^

(i know the dll is big, and when i would add full mmx 3d/2d msoften stuff, it'll be even bigger. it's normal, there's a lot of assembly. the "c3d" mode take less than 10 Kb ^^)

(attached "deen beta 1.zip")

@sh0dan : i can change some stuff to use 100% aligned loads, but i only gain some fps, nothing terrible :-/ (not implemented here)

sh0dan
30th December 2002, 21:26
Looks very promising indeed! Great work.

Regarding usability, I think it would be great if you used named, optional parameters. If you are going to implement several different softeners (which is a great idea!) I think it would be easier to use. for some reason it's easier for me to remember 'c3d_matrix = "121"' than 'mode = 0' - that way you could also implement optional different thresholds for temporal softening, etc. Donalds filters are great inspiration for that.

Does that make any sense?

ps. a few fps more is good enough for me, if the filter gives me 3fps :) I'd be happy to look through your implementation - feel free to mail me the source :)

Marc FD
30th December 2002, 22:53
>Looks very promising indeed! Great work.

thx

>Regarding usability, I think it would be great if you used named,
>optional parameters. If you are going to implement several different
>softeners (which is a great idea!) I think it would be easier to use.

well, i have 5 methods : "c3d","a3d","m3d","a2d","m2d" and they all need the same parameters, so it makes sense i share them

>for some reason it's easier for me to remember 'c3d_matrix = "121"' than
> 'mode = 0' - that way you could also implement optional different
>thresholds for temporal softening, etc.

-> exactly the same as vlad's filter to avoid confusion.

>Donalds filters are great inspiration for that.

sure ^_^

>Does that make any sense?

well, if i need to split things, i'll do it ^^

>ps. a few fps more is good enough for me, if the filter gives me 3fps
>I'd be happy to look through your implementation - feel free to mail
>me the source

a few fps like 23+3 fps
accessing unaligned data don't seem to be a big deal
BTW, i could improve pairing, to make 8 check in 11 cycles (currently 13 or 14). but i don't think i can do it much faster ^^

FuPP
30th December 2002, 23:51
Sorry Marc, but I don't manage to make that thing working.

I always get a message saying

Avisynth open failure
deen : name list : 'c3d','a3d','m3d','a3d', or 'm2d'

my script :

LoadPlugin("C:\video\avsfilters\deenyv12.dll")
avisource("f:\capture\capture.avi")
converttoyv12()
deen("c3d",1,10,12,3)
bicubicresize(480,576,0,0.75)
converttoyuy2()

I've tried with native yv12 source : same message...

Using W2000, AMD xp 1800+ and avisynth 2.5 build 29/12
So ?

Regards,

FuPP

Marc FD
31st December 2002, 11:05
strange. i'll check what could cause that.
it worked flawlessly on MPEG-2 and AVI (MPEG-4) YV12 sources

EDIT : i tested everything i could. i'm still unable to reproduce it. does anyone encounter the same problem ?

celeron
1st January 2003, 19:30
Hi
@Marc FD
Nop no problems in here.

PS: thks for your work this filter works very good :)

Marc FD
1st January 2003, 19:54
thx celeron.

if it works, i'll continue then.
there's massive alignement and pairing + some new isse code i want to test ^^

seewen
2nd January 2003, 04:50
Originally posted by Marc FD
[ i tested everything i could. i'm still unable to reproduce it. does anyone encounter the same problem ? [/B]

I've got exactly the same problem.

I've copied/past your suggestions on the Help-file. Everytime I've got the same error :
" Deen : name list : "c3d", "a3d", "m3d", "a2d" or "m2d" "

I've tried with "deen("a3d",1,10,12)" (your suggestion in the Help file ). I try the same with differents "names" ( c3d, m3d, etc..).

Then I try about 30 others combinations ( with 5 params instead of 4, etc.. ), but I have always the same error.

-----------
I've got Aviynth 2.5 ( 29.12.2002), VdubMod 1.4.13.1, WinXP SP1, AMD Athlon XP.


A+

EDIT : It works.. But not all time. If I open/close the same script some times, suddenly i've got this error.. ( and I didn't touch the script at all meanwhile)

$$$
2nd January 2003, 06:40
Had the same problem. Here is what I did:
- frameserving the following AVI files to VDubmod
- XP SP1, P4-M

File 1, AVI uncompressed
- no chance to apply deen(), same error message as reported above

File 2, AVI with code IV32
- no chance to apply deen(), same error message as reported above

File 3, AVI with code dvsd
- using AVISource(), deen() throws error message
- using DirectShowSource(), deen() works
- in the same VDub session, deen() works then even with AVISource()

$

seewen
2nd January 2003, 08:27
It happend very often, if you add "deen" after other filters.

And the only way to make it work ( at least for me ) is to close VdubMod, and then Restart it. And at this moment, the script is ok.

This error happen with "AViSource" and "Mpeg2Source". It happen with other filters and without other filters.
The order of the "loadplugin" declaration (if there' many filters) has no effect.
The order of the functions call has no effect too.

And again, one of the easiest way to reproduce this error, is to make a script with 2-3 filters (1 internal + 2 external, like Conv3d and aSharp. Just need to load those plugins, not necessary use them), and then load this script in VdubMod.
Then open the AvsEditor, and :

1) Replace the "LoadPlugin("Conv3d.dll")" by "LoadPlugin("deen.dll")" , and then add "deen("m2d",1,10,12)" for example

2) Add "LoadPlugin("deen.dll"), and then add "deen("m2d",1,10,12)" for example

But with 1), it append more often. Like if there was a problem when 1 plugin was loading and another Unloading at the same time..

It doesn't happend every time, but really often.
(sometimes you can make it work without closing/re-opening VdubMod, but just in adding a 5th parameter : "deen("m2d",1,10,12)" -> "deen("m2d",1,10,12,3)" . But again it's not 100% sure.).

Marc FD
2nd January 2003, 12:01
okay, i'm still unable to reproduce it, but i totally rewrote argument parsing, it should be rock solid now.

BTW, new stuff (mass alignement & new isse code) is disabled, i want it to work first ^^ (i don't want to add potential bugs now, so i keep trusted code)

sh0dan, mass alignement didn't help. maybe it's the overhead of my method. but i heard that alignement was crucial with sse2 code, so maybe it would be great for a sse2 version (because i can use only movdqa), the problem, i don't have any sse2 capable cpu ^^. whatever, i think changing all mm# to xmm# would work. i'll need PIV owners to test. potential huge speedup ^_^

(attached deen beta 2.zip)

sh0dan
2nd January 2003, 13:09
@MarcFD: Yes - my own preliminary results show the same. I get a very good speedup in the processing part, but the initial realignment is _much_ slower than I anticipated.
I am not finished with the tests, but I'm working on a mmx-optimized unpack (currently in C), that writes 4-byte aligned.
Processingwise I'm able to test and blend 8 bytes in parallel, with a perframe-variable matrix.
I cannot seem to fit in the temporal tests, that skips the temporal part - that work make the code branching, and probably slower. Now that the matrix is variable it could actually be funny to try adjusting it on a per-frame basis. Perhaps it could be merged with something along the lines of dup(), using the information to adjust blending.

Marc FD
2nd January 2003, 13:16
>@MarcFD: Yes - my own preliminary results show the same. I get a very >good speedup in the processing part,

no speedup at all.

> but the initial realignment is >_much_ slower than I anticipated.

not really for me. but it's simple code. no interleaving.

maybe usefull for sse2 i think.

sh0dan
2nd January 2003, 14:06
What's interesting is that it could actually be made into a generic filtering code, applying any matrix you'd like, much like the resize filter.

I can post the code, when I get the unpacking done (it isn't interleaved, but re-aligned) - I think our approach is slightly different. And yes, with sse2 will speed up the processing part even more - I still don't have a P4 to test it on though.

FuPP
3rd January 2003, 21:51
Originally posted by Marc FD
okay, i'm still unable to reproduce it, but i totally rewrote argument parsing, it should be rock solid now.


ok Marc, works fine now :); I play a little bit with it and then will report.

Regards
FuPP.

wotef
5th January 2003, 04:17
there's lots of fun to be had playing with this filter!

regarding mode, i prefer a3d > c3d > a2d > m2d

regarding thresholds i would say:
very clean dvd source --> don't bother!
light cleaning --> deen("a3d",3,4,1,4)
medium cleaning --> deen("a3d",3,6,1,6)
heavy cleaning --> deen("a3d",4,9,1,9)

one thing i'd like to know more about is how the modes differ from one another, in terms of operation and logic, e.g. a3d vs c3d

in any case, well done, marc - i think this could be a real useful yv12 filter

Marc FD
5th January 2003, 14:25
just one thing

>deen("a3d",3,4,1,4)
>deen("a3d",3,6,1,6)
>deen("a3d",4,9,1,9)

is you don't want to filter chroma, use thrUV=0, it'll give a nice speed boost.

FuPP
5th January 2003, 14:43
hem,

Probably a stupid question, but parameters you both describe in your last posts don't seem similar to the ones Marc suggests in his "readme".

I quote marc .txt : you can try deen("a3d",1,10,12)

I quote your posts: >deen("a3d",4,9,1,9)

What is mode 4 ?
Is 9 temporal influence ?

FuPP :confused:

frank
5th January 2003, 14:43
Marc please correct the right syntax.

Your Readme says:
deen(string "name",int "mode",int "thrY",int "thrUV", float "ti")

Or, did you changed it to:
deen(string "name",int "mode",int "thrY",int "thrYtmp,int "thrUV", int "thrUVtmp)

???

Marc FD
5th January 2003, 15:26
>Your Readme says:
>deen(string "name",int "mode",int "thrY",int "thrUV", float "ti")

and it's how it works.

when i think about it, wotef used strange settings.
he could give a second look ^^

wotef
5th January 2003, 15:33
maybe! but this is what i think i'm doing (no longer filtering chroma), if i use: deen("a3d",3,4,0,4)

name is a3d
mode is 3, 7x7 radius
luma threshold of 4
chroma threshold of 0
temporal influence threshold of 4

let me know if that's odd, cause, well, the results are looking good to me and i'm using it on a 3 hour encode that just started!

Marc FD
5th January 2003, 16:12
exactly that ^^

FuPP
5th January 2003, 19:04
I've made some tests around a3d and c3d; these tests have been made using a dvd source with heavy noise.

parameters used (aim : eliminate noise but not at the cost of details)

a3d : deen("a3d",4,5,8,3)
c3d : deen("c3d",0,5,8,3)

Both seem stable and robust, and gave me the same compressibility (gain about 6.5%); but a3d looks more pleasant to my eyes. It is though really slower !

I've tried to compare c3d and convolution3d : I can't manage to get similar results; I don't know if it is caused by your implementation or related to the temporal influence parameter which is not already implemented in convolution3d (yv12 version).


Regards,
FuPP.

wotef
6th January 2003, 16:37
i've found this to be quite similar, although i am comparing convolution3d yuy2

convolution3d(0,3,3,7,3,2,0) ~ deen("a3d",3,3,0,3)

seewen
6th January 2003, 22:17
The new Version of Deen ( beta 2) works very well. No more Loading probelms.

And I love the effect of "a3d" ( find that lokks better than "c3d". Of course it's personal taste).

jorel
12th September 2003, 01:38
Originally posted by Marc FD
just one thing

>deen("a3d",3,4,1,4)
>deen("a3d",3,6,1,6)
>deen("a3d",4,9,1,9)

is you don't want to filter chroma, use thrUV=0, it'll give a nice speed boost.

@ Marc FD and Deen users

i'm using Deen() and need recomendations of
differents parameters for clean dvd source to make svcds!

all hints are welcome,the read me is so advanced for me.
:o

thanks!
:)

telemike
15th September 2003, 14:33
When you use just plain Deen(), what is Deen doing? Thanks.

jorel
16th September 2003, 02:32
Originally posted by telemike
When you use just plain Deen(), what is Deen doing? Thanks.

Deen() give the default adjusts like wroten in the read-me:
deen(string "name",int "mode",int "thrY",int "thrUV", float "ti")
name :default : "c3d"
mode :default : 0
thrY,UV :default : 10,12
ti :default is 3

- you can test "a3d"&"a2d" mode.
you can try deen("a3d",1,10,12) as an alternative
to c3d with <111> matrix or deen("a2d",2,10,12)
for 5x5 spatial filtering.

- "m2d" is in alpha-stage.
but you can take a look at deen("m2d",1,10,12)
(mmxed 2d msoften2 / 21x21 emulation )

and after 3904 views,someone will got good results from
clean dvd sources, and can show recomendations using
differents parameters that are "too big" for my knowledge!

using the "defaults" is great,...maybe some more hints
can turn the "great" to "incredible'!
;)

jorel
19th September 2003, 15:38
Originally posted by wotef
maybe! but this is what i think i'm doing (no longer filtering chroma), if i use: deen("a3d",3,4,0,4)

name is a3d
mode is 3, 7x7 radius
luma threshold of 4
chroma threshold of 0
temporal influence threshold of 4

let me know if that's odd, cause, well, the results are looking good to me and i'm using it on a 3 hour encode that just started!

thanks for that hint wotef!

deen("a3d",3,4,0,4)
is wonderfull...clean colors!
give the same final size if use(don't know why)
deen("a3d",3,4,1,4)
!

ps:
where is Marc FD?
:confused:
and why don't have more versions or hints for Deen?
thanks!

lamer_de
19th September 2003, 17:12
where is Marc FD?
He left this forum/his filters a long time ago, I think it was in the beginning of 03.

and why don't have more versions or hints for Deen?
MarcFD never published his source code for this filter. There aren't that many parameters and their effects are easy visible/understandable, so I guess there was no need to describe the parameter in more detail/give more examples. And, as always, the parameter depend on your source. Just play around a bit, there's nothing you can break :p

CU,
lamer_de

jorel
19th September 2003, 17:49
"He left this forum/his filters a long time ago, I think it was in the beginning of 03"
really sorry!

thanks for atention lamer_de!
:)