Log in

View Full Version : VagueDenoiser 0.35.1: a 2D Wavelet denoiser/smoother


Pages : 1 2 3 [4] 5

Fizick
28th September 2004, 20:25
LigH,
confirmed :(
thanks :)
I released v.0.33.5 today.
Fixed bug with AutoThreshold for Interlaced Wiener mode.
I also used newest avisynth.h for compiling,
and made spell check of documentation. Now it has only 2 mistakes :)

P.S. What about update of the thread name? Anybody still can do it ? :D

LigH
29th September 2004, 07:27
@ Fizick:

Please thank 'Viperzahn' in your changelog for his original report in the german doom9 / Gleitz board; I just quoted it here.

Fizick
30th September 2004, 05:08
Done.

Viperzahn
11th October 2004, 22:42
There is another bug in the combo of nsteps, chromaT and interlaced:
MPEG2Source("Interlaced_NTSC_DVD.d2v")
VagueDenoiser(nsteps=6,chromaT=0,interlaced=true)
produces a green touch in the upper left corner.
'nsteps=6,chromaT=0,interlaced=false', 'nsteps=6,interlaced=true', 'nsteps=5,chromaT=0,interlaced=true' works fine.

Fizick
12th October 2004, 00:41
Probably it is not bug, but feature :)

Too big nstep for interlaced YV12 chroma plane (height=120).

Viperzahn
12th October 2004, 02:07
Ok :cool:,
but any chance to get an warning message instead of an ugly picture?

Fizick
12th October 2004, 12:20
Viperzahn,
You may consider Lefungus note in doc and my post above as warning message. :)

But any chance to get "Thanks for your updates" message?
(Lefungus was only who post it).
:rolleyes:

Viperzahn
12th October 2004, 13:32
You may consider Lefungus note in doc and my post above as warning message.
I find nothing about this in the manual, and sometimes, you dont see this error on the first preview. It is really hard to get a worse result after a ~20h encoding.



But any chance to get "Thanks for your updates" message?
(Lefungus was only who post it).
I'm sorry - it was very late yesterday :(
Thanks for your work.

Fizick
13th October 2004, 18:56
New Version 0.33.6 - October 13, 2004
Nsteps parameter now is auto-limited to max admisible value if input too big or =0 (don't worry, Viperzahn :)

Some improving of exception handling (try-catch-throw).

Try!

Viperzahn
14th October 2004, 00:17
Thank you! :)




