Log in

View Full Version : AnimeIVTC() - All-in-one solution for interlacing and blending - v2.00 [2010-01-07]


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 22 23 24 25

Nightshiver
7th January 2010, 03:54
That's because EEDI2 doesn't exist in the current version of Animeivtc. Wait for the new version.

Undead Sega
7th January 2010, 04:38
Im pretty sure it does as it is in the docs itself. I could even use NNEDI2 if i wanted i think if i just replace all the EEDI2 functions in the avis.

thetoof
7th January 2010, 05:30
I had changed the parameters name in animeivtc v1.06, but not in the sharpaamcmod sub-function, the original names are kept.

thin = shpre
...
...

Check the original sharpaamc "fine anime antialiasing" thread, or in the script, or wait for the release...

nnedi2 doesn't have the same aa capabilities as it is more accurate than eedi2. See the "denoise in tv anime" thread. eedi3 combined with nnedi2 is nice though, but too slow for now.

thetoof
7th January 2010, 10:46
Here goes. Have fun and happy new year :p http://www.sendspace.com/file/jb3c3k

Funny how this has grown till this 830th post..

I finished this half asleep, so I'll wait a few days to be sure everything is alright before making it official.

2.00 Released 2010-01-07 by thetoof

* Compatibility with MVtools2
* Compatibility with srestore for field blended
* New (and better) decimation for dht
* The user will determine the end frames of every sections in case of progressive/interlaced credits and the rest will all be done internally (no need to switch between the checks since it was a pain)
* Handling of the blend-decimation of hybrid sections in omode=1
* More aa and killcomb options
* New parameter to fix chroma swap between fields
* New parameter to fix blend telecine
* New parameter to fix interlaced fade-ins
* The modes are "re-thought" : mode=1 (hard telecine) mode=2 (field blended) mode=3 (double hard telecine) mode=4 (hybrid) At the moment you define a frame # for interlaced or progressive credits, the function adapts itself
* Memory usage decreased for a few modes
* No need to specify the region of your source (done internally) Single parameter added (bool "normconv") to go from one to another
* More accurate external pelclip with nnedi2 for optimal motion vectors calculation
* Rewriting of the function from scratch (I had patched with a few tricks here and there which made it harder to read. It's almost all gone now)
* Maybe a few other things I'll add when I remember what I changed in the last year or so ;)

ShocWave
7th January 2010, 20:18
Amazing! Mode=1 is more than 10 times faster for 1080i.
I'm not sure if mode=2/3 are working for that high of a resolution though. It seems to be only displaying 1 field throughout the whole movie, and jaggies are everywhere.

Nightshiver
7th January 2010, 21:53
For the other modes, you need the correct "problems" for it to work. As I understand, practically all Blu-ray's are progressive or soft telecine, unless the HD video has been home captured.

Undead Sega
8th January 2010, 06:22
To thetoof and Nightshiver, thanks very much for all the help, it has given me the ability to show you (so-far) The Vanishment of Haruhi Suzumiya in 1080p24:

http://www.megaupload.com/?d=YCT0FKGW

Hope its not too much to ask and its not perfect yet of course :D

ShocWave
8th January 2010, 06:43
I ran a few tests to compare v1 and v2 of the scripts, and included a few screenshots below.

Does v1 do line darkening and sharpening by default? It seems the lines are much smoother and detail is sharper compared to v2, especially on 1080i.

Look under the pink-haired girl's chin and the guy's eyebrows where the difference is most apparent.

1080i (mode=2 not possible in v1)
http://pixtube.eu/files/xmrvvgrgtys183yhsj61_thumb.png (http://pixtube.eu/viewer.php?file=xmrvvgrgtys183yhsj61.png)
http://pixtube.eu/files/zb6h1xe5judrizfpgq1k_thumb.png (http://pixtube.eu/viewer.php?file=zb6h1xe5judrizfpgq1k.png)
http://pixtube.eu/files/9qrdzchskgy84n3x53j6_thumb.png (http://pixtube.eu/viewer.php?file=9qrdzchskgy84n3x53j6.png)
http://pixtube.eu/files/nwqawbuxj4mfs7axzsnk_thumb.png (http://pixtube.eu/viewer.php?file=nwqawbuxj4mfs7axzsnk.png)

480i
http://pixtube.eu/files/gf6rawj782gwn6ycid7h_thumb.png (http://pixtube.eu/viewer.php?file=gf6rawj782gwn6ycid7h.png)
http://pixtube.eu/files/1ag9o760ex0tad40iy5r_thumb.png (http://pixtube.eu/viewer.php?file=1ag9o760ex0tad40iy5r.png)
http://pixtube.eu/files/2g7mjwlvykuy7zqbcqv0_thumb.png (http://pixtube.eu/viewer.php?file=2g7mjwlvykuy7zqbcqv0.png)
http://pixtube.eu/files/a2zoieabofburr4xzv3h_thumb.png (http://pixtube.eu/viewer.php?file=a2zoieabofburr4xzv3h.png)
http://pixtube.eu/files/ysxf3c9cqpv9zw3t6a5q_thumb.png (http://pixtube.eu/viewer.php?file=ysxf3c9cqpv9zw3t6a5q.png)

thetoof
8th January 2010, 14:17
For some reason I could see the pictures 30 mins ago... but now I can't.

Here's what I remember seeing:
-FullHD version of the anime is meaningless, as it is badly upscaled SD content. You may warpsharp like crazy (as v1 did) so that the lines actually *look* like lines instead of... the mess they are now, but I personally wouldn't do that.
-Some defaults were changed because warpsharpening was way too strong. Tweak thin= (80 before, now 10) and then dark= if you still need more line darkening.

edit: Undead Sega, oversharpened (oil painting look) + banding, but this is becoming OT.

Vitaliy Gorbatenko
9th January 2010, 10:03
Thank you, thetoof! Great job!

Undead Sega
9th January 2010, 19:31
@thetoof, you are probably right, can you tell me if this is any better?

http://www.megaupload.com/?d=W5FTSXLO

i believe it is :D

thetoof
9th January 2010, 20:19
Yes, it is.

Undead Sega
9th January 2010, 21:00
Excellent :D

in your opinion, how does it fare with it being a 1080p source? or like other upscaled material from youtube or in general perhaps? anything really, any improvements?

Honestly, wat gave the previous attempt that oilpainting look was use to the fact of using aa=4 i.e. sharpaamcmod(). Also in order to get a good result like this, it takes some experimenting in a way, as in that in which order should one do the filtering process like Dehaloing, Deblocking, Debanding, Denoising and upscaling, and which method of antialiasing should be used.

P.S. I see you've added NNEDI(2?), how does that compare to EEDI2?

thetoof
9th January 2010, 21:28
For 1080p, it's utter crap. The level of detail is nothing close to what it could/should be (i.e. the upcoming Blu-Ray source). This is SD quality, at best. I only helped since you said if was to "experiment" on, as in for learning purposes. You can't hope to recreate details lost in youtube's compression, only make artifacts less apparent.

I guessed it was because of aa=4, which is quite aggressive on sharpening, especially warpsharpening (now less than before... but still), but I'll use this opportunity to remind you that it is meant to be an antialiasing function, not a general sharpening one. Basic explanation in simple terms, not necessarily the most accurate, but only used to explain the "general" purpose of each processing step in. Somewhat vague and overly simplified, I am aware...
-crazy warp sharpening when aliasing is present in elements that are widely spread to make them thinner + toon to darken to prevent a bit of sangnom's damage (if it remained widely spread, sangnom's blur would be more apparent)
-sangnom aa, which is a detail killer - blurs a lot
-lsfmod to try to compensate for sangnom's damage
-mdegrain to average all that if the edges are unstable
-edge directed to avoid screwing up the rest of the image

