Log in

View Full Version : Deen and SangNom


Marc FD
18th January 2004, 16:33
wow, almost a year i didn't post here ^^!

i'm not active at all here, might be because this board bored me (seriously, i can't see what's new here in avisynth plugins since a year ^^;; (maybe decomb 5...))

well, the fact that attachements are disabled now dissuaded me twice to post here too ^^;

okay, let's post some old stuff ^^

first is deen 1.0 beta, which was posted last summer on a french board.

topic :
http://atlas2.tgv.net/~media-video/forum2/viewtopic.php?t=2808

direct link :
http://atlas2.tgv.net/~media-video/forum2/download.php?id=102

(warning it's in french - but the filter is pretty standard, and any experienced user knows how to use a denoiser ^^)

second is SangNom, a filter i started in my xmas holidays, which is a single field deinterlacer. no fancy stuff, just plain edge-directed interpolation.

topic :
http://atlas2.tgv.net/~media-video/forum2/viewtopic.php?t=3655

direct link :
http://atlas2.tgv.net/~media-video/forum2/download.php?id=244

(french again, anyway SangNom() should enough for most uses)

well, let's see how this thread will sink unnoticed in this forum now ;)

mf
18th January 2004, 16:54
So you didn't ignore my request after all, as I suspected at first :). Glad to see you post here Marc. And thanks for the filter :). It's a great upsizer (I'm using it as a way to upsample a fansub I'm doing from 640x360 to 720x400 :D).

Wilbert
18th January 2004, 17:24
i'm not active at all here, might be because this board bored me
I thought it was because people were nagging for the sources of your plugins which you didn't want to give ?

seriously, i can't see what's new here in avisynth plugins since a year ^^;; (maybe decomb 5...))
I think that people were busy with squeezing out bugs of your plugins for which the source was available :)

New plugins: decomb5, dgbob, kerneldeint, interpolationbob, mipsmooth, vaguedenoiser, mpasource, ssim, ctmedianfilter, masktools, audiograph, to name a few recent and interesting ones.

I'm sorry if I sound a bit negative, I just hope you will learn from it some day.

mf
18th January 2004, 17:32
Bad Marc :p. Btw, you're struck for violating rule 9 :D. Just kidding :devil:.

Sigmatador
18th January 2004, 20:47
and this was the last post of marcfd on doom9 :D

mf
18th January 2004, 20:53
Originally posted by Sigmatador
and this was the last post of marcfd on doom9 :D
And I still don't understand why he doesn't post here. Are we mean, evil? :D

Kaiousama
18th January 2004, 21:06
Welcome back markfd!!!! :) :D

and keep up with the good work, especially on Deen, it is a so danmed good denoiser.;)

DarkNite
20th January 2004, 06:30
Marc FD has spoken! *makes mark on calendar*

*cough* Please note the sig *cough* ^_^

Anyways, good to see a post from you after such a long time. I look forward to seeing you continue your fine works, in whatever language that may be, and wherever it may be.

*shuffles around for his copy of SysTran*

acrespo
23rd January 2004, 14:11
I make analog captures. After some tests with SangNom my only problem is in fixed subtitles that not deinterlace correctly with aa=48 (default value) parameter. I changed aa=10 and subtitles is perfect but edges not. With aa=20 edges is more good but subtitles are bad again.

There are any possibility to make a YUY2 version? My captures need to be converted to YV12 for use SangNom and I think YUY2 will work better for deinterlace because chroma upsample.

spyder
26th January 2004, 04:17
MarcFD: I have been playing with SangNom for deinterlacing pure video of real content like sports, music videos(mixed video and film) etc. It works very nicely as a double fps deinterlacer if you interleave a clip with a swapped field version of itself. The result is beautiful except for the logos and stationary stuff like text etc. These exhibit usual bob artifacts(bobbing, squash/expand). Otherwise, it's WAAY better than DgBob ;) So If you have time/will power can you please consider making this have a double framerate mode and adaptive deinterlacing? :)

d'Oursse
26th January 2004, 09:03
@spyder : have you tried to reduce the aa parameter (say aa=10 or 15) ? It stabilizes the stationnary stuff.