EDIT
hm, same problem with 'nsteps=0,chromaT=0,interlaced=true' and 'nsteps=6,chromaT=0,interlaced=true' is still selectable and green :(

Fizick
14th October 2004, 05:33
It must be selectable. But why green?:confused:

please give more info about CPU, source and script and program.
And how with other source? I have no NSTC.

Anybody else can confirm?

Viperzahn
15th October 2004, 00:54
please give more info about CPU, ... script and program.
Configuration:
Athlon Thunderbird 800 MHz
256 MB RAM
Windows XP Professional (no SPs, but all critical updates)

Tools:
AviSynth 2.55 (final 2004-08-31)
DGIndex 1.0.12 & DGDecode
VagueDenoiser 0.33.6 from http://bag.hotmail.ru/
VirtualDubMod 1.5.10.1 build 2439

Script:
LoadPlugin("DGDecode.dll")
LoadPlugin("VagueDenoiser.dll")
MPEG2Source("HeavyNoise_interlaced_NTSC_DVD.d2v",iPP=true)
VagueDenoiser(nsteps=0,chromaT=0,interlaced=true)

Procedure:
Open script in VirtualDubMod: green colouring in the upper left part of the image



please give more info about ... source ...
And how with other source? I have no NSTC.
Check this, please:
LoadPlugin("VagueDenoiser.dll")
BlankClip(length=300,width=720,height=480,pixel_type="YV12",fps=29.970,color_yuv=$0000EB)
VagueDenoiser(nsteps=0,chromaT=0,interlaced=true)
You may test it with nsteps=0\6\5,chromaT=0,interlaced=true\false

720x576 seems to work (in this script) and i tested with two different NTSC DVD sources (MPEG-2 Video MP@ML,YV12,29.970 FPS, 720x480 pixels,interlaced,TFF,pic-structure=frame).

Fizick
15th October 2004, 17:42
Viperzahn,

I tried your last test script.
I have got red frame without any green corner.

So i still wait reports from others.
May be old Athlon?
BTW, what YV12 decoder does your use? I use Helix.

However, my red frame is not pure red, but with some dark left upper zone.

I found more sharp spots with "height=512".
So, some bug (or feature) really exist.

May be, some mirror (symmetry) code missed.
I do not know.
May be, i simply decrease the max admissible nsteps in next version.

Thanks for report!

Viperzahn
15th October 2004, 21:42
>May be old Athlon?
CPU supports MMX, integer SSE, 3DNow!, 3DNow! 2

>BTW, what YV12 decoder does your use?
XviD Decoder (Koepi's binaries - 1.0.2-29082004 _Final Release_)



I have got red frame without any green corner.
.
However, my red frame is not pure red, but with some dark left upper zone.
Yes, that's what i mean, but in a natural picture is this dark area green.



Please compare this:
A=BlankClip(length=300,width=720,height=480,pixel_type="YV12",color_yuv=$0000EB)
\.VagueDenoiser(nsteps=0,chromaT=0,interlaced=true)
B=BlankClip(length=300,width=720,height=480,pixel_type="YV12",color_yuv=$0000EB)
Subtract(A,B)
and
A=BlankClip(length=300,width=720,height=576,pixel_type="YV12",color_yuv=$0000EB)
\.VagueDenoiser(nsteps=0,chromaT=0,interlaced=true)
B=BlankClip(length=300,width=720,height=576,pixel_type="YV12",color_yuv=$0000EB)
Subtract(A,B)
Something is false with 480 height and nsteps,chroma=0,interlaced=true

Fizick
16th October 2004, 10:35
V.0.33.7 - October 17, 2004 (Fizick)
Decreased max admissible value of nsteps to fix some internal bug (or feature)
(thanks to Viperzahn for insistent report :-)

I am really wonder, why about 30 peoples downloaded last bugged version without any test and report (for collection may be):angry:

Viperzahn
18th October 2004, 21:05
It seems to work now, in my fast test - Thank you Fizick :)
I make a harder testing in the next days, when i found more time :(


BTW, sorry for my bad english.

Fizick
23rd November 2004, 23:36
V.0.34 - November 24, 2004
Added auxiliary (some prefiltered) clip for first pass of Wiener mode.

Add Parameter auxClip: auxiliary clip for first pass of Wiener mode (default=none)

Prefiltered source clip, preferably with temporal or spatial-temporal filter (such as DeGrainMedian) for best denoising and artifacts suppression.

Sample usage:

aux=degrainmedian(mode=0)
vaguedenoiser(wiener=true,auxclip=aux)


Now Vaguedenoiser is not pure spatial filter. :)

DarkFoon
18th December 2004, 04:40
I've looked high and low, but I can't seem to find anywhere if VagueDenoiser requires an SSE capable CPU.
This means it's probably right under my nose.
so, Does vaguedenoiser work w/o SSE?
this may seem like a stupid question, because all modern CPU's have SSE in some form. But I have a pentium II I fancy as an encoder, so I can use my other computer (a PIII) instead of waiting for it to get done.
I get a green-screen output with vague in my script(on the PII, it works just fine on my PIII), should I take this to mean that it requires SSE?
if it does... i'm screwed.
is there anyway to make a script that has optimizations, but can also work w/o them? I don't know programming, so those may be opposing ideas....


I hope this makes sense, I'm tired and hungry, and frustrated:angry:
thanks for your time/help

Fizick
19th December 2004, 01:19
Hmm...
Vaguedenoiser must work without SSE.
It contains pure C (not-optimized part) part.
But it use some MMX part for mem_set,
and use some internal Avisint functions for copy (BITBLT)...

OK. Now i made some fix to mem_set (change prefetcht0 to prefetchw).
Try new version 0.34.1
It must work, but I can not test it.

DarkFoon
19th December 2004, 03:02
Thank's for your help.
just FYI, it's a PII MMX using Slot 1 to connect to mobo.
it's a total junker, but since it isn't a PI, i can use it for encoding.

I'll test the new version. I should tell you what I saw when I used the filter: green... The whole frame was 100% green. You know, that YV12 green color.

If it happens with the new code, I'll post a screen shot and my script.

Thanks again.

DarkFoon
19th December 2004, 03:40
I've just tested it on my PII, bad news.

When I open up my script in VDubMod instead of getting a video frame, I now get:
"Avisynth Read Error: Avisynth: Illegal instruction at 0x01ef9400"
in the little bottum line where the menu descriptions appear.
This happens for all video frames, and when I go to
File>File Information
Vdub crashes. Somthing like an out-of-bounds access violation, I can't get it to dump the crash info, because of stupid win98SE and the way it crashes...

Now, I shall post my script, maybe that can offer you some insight into this strange problem...

[Begin script post]

loadplugin("C:\plugins\dgdecode.dll")
loadplugin("c:\plugins\MPASource.dll")
loadplugin("C:\plugins\guavacomb.dll")
loadplugin("C:\plugins\peachsmoother.dll")
loadplugin("C:\plugins\decomb521.dll")
loadplugin("C:\plugins\kerneldeint140.dll")
loadplugin("C:\plugins\mipsmooth.dll")
loadplugin("C:\plugins\msmooth.dll")
loadplugin("C:\plugins\vaguedenoiser.dll")
loadplugin("C:\plugins\fluxsmooth.dll")
v=mpeg2source("sad2.d2v",cpu=0,idct=4,ipp=true,moderate_h=20 ,moderate_v=40 ,showq=false,fastmc=false,cpu2=" ")
a=MPASource("sad2.mpa", normalize=false)
AudioDub(V,A)
trim(0,-1)++trim(2918,0)
trim(0, 18002)++trim(23109, 0)
trim(0, 39543)++trim(39844,0)
trim(1,39543)
crop(0,62,0,-66,align=true)
telecide(order=1, guide=1, post=0, back=0, nt=15, gthresh=15, vthresh=25, bthresh=90.0, show=false, hints=true)
decimate(mode=2,threshold=1.0, threshold2=3.0, quality=3, show=false)
msmooth(threshold=3, strength=3, mask=false)
VagueDenoiser(threshold=1.5,method=1,nsteps=6,chromaT=0,interlaced=false,wavelet=1,wiener=false,wratio=0.5,percent=100)
#tweak(sat=1.50, coring=false)
#Levels(0, 0.9, 255,0, 255, coring=false)

[End script post]

That's the whole thing, I hope it is helpful. I can also give you my system stats. (those of the PII, because that's where the problem is)

