Log in

View Full Version : Avisynth port of TemporalCleaner


Pages : [1] 2

vlad59
8th November 2002, 22:26
Hi all,

I made an avisynth port of Jim Casaburi's TemporalCleaner.

This filter is a simple temporal denoiser but it's real aim is to help compressibility as it will gave you a first pass size 10-20% lower for almost no speed penalties.

With this first release you have to use a mod4 width otherwise it may crash.

Next version will include pixel lockers and maybe a specific YV12 dll.

happy testing.

TemporalCleaner (http://membres.lycos.fr/tempask/TemporalCleaner.zip)

@Defiler

May I ask you to host this filter as well. Thanks in advance.

ajp
8th November 2002, 23:23
E-e-e-xcellent! I will try it out right away on some shorter clips! :)

Thanks again,

@jp

Zarxrax
8th November 2002, 23:40
Yay! :D

Niño
9th November 2002, 00:58
This filter works great, but there was a green line on the left of my clip.
The script was this:

#
LoadPlugin("C:\Avisynth\TemporalCleaner.dll")
mpeg2source("C:\Niño\Documents\Con_Air\Con_air.d2v")
#
crop(0,70,718,434)
#
TemporalCleaner(6,10)
#
LanczosResize(640,272)
#

Dark-Cracker
9th November 2002, 01:39
hi,

try to use some crop value divisible (yes my english is crap) by 4
(use value like 716 our 720 for height and 432 or 436 ) i think this will solve your problems.

++

Milkman Dan
9th November 2002, 02:20
Vlad SPECIFICALLY said to use a horizontal resolution that was mod4...meaning divisible evenly by 4.


Originally posted by Niño
This filter works great, but there was a green line on the left of my clip.
The script was this:

#
LoadPlugin("C:\Avisynth\TemporalCleaner.dll")
mpeg2source("C:\Niño\Documents\Con_Air\Con_air.d2v")
#
crop(0,70,718,434)
#
TemporalCleaner(6,10)
#
LanczosResize(640,272)
#

Niño
9th November 2002, 02:40
Sorry, you're right, :(
Thanks

JohnMK
9th November 2002, 05:17
Could someone recommend a good, all-around, general-purpose setting for this, or small-range of settings?

vlad59
9th November 2002, 09:40
I must admit I only made tests on anime and I used safe setting :
5, 10

I think that if you use it on normal movie then you should use settings like :
3, 8

But it's untested. I'll remake a test with Excalibur tonight.

Koepi
9th November 2002, 10:39
Heya Vlad,
thx for this nice filter, I waited long time for an avisynth port :)

How about this:
{quote]
3 - Current limitations or known problems : .
- Work only with YUV2, CHECKED.
[/quote]

Do you plan to port it to avisynth2.5/YV12? ;)

Best regards
Koepi

ajp
9th November 2002, 11:46
Vlad,

only had time to test it on a few short clips but inital impressions are very good! It really cleans up my digital cable caps, removes any flickering and dct blocks. I haven't tried it on an analogue cap yet but I will tonight. I suspect they are so noisy I will have to use it in combination with Peachsmoother or something...

Speed is also very good... :)

Thanks!

@jp

vlad59
9th November 2002, 22:45
Originally posted by Koepi
Do you plan to port it to avisynth2.5/YV12? ;)



Don't tell anyone about this but it's already done ..... ;)
Just some little thing to check and ....



@all

Can somebody post some speed bench as I only tested it on my old PIII500 so it was hard to compare speed.

Thanks in advance.

ajp
9th November 2002, 23:00
Converting a testclip took 0.7x realtime without Temporalcleaner (without using Avisynth at all), using Avisynth and Temporalcleaner (4,8) it took 1.1x realtime... not very scientific but still... :)

Convolution3D is still no 1 when it comes to quality but also quite a lot slower, Temporalcleaner is often good enough on less noisy clips and does it in half the time... :)

I tried combining them but I have a feeling that's completely unnecessary?

MaTTeR
10th November 2002, 02:49
Originally posted by vlad59

Don't tell anyone about this but it's already done ..... ;)
Just some little thing to check and ....
Oh man, your teasing us:) Yep, the speed is very good; definitely faster than Convolution3D though. I don't have any hard benchmarks but could post some if needed. Nice work as always Vlad.

jarthel
10th November 2002, 06:18
will compare to 2dcleaner and temporalsmoother :)

jayel

jarthel
11th November 2002, 04:17
initial feedback even without encoding the anime (previewing in vdub). 2DCleaner is better. TemporalCleaner is not as smooth and clean as 2Dcleaner. So I opted not to test it cause it uncompressed is not good. I would assume that compressed file would be worse. :)

