View Full Version : TDeint and TIVTC
osgZach
16th March 2014, 18:20
CRC error usually means your metrics do not match your file or something like that.
Try removing the hybrid=2 in your first pass? If its just metrics it shouldn't be used anyway, if I understood the manual correctly.
Or perhaps it has something to do with the way you are using nnedi3 as your clip2?
edit:
I tested out your commands, running a first pass in Vdub (analyze video)
And then a 2nd pass as a rendered output.
Didn't get any CRC errors with the source clip I used.. Maybe its your source filter? Are you using DirectShow or something? It's possible you might not be getting frame accurate input that is being altered in some way?
turbojet
16th March 2014, 21:36
Did the first command (1 pass vfr) work for you?
According to readme, hybrid is ignored in mode=4 so that shouldn't be an issue but can be removed.
I usually use DSS2 but changing to lsmash had no effect, the error had identical crc's.
If tfm(output=matches.txt) and tdecimate(tfmin=matches.txt) are removed it works. Readme says tfmin is required for mode 5 but it runs without however the output is still interlaced. When working with 60p sources I never use tfm and vfr works fine then.
Somehow 2 pass is working now, I removed clip2=nnedi3() which didn't work on the first try but did on the second try. Now timecodes don't match the video.
osgZach
19th March 2014, 14:16
Well like I said, yes both passed worked fine for me.. exactly as you had posted them. If you were referring to something else ( different mode) I didn't test that.
I'm not familiar with Lsmash or DSS2, but generally when I am working with telecined content my sources are DVD's so I always index with DGindex and decode w/ the .d2v output and dgdecode.
If the source file isn't mpeg/can't be indexed I'd try getting it into an intermediate AVI container. If it needs to be decombed/deinterlaced you could just bob it with a good filter like QTGMC, or TGMC_mod, with a .SelectEven() and then save that output. Then run 1stpass stats for Tdec on the intermediate AVI, then run your 2nd pass to another output (intermediate for more filtering, or straight into your output like x264, etc) to see if you could get your VFR that way?
I haven't tested this, but I would assume it would work to some acceptible degree
turbojet
20th March 2014, 22:49
I was able to get 2 pass vbr working. The mismatched frame count of timecodes file and video was an issue of calling mp4fpsmod, it works fine in an mkv.
With single pass after stripping the function I was able to get an understandable error, instead of a crash. It needs linear access but I haven't manage to get that. Tried ffvideosource(seekmode=-1 and 0) directshowsource(seekzero=true,seek=false) both are supposed to give linear access. Couldn't find a way to get it with lsmash or dss2, my preferred source filters. Any ideas?
osgZach
22nd March 2014, 01:46
Try Vdub with ffmpegsource or DirectShow input drivers.
These days when I process Blurays that's what I use (ffinput driver) to load the source files for filtering with Neat Video
turbojet
23rd March 2014, 22:01
It must have been an issue with the source. This worked fine on a few other sources:
DSS2("source.mpg",preroll=60, lavd="hm1")
TFM(clip2=nnedi3())
a=last
crop(0,0,0,-height/6).TDecimate(mode=3,clip2=a,hybrid=2,mkvout="timecodes.txt")
turbojet
1st April 2014, 00:24
Since development seems to have ceased years ago, I don't know how much this will help. I came across a clip that tivtc removes the wrong frames but decomb and madvr ivtc remove the correct ones. It's a typical 3:2 pattern http://180upload.com/jeqngmb3uy7p. It is a little crude, basic cable, best not to listen to at work or around kids.
Guest
1st April 2014, 00:29
Since development seems to have ceased years ago, I don't know how much this will help. I came across a clip that tivtc removes the wrong frames but decomb and madvr ivtc remove the correct ones. It's a typical 3:2 pattern http://www.mediafire.com/download/z5kgg4ysc9j3a60/tivtc_issue.mpg. It is a little crude, basic cable, best not to listen to at work or around kids. The link does not work for me. Please correct it only if it doesn't violate rule 4, no profanity. Thank you.
turbojet
1st April 2014, 06:05
Mediafire filter doesn't comply with fair use, uploaded it to another site and updated it. It's only talk of human anatomy.
Okeeffe1881
15th August 2014, 07:45
I use this script
DirectShowSource ("F: \ Asi - Against Destiny \ ASI \ Asi - Against Destiny Ep 2 RoSuB HD.ts", fps = 25.000, convertfps = true, audio = true) .ConvertToYV12 ()
Video format is .ts video resolution is 1920x1080i and want to conver it in 1920x1080p and I want to delete Interlaced
Any idea?
LigH
15th August 2014, 18:22
Don't do that. After using DirectShowSource(..., convertfps=true ...), the previously existing field/frame structure will be destroyed so that no deinterlacer will work anymore. Serious AviSynth users will always try to prefer native AviSynth source plugins, and avoid norm conversions if applicable. Most modern HD TV sets will adapt to all available TV norms.
Okeeffe1881
16th August 2014, 11:34
Can you please tell me in more detail, or link with more information.
Thanks
LigH
16th August 2014, 16:03
If I knew you would understand German, I would link you to "exotisches Interlacing" by scharfis_brain; unfortunately, I don't know which similarly comprehensive explanations of interlacing and good or bad norm conversions exist in English... In brief: If you really have regular interlacing you want to remove, ensure that your source will be read as exactly as possible; DirectShow cannot guarantee that, there may be decoders which already try to "deinterlace" with very bad-because-fast algorithms...
DirectShowSource is disfavoured by AviSynth purists for many years now. Hard to miss so many threads about the disadvantages of a source filter relying on unreliable sets of filters every user may have a different set of and different settings of.
Preferable alternatives should be: L-SMASH Works as free-of-charge software-only solution, or DGDecNV as unexpensive interface to the hardware decoder chip of Nvidia cards generation 8+.
PeterYu
11th September 2014, 13:59
The cArray's size is 4 times the block number not equal to block number.
"cArray = (int *)_aligned_malloc((((vi.width+xhalf)>>xshift)+1)*(((vi.height+yhalf)>>yshift)+1)*4*sizeof(int), 16);"
in TFM.cpp, corresponding in TFMYV12.cpp, TFMYUY2.cpp
"cArray[temp1+box1+0] += sum;
cArray[temp1+box2+1] += sum;
cArray[temp2+box1+2] += sum;
cArray[temp2+box2+3] += sum;"
Can someone please tell me why?
Thanks!
StainlessS
11th September 2014, 15:38
@ Ligh,
Here's the best I can do (EDIT: English Translation) for "'exotisches Interlacing' by scharfis_brain" (exotic Interlacing),
Probably a temporary link:
EDIT: LINK REMOVED:
Several links included in zip (120KB).
EDIT: See DATA Folder via Mediafire Link in sig below this post.
Will now be permanently available.
LigH
11th September 2014, 19:58
:eek: :thanks: Great, I am impressed how much leisure time you had... :cool:
StainlessS
11th September 2014, 20:50
I did it about 2 years ago, I Asked S_B if he minded if I posted it (PM or post in thread, cant remember), never got a reply so left it.
Hardest part was aligning all of the symbols and letters representing frames, they were all over the place after Google translation.
Corrected what I could but was lost for the meaning of some sentences.
StainlessS
19th September 2014, 16:25
Exotic Interlacing (English translation) by Scharfis_Brain will now be available via my Mediafire account (in sig below this post) in the DATA
folder. Has had 57 downloads so is quite popular, perhaps a good candidate for the Wiki if someone could correct
any mis-translations and fix the sentences that I could not figure out.
Link deleted in post #1266 above.
turbojet
17th October 2014, 19:17
Would anyone be so kind as to add dgi support to tfm's d2v parameter? It would speed things up and overcome some potential ivtc issues.
I don't want to minimize the workload but there's only a few instances of d2v outside of tfmd2v.cpp. I don't think vast c++ knowledge is needed, just a bit more than I have which is almost none.
If something is needed feel free to ask. TIA.
Sparktank
17th October 2014, 19:49
Would anyone be so kind as to add dgi support to tfm's d2v parameter? It would speed things up and overcome some potential ivtc issues.
I don't want to minimize the workload but there's only a few instances of d2v outside of tfmd2v.cpp. I don't think vast c++ knowledge is needed, just a bit more than I have which is almost none.
If something is needed feel free to ask. TIA.
+1 for DGdecNV support.
I just emailed tritical and he currently has no plans to update TFM himself.
I'll ask to see if ex-Neuron knows much to help with this.
Seedmanc
27th July 2015, 00:54
Doesn't 100fps.com do a better job at explaining interlacing? At least compared to autotranslation from a foreign language that we have here.
ChiDragon
27th July 2015, 07:08
The "exotic interlacing" page explains norm conversions, not just interlacing. And 100fps.com misdiagnoses some things like improper 4:2:0 conversion.
Sparktank
13th September 2015, 06:44
DGdecNV support aside, any chance of a modern update with something newer then 2003?
Avisynth Info Tool 1.3.1 gives error: R6034
C:\AVS\AVS_Ver\AVS260_MT\plugins\TIVTC.dll
Timestamp: January 17, 2008, 14:01:48
MD5 Hash: 0416E3D06AD70685C6ECE448713928AE
DLL Dependencies: KERNEL32.dll
Linker version: 7.10 (VS2003)
Plugin version: AVS 2.5 Plugin
FILEVERSION: 1.0.5.0
PRODUCTVERSION: 1.0.5.0
Language: English (United States)
Comments:
CompanyName:
FileDescription: TIVTC v1.0.5 for Avisynth 2.5.x
FileVersion: 1, 0, 5, 0
ProductVersion: 1, 0, 5, 0
InternalName:
LegalCopyright: Copyright (C) 2004-2008 Kevin Stone
LegalTrademarks:
OriginalFilename:
PrivateBuild:
ProductName:
SpecialBuild:
I got every version of MSVS redistributables installed. Error only happens when using AIT but no errors while actually using it in anything else.
Groucho2004
13th September 2015, 09:29
Avisynth Info Tool 1.3.1 gives error: R6034
...
Error only happens when using AIT but no errors while actually using it in anything else.
Please try this version (https://www.dropbox.com/s/h2bl44k2f6u00dx/AVSInfoTool.7z?dl=0) of AIT.
Sparktank
13th September 2015, 09:33
Please try this version (https://www.dropbox.com/s/h2bl44k2f6u00dx/AVSInfoTool.7z?dl=0) of AIT.
Still has r6034 error. :(
Groucho2004
13th September 2015, 09:38
Still has r6034 error. :(
Please post both AIT logs. I can't reproduce this. Have you tried with just that DLL in your auto-load directory?
Groucho2004
13th September 2015, 10:54
DGdecNV support aside, any chance of a modern update with something newer then 2003?
Here it is (https://www.dropbox.com/s/mchng7jokx0wwn8/TIVTC.7Z?dl=0) built with VC10. You'll need the runtimes for VC2010.
Sparktank
13th September 2015, 10:55
I got every version of MSVS redistributables installed. Error only happens when using AIT but no errors while actually using it in anything else.[/QUOTE]
So I isolated and it turns it really wasn't tivtc. It was "toon".
I even downloaded and re-installed the redist but it just went through so quickly I don't know if it actually installed.
Avisynth info log: http://www.mediafire.com/view/ajzlcw6j6pw3kat/AvisynthInfo.txt
Full plugin info: http://www.mediafire.com/view/971sdh9yprhc5fl/AvisynthPluginInfo.txt
Isolated DLL's for just Toon + AwarpSharp2: http://www.mediafire.com/view/c77ieaul1qhxrik/AvisynthPluginInfo_isolated.txt
This is the one I had downloaded, Toon v1.1
http://avisynth.nl/index.php/Toon
Sparktank
13th September 2015, 10:58
Here it is (https://www.dropbox.com/s/mchng7jokx0wwn8/TIVTC.7Z?dl=0) built with VC10. You'll need the runtimes for VC2010.
Thanks for the update, though! :)
bilditup1
7th June 2016, 22:31
Here it is (https://www.dropbox.com/s/mchng7jokx0wwn8/TIVTC.7Z?dl=0) built with VC10. You'll need the runtimes for VC2010.
Hmm. appears to be dead now - do you think you could put this up somewhere again, please?
Groucho2004
7th June 2016, 23:01
Hmm. appears to be dead now - do you think you could put this up somewhere again, please?
I added it to my "Avisynth Stuff (http://forum.doom9.org/showthread.php?p=1759271#post1759271)" thread.
bilditup1
8th June 2016, 01:16
I added it to my "Avisynth Stuff (http://forum.doom9.org/showthread.php?p=1759271#post1759271)" thread.
Ah, thanks a lot.
Katie Boundary
11th June 2016, 00:24
The missouri.edu server seems to be down at the moment. Has anyone mirrored the non-VC10 versions of these?
Reel.Deel
11th June 2016, 00:55
The missouri.edu server seems to be down at the moment. Has anyone mirrored the non-VC10 versions of these?
http://avisynth.nl/index.php/External_filters#IVTC_.26_Decimation
Katie Boundary
11th June 2016, 01:23
http://avisynth.nl/index.php/External_filters#IVTC_.26_Decimation
"The requested URL /~kes25c/TIVTCv105.zip was not found on this server."
Maybe because that page just has a link to the copy on the missouri.edu server, which is down...
Reel.Deel
11th June 2016, 01:37
"The requested URL /~kes25c/TIVTCv105.zip was not found on this server."
Maybe because that page just has a link to the copy on the missouri.edu server, which is down...
Oops, here's the correct link: http://web.archive.org/web/20140420181748/http://bengal.missouri.edu/~kes25c/TIVTCv105.zip.
Edit: not sure why the archive.org link on the wiki is no longer working, it was when I added it not too long ago. :confused:
Edit 2: updated the wiki.
Katie Boundary
11th June 2016, 05:00
Ooh, nice! I shall add it to my regrowing library of tools.
Katie Boundary
10th January 2017, 05:34
I'm confused. This part:
TDeint will try either weaving the average of f and i, or simply f or i
...seems to contradict this:
Second, this filter is using a new form of modified ELA interpolation that I have been working on recently. It takes into account the direction of the normal line to the gradient vector when deciding in which direction to average, and attempts to tune the interpolation so that it can adapt to any edge direction within its range.
So... does it average two pixels like linear interpolation, or does it perform wacky edge-detection motion-compensation magic?
Also, how does it handle situations in which neither f nor i looks like what the "target" pixel should be, a common situation in 60hz content, particularly with animated text? YADIF has a spatial interlacing check for this.
EDIT: I performed a side-by-side test with TDeint(mode=1) and YADIF(mode=1), running the Andromeda episode "Ouroboros" through each of them, downscaling to 624x352, and then exporting to an Xvid Full Quality First Pass. File sizes were 739 MB for TDeint and 788 MB for YADIF, indicating that TDeint is quantifiably less "noisy".
https://wowkent.co.uk/wp-content/uploads/2015/05/Maidstone-Museum-premium-listing.jpg
pinterf
21st April 2017, 19:23
Hi, after having spent some weeks (didn't know that this would take this much time :) ) on porting TIVTC to 64-bit (and an SSE2 capable 32 bit version), finally finished the first step of the update.
Download TIVTC 1.0.6 (beta) (https://github.com/pinterf/TIVTC/releases)
32 bit users would also try it, it is faster than the original one, at least or my machine (not to mention the x64 version, which is much faster).
Since all inline asm was rewritten in simd intrinsics or C, along with new SSE2 additions, and none of the old mmx/isse code is running in this version, please don't kill your existing 1.0.5, treat it as a beta, though I was trying to test it until it gave identical results to the (fixed) original code. Feedbacks are welcome.
# TIVTC v1.0.6 (20170421)
This is a modernization effort on tritical's TIVTC (v1.0.5) plugin for Avisynth
**v1.0.6 (20170421) - pinterf**
- project migrated to VS 2015
- AVS 2.6 interface, no Avisynth 2.5.x support
- some fixes
- x64 port and readability: move all inline asm to simd intrinsics or C
- supports and requires SSE2
- MMX and ISSE is not supported, but kept in the source code for reference
- source code cleanups
**v1.0.5 (2008) - tritical**
- see old readmes
Future plans: support additional color spaces, now YV12 and YUY2 is supported
DJATOM
22nd April 2017, 10:22
It seems Tfm can't properly analyse with Prefetch and just skipping frames.
#TFM v1.0.4 by tritical
field = top
crc32 = 5dcb7f8a
4 c - [0]
8 c - [0]
12 c - [0]
16 c - [0]
20 c - [0]
24 c - [0]
28 c - [0]
32 p - [0]
...
TDecimate mode 1 is not working with Prefetch:
Error requesting frame 1199
TDecimate: internal error during pre-buffering (n1=1509,n2=1510,pos=0,nbuf.FrameSO=1505,nBuf.frameEO=1510)!
TDecimate mode 5 is slower with Prefetch (I think it's due to Tfm: ~140fps vs ~400fps on my HW).
I didn't checked other modes.
pinterf
22nd April 2017, 11:25
Thanks, the MT things did not change in this version, what mt mode is effective for that?
And some scripts would be wecome, there are so many parameters and combinations that I cant figure out the frequent use cases (and since I never had to use this plugin, nor have I experience with it)
DJATOM
22nd April 2017, 11:34
The main purpose of MT is fully working chain. TFM/TDec might not benefit from MT, but other filters do. Also about analysing: we should forbid non-sequential access if possible.
Ok, I'll give you my test case after work.
stax76
22nd April 2017, 11:59
Since I'm adding it to staxrip profile suggestions are welcome.
real.finder
27th April 2017, 00:16
TIVTC 1.0.6 is unstable in little complex script with 1080i, it's slower than the 1.0.5 and crash after few seconds
pinterf
27th April 2017, 07:26
How can I reproduce? If it is too complex then effective parameters would help.
real.finder
27th April 2017, 10:02
How can I reproduce? If it is too complex then effective parameters would help.
I see it show this message too https://s14.postimg.org/ohd4vits1/New_Avi_Synth_Script043157.png
a=ColorBarsHD(width=1440, height=1080)
a+a+a
converttoyv12
#~ ThreadRequest()
DecombUCF() (https://pastebin.com/GNX0UCrh)
#~ ThreadRequest()
Crop(0, 0, 0, -160).StackVertical(Crop(0, Height()-80, 0, 0)).TDecimate(1,clip2=last)
#~ ThreadRequest()
Spline36Resize(1280, 720)
this not crash but it will crash if I uncomment the ThreadRequest lines (in avs 2.6 ofc)
pinterf
27th April 2017, 10:49
...this not crash but it will crash if I uncomment the ThreadRequest lines (in avs 2.6 ofc)
Thanks. I need only a FrameCache plugin. I can't find the binaries, there is no link in http://avisynth.nl/index.php/External_filters
real.finder
27th April 2017, 10:54
Thanks. I need only a FrameCache plugin. I can't find the binaries, there is no link in http://avisynth.nl/index.php/External_filters
it's in warpsharp.dll (web.archive.org/web/20120212062428/http://vfrmaniac.fushizen.eu/seraphy_mirror/warpsharp/bin/warpsharp_20080325.7z)
pinterf
27th April 2017, 11:55
Reproduced, but so far it's not TIVTC 1.0.6 specific for me.
It crashes in
avs [error]: Avisynth: access violation at 0x00003CBC in C:\Program Files (x86)\AviSynth\plugins\TDeint.dll
attempting to read from 0x69706D6F
or from AvsMeter:
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Avisynth: access violation at 0x00003CBC in C:\Program Files (x86)\AviSynth\plugins\TDeint.dll,
attempting to read from 0x00000000
AVS 2.6.0.5
Original TIVTC 1.0.5
TDeint 1.1 (2007) (crash above)
TDeint 1.1 (2012 version - rebuild(?)) (hang)
EDIT: Crashes also without ThreadRequest.
real.finder
27th April 2017, 12:23
Reproduced, but so far it's not TIVTC 1.0.6 specific for me.
It crashes in
avs [error]: Avisynth: access violation at 0x00003CBC in C:\Program Files (x86)\AviSynth\plugins\TDeint.dll
attempting to read from 0x69706D6F
or from AvsMeter:
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Avisynth: access violation at 0x00003CBC in C:\Program Files (x86)\AviSynth\plugins\TDeint.dll,
attempting to read from 0x00000000
AVS 2.6.0.5
Original TIVTC 1.0.5
TDeint 1.1 (2007) (crash above)
TDeint 1.1 (2012 version - rebuild(?)) (hang)
EDIT: Crashes also without ThreadRequest.
I am using new TDeint rebuild by Groucho2004 https://www.dropbox.com/sh/6kb3723po5oqd4b/AADbP8gIJ3YrHVoLU3joqJDma?dl=0 with last avs mt by SEt and work fine
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.