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 20th March 2006, 13:54   #561  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 408
@Mr. Brown

Have you tried without crop?

Quote:
setmemorymax(384)
### Plugins ###
LoadPlugin("C:\dgmpgdec146\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Tdeint.dll")

### Source ###
mpeg2source("C:\fliegen\flying.d2v")

crop(4,0,-12,-0)

tdeint(mode=2,order=1)
certain filters don't work well on cropped clips
AVIL is offline   Reply With Quote
Old 20th March 2006, 13:57   #562  |  Link
Mr. Brown
Step into the Light
 
Mr. Brown's Avatar
 
Join Date: Dec 2005
Location: Germany
Posts: 20
@Avil
also without crop it crashed
Mr. Brown is offline   Reply With Quote
Old 20th March 2006, 17:41   #563  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
The fact that you don't get any output at all with debug=true is very strange. The first message it outputs is at the beginning of the constructor right after error checking for valid parameters (taken from DarkNite's post):

"[964] TDeint: v1.0 RC4 (03/19/2006) by tritical
[964] TDeint: mode = 1 (bob - double rate)"

If you don't at least get that then it isn't even getting through the constructor.

I'll put up a build here in a bit with some debug output strings that should identify which routine it is crashing in. If you and DarkNite could run the scripts that cause crashes with that build and capture the debug output it would help a lot. I am guessing it is a problem with one of the asm routines in mode 2, but I've run them all on my comp without problems.

Debug Build: [link removed]

The extra messages will be output w/ or w/o debug=true.

Last edited by tritical; 21st March 2006 at 19:33.
tritical is offline   Reply With Quote
Old 21st March 2006, 06:50   #564  |  Link
DarkNite
Almost Silent Member
 
DarkNite's Avatar
 
Join Date: Jun 2002
Location: Purgatory
Posts: 273
Here's what DebugView has to say now:

Code:
[2844] Create_TDeinterlace
[2844] Creating TDeinterlace object
[2844] TDeint constructor
[2844] TDeint:  v1.0 RC4 (03/19/2006) by tritical
[2844] TDeint:  mode = 1 (bob - double rate)
[2844] TDeint constructor returning...
[2844] Creating TDHelper object
[2844] TDHelper constructor
[2844] TDHelper constructor exiting...
[2844] TDHelper getframe
[2844] TDeint getframe
[2844] TDeint getframe yv12
[2844] TDeint:  frame 1066:  accumP = 1464846  accumN = 10990531
[2844] TDeint:  frame 1066:  field = interp top (0)  order = tff (1)
[2844] TDeint:  frame 1066:  mthreshL = 6  mthreshC = 6  type = 2
[2844] TDeint getframe
[2844] TDeint getframe yv12
[2844] TDeint:  frame 1067:  accumP = 11032302  accumN = 1905505
[2844] TDeint:  frame 1067:  field = interp bottom (1)  order = tff (1)
[2844] TDeint:  frame 1067:  mthreshL = 6  mthreshC = 6  type = 2
[2844] TDeint getframe
[2844] TDeint getframe yv12
[2844] TDeint:  frame 1067:  accumP = 1308674  accumN = 1368299
[2844] TDeint:  frame 1067:  field = interp top (0)  order = tff (1)
[2844] TDeint:  frame 1067:  mthreshL = 6  mthreshC = 6  type = 2
[2844] TDHelper subtract frames
[2844] TDHelper subtract frames isse
@Mr. Brown

You can get DebugView here. Just start it up, load your script in VirtualDub, and hit the play input button. The magic will happen on it's own.
__________________
Rethinking the "Why?" chromosome.
DarkNite is offline   Reply With Quote
Old 21st March 2006, 07:26   #565  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Thanks, I found the problem... had paddq's in the isse routine when it is an sse2 instruction. Unfortunately, it looks like I made that same mistake in a few places in TIVTC, but it only effects fielddiff() and a few of tdecimate's yuy2 routines. I'll put up fixed versions tommorrow.
tritical is offline   Reply With Quote
Old 21st March 2006, 08:32   #566  |  Link
DarkNite
Almost Silent Member
 
DarkNite's Avatar
 
Join Date: Jun 2002
Location: Purgatory
Posts: 273
__________________
Rethinking the "Why?" chromosome.
DarkNite is offline   Reply With Quote
Old 21st March 2006, 10:16   #567  |  Link
Mr. Brown
Step into the Light
 
Mr. Brown's Avatar
 
Join Date: Dec 2005
Location: Germany
Posts: 20
my debug