mf
26th January 2004, 10:32
@spyder
The new version has a double framerate mode to use with DoubleWeave(), but you could always Interleave(SangNom(1), SangNom(0)) before. Also, using YV12Subtract you can make a comb mask of fielddeinterlace and already perform some basic adaptive deinterlacing yourself (afaik DGBob doesn't have a show mask function) using MaskedMerge. I found it to be crap, but then again, I only test on anime ;).

morsa
26th January 2004, 11:35
@mf
Could you post the script you've mentioned above for testing purposes?
I mean, about adaptive deinterlacing using SangNom.
Thank you.

scharfis_brain
26th January 2004, 11:37
go to the sstmocomp thread, search for the tmcbob - script.
replace tomsmocomp(0,-1,0) with sangnom(...)

thats all.

mf
26th January 2004, 14:59
Originally posted by morsa
@mf
Could you post the script you've mentioned above for testing purposes?
I mean, about adaptive deinterlacing using SangNom.
Thank you.
http://mf.creations.nl/avs/maskedmocomp-size.png
No, I'm not going to post that :D. It kind of reflects what NinjaMice said in my sig :p.

spyder
26th January 2004, 22:08
Well, using Interleave(SangNom(1),SangNom(0)) works but you still need to trim one line from the top of the top field frame and one from the bottom of the bottom field one...otherwise it jumps up and down.

EDIT: well, no, it still jumps...I'll play with it more later

EDIT2: no, the jumping was my own error :)

acrespo
27th January 2004, 17:13
My actual method is
Telecide (order=1,post=0)
SSTomsMoComp("tff")

When I use post=0 some interlaced lines still showed, than I use SSTomsMoComp to eliminate them. SSTMC is best than FunkyDeint, FunkyBob, TMCBob methods for me (I am a analog anime ripper).

Changing SSTomsMoComp for SangNom(order=1,aa=48) my video is better, but static texts are not good and if I change aa parameter to 20 static texts are good but the overall video is not good than SSTomsMoComp.

mf: Is it possible to do a SSSangNom?

