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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd May 2003, 01:20   #1  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
new brain-dead UnComb YV12 IVTC filter

Today I sat down and wrote another IVTC filter, UnComb.dll.

This is for Avisynth 2.5+ YV12 only. It's fast, but not very smart, so use it only on non-problem material. I'll just post an excerpt from the readme file below.

As always, feedback appreciated.

- Tom

********** from Readme_UnComb.txt **************

UnComb is a simple IVTC filter for matching up even and odd fields of properly telecined NTSC or PAL film source video. Think of it as a poor mans little brother to Telecide(). It is fast but that's because it makes no attempt at finding frames that must be deinterlaced.

USAGE - To use it just:

1) Place the UnComb.dll in a directory somewhere. If that is the C:\ProgramFiles\AviSynth 2.5\plugins folder (recommended) then you can omit the LoadPlugin command in your script. You can get UnComb from:

www.trbarry.com/UnComb.zip

2) In your Avisynth file use commands similar to

LoadPlugin("F:\UnComb\UnComb.dll")
Avisource("D:\wherever\myfile.avi")
UnComb()

Of course replace the file and directory names with your own. There are no parameters.


KNOWN ISSUES AND LIMITATIONS

1) Requires Avisynth 2.5 and YV12 input.

2) Sorry, currently requires a P-III, Athlon, or higher. Needs SSEMMX support.

3) It will not handle improperly telecined material or bad video edit. It does not even check for combed frames. It just makes the best field match from what is available. It will not blend, interpolate, deinterlace, or even care. It is for reasonably good source material.

4) It does not and likely will not have fancy options like Telecide(). Use Telecide() when needed.

5) It does not decimate. Follow UnComb with Decimate(5) when you need to decimate frames from 30 to 24 fps.

6) It is wicked fast. ;-)

FILE LOCATIONS

For now, both source, this readme, and DLL should be at:

www.trbarry.com/UnComb.zip

A copy of this Readme_UnComb.txt file should be at:

www.trbarry.com/Readme_UnComb.txt
trbarry is offline   Reply With Quote
Old 3rd May 2003, 15:16   #2  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
What? (bump)

Nobody cares about Telecide/UnComb/IVTC speed?

- Tom
trbarry is offline   Reply With Quote
Old 3rd May 2003, 15:23   #3  |  Link
Koepi
Moderator
 
Koepi's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 4,454
Sorry, I sure would - but I live in europe and have to deal with PAL. Well, sometimes we even have NTSC material converted to PAL, and guess what, it simply s*cks as the well paid big companies mess terribly up with that.

Thanks for the new filter, let's hope I get my hands on some Region1 DVD sometime to play around with it.

Best regards
Koepi
Koepi is offline   Reply With Quote
Old 3rd May 2003, 15:51   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally posted by trbarry
Nobody cares about Telecide/UnComb/IVTC speed?
I care, but I'm trying to finish up some existing projects before I look into the implications of your interesting new work. I fully intend to do so.
Guest is offline   Reply With Quote
Old 3rd May 2003, 15:51   #5  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Koepi -

This is just a field matcher, no decimate. So it should also work to correct bad 2:2 PAL cadence when needed. It doesn't even look for 3:2 patterns NTSC patterns.

- Tom
trbarry is offline   Reply With Quote
Old 3rd May 2003, 18:09   #6  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Thank you very much for this filter, Tom! I just downloaded it, and I'll report back my findings as soon as I have some results. I'll use it on analogue captures, and I'm curious to see how it works out. Up to now I check the source if it's field shifted or not, and if it is, I use Donald's Telecide (just for lazyness, and to make sure I don't miss field order changes...).

bb
bb is offline   Reply With Quote
Old 3rd May 2003, 19:27   #7  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Quote:
Just out of curiousity, why don't you post some timing numbers for your filter versus Telecide(post=false)? If it is blazingly faster, we could consider modifying Telecide to use your algorithm (or giving the user a choice of algorithms if their output differs in important ways). Assuming of course, that you'd be agreeable to it.
Donald -

It's blazingly faster.

But please feel free to add the code to yours as sort of a "Telecide-lite" option of post=false if you wish. It's only that one little section of about 50 lines of assembler that would be of any interest.

I still think of you as the IVTC-meister. I don't have the patience to be adding all the options to deal with all the pathological things that folks do to telecined video. And in this your Telecide filter has gone far beyond anything I could do with my quick and dirty Doom9 front end to GreedyHMA, which I would rather not maintain anyway.

But all the options and cleverness can slow things down a bit and I thought maybe a fast simple one for YV12/Avisynth 2.5 might be welcome here. UnComb seems to do an adequate job on most of my HDTV caps so far where I have to be tediously doing it on huge frames of 1920x1080, making performance more of an issue.


bb -