Code:
00000000	0.00000000	[3744] Create_TDeinterlace	
00000001	0.01130898	[3744] Creating TDeinterlace object	
00000002	0.01135899	[3744] TDeint constructor	
00000003	0.01139055	[3744] TDeint:  v1.0 RC4 (03/19/2006) by tritical	
00000004	0.01141737	[3744] TDeint:  mode = 1 (bob - double rate)	
00000005	0.01143441	[3744] TDeint constructor returning...	
00000006	0.01146179	[3744] Creating TDHelper object	
00000007	0.01149476	[3744] TDHelper constructor	
00000008	0.01152381	[3744] TDHelper constructor exiting...	
00000009	0.42560494	[3744] TDHelper getframe	
00000010	0.42565188	[3744] TDeint getframe	
00000011	0.42567924	[3744] TDeint getframe yv12	
00000012	0.43208677	[3744] TDeint:  frame 0:  accumP = 0  accumN = 0	
00000013	0.53284848	[3744] TDeint:  frame 0:  field = interp bottom (1)  order = tff (1)	
00000014	0.53289932	[3744] TDeint:  frame 0:  mthreshL = 6  mthreshC = 6  type = 2	
00000015	0.53293365	[3744] TDeint getframe	
00000016	0.53295994	[3744] TDeint getframe yv12	
00000017	0.54167360	[3744] TDeint:  frame 0:  accumP = 0  accumN = 0	
00000018	0.64207071	[3744] TDeint:  frame 0:  field = interp bottom (1)  order = tff (1)	
00000019	0.64211595	[3744] TDeint:  frame 0:  mthreshL = 6  mthreshC = 6  type = 2	
00000020	0.64214361	[3744] TDeint getframe	
00000021	0.65502572	[3744] TDeint getframe yv12	
00000022	0.76859599	[3744] TDeint:  frame 0:  accumP = 3386725  accumN = 4707391	
00000023	0.77290606	[3744] TDeint:  frame 0:  field = interp top (0)  order = tff (1)	
00000024	0.77300441	[3744] TDeint:  frame 0:  mthreshL = 6  mthreshC = 6  type = 2	
00000025	0.77540302	[3744] TDHelper subtract frames	
00000026	0.80813426	[3744] TDHelper subtract frames isse
Mr. Brown is offline   Reply With Quote
Old 21st March 2006, 19:32   #568  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
[link removed], only change was fixing the paddq problem.

Last edited by tritical; 22nd March 2006 at 05:51.
tritical is offline   Reply With Quote
Old 21st March 2006, 19:45   #569  |  Link
Mr. Brown
Step into the Light
 
Mr. Brown's Avatar
 
Join Date: Dec 2005
Location: Germany
Posts: 20
@ tritical
now it works
thank you!
Mr. Brown is offline   Reply With Quote
Old 22nd March 2006, 05:50   #570  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Glad it works . Now time for the 4th release in four days... [link removed], changes:
Code:
   + optimized motion map and field comparison routines
   + added opt parameter
   - fixed missing cache in mode 2
In my tests versus RC5, w/ default settings, I got the following speed increases:

mode 0 ~ 25-30%
mode 1 ~ 35-40%
mode 2 ~ 100%

For the amount of work it took I was hoping for a bit more, but it's still pretty good. The checkcombed routine could still be optimized (just need to bring over the code from tivtc), but I decided to put that off for another time. None of the changes effect output.

Last edited by tritical; 10th April 2006 at 10:10.
tritical is offline   Reply With Quote
Old 22nd March 2006, 20:35   #571  |  Link
DarkNite
Almost Silent Member
 
DarkNite's Avatar
 