Pentium II MMX 300MHz (possibly overclocked?)
233 MHz system bus
128 MB of SDRAM (I think it's 133Mhz ram)
Intel 440LX chipset/motherboard
some other crap

Thanks for all your help. And your time. I do hope that this helps pinpoint the problem

LigH
19th December 2004, 09:17
If I remember correctly, "everything in green" happened when the 'nsteps' parameter as a power for 2 was bigger than the video size.

But in general: If something strange happens, try to comment out everything which is not really necessary, start at the most simple script (MPEG2Source, Crop/Resize - nothing else). If the video is already green here, you may have encrypted video. If not, then add the VagueDenoiser: If this results in green, then there is a general problem with the VagueDenoiser parameters. If you see some content there, the filter chain causes the problem.

DarkFoon
19th December 2004, 10:28
Indeed LigH, I have tried all these that you have mentioned. As a matter of fact, it all works/looks fine, until I un-comment out VagueDenoiser, and then I get green. But I know my parameters are correct, because they work on my other computer. I can run the same script on my PIII (the computer I am using to write this post) and it will work fine. The two systems are similarly configured too. They both use Koepi's Xvid build to decode YV12. If there is a better(faster) YV12 decoder than that, I would love to hear it.
But back to the subject at hand.
What I should have said in my last post, was that the newest version, 34.1, which fizick made to correct my first, "green" problem, now just plain doesn't work (on my PII). I could try 33.7, or 34.0 again with my PII, but I doubt there will be anything different.
*sigh*
Old tech...
a love/hate relationship...

Fizick
19th December 2004, 12:33
So, 0x01ef9400 is prefetch address.
OK, i remove it from code.
Try new release of modifyed version 0.34.1 (i forget change version number):)

DarkFoon, please test with simplest script
(only vague).

Fizick
3rd March 2005, 20:50
DarkFoon wrote:
@Fizick This is completely off topic, but version 0.34.1 of Vaguedenoiser crashes all of my computers: not only my P2, but also my P3. Just thought you'd like to know (especially since I complained about the P2 problem in the first place ) Yeah, yeah... I know there's a thread for that filter, but I'm too lazy to find it (I have this thread bookmarked, however)

With lLatest version fom my site?

Anybody else have a problem?

Kurosu
3rd March 2005, 21:39
Originally posted by DarkFoon
Thank's for your help.
just FYI, it's a PII MMX using Slot 1 to connect to mobo.
Thanks again.
Strange, it should be rejected, as it doesn't have neither SSE nor 3DNow! support. There's absolutely no way VD will ever run on that CPU, unless someone implements a new wavelet and code an integer-based lifting scheme.
But the problem with the P3 is even more strange. I thought I had taken care of those prefetch/prefetchw/prefetchnt{a,0,1,2}