In short, it is maa() with a few other filters trying to compensate for each other's poison. Like grandmas taking pills to help with nausea caused by a medic for blood pressure caused by a medic for leg cramps. At some point you realize there is no point taking any in the first place and you go out for some exercise.

Where did I add nnedi(2?)?

Undead Sega
9th January 2010, 21:52
well i would agree with you that its not the best 1080p due to the original source where it came from where alot of detail most likely have been lost originally. However im hoping u would agree that it is better than the original source itself, besides for the upscaling, its 'restoration' makes it slightly superior. For a HD source it is not the best but maybe a good attempt? I think slightly more can be done but what lets it down abit is from the result of the title cards against the black background, when using the dehlo function, it works very well on the image but with those it smudges it abit.

I am aware that aa=4 is purely for AA and i never attempted to usr it for sharpening, however there is one time where i did sharpen the source with aa=4 to see how it looks like, i thought it was abit too much with this mode as a inclusion. I never use sangnom, i dont why it still exist :D As for the others, it is something i am going to have to experiment itself one day but ur explaination helps :D

Sorry, i meant NNEDIAA ?

thetoof
9th January 2010, 22:42
-Good attempt at restoration, yes. Use trim then to use dehalo only where you want...
-Sangnom does similar results than eedi2 when it comes to aa (especially in sharpaamc), only a lot faster.
-Where do you see nnediaa? Read the two threads I referred you to 3 days ago to see why eedi2 is used and not nnedi. In short, eedi2 is less accurate, so it "averages" the lines, thus corrects aliasing in some cases, while nnedi2 correctly reproduces the imperfections (when image has aliasing), which can be details when no aliasing is present in the source.
If you're talking about daa(), it's actually another approach by Didée that has always been in AnimeIVTC.

