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. |
27th February 2006, 09:57 | #541 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
You can upload the clip to my ftp if you haven't already found someplace else:
ip: 68.119.245.113 port: 17252 user/pass: upload/upload as long as it's not larger than 2 or 3 GB's, any size is fine . I don't think my email will take attachments larger than about 5 MB's. |
27th February 2006, 11:23 | #543 | Link |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
I've done a fair bit of searching and been unable to find anything said on this topic. I hope I'm not hijacking this thread by asking this here.
I am asking because I am working interlace detection for MeGUI, and at the moment I'm using DeComb's IsCombed() function. I wonder if it would perhaps give better results to change to IsCombedTIVTC() for this. |
27th February 2006, 19:01 | #544 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
@rig_veda
I looked at the clip and I was able to reproduce your results if I seeked to frame 268. If I ran up to frame 268 linearly from the beginning both scripts produce the same result. Involved explanation of what happens The difference is w/o ttempsmooth seeking to frame 268 causes only the cycle starting at frame 335, plus the previous (330) and next (335) cycles to be evaluated. However, with ttempsmooth in there to request extra previous frames, the cycle at 325 is also evaluated. The blend decision in mode 0 with hybrid=0 is based on seeing match dups + lowest metric'd frames at the right interval that it looks like an ivtc pattern change that produced two dups in one cycle. In this case the match dup in the previous cycle appears at pos 0 (frame 330), but without evaluating the cycle prior to that (starting at frame 225) it won't know the match used for frame 329 and therefore can't tell that frame 330 is a match dup. So with ttempsmooth it can tell frame 330 is match dup which triggers the detection and without it it can't so it doesn't trigger. So the solutions are: 1.) don't seek 2.) if you don't want the blending for such cases when hybrid=0 then use "noblend=true" in tdecimate() 3.) Use "d2v=source.d2v" in tfm. In this case your source is almost entirely flagged (94% reported by tfm). With the d2v option enabled it doesn't try to blend in that cycle and picks up the correct ivtc pattern... plus it is faster . A problem though is that the following script should support seeking (assuming you use the output parameters on a previous pass to generate input files): mpeg2source() tfm(input="tfm.txt") tdecimate(input="tdec.txt",tfmIn="tfm.txt") but I seem to have made it so you can't use a tfmIn file with hybrid=0 for some reason... I'll have to fix that. I'm also considering making noblend default to false since most people would rather just keep the extra dup than see a blend in such cases. |
27th February 2006, 19:31 | #545 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
@berrinam
They are mostly the same except that tivtc's function uses overlapping windows (the normal set plus 3 others offset at 0.5*blockx in the x direction, 0.5*blocky in the y direction, and 0.5*blockx in the x + 0.5*blocky in the y, the window size is variable (blockx, blocky) (fixed at 4x8 in iscombed), the window threshold amount is variable (MI) (fixed at 15 in iscombed), chroma parameter is adjustable (iscombed uses true), and it uses a different per-pixel combing metric. Assume we have 5 pixels vertically and we want to know if 'c' is combed or not: a b c d e IsCombed's per-pixel metric: Code:
val = (b - c) * (d - c); if (val > threshold*threshold) it's combed; Code:
d1 = c - b; d2 = c - d; if ((d1 > cthresh && d2 > cthresh) || (d1 < -cthresh && d2 < -cthresh)) { if (abs(a+4*c+e-3*(b+d)) > cthresh*6) it's combed; } |
27th February 2006, 19:41 | #546 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
tritical, I have a question (or suggestion) regarding fieldmatching principles.
I want to discuss the low-motion (also no-motion) case. The most fieldmatchers I know of will prefer a blind match on them even if the underlying video is true interlaced stuff thus risking the well known mouth combing. How about introducing a threshold to identify these low/no motion scenes and the apply a motion adaptive deinterlacer on them? The problem is pretty obvious with tdeint(mode=1,tryweave=true, full=false). -low motion interlaced scenes always are fieldmatched instead of being deinterlaced. EDIT: IMO smartdecimate does something like this, in past I always wondered, why it started bobbing in low/no-motion scenes... I mean fieldmatching should only be applied, if the algorithm is pretty sure that two fields are derived from one frame. This is only the case with a reasonable amount of motion. Of course, on can continue a running pattern (let the fieldmatcher adapt to a pattern), if the motion gets low or stops, but after a scene change it needs to reset this immediatelly.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
27th February 2006, 22:45 | #547 | Link | |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
@scharfis
Just a warning, I did a lot of rambling and thinking while writing this reply so it kind of jumps arounds. Also I was not sure whether you were specifically talking about TDeint or also TIVTC. Quote:
TIVTC's field matcher can handle low motion scenes (mouthes moving) pretty well (assuming a good match exists) because it uses temporal differencing in combination with field differencing (if it wants to compare matching two top fields A/B with a bottom field C, it first compares A/B to find where they are different and then only applies the spatial metric to the created A/C and B/C frames in those areas). That said, the field matching built into TDeint is much simpler than that of TIVTC's (though at this point it probably runs slower than tfm w/ slow=2). It doesn't use temporal differencing at all and just runs the spatial metric at every point and sums the result... so I would expect it to be much more inaccurate in low motion areas. Too check if the chosen match is combed the created frame is then passed off to the combed frame detection routine. The reason the combed frame detection routine has such a hard time detecting frames which have very little combing or 'weak' combing (falls under the cthresh level) is simply that it is a tough problem. The comb metric isn't perfect and causes false detections due to noise and high frequency detail. Because of this, it cannot be made that sensitive (low cthresh and low MI values) without causing a lot of false detections. In TIVTC, which works under the assumption that a large majority of the clip should be matchable, but that you will occasionally get a frame that isn't, it is usually better to let a few combed frames slip through every now and than to have a lot of false detections. However, in TDeint, which w/ tryWeave=true should work under the assumption that a majority of the clip is interlaced, it should be better to have a some false detections than to let a lot of combed frames slip through. So the low-motion idea might help. Or it might help to simply adjust the combed frame detection based on the motion level (the defaults for cthresh/MI/blockx/blocky are 6/64/16/16, so maybe use 6/15/4/8 in low motion areas). The filter could then vary the settings between those two ranges based on the measured motion level. Last edited by tritical; 27th February 2006 at 22:49. |
|
27th February 2006, 23:39 | #548 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
More thinking... Source type detection in areas without adequate motion is almost impossible. Therefore, the type of such areas must be determined based off assumption. TIVTC works under the assumption that the clip is mostly matchable. Therefore, it should assume that low motion areas are matchable. TDeint works under the assumption that the clip is mostly interlaced (not matchable). Therefore, it should assume that low motion areas are interlaced. 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.
|
3rd March 2006, 17:13 | #549 | Link | |
Registered User
Join Date: Mar 2002
Posts: 1,075
|
Quote:
|
|
9th March 2006, 04:57 | #551 | Link | ||
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
Quote:
Code:
abcdefghi o jklmnopqr diff = abs(h-k) Code:
abcdefghi o jklmnopqr diff = abs(j-g)+abs(k-h)+abs(l-i) Code:
abcdefghi jklmnopqr o stuvwxyzA BCDEFGHIJ Quote:
mode 1 does not support random access. mode 0 does support random access.Assuming information from tfm is present: Currently, neither mode truely (i.e. 100% reliably) supports random access. Though once the next version of tivtc is out (so that tdecimate allows using a tfmIn file when hybrid=0) it will be supported in mode 0 by using:Mode 1 can never 100% support random access since its decision's on the current cycle can be effected by what frame was dropped from the previous cycle. Next version will also have an option to stop tfm from putting any information into the stream which is not possible atm (it will always put at least the match used and combed/not combed), and an option in tdecimate to ignore the extra information and go purely on metrics (also not possible atm). Unfortunately, I haven't had the time to work on avisynth stuff lately... should change soon. Last edited by tritical; 9th March 2006 at 05:01. |
||
10th March 2006, 22:09 | #552 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
I sat down last night and did some work on tivtc... I gave up on the having a separate 1.1 branch and only doing bug fixes to 1.0 because I'm too lazy to maintain both. So there might be quite a few more release candidates before a final 1.0. Current working changes:
- fixed cthresh < 0 problems (was broken for both assembly and c routines) - allow tfmIn file when hybrid=0 in tdecimate - if the field order of a d2v file does not match the user specified order an error is thrown - noblend defaults to true - added new spatial comb metric to tfm and is/showcombedtivtc (from decomb's iscombed/fielddeinterlace) - added hint option to tfm to disable putting hints in the stream - added hint option to tdecimate to disable reading of hint information - replace all frame copying with env->makewritable() where possible - seeking is fully supported for both modes 0/1 of tdecimate when a metrics input file and a tfmIn file (if hints=true) are used - added clip2 option to tdecimate (metrics are calculated off the input clip but frames are returned from clip2, all modes supported) - added hclip option to tdecimate (hybrid=1/3 take frames from hclip instead of doing blend conversion, modes 0/1) - added RequestLinear filter (makes sure all requests for frames are linear and that all frames are requested) There is one problem though, the hclip option works perfectly well for hybrid=1 by doing: mpeg2source() tfm() mc = last.mcconvertfps() tdecimate(hybrid=1,hclip=mc) However, it is not possible to handle hybrid=3 in the same manner since the clip fed to the mc filter would first need to have the duplicates removed. That causes another problem because the resulting clip (w/ dups removed in film sections) after being fps converted would not have a constant relation to the frames in the input clip. Atm, it looks like for hybrid=3 it will take two passes and the following second pass setup: mpeg2source() tfm() mc = last.tecimate(input="",tfmIn="",mode=8).mcconvertfps() tdecimate(input="",tfmIn="",hybrid=3,hclip=mc) where mode=8 would be a special mode for the purpose of dropping the correct frames. If anyone has any other ideas I'm all ears. Last edited by tritical; 11th March 2006 at 05:18. |
19th March 2006, 06:32 | #553 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
[link removed], changes:
Code:
+ Added mode 2, and blim parameter The difference to blendbob is that it will never try to deliver a p/n blend (which is what makes blendbob not support seeking since the decision to blend p/n is based on previous differences) and that it has the max difference value at which point it will not blend the source frame with prev or next. The main reason for mode 2 is pping for ivtc. Namely: deinted = tdeint(mode=2) tfm(clip2=deinted) mode 2 can work with tdeint's edeint option perfectly fine (the edeint clip has to be as though it is being used in mode=1), so something like: interp = separatefields().eedi2(field=-2) deinted = tdeint(mode=2,edeint=interp) tfm(clip2=deinted) is also possible. Last edited by tritical; 20th March 2006 at 05:52. |
19th March 2006, 14:59 | #554 | Link |
Step into the Light
Join Date: Dec 2005
Location: Germany
Posts: 20
|
@tritical
i wanted to test Tdeint(mode=2) but it crashed always (avisynth 2.5.6a) Code:
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) http://rapidshare.de/files/15891931/flying.m2v.html
__________________
|
20th March 2006, 05:23 | #557 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
[link removed], changes:
Code:
+ output MIC values in debug info when tryweave=true or full=false + added value 70 to emask input + added mmx versions of isse/sse2 compare/blend routines for mode=2 - refactored/rewrote a lot of the code to clean up and simply things, no changes that effect output... should give a slight speed up Unfortunately, I wasn't able to reproduce your problem. Does it crash if you use tdeint(mode=1,order=1)? Could you also put debug=true in the tdeint() line and use debugview to capture whatever it outputs before crashing? Last edited by tritical; 21st March 2006 at 19:33. |
20th March 2006, 10:08 | #559 | Link | |
Almost Silent Member
Join Date: Jun 2002
Location: Purgatory
Posts: 273
|
I see what you're talking about Mr. Brown. I'm using RC4 in AviSynth 2.5.6a with DGIndex 1.4.6 and VirtualDub 1.6.14 on an AthlonXP 3200+, Windows XP SP2.
mpeg2source() deinted = tdeint(mode=2,debug=true) tfm(clip2=deinted) Here's what DebugView has to say: Code:
[964] TDeint: v1.0 RC4 (03/19/2006) by tritical [964] TDeint: mode = 1 (bob - double rate) [964] TDeint: frame 1066: accumP = 1464846 accumN = 10990531 [964] TDeint: frame 1066: field = interp top (0) order = tff (1) [964] TDeint: frame 1066: mthreshL = 6 mthreshC = 6 type = 2 [964] TDeint: frame 1067: accumP = 11032302 accumN = 1905505 [964] TDeint: frame 1067: field = interp bottom (1) order = tff (1) [964] TDeint: frame 1067: mthreshL = 6 mthreshC = 6 type = 2 [964] TDeint: frame 1067: accumP = 1308674 accumN = 1368299 [964] TDeint: frame 1067: field = interp top (0) order = tff (1) [964] TDeint: frame 1067: mthreshL = 6 mthreshC = 6 type = 2 Quote:
__________________
Rethinking the "Why?" chromosome. Last edited by DarkNite; 20th March 2006 at 10:27. |
|
20th March 2006, 12:57 | #560 | Link |
Step into the Light
Join Date: Dec 2005
Location: Germany
Posts: 20
|
I wasn't able to make debug file because vdub(mod) close directly after loading the skript
Code:
Does it crash if you use tdeint(mode=1,order=1)? and i try this Code:
deinted=tdeint(mode=1,order=1,debug=true) tfm(order=1,clip2=deinted)
__________________
Last edited by Mr. Brown; 20th March 2006 at 13:12. |
Tags |
tdeint, tivtc |
Thread Tools | Search this Thread |
Display Modes | |
|
|