Btw, some speed could be save by merging thresholding and float2byte conversion (I can't remember if it is possible). I guess the current code is more memory-bound that CPU bound. Anyone to test with different memory timings/frequencies but at the same CPU clock ?

Fizick
4th March 2005, 05:52
Kurosu,
You probably forget, that there is "plane C" code branch in Vague, so P2 CPU can use it. :)

I removed prefetch from mem_set in last version.
BTW, there was 2 different versions of 0.34.1.

I really wonder why DarkFoon (or somebody else) did not report so long about this problem. :confused:

My AthlonXP works well.

DarkFoon
4th March 2005, 07:17
@Kurosu
There was no problem with the P3, only the P2; sorry for the confusion.
I haven't had the time to re-test the new 0.34.1 version on my P2 (I have been making the P2 a multiboot recently) I will do that shortly.

@Fizick(and all VD developers)
Maybe there should be two versions of VagueDenoiser: a SSE optimized version (for all newer CPUs) and a "legacy" MMX-only optimized version for crappy P2 and lower CPU. Just a crazy thought. (or maybe the filter should figure out which optimizations are present and pick the ones to use? like 3Dnow! on Athlon, SSE2 on P4, SSE on P3, and MMX on P2) <-[to a non-programmer like myself, that sounds difficult to implement, but I have seen it before...]

Kurosu
4th March 2005, 09:10
Originally posted by Fizick
Kurosu,
You probably forget, that there is "plane C" code branch in Vague, so P2 CPU can use it. :)
Indeed, I had totally forgotten. So much for my "absolutely". As for mem_set, I doubt it improves much anything.

Originally posted by DarkFoon
Maybe there should be two versions of VagueDenoiser: a SSE optimized version (for all newer CPUs) and a "legacy" MMX-only optimized version for crappy P2 and lower CPU. Just a crazy thought. (or maybe the filter should figure out which optimizations are present and pick the ones to use? like 3Dnow! on Athlon, SSE2 on P4, SSE on P3, and MMX on P2) <-[to a non-programmer like myself, that sounds difficult to implement, but I have seen it before...]
SSE2/SSE/MMX as you see them used are for integers. VD uses floats. So, back to my "code an integer-based lifting scheme."

DarkFoon
4th March 2005, 09:22
@Kurosu
I know nothing about optimizations, but I remember reading somewhere something about float vectors or such in SSE. But those are vectors, not plain ol math ^^U, my bad.
What about a GPU version of VD, is that possible? Kind of like the FFT3DGPU. I mean, the reason FFT3D has a GPU bersion is because of parallel floating-point math (or something like that, the programmer said).
Anyways, like I said, I don't know hardly enough about this subject to even comment, but here I am ;)
So, take my words "cum granum salis".

Fizick
4th March 2005, 20:11
Maybe there should be two versions of VagueDenoiser: a SSE optimized version (for all newer CPUs) and a "legacy" MMX-only optimized version for crappy P2 and lower CPU. Just a crazy thought. (or maybe the filter should figure out which optimizations are present and pick the ones to use? like 3Dnow! on Athlon, SSE2 on P4, SSE on P3, and MMX on P2) <-[to a non-programmer like myself, that sounds difficult to implement, but I have seen it before...]

Darkfoo,
You may be wondered, but VagueDenoiser HAS such automatic CPU selection :)

So, when you make new test on P2?
Kurosu and I have some other work too.

DarkFoon
4th March 2005, 20:50
Fizick asks me
So, when you make new test on P2?
Kurosu and I have some other work too.

And I reply: right now. ;)
Here are the results...