mf
27th January 2004, 17:23
Originally posted by acrespo
mf: Is it possible to do a SSSangNom?
Nope (http://forum.doom9.org/showthread.php?s=&threadid=28778&perpage=40&pagenumber=3).

morsa
28th January 2004, 03:35
I`ve been testing SangNom with video stuff and its results looks promising noting that it is still in very beta state.
The problem is that it leaves a kind of dotcrawl around the edges when you use aa 15 and higher.
They are really ugly and throws away any useful result.
I hope mf can make a post showing what I`m talking about, cause I can`t do it.
Thanks.

mf
28th January 2004, 13:00
Originally posted by morsa
I hope mf can make a post showing what I`m talking about, cause I can`t do it.
http://sigmatador.free.fr/Divers/sntest.png


This stuff?

morsa
28th January 2004, 21:00
Something like that.
But with real life images, after an upsize it becomes worst!!
Thank you.
Any possibility to correct this bug, MarcFD??

Sigmatador
28th January 2004, 21:19
when the edged are too closed, this could happen, and it should be very difficult to detect this pixel.

MfA
28th January 2004, 23:12
If Marc is reading this ... are you using an isotropic blur? Or a blur oriented in the same direction as the predictor?

sOy
4th February 2004, 15:55
hi,

Could anyone explain what "w3d" mode is? since i don't understand French at all.

Thanks Marc FD for his great filters.:D

DarkNite
7th February 2004, 04:34
Deen 1.0 beta 1

Deen(clip, str mode, int rad, int thrY, int thrUV, int tthY, int tthUV, float min, float scd, string fcf)

Modes: "c2d", "c3d", "w2d", "w3d", "a2d", "a3d" 2d = spatial / 3d = spatial + temporal (on 3 frames)

rad: radius (1-4 in 3d/1-7 in 2d)

thrY, thrUV: spatial tresholds
tthY, tthUV: temporal tresholds (3d only)

min: 1 = not of reduc.. 0 = reduc max
- in mode "w", it is the reduction of the weight of the pixels according to their distance.
- in mode "a", it is the reduction of the treshold according to the distance of the pixel.

scd: Scene Change Detector, causes the use of the equivalent mode in 2D if a movement
higher than the value threshold is detected (scd=-1 to see the values with debugview)
(only in 3d modes)

fcf: Full Control File by (demonstration in the zip). "" by default = no fcf.
Override of the adjustments by external file.


Yeah, a little rough, but you get the point. :D

Does that help?

r6d2
7th February 2004, 05:07
@DarkNite,

:goodpost:

sOy
8th February 2004, 15:57
@DarkNite

Thanks for your responses, but I have got this english translation before.;)

I have used deen since it borned. deen has several mode such like "c3d" (almost same with filter c3d), "a3d"(Marc FD's mode, nice denoising mode to animes). But with this new version, i have no idea with what "w3d" mode is.

Maybe Marc FD have mentioned it in the French board linked above, but I can't understand it at all.:(

Any help will be appreciated, thanks.

Manao
8th February 2004, 16:21
Each of the three modes ( a, c, w ) will take into account pixels around in order to compute the new value. They will only take pixels that are under the threshold ( meaning that they are not too different from the original pixel ).

Now, with the 'c' mode, you only make an average of the surrounding pixels ( under the threshold ) in order to calculate the new pixel.

With the 'a' mode, you do the same, but the threshold is reduced with the distance. Which means that pixels farther will have to be closer to the pixel considered in order to be taken into account.

Finally, the mode 'w' change the weight of a pixel according to its distance from the original pixel. Meaning, instead of avering all the surrounding pixels under the threshold, it will instead weight : pixels close to the center will have a weight of 3 ( for example, I don't know exactly the formula ), pixels a bit farther a weight of 2, and the farthest pixels, a weight of 1 ( they will count three times less than the closest pixels ).

I hope I was clear ( and understandable ) enough.

Kurtnoise
8th February 2004, 20:46
for info, the default values :

Deen() is equal to Deen("c3d",1,7,9,4,6,0.5,9).

And, SangNom() == SangNom(1,32). ;)

morsa
12th February 2004, 11:05
Well if anyone is interested about experimenting with the code that makes this stuff posible (Sangnom)Avery made an edge directed resizer for Vdub some time ago.
Its source code is posted at Vdub forum, just look for edge directed at the filters section.
Good Luck

mf
12th February 2004, 12:26
Oh, that's certainly nice. So instead of doing complicated things with crop, addborders, turnleft and turnright to use sangnom as a resizer, someone could also just make EdgeDirectedResize().

morsa
12th February 2004, 14:47
I've been examinig Scale2X source code, and I guess it also does an EDI.It is hosted at sourceforge and has a nice and clear code.

mf
12th February 2004, 15:36
Originally posted by morsa
I've been examinig Scale2X source code, and I guess it also does an EDI.It is hosted at sourceforge and has a nice and clear code.
Scale2X performs *very* bad on antialiased/blurred material. If you're looking for hard pixel upsampling, I'd look at HQ2X instead. It's also bad on antialiased stuff, but it looks a lot better than scale2x. http://www.hiend3d.com/hq2x.html

morsa
12th February 2004, 22:28
Yeah, I know it.
The problem is that, I have problem figuring out how to make the algo work with 32 bit images.Remember I'm not a coder, and I'm just trying to make my best to get something working while trying to learn C++.
So the only useful code for me ,now, is unoptimized plain C++.

mf
12th February 2004, 23:45
Actually, I've tested HQ2x as an antialiaser, upsampling to 4x with HQ2x, then downsampling with bilinear, and it works really neat. Better than "Antialias()" that I made, which involves SangNom, warpsharp, blur and xsharpen ;). Though that one manages to do hard edge antialiasing pretty well too.

Longinus
15th June 2004, 22:29
Where can I get sangnom? The original link doesn't work anymore...

Guest
16th June 2004, 01:02
direct link :
http://atlas2.tgv.net/~media-video/forum2/download.php?id=244

Longinus
16th June 2004, 03:00
Neuron2, can you connect at this address?

It gives me the usual apache's Forbbiden msg..
"You don't have permission to access /~media-video/forum2/download.php on this server."

Guest
16th June 2004, 03:59
I click on the link and there is the zip file. Don't know what to tell ya.

Longinus
16th June 2004, 04:57
Really?? Very strange...
I don`t have any proxy or things like that... so it should work.. I even tried cleaning my cache to see if it helped... but no good..

Maybe, for some strange reason, my IP (probably my IP range) is blacklisted in this server (I canno`t access even it root directory)... I`ll ask somebody else to try it.. and maybe someone on the same ISP as me, to see if he gets the same error.

Thank you, and sorry for the trouble (you probably thought the questio was really lame, because you just cliked and it worked.. :D).. For me the server really wasn`t working.. simple as that..

Longinus
16th June 2004, 05:35
Humm.. no good..
I asked some persons... same problem.. Thant I tried using wget in a server in another country... just to see..

http://www.neoplastique.com/longinus/wget.gif
(just so people see I'm not crazy.. =D)

Please Neuron2, if you have some time could you download it and making it available somewhere else? Maybe email me? longinus@gmail.com

Thanks!

Manao
16th June 2004, 06:04
http://jourdan.madism.org/~manao/SangNom.zip

Longinus
16th June 2004, 06:34
Manao, thank you very much!
Problem solved.