Undead Sega
10th January 2010, 00:05
-Good attempt at restoration, yes. Use trim then to use dehalo only where you want...

Indeed, however upon looking at both files, the original and HD restored on my 42inch HDTV, it is a tiny bit softer due, but wat i think is most evident and what probably causes this softness is, when looking closely at some edges, there is a small noticable color bleed, i dont know wat is the correct term, however its like if the colour was pouring out abit of its destinated area.

-Sangnom does similar results than eedi2 when it comes to aa (especially in sharpaamc), only a lot faster.

Ahhh okay then, but does eedi2 contains somesort of blur itself? Now sharpaamc() does provide nice results and retains the look of the animation's lines, but it indeeds smooths alot especially parts of the frame that is not needed, which results in that oilpainting look that u have said, if only there was a way for it to only affect the hand drawn lines and not 'everything' :D

Read the two threads I referred you to 3 days ago to see why eedi2 is used and not nnedi. In short, eedi2 is less accurate, so it "averages" the lines, thus corrects aliasing in some cases, while nnedi2 correctly reproduces the imperfections (when image has aliasing), which can be details when no aliasing is present in the source.

that is very interesting, its like the imperfection of the filter is the desired effect that we are all after :D

- Very good combing removal and anti-aliasing functions (can be called externally as nnediaa() daa() maa() or sharpaamcmod())

nnediaa() is what i meant :D

thetoof
10th January 2010, 00:12
if only there was a way for it to only affect the hand drawn lines and not 'everything' :D
Hmm, actually there could be a way. Now it's only using a basic edge mask... but it could be possible to use an additional mask to target only dark edges (lines).

I'll consider implementing this.

edit: Oh that! I wrote this part of the post for 1.00 when I thought that since nnedi was more accurate it should be better. (I was corrected as you have seen in the two threads and changed it back).

Undead Sega
10th January 2010, 02:03
wow i didnt know such a thing could actually be possible! :D but wat avisynth filter actually does such a thing? If that was the case, then it will definately make the footage more like if it was at a better definition, as well as if u agree that it was aa=4 that gave the oilpainting look on the backgrounds but everything else like the characters etc. looked fine?

thetoof
10th January 2010, 02:21
With a combination of masktools functions (mt_lut, mt_logic....).
Your 1st version was bad, the new one is fine. Now, I would like to stop discussing this here since it is out of the scope of this thread. Thanks.

Undead Sega
10th January 2010, 02:26
Indeed, i understand what you mean exactly, i am appreciative of your help in this, and i would like such a feature on wat was discussed briefly to be included.

However, after some research i came across a filter called mfToon, which is apprantly "the god of anime sharpening". Does this ring any bells to you or would u happen toknow if its still a recommended filter?

thetoof
10th January 2010, 02:43
Yes, I know about it. It is old, but performs what you want - dark, thin and sharp lines. I would prefer doing all those externally with our current tools (awarpsharp2, toon and lsfmod) which can be tweaked easily for great results.