With this script (below) and YV12 source, I get a solid black frame... :(

loadplugin("c:\plugins\vaguedenoiser.dll")

avisource("Ghost in the Shell SAD 3.avi")
VagueDenoiser(threshold=4, method=3, nsteps=8, chromaT=-1, wavelet=3, percent=100)


With this other script (below) and YV12 source, I get a solid green (0,135,0 = RGB) frame... :(

loadplugin("c:\plugins\vaguedenoiser.dll")

avisource("Ghost in the Shell SAD 3.avi")
VagueDenoiser(threshold=4, method=3, nsteps=8, chromaT=0, wavelet=3, percent=100)


Video informations:
720x352
YV12
23.976 FPS Progressive (it has been IVTC'ed)
XviD Codec (you want the version number? ;))

Computer informations:
CPU: Pentium II MMX 300Mhz Slot 1 type
RAM: 128MB PC133
M/B: Some AOpen piece of crap
GFX: 32MB(?) TNT2

I hope this helps....

Fizick
6th March 2005, 22:50
I checked a code but did not found any reason.

Kurosu, can we use _mm_alloc (_aligned_malloc) with old P2 CPU?

somail
7th March 2005, 07:24
could someone post a link to .29 I have not been able to find a link to a binary all night. (EDIT: Never mind I'm an idiot.)

Also I am currently using .27, and I have an odd issue with the filter. It seems to only be filtering 50% of the picture (the left side). I havn't found anything on this issue, so I am wondering if I have a possible system .dll not installed or a setting wrong. Hopefully going to .29 will help.

thanks

Kurosu
7th March 2005, 11:31
Originally posted by Fizick
Kurosu, can we use _mm_alloc (_aligned_malloc) with old P2 CPU?
Yes, this is platform dependent (Windows only), not CPU-dependent. A green buffer is typically all values set to 0, so there's probably one or more missing copy somewhere. Or maybe all values are thresholded to 0.

Fizick
8th March 2005, 07:30
I will wait the problem confirmation from somebody with old Pentium2 CPU.

DarkFoon
8th March 2005, 08:30
I doubt there will be any confirmation from anybody else with an old Pentium2. I think I am the only person who tries to do video on a Pentium2 in this whole forum. ;)

I wonder if it's just my lame computer...

Fizick
8th March 2005, 09:54
Darkfoon,
what speicific Avisynth version do you use?
2.55 ?

LigH
8th March 2005, 13:23
I have an AMD Duron 800 (MMX, ISSE, basic 3Dnow!). If that helps, then I may check for issues, too - but I'm unsure which constraints I have to follow, this thread starts to confuse me the more I read it. Would you collect the constraints again, please?

Fizick
8th March 2005, 15:06
LigH,
thanks, but Duron is not so old CPU. :)
We need in P2.

DarkFoon
9th March 2005, 06:29
I think i am using avisynth 2.53 on the P2.
and 2.55 on my P3.

paviko
9th March 2005, 14:13
Hi.
Thank you for great denoiser.
I've got strange behaviour when chromaT parameters is greater or equal to 0 and video is in YV12 mode. Then I see in the upper-left corner small, blue rectangle. It doesn't appear in YUY2 mode. It's not a big deal because I'm mostly using YUY2 mode.
My system: Athlon XP (Barton), Win XP SP2.

Thank you,
Regards

Fizick
12th March 2005, 20:10
V.0.34.2 - March 11, 2005 (Fizick)
Fixed small bug (blue dot) for chromaT>=0 in YV12 for Athlon (Thanks to Pavico for report). Added pitch for internal buffers.

paviko
13th March 2005, 12:37
Thank you :)
You are the most active plugin developer :cool:

Regards

Fizick
11th September 2005, 15:40
I found, that AutoThreshold mode (threshold=0) gives overestimated threshold values, and found a bug in algo.
So, new version: V.0.34.3 - September 11, 2005 (Fizick)
Fixed AutoThreshold algorithm

Fizick
17th September 2005, 20:55
Nobody interested? O.K., new version.

V.0.35 - September 17, 2005
Improving soft method=1 - do not filter lowest level anymore, mean picture intensity is not changed now .
Re-enabled method=2 of multilevel subband adaptive thresholding, implemented as NormalShrink method;
Added method=4 uniformly smooth shrinking function;
Replaced partial denoising blend mode by limited shrinking of small coefficients for all thresholding functions;
Changed default percent=85;
Implemented new SSE versions for method=0,3,4 and C versions for rest (3DNow disabled with 4% speed decreasing);
Added 3DNow optimized versions for transform of wavelet 1 and 3 (10% speed).

DarkFoon
17th September 2005, 21:34
yay!
thanks Fizick

Soulhunter
17th September 2005, 22:03
Yeah, thx... ^^


Bye

LigH
18th September 2005, 05:10
3Dnow! speedups and algorithm improvements? http://cosgan.de/images/smilie/liebe/f020.gif

Fizick
18th September 2005, 09:03
Pentium4 users, please compare the speed of Brislawn wavelet=2 with version 0.343:
Vaguedenoiser(threshold=2,wavelet=2,percent=100)
I disabled part of SSE code here (it is slower on Athlon) then pure C.