Yep, UnComb should be able to handle most field shifts and order changes. (barring bugs, it's new alpha code)

- Tom

Last edited by trbarry; 3rd May 2003 at 19:35.
trbarry is offline   Reply With Quote
Old 3rd May 2003, 19:30   #8  |  Link
wotef
Registered User
 
wotef's Avatar
 
Join Date: Apr 2002
Posts: 272
uncomb doesn't seem to give the same results as telecide(post=false) on the pal material i capture from
wotef is offline   Reply With Quote
Old 3rd May 2003, 19:39   #9  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Are they good differences or bad differences?

- Tom
trbarry is offline   Reply With Quote
Old 4th May 2003, 00:39   #10  |  Link
wotef
Registered User
 
wotef's Avatar
 
Join Date: Apr 2002
Posts: 272
ha, good question

after some more testing, for one show (drama), the frames looked very similar indeed

for another show (sports), they both weren't really ideal so i've confused myself now!

guess all i was saying was you wouldn't necessarily assume they'd match the same in all cases, or rather, you'd wanna know in what circumstances they wouldn't
wotef is offline   Reply With Quote
Old 4th May 2003, 01:47   #11  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Sports is likely to be from video cameras. This would have to be deinterlaced by TomsMoComp or something.

Telecide would probaby be smart enough to recognize this and do it automatically but UnComb is too "brain dead", it has no such code.

So be sure ahead of time you use UnComb only for telecined film source material, i.e. movies.

- Tom
trbarry is offline   Reply With Quote
Old 4th May 2003, 05:10   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@Tom

Thank you for your work and kind words. I will certainly look into incorporating your fast field matching code as soon as my current extended decimate and declick filters reach decent beta states. I also have some good postprocessing code optimizations from sh0dan. So Decomb could well become faster thanks to your two efforts.
Guest is offline   Reply With Quote
Old 5th May 2003, 05:05   #13  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Technical discussion moved to Development forum

I've moved the technical discussion to the Development forum. Please continue the usage discussion and results reporting here. Thank you.
Guest is offline   Reply With Quote
Old 5th May 2003, 17:14   #14  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by trbarry
bb -

Yep, UnComb should be able to handle most field shifts and order changes. (barring bugs, it's new alpha code)

- Tom
Hm, have the results now for my Star Trek capture (the original series). PAL, phase-shifted, but UnComb didn't resolve it correctly - still many combs left after the filter... whereas Donald's Telecide(guide=2) gave a perfect result. Maybe I'm doing something wrong with UnComb's long list of parameters?

I'd like to add that I use AviSynth 2.51 with a YUV2 source (converted to YV12 right at the beginning of the script).

bb
bb is offline   Reply With Quote
Old 5th May 2003, 17:29   #15  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
bb -

Dunno. It should be able to handle it. Are you sure it was film source? And can Telecide(post=false) handle it okay?

Finally, is it just on scene changes where it fails?

- Tom
trbarry is offline   Reply With Quote
Old 5th May 2003, 17:54   #16  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@bb

Can you make available a short (unprocessed) source clip that does not get matched correctly? This would really help Tom and I. This new approach by Tom has so much portential that anything you can do to help get it perfected will pay off big for all of us!

Thank you!
Guest is offline   Reply With Quote
Old 5th May 2003, 18:36   #17  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Just wanted to point this out for those who haven't realized it...

You can make a full IVTC with postprocessing out of Tom's field matcher:

Uncomb()
FieldDeinterlace(full=false)

Add decimation if you have NTSC 3:2 telecining:

Uncomb()
FieldDeinterlace(full=false)
Decimate()

Barring unforeseen developments, this new matching will find it's way into Telecide(), so this may be a temporary expedient.
Guest is offline   Reply With Quote
Old 6th May 2003, 02:56   #18  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I've started running Uncomb() on my entire torture test suite and I can confirm bb's results. Uncomb() does emit combs in cases where Telecide(post=false) does not. And they are not scene changes. I am now trying to pin down the reason. It may be due to the restriction to luma. I will report back when I determine the cause.

On the other hand, there are cases where Uncomb() emits good matches where Telecide() does not. The important question is which one succeeds more often.
Guest is offline   Reply With Quote
Old 6th May 2003, 04:55   #19  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Donald -

Interested in your opinion here. Imagine an edit done on teleceined but staggered PAL video giving frames:

a b c edit f g h
b c d edit g h j ...

UnComb only looks backward, so the f/g frame has no match. I decided to live with that because of my rule of taking at least one field from every frame, to keep the timing smooth. But that is why I asked about scene changes since I thought the change would have been obvious.

OTOH, maybe I just have a silly bug somewhere. Be interested to hear the results of your analysis.

- Tom
trbarry is offline   Reply With Quote
Old 6th May 2003, 13:20   #20  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
I apologize. I did the encode again, and this time everything was fine: no more combs after UnComb. I still don't know what was wrong, because I don't remember that I changed anything in the meantime - weird. But I have to assume that it was my fault.

@neuron2: I doubt that my material can compete with your torture tests. I didn't see any combing in my second test after applying either filter (UnComb / Telecide), so there probably aren't any borderline cases in the 48 min episode.

False alarm from my side, congratulations to Tom for the fast filter!

bb
bb 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 04:57.


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