I will not answer any more questions about anything that has nothing to do with what AnimeIVTC is meant to correct.

There are plenty of other threads for that, or you could create one so that people can help you.

Overdrive80
12th January 2010, 01:17
Hi, thanks for your updated filter. I collected updated filters for animeivtc in this file.

http://www.mediafire.com/?nydyyqqyqhq


Bye

thetoof
12th January 2010, 04:00
Looking good. Thanks!

Agarsen
14th January 2010, 14:13
Hi, in the previous version i often used:
AnimeIVTC(mode=1,aa=4,mt=true)

MT was meant to use alla cores of the CPU, but this version doesn't recognize it anymore :/

thetoof
14th January 2010, 17:45
I judged the improvements of mvtools2 more important than the mt capabilities of josey_well's mt version and removed that option. There is an explanation of how to multithread animeivtc differently in the guide. Post if you need help with it.

Great Dragon
15th January 2010, 09:25
First of all thanks for the such a great script, thetoof.
But i have a little problem. If i enable "ifade=true" i have an error: "I don't know what "sfthr" means (blah-blah-blah, line 151)". Any suggestions?

thetoof
15th January 2010, 10:31
*facepalm*

replace
ifade = aa==2 ? false : ifade

by

ifade = aa==2 ? false : ifade
sfthr = default ( sfthr, 0.4 )
sfshow = default ( sfshow, false )