Zarxrax
11th November 2002, 04:34
Um... 2d cleaner and temporal cleaner are COMPLETELY different types of filters. You cant say one is better than the other :rolleyes:

jarthel
11th November 2002, 07:03
isn't 2dcleaner a temporal smoother?

ErMaC
11th November 2002, 07:50
No, it's 2d - meaning it operates on a single 2d still frame. It's a spatial smoother.

vlad59
11th November 2002, 08:49
One thing I totally forgot to say :

As stated in the doc, this filter use feedback, that it use the already processed previous frame (not the unprocessed one). So if you want to make test on a specific frame (in Vdub) :
go 4 or 5 frame before your test frame and then use the right arrow to reach your frame.

Sorry for forgetting this one.

Another thing, luma and chroma threshold are linked : for a pixel if luma différence is above luma threshold (so we keep current luma) then chroma is also kept.

So if you use this script :
TemporalCleaner (1, 25) or TemporalCleaner (0, 255)
don't be surprised if the filter don't make anything.

I think that's all I've forgotten.

@Jarthel

No you can't say that if the result with TemporalCleaner don't seem as clean as the result with 2Dcleaner -> then the compressed one will follow. Also the TemporalCleaner should keep more details that 2DCleaner.

It depends of your second pass size, of your compressibility.

You could try to run a complete full pass with both scripts and compare the first pass size.


Hope this helps

jarthel
11th November 2002, 13:47
I'll try your suggestion. As I previously said, I thought 2DCleaner is also a temporal smoother. I apologize for my mistake. :)

Here's the script for reference. I will try it on Record of Lodoss War TV.
----------
body=mpeg2source("d:\dvdrips\lodoss14\lodoss14.d2v").trim(0,40176).temporalcleaner(5,10).Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Decimate(cycle=5).crop(14,4,692,472)._2DCleanYUY2().lanczosresize(640,480)

return body
------------

jayel

vlad59
11th November 2002, 13:52
In my opinion TemporalCleaner should come after Telecide and Decimate for maximum speed and quality.
But I never worked with NTSC movies.

MaTTeR
11th November 2002, 14:18
Originally posted by vlad59
In my opinion TemporalCleaner should come after Telecide and Decimate for maximum speed and quality. Agreed, not very effecient to filter borders which will be cut away later:confused:

The only thing to use before cropping is IVTC or Deinterlace filters IMO.

manono
11th November 2002, 18:57
And in jarthel's case, he can even stick Telecide-Decimate after cropping also (but before the smoothers), and gain a bit more speed. So can anyone else if you abide by the "Horizontal Crop must be divisible by 4" rule.

vlad59
11th November 2002, 19:05
@manono

Ooooops you got me.
I totally forgot about this "know problem". This problem is already fixed in the YV12 version (should be release in 2 or 3 days).

I'm afraid I won't have any time to fix it in YUV2 till the end of the week.

Sorry for this.

jarthel
12th November 2002, 00:54
I compared both temporalcleaner with 2DCleaner and temporalsmoother with 2DCleaner and temporalsmoother w/ 2DCleaner has a lot smaller filesize. Temporalcleaner w/ 2Dcleaner is 2mb smaller than jus using 2DCleaner.

Here are the 2 scripts:

------------ using temporalcleaner ------------
body=mpeg2source("d:\dvdrips\lodoss14\lodoss14.d2v").trim(0,40176).temporalcleaner(5,10).Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Decimate(cycle=5).crop(14,4,692,472)._2DCleanYUY2().lanczosresize(640,480)
return body
-------------------------------------------------

------------ using temporalsmoother ------------
body=mpeg2source("d:\dvdrips\lodoss14\lodoss14.d2v").trim(0,40176).Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Decimate(cycle=5).crop(14,4,692,472).temporalsmoother(5)._2DCleanYUY2().lanczosresize(640,480)
return body
-------------------------------------------------
jayel

jarthel
12th November 2002, 11:53
Originally posted by vlad59
In my opinion TemporalCleaner should come after Telecide and Decimate for maximum speed and quality.
But I never worked with NTSC movies.

FYI, Record of Lodoss War TV is an anime. :)

jayel

vlad59
12th November 2002, 12:08
Originally posted by jarthel
FYI, Record of Lodoss War TV is an anime. :)

jayel

I should have said NTSC source ;)
Because I knew about Record of Lodoss War, I encoded them a year ago and it was a pain in *** due to blend fields (bad NTSC->PAL conversion). Very good anime :)

jarthel
12th November 2002, 14:29
Originally posted by vlad59
I should have said NTSC source ;)
Because I knew about Record of Lodoss War, I encoded them a year ago and it was a pain in *** due to blend fields (bad NTSC->PAL conversion). Very good anime :)

The NTSC version has blended fields too. :(

jayel

ajp
18th November 2002, 11:41
Still one of my favourite filters, any updates planned? Only filter I've tried except Conv3d that reduces flickering/blocks in my digital tv-caps, only it does it much faster... :)

Thanks,

@jp

vlad59
18th November 2002, 13:25
I'm currently working on a YV12 version but for now it's slower :( .

I'm working on that.

ajp
18th November 2002, 13:56
Not that the current version doesn't work fine so far, it does. I just don't want the filter to die, it's such a great one. Conv3d and temporalcleaner are the ones I use the most... :)

I don't think I will try AVS 2.5 until it goes beta anyway.... ;)

Cheers,

@jp

vlad59
19th November 2002, 08:59
New Avisynth 2.5 version.

It will work with YUV2 and YV12 colorspace. YV12 processing is only a little faster (better than nothing ;) ).
When processing yv12 there shouldn't be any restriction on width (at least I haven't had any problem with it).

Another interesting feature is you can only process luma if you want (just put cthresh=0).

Hope you'll like it (http://membres.lycos.fr/tempask/TemporalCleanerYV12.zip)

ajp
19th November 2002, 10:05
Ooooh, that was quick! Now that there are YV12 versions of both Conv3d and TemporalCleaner I can switch to AVS 2.5... :)

I only convert DV to mpeg2 though so I will probably lose speed instead? Sometimes I feel that 2.5 is geared too much towards DivX/Xvid... :(

EDIT: I get an access violation in Avisynth when trying it in YV12 and in YUY2 I get a message saying it's YV12 only? Could be me, I've just installed AVS 2.5...

vlad59
19th November 2002, 10:52
Oooops it's my fault I messed up with debug and release build you can redownload the filter on the same link and it should work.

Sorry for this.

ajp
19th November 2002, 10:56
No worries! I will post some feedback later tonight...

Thanks! :)

@jp

MaTTeR
19th November 2002, 13:30
Woohoo...YV12 port appears to be working quite well here. I just finished a full first pass and noticed the speed is comparable to that of Conv3D_SMP. If anything, Temporal Cleaner might be about 1-2 FPS slower than Conv3D_SMP but that's like comparing apples to oranges I guess.

ajp
19th November 2002, 13:37
TemporalCleaner has always been quite a lot faster than Conv3D (non-SMP) for me...

vlad59
19th November 2002, 13:38
@MaTTeR

It isn't too surprising (Convolution3D is fast with SMP). With this filter working in YV12 colorspace is really harder than in YUV2.
If you got some time (I know, I know ;)) Can you try it with :
ConvertToYUY2()
TemporalCleaner ()
ConvertToYV12()

Just to check if YV12 is not slower than YUV2 for this case

Thanks in advance.

MaTTeR
19th November 2002, 14:49
vlad59,

I've got the tests setup in my queue, they should be finished by the time arrive back from work:) I agree with you though, I wasn't too surprised to see that C3D_SMP was indeed faster on my machines.

Wilbert
19th November 2002, 16:26
New Avisynth 2.5 version. It will work with YUV2 and YV12 colorspace.

I'm updating the faq. I'm very tired so I could easily have missed it, but where can I download this version?

vlad59
19th November 2002, 16:48
Hi Wilbert,

There is little "it" hiding the URL

cult
19th November 2002, 17:02
or here
http://membres.lycos.fr/tempask/TemporalCleanerYV12.zip

MaTTeR
20th November 2002, 13:43
From vlad59- ConvertToYUY2()
TemporalCleaner ()
ConvertToYV12()

vlad59,
It occured to me that I need to be present in order to really watch the performance so my testing proved useless yesterday. It might take me some time since I'm not always sitting here:)

Just to clarify, you did want 3 different tests with the above functions right?

TheUnforgiven
9th January 2003, 00:22
hi vlad,
link is down for the temporalcleaner_yv12.

vlad59
9th January 2003, 08:50
I'll post a new binary tonight.

Thanks for the feedback.

Dali Lama
12th January 2003, 05:15
Hi guys,

Does anyone have a copy of Temporal Cleaner for Avisynth 2.07?

The Link is down.

Thanks,

Dali

vlad59
13th January 2003, 08:36
Here we are, I just attached a zip with the latest avisynth2.0X and avisynth 2.5 version of TemporalCleaner (with of course the source updated).

As I'm currently at work I only was able to recompile it (no tests was done).

There's two dll in the zip
TemporalCleanerOld -> Avisynth 2.0X
TemporalCleaner -> Avisynth 2.5

Let me know if you have any problems with this.

jarthel
23rd March 2003, 14:16
Any updates? Thanks vlad. :)

jayel

unimatrixzer0
19th May 2003, 16:32
is there a working link for this filter?