Join Date: Jun 2002
Location: Purgatory
Posts: 273
Nicely done! I would love to do more testing with this right away (there's a few sources I have that would love to meet mode 2), but Oblivion calls.
__________________
Rethinking the "Why?" chromosome.
DarkNite is offline   Reply With Quote
Old 22nd March 2006, 22:25   #572  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Wow! Nice speedups!

A question on TIVTC:
Does using hybrid=1 or hybrid=3 with TDecimate affect random seeking in the file? Do the output files from either tfm or tdecimate store the metrics used to handle the hybrid stuff?
Zarxrax is offline   Reply With Quote
Old 23rd March 2006, 14:00   #573  |  Link
hwti
Registered User
 
Join Date: Mar 2005
Posts: 30
Quote:
Originally Posted by tritical
mode 1 ~ 35-40%
I gain 80% with mode 1 between RC4 and RC6.

But I wonder : does the opt parameter really work ?
opt=0 (C routines) is only 12% slower than opt=1, 2 or 3, which have the same speed.

My CPU is an opteron 144 (same as A64 SanDiego core) : MMX, SSE, SSE2, SSE3
hwti is offline   Reply With Quote
Old 23rd March 2006, 15:34   #574  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@hwti
The opt parameter works, the reason there isn't much difference is because the routines that have simd versions just don't take up that much processing time overall. In mode 1, with default settings, there are only two routines that have simd versions, and there are only mmx/sse2 versions of those (I wouldn't expect much if any speed difference between them). Those two routines w/ c versions only take up about 10-15% of tdeint's total processing time.

Most of the speed gain in RC6 was from internal buffering of frame differences. Previously, the differencing/logic for motion mapping was all done at once in a single loop. Now, those operations are split up into separate functions which allows the differences to be buffered. This makes more of a difference for mode 1 then mode 0 since mode 1 processes each frame twice (just swap the value of field)... so the second time through on each frame it doesn't need to caculate any differences at all. For each new frame only a single frame needs to be diff'd and added to the buffer (same for mode 0). That makes more of a difference for mtnmode=1/3 which use 5 frames and test 2/4 field distances then for mtnmode=0/2 which only use 4 frames and test only 2 field distances.

@Zarxrax
Yep, the output files do include everything that is used for hybrid detection. Seeking with hybrid=1/3 and default settings will currently not work 100% even when using complete input files. Actually, it depends on what vidDetect is set too. If it is set to metrics only then seeking will work, but if it includes checking match/rff info from tfm then it will not. That will be fixed in the next release.
tritical is offline   Reply With Quote
Old 24th March 2006, 05:29   #575  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
[link removed], changes:
Code:
TFM:
   + Added metric parameter and new spatial combing metric
   + Added hint parameter
   - throw an error if the field order of a d2v does not match the user
        specified field order
   - replace frame copy with makewritable where possible
   - fixed cthresh < 0 not working correctly

TDecimate:
   + Added clip2 parameter
   + Added hint parameter
   + Modes 0/1 fully support seeking when complete input/tfmIn files are
         present (tfmIn file not required if hint=false)
   - fixed a few mmx/isse routines containing paddq sse2 instruction
   - replace frame copy with makewritable where possible
   - fixed not allowing tfmIn file with hybrid=0
   - changed noblend default to true

Other:
  + added new combing metric and metric parameter to is/showcombedtivtc
  - fixed cthresh < 0 problem in is/showcombedtivtc
  - fixed paddq in mmx functions in fielddiff()
  + added RequestLinear Filter

Last edited by tritical; 9th April 2006 at 19:25.
tritical is offline   Reply With Quote
Old 24th March 2006, 09:52   #576  |  Link
berrinam
Registered User
 
berrinam's Avatar
 
Join Date: Apr 2005
Posts: 1,740
Quote:
Originally Posted by tritical
Other:
+ added new combing metric and metric parameter to is/showcombedtivtc
The documentation doesn't say what the default value is -- I presume 0?

Quote:
Originally Posted by tritical
Roughly speaking, the number of combed pixels present in frames from an interlaced clip is directly proportional to the amount of motion. Based on that, the amount of combing that the combed frame detection routine looks for (controlled by MI, blockx, blocky) when tryWeave=true should be based on the amount of motion, and it should be requiring less combing as the amount of motion decreases.
Could this idea also be furthered through the use of motion masking?

Also, what is the reason for keeping TDeint separate from TIVTC? From what I've gathered, both can do field-matching and deinterlacing, just TDeint uses better deinterlacing and TFM uses better field-matching. Couldn't those different algorithms all be listed together so that there would be one TSourceFixer function, which could have a "ivtc" preset which focuses on field-matching and a "deint" preset which focuses on deinterlacing. I feel like I'm missing something...
berrinam is offline   Reply With Quote
Old 24th March 2006, 10:29   #577  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Cool! RequestLinear will make using certain functions with others a lot simpler, thanks! I haven't had any great ideas on how to use hclip better, short of psychic functions (maybe sse4 will come with that? ). It's too bad, since the extra pain in the ass means people probably won't use it. On the other hand, conversion to 24p seems to be a lot more common than 30p.
foxyshadis is offline   Reply With Quote
Old 24th March 2006, 22:35   #578  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@foxyshadis
The hybrid=3/hclip problem is the main reason hclip wasn't included. I've been thinking about just adding hybrid=1/hclip functionality since it is easy to do.

@berrinam
Yep, the default value is 0, forgot to put it in there. I'm not sure having metric 1 will be all that useful or not... the main reason I included it was so iscombedtivtc could be set to operate exactly as iscombed does, aside from the overlapping windows.

TIVTC and TDeint could be combined the way you mention. The main reason they aren't is just because I started them as separate filters. TFM may not have as good deinterlacing abilities as TDeint, but it can have access to them via the clip2 parameter. In fact, I prefer TFM having separate, faster functionality... tfm's pping could be made quite a bit faster using simd (it's the only part of tivtc that I haven't worked on optimizing), which I plan to do in the future. The main thing that isn't possible atm is TDeint having access to tfm's better field matching ability, but I could simply copy tfm's routines into tdeint. My plan for now is to make TDeint's field matching equal to slow=0 in tfm. The only change to make that happen is to have it difference at both a high/low motion level instead of just the low motion level. Obviously a big gain of combining the two would be not having to duplicate as much code.
tritical is offline   Reply With Quote
Old 24th March 2006, 22:47   #579  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
tritical,
Sorry, but why you afraid to release it as 1.0 without "RC99" ?
or 1.1.

"RC" is usually used for bug fixes only.
Fizick is offline   Reply With Quote
Old 24th March 2006, 23:08   #580  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Any potential reasoning behind the version numbers was lost too long ago to remember, and I just like the way RC sounds I guess . Maybe I should downgrade it to v0.10.x.x for a while and just randomly increase the numbers (basically what I do now), since I don't plan to make a final v1.0 until there is nothing on the todo list. For some reason though, things keep getting added to it right when it's about to become empty.

Last edited by tritical; 24th March 2006 at 23:16.
tritical is offline   Reply With Quote
Reply

Tags
tdeint, tivtc

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 14:48.


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