and
function AnimeIVTC (clip i, int "mode", int "aa", int "precision", int "killcomb", int "cache", bool "ifade"\
by
function AnimeIVTC (clip i, int "mode", int "aa", int "precision", int "killcomb", int "cache", bool "ifade", float "sfthr", bool "sfshow"\

sfthr is the threshold used by smartfademod to detect interlacing (too low=function might miss some interlaced sections, too high=correction could be applied on sections that don't need it) and sfshow true/false is to see the values on screen to properly tweak sfthr.

Will fix in the next version... for now please edit the script.

Great Dragon
15th January 2010, 11:49
Another issue after replacing: "I don't know what "show" means". line 497, line 153.
After i've changed in 497 line
show = default ( show, false )
to
show = default ( sfshow, false )

i got this: "I don't know what "c" means. Line 504, 153

PS: Maybe it's not right, i don't know. I'm not very familiar with complex scripting.

thetoof
15th January 2010, 11:57
function smartfademod(clip clip, float "sfthr", bool "sfshow", int "cache") {

global sfthr = default ( sfthr, 0.4 ) # Threshold for fade detection.
show = default ( sfshow, false )

Great Dragon
15th January 2010, 15:40
function smartfademod(clip clip, float "sfthr", bool "sfshow", int "cache") {

global sfthr = default ( sfthr, 0.4 ) # Threshold for fade detection.
show = default ( sfshow, false )

This is exactly what i've done and got a "c" error.

thetoof
15th January 2010, 21:06
function smartfademod(clip c,
As you may have noticed, this option somehow ended up untested after being modified and I was unable to do so until now. Sorry for the trouble.

Overdrive80
17th January 2010, 00:13
Hi, post old script of release than do it, for a web.

a=DGDecode_mpeg2source("E:\DB_1\ope\ope.d2v", info=3)
b=DGDecode_mpeg2source("E:\DB_9\54\54.d2v", info=3)

a+b

ColorMatrix(hints=true, threads=0)

crop( 8, 0, -4, 0)

#FILTRADO

SharpAAMCmod(dark=0.25, thin=10, sharp=100, smooth=100, stabilize=true, tradius=1, aapel=4, aaov=8,\
aablk=16, aatype="eedi2")

MT("FFT3DFilter(sigma=2,bw=32,bh=32,ow=16,oh=16,plane=0,sharpen=0.6)",threads=6)


MT("TBilateral(diameterL=5,diameterC=5,sDevL=1.300,sDevC=1.300,iDevL=7.000,iDevC=7.000,\
csL=1.000,csC=1.000,d2=false,chroma=true,kernS=2,kernI=2,resType=0)",threads=6)

My question is: how i use multithread mode in new version animeivtc? I dont understand the example, excuse me.

Have i create as many scripts as parties to divide the video?

tengo6dedos
17th January 2010, 00:38
Hello, can you tell me what exact line you used to subtitle like this the image, words hard telecine and ivtced

http://img140.imageshack.us/img140/5674/ht1224lqro7.jpg

Thanks

thetoof
17th January 2010, 02:36
At the time... Photoshop ;)
But you can easily do it via Subtitle. Quickly looking at http://avisynth.org/mediawiki/Subtitle, here's what you can find:
top left is align=7
size=x to customize at your will
text_color= search for hexadecimal color values, something like $00FF0000 should do the trick

Overdrive80, please have a look at this post and tell me again if you need help to understand. http://forum.doom9.org/showthread.php?p=1364489#post1364489
and yes to the question at the bottom of your post.

Overdrive80
17th January 2010, 16:19
Hi, more or less i understand the example, have hard head jeje.

I attach files for you can review its. Thanks.

Other question: Could i execute, for example rendering1 and 2, at the same?

Excuse me for my english.

PD: I attach too guide in spanish for animeivtc 2.00. ^^

fleon
17th January 2010, 18:28
Hi, thetoof I have noticed that you have released a new version of AnimeIVTC() does this new version fixes RSvolcom problem and my problem? (I think the problem was double chroma blends) if your actual release fixes the problem can you tell me the steps that I should folow with megui to fix the problem? in any case here is a sample http://www.mediafire.com/?wmlmitymo3j and also below are the old posts where I asked for your help and you told me that maybe in the next version of AnimeIVTC you would fix that.



You have the same problem as RsVolcom. You can follow the development in this thread: http://forum.doom9.org/showthread.php?p=1208543#post1208543
The "fixable" thing he's talking about is your issue.


Hi I wanna try animeivtc with a film that I own it is Daft Punk's Interstella 555, Megui tells me that the the source is Hybrid film/interlaced. Mostly insterlaced, and also says that the field order is top field first,
and mediainfo tells me this

http://img159.imageshack.us/img159/6247/98935747mk5.th.jpg (http://img159.imageshack.us/my.php?image=98935747mk5.jpg)http://img159.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)



So what settings should i use in animeivtc?

thetoof
17th January 2010, 18:38
The setting using chroma_rep() (written by MOmonster for this issue) is chrfix=true. However, the function seems broken for some reason... I'll use your sample to ask him for help.

and btw, at the time I called it some sort of blend, but it's actually a chroma swap between fields.

Overdrive80
18th January 2010, 01:24
Hi, more or less i understand the example, have hard head jeje.

I attach files for you can review its. Thanks.

Other question: Could i execute, for example rendering1 and 2, at the same?

Excuse me for me english.

PD: I attach too guide in spanish for animeivtc 2.00. ^^

Is it possible that the script with "b" only has one frame? Because I get it.

thetoof
18th January 2010, 02:22
It's possible, but it's not ideal :p

The principle is very simple - you split you source in x files of equal length to process them separately. More HDD in use = better since it removes some workload on the one your source is on.

So, after animeivtc, write something like this:

a=trim(0,x)
b=trim(x+1,y)
c=trim(y+1,0)
a

Load this file in vdub and start a rendering pass (fast recompress, compression=YV12 Lagarith). Then change a to b and open the new script in another instance of vdub, start another rendering pass. etc etc etc. So, you'll have multiple versions of the same script (but processing different sections of your clip) in multiple vdubs running at the same time, ideally reading/writing on different drives. You can also split the source before processing to prevent HDD deadlock. This way, you "multithread" your filtering by running multiple single theaded processes at the same time.

Vitaliy Gorbatenko
18th January 2010, 04:36
At long film I doing just that =) Short series (~ 25 minutes) put in parallel at once 3 files. logarith codec on 1280x960 x3 files by 25 min eat ~52 Gb.

Overdrive80
18th January 2010, 05:37
Ok, i understand and edit the example:


s=(...)
threads=3

a=s.trim(0,(framecount(s)/threads))
b=s.trim((framecount(s)/threads)+1,((framecount(s)+(framecount(s)/threads))/(threads-1)))
c=s.trim((framecount(s)/threads)+((framecount(s)+(framecount(s)/threads))/(threads-1))+2,0)

a

or more simple

s=(...)
Threads=3
x=(framecount(s)/threads)

a=s.trim(0,x)
b=s.trim(x+1,2*x)
c=s.trim((2*x)+1,0)

a

For "m" threads, where m=1,2,3..

Tomorrow, use it. Thanks you very much.

edit3: i correcting the codes, i use and its functional.
bye

iisdev
18th January 2010, 10:48
I'm having a little trouble using AnimeIVTC with Record of Lodoss War (OVA). If anyone that has encoded the OVA episodes can share their avs script I would appreciate it. This is what I'm currently using. It's close but some blended frames still keep creeping in.

DGDecode_mpeg2source("C:\Record of Lodoss War\01\VTS_01_1.d2v", info=3)
ColorMatrix(hints=true, threads=0)
AnimeIVTC(mode=2,bbob=4,degrain=3,normconv=true,aa=0)

Thank you!

tengo6dedos
18th January 2010, 18:33
At the time... Photoshop ;)
But you can easily do it via Subtitle. Quickly looking at http://avisynth.org/mediawiki/Subtitle, here's what you can find:
top left is align=7
size=x to customize at your will
text_color= search for hexadecimal color values, something like $00FF0000 should do the trick


Yes im aware of subtitle but it is ugly for my taste, thanks anyway.

n2k3
19th January 2010, 00:11
It seems when specifying aatype="EEDI2" when using aa=4, it expects an int, while further down it expects a string. According to the documentation its should also be a string.
replacing (line 14)

, float "dark", int "thin", int "sharp", int "smooth", bool "stabilize", int "tradius", int "aapel", int "aaov", int "aablk", int "aatype"){

with:

, float "dark", int "thin", int "sharp", int "smooth", bool "stabilize", int "tradius", int "aapel", int "aaov", int "aablk", string "aatype"){

seems to have fixed this.

-------------------------

when using mode=1 and precision=1 it's giving me the error

TFMMP: clip2 does not have the same number of frames as the input clip!
line 152

-------------------------

also, when specifying killcomb=0 (or nothing, because its the default) it still seems to remove combed frames?

And I'm glad you picked this up again ! :)

thetoof
19th January 2010, 01:52
edit3: i correcting the codes, i use and its functional. Good work.

It's close but some blended frames still keep creeping in.Maybe you don't need normconv=true (if your input is NTSC, it'll add a frame per second, which could be the source of the remaining blends). A 10mb max m2v sample with a lot of motion would be best.

Yes im aware of subtitle but it is ugly for my taste, thanks anyway.You can always have a look at aegisub... easy to typeset, style and import.

it expects an int, while further down it expects a string. According to the documentation its should also be a string.Well spotted and corrected. Thanks.

when using mode=1 and precision=1 it's giving me the errorBad copy paste.
\ (precision==1 && usefm) ? blend ? debprep.srestore(omode="pp1") : i.tfm(slow=2,clip2=i.tdeint(2)) :

also, when specifying killcomb=0 (or nothing, because its the default) it still seems to remove combed frames?I really don't see how. I guess the clip simply didn't have any remaining combing after field matching.

And I'm glad you picked this up again ! :)Was about time :p

BUFU
21st January 2010, 01:37
@ thetoof. Thank you for this great script of yours. Kudos.
There is this anime I really want to encode, but can't seem to find the right settings for it.
The source is : Hybrid partially Film / Mostly Interlaced. This great anime is called Great Teacher Onizuka. R1 DVD Source.
Any help on this would be much appreciated.

Thnx in advance.

Nightshiver
21st January 2010, 01:45
Post a sample, as always. And never trust in the "auto detection" of MeGUI, it is far more accurate to find out by your own means. Bust as before, please post an unprocessed short sample/clip.

BUFU
21st January 2010, 02:17
Sample Great Teacher Onizuka : http://www.megaupload.com/?d=H9GCIT1D

thetoof
21st January 2010, 03:37
It depends ;) http://forum.doom9.org/showthread.php?p=1362315#post1362315

btw, Stephen R. Savage, this is the same as animeivtc(mode=2,bbob=4)