Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th May 2008, 12:24   #1  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
AnisoTools v1.0 alpha 5

Hi,

http://manao4.free.fr/anisotools-v1.0a5.zip

It is a new set of filters that I'm working on. For the moment, there's only one filter, at_spatial, which is basically a spatial denoiser. It's slow, but not optimized yet (don't expect wonders from optimizations however).

You can have a look at the readme for more informations on the filter.

I release the filter at such an early stage in the development process mostly to have some feedback on it in some real case uses. Be aware that the filter is really tricky to configure.

The set might be extended later with a spatio-temporal denoiser (possibly mo-comped), and an inpainter.

Have fun.

Edited : updated link to the most recent version

Changelog : From v4 to v5 :
Code:
 @ fixed : random black pixels around black & white edges
From v3 to v4 :
Code:
 @ fixed : possible crash introduced in v1.0a3
From v2 to v3 :
Code:
 + added : proper documentation (avisynth's style)
 + added : per plane specific parameters
 + added : edge and motion protection formulas.
 @ fixed : support for edge = 0 or motion = 0.
From v1 to v2 :
Code:
 * renamed at_spatial into at_denoise
 * changed parameters influence
 + added temporal denoising
 + added motion compensated temporal denoising
 - added resolution restriction to mod 16 horizontally & vertically
__________________

Last edited by Manao; 13th September 2008 at 14:20.
Manao is offline   Reply With Quote
Old 5th May 2008, 22:20   #2  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
I'm a bit disappointed not seeing any comments / feedbacks.

Anyway, here's an alpha 2, which adds the mo-comped part to the algorithm. It got even slower, there's still no assembly, and now resolution must be a multiple of 16 both horizontally and vertically.

http://manao4.free.fr/anisotools-v1.0a2.zip
__________________
Manao is offline   Reply With Quote
Old 5th May 2008, 23:08   #3  |  Link
rfmmars
Registered User
 
Join Date: Feb 2004
Posts: 743
Quote:
Originally Posted by Manao View Post
I'm a bit disappointed not seeing any comments / feedbacks.

Anyway, here's an alpha 2, which adds the mo-comped part to the algorithm. It got even slower, there's still no assembly, and now resolution must be a multiple of 16 both horizontally and vertically.

http://manao4.free.fr/anisotools-v1.0a2.zip
Sorry, I will give it a go when time permits, thanks for your efforts.

Richard
photorecall.net
rfmmars is offline   Reply With Quote
Old 6th May 2008, 00:48   #4  |  Link
Malcolm
Registered User
 
Join Date: Sep 2002
Location: Germany
Posts: 352
Atm. i'm playing around with your filter (yesterday v1, today v2) and so far i think it's great. cannot tell more at this point.

Thanks a lot!
Malcolm
Malcolm is offline   Reply With Quote
Old 6th May 2008, 12:30   #5  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
hmm, crashes VDM on my AMD X-2, and errors out with an access violation on the quad P4 at work

this is with quicktime sources, converted to yv12 in the script, though i don't imagine that would make a difference.

should i track down a single core to try it on? or is that barking up the wrong tree?

btw, if it helps, virtualdubmod (on the AMD) seems to be getting the framecount before it disappears, at least judging from the seekbar appearing the way it does.

i'm eager to try this one out though. more inpainting tools are always welcome, as well as denoisers of all kinds
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 6th May 2008, 12:37   #6  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
I'm at work right now, so I can't test anything. I'll however emphasize a restriction that would make the filter crash :

resolution must be a multiple of 16 both horizontally and vertically.

Apart from that, I don't see what could make it crash. It shouldn't care about multi cores, nor cpu type.
__________________

Last edited by Manao; 6th May 2008 at 12:44.
Manao is offline   Reply With Quote
Old 6th May 2008, 19:27   #7  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
So Mug Funky, any news on your crash ? If your video is mod16, can you post your avisynth script and tell me the video's resolution, so that I can try to replicate the problem ?
__________________
Manao is offline   Reply With Quote
Old 9th May 2008, 04:10   #8  |  Link
predatorfreak
Registered User
 
Join Date: Apr 2008
Posts: 1
I like the direction this project is going and I've achieved some excellent results with the at_denoise filter, however, at the speed it runs, I can use MVDegrain3 and achieve better results. However, I am hopeful that as development continues, speed and quality will improve.
predatorfreak is offline   Reply With Quote
Old 12th May 2008, 16:19   #9  |  Link
Naito
Gleitz Team Member
 
Naito's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 22
I did a quick test with AnsioTools.

Setup:
  • ffdshow-tryouts 1926
  • HuffYUV (FFVH), Colorspace YV12, Predictor Median, Adaptive Huffman Tables: yes
  • DGMPEG 1.5.0 RC5, TIVTC 1.05
  • AnsioTools 1.0a2, TNLMeans 1.03
  • VirtualDUb 1.8 Beta
  • WinXP SP2
  • Intel E6600 @ 3,3GHz, DDR2-6400 @ 1.100MHz
Sample:
  • NTSC-DVD "Neon Genesis Evangelion - Rebuild of Evangelion 1.0 - You are (not) alone"
  • 9122 frames @ 23,976fps (6:20min)
.......

Quote:
Originally Posted by RAW
MPEG2Source("Cell Titel 06.d2v", cpu=0)
tfm(mode=4, slow=2, d2v="Cell Titel 06.d2v").tdecimate(mode=1).Crop(16, 16, -16, -16)

1.261,37 MB @ ~192fps


.......
Quote:
Originally Posted by AnisoTools
MPEG2Source("Cell Titel 06.d2v", cpu=0)
tfm(mode=4, slow=2, d2v="Cell Titel 06.d2v").tdecimate(mode=1).Crop(16, 16, -16, -16)

at_denoise(sstep=0.4, tstep=0.4, edge=0.4, motion=1, iterations=10, center=8)

946,54 MB (ca. -24,9%) @ ~3,76fps


.......
Quote:
Originally Posted by TNLMeans
MPEG2Source("Cell Titel 06.d2v", cpu=0)
tfm(mode=4, slow=2, d2v="Cell Titel 06.d2v").tdecimate(mode=1).Crop(16, 16, -16, -16)

tnlmeans(Ax=4, Ay=4, Az=1, Sx=2, Sy=2, Bx=1, By=1, ms=false, rm=4, a=0.6, h=0.15, sse=false)

1.056,29 MB (ca. -16,3%) @ ~0,47fps


.......

Image 5942_at (2nd picture AnisoTools) shows a bit of gradient. It could be definitively done better, with a little more testing and tweaking on my side. But overall, very good. ATM TNLMeans is my first choice denoising Anime, and he is slow as hell. AnisoTools my be become a very good counterpart. I definitively keep my eye on it.
_____

Really interesting is iterations. Unlike other filters, I can adjust the "speed" of AnisoTools (But keep in mind, it affects the denoising-quality!). I tried something like "How many time I spend AnisoTools" and then tweaked sstep & tstep.
Good to know would be rule of thumb between step and iterations.
_____

A little bug: "edge=0" crashes VirtualDub / MPC.
_____

Feature Request:
* A switch for luma/chroma-planes.
* A switch how many frames proceeded temporal. (Don't even know the number of temporal frames in my little test.)
_____

Question: Is AnsioTools thread-safe using it with SetMTmode()? AnsioTools use only one cpu-core.
__________________
Apologize for my English. | My PC

Last edited by Naito; 12th May 2008 at 16:25.
Naito is offline   Reply With Quote
Old 14th May 2008, 20:07   #10  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
New version's up : http://manao4.free.fr/anisotools-v1.0a3.zip

Changelog :
Code:
 + added : proper documentation (avisynth's style)
 + added : per plane specific parameters
 + added : edge and motion protection formulas.
 @ fixed : support for edge = 0 or motion = 0.
Naito : I'm afraid the gradients can't be avoided. Denoising creates them, since it removes dithering. TNLMeans also shows gradients, though they are less pronounced (perhaps because it denoises less).

The crash is fixed.

The rule of thumb between step & iteration is the following : if iteration isn't saturated (i.e, if raising iteration denoises more), then step * iterations constant should amount to roughly the same amount of filtering. Thus, 10 iterations with step 0.2 should be equivalent to 5 iterations with step 0.4.

I don't know how MT achieve threading, but I doubt at_denoise will be MT-friendly. It might work, but even if it does, it will most probably be slower.

Filtering is done recursively. The Nth iteration of the Kth frame is done using the Nth iteration of the frame K-1, and the N-1th iteration of the frame K+1. That means the filter uses implicitely 2N+1 frames temporally when filtering (thus, far more than any other filters).

@all :

Now that I expose the edge protection formula, I'm pretty sure you can achieve sharpening with that filter (though I'm clueless on how good/bad it can be).

Try to have "motion" as high as possible. With the same amount of denoising, temporal denoising should keep more details.
__________________
Manao is offline   Reply With Quote
Old 14th May 2008, 21:50   #11  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
You could work in 16+ bits and then reintroduce appropriate dither in the end when going back to 8 bits.
MfA is offline   Reply With Quote
Old 14th May 2008, 22:02   #12  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
I work in 16 bits internally. I don't want to add back dithering, because that encodes badly. Better add it at playback.
__________________
Manao is offline   Reply With Quote
Old 14th May 2008, 22:14   #13  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
What, it won't get fast enough to run during playback?
MfA is offline   Reply With Quote
Old 16th May 2008, 13:02   #14  |  Link
InTrancer
Registered User
 
Join Date: Oct 2007
Posts: 17
i try to load it but in avsp i have this errors

Code:
Traceback (most recent call last):
  File "AvsP.pyo", line 5819, in OnMenuVideoToggle
  File "AvsP.pyo", line 8925, in ShowVideoFrame
  File "AvsP.pyo", line 9467, in PaintAVIFrame
  File "pyavs.pyo", line 322, in DrawFrame
  File "pyavs.pyo", line 301, in _GetFrame
  File "avisynth.pyo", line 277, in GetFrame
WindowsError: exception: access violation reading 0x0644C000
Traceback (most recent call last):
  File "AvsP.pyo", line 7123, in OnPaintVideoWindow
  File "AvsP.pyo", line 9467, in PaintAVIFrame
  File "pyavs.pyo", line 322, in DrawFrame
  File "pyavs.pyo", line 301, in _GetFrame
  File "avisynth.pyo", line 277, in GetFrame
WindowsError: exception: access violation reading 0x0665C000
avs file
Code:
LoadPlugin("D:\Program Files\DGIndex\DGDecode.dll")
mpeg2source("H:\Kimi ga Nozomu Eien\DVD1\VIDEO_TS\s01.d2v", cpu=0)
ColorMatrix(mode="Rec.709->Rec.601", interlaced=false)
crop(4,0,-4,0)
at_denoise()
InTrancer is offline   Reply With Quote
Old 16th May 2008, 14:17   #15  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Quote:
resolution must be a multiple of 16 both horizontally and vertically
Quote:
Code:
crop(4,0,-4,0)
So try cropping after denoising
__________________
Manao is offline   Reply With Quote
Old 14th June 2008, 11:26   #16  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
Quote:
dss2("luminary_us480_logo.wmv")
lanczosresize(768,432)
at_denoise()
It explodes. AvsP just starts erroring like mad.

Happens with everything I've tried so far. Tried clearing plugins folder, doesn't help.
Comatose is offline   Reply With Quote
Old 30th June 2008, 19:23   #17  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
just noticed this filter, thnxs for all the efforts and time. Will try this one out when I get back to my place.

Regards
superuser is offline   Reply With Quote
Old 10th August 2008, 20:16   #18  |  Link
Naito
Gleitz Team Member
 
Naito's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 22
I have troubles using the Alpha3.

Alpha2 works flawless for all my encodes. But if I try to switch to Alpha3, it randomly crashes. No clue why (strict mod16). One extreme example: One DVD with 2 episodes. The first episode only works with Alpha2 (Alpha3 crashes), the second with Alpha2 and Alpha3. Both episodes have the same script. (Also tested with at_denoise() only, and it crashes in the middle of the lossless-encoding.)
Preview in AvsP works some time, sometimes it doesn't. Really weird.

I'm sorry I can't more precise about this case. It's (for me) a random error. I will try to perform some tests, if you can maybe specify some general conditions.

OS: WinXP SP2, AviSynth 2.5.7, AvsP 2.0.2, VirtualDub 1.8
___

Quote:
Originally Posted by Manao View Post
Changelog : From v2 to v3 T
+ added : proper documentation (avisynth's style)
BTW, within the zip form Alpha3 is only the old plain TXT from Alpha2.
__________________
Apologize for my English. | My PC
Naito is offline   Reply With Quote
Old 10th August 2008, 22:36   #19  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
You're not the first one to report such random crashes. I have never been able to reproduce them yet, even with a source crashing on someone else's computer, but the crash is more than probably at_denoise's fault. I'll check once more the code, perhaps (yet) another inspection will allow me to find the source of the problem.
__________________
Manao is offline   Reply With Quote
Old 14th August 2008, 11:03   #20  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 151
Great work Manao! I really like it!

Maybe this is off-topic but you say it works 16-bit internally, does this mean it would be easier to rewrite this for AviSynth 2.6 and process in 16-bit later on?
There are more filters/plug-ins that work 16-bit internal for avisynth?
anton_foy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:06.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.