PDA

View Full Version : Useful Tool to generate Decomb override files


Mentar
25th May 2003, 17:09
I'm posting this for a friend of mine who has developed a tool which I found extremely useful for dealing with nasty hybrid anime clips. He's still got to wait a few days before his account is activated, so I'm posting this in his name:

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

Hi all,

I coded up a quick and dirty utility that I've found to be amazingly helpful in dealing with decomb failures. Basically, it uses the output from Telecide()'s debug=true option as well as the manual override features of telecide() and decimate() to implement a crude 2-pass decomb process. The logic is incredibly simple, but it has worked wonders for several of our test DVDs. This utility is useful for clips where decomb abruptly stops matching the fields correctly. In our case, this usually came after a scene change... we would get good matching, then the scene would change and the matching would be bad, then things would be fine again after the next scene change.

It also works wonders where one would see a single combed frame at a scene change. (A perfect example is the Lupin III TV DVDs by Pioneer, where every scene change had a combed frame with no good match)

Telecide() already has a great way to test for combed frames by enabling post=true and debug=true. This creates a large logfile with the still-combed frames clearly marked. The utility parses this information to find out frames that have still been combed, and then makes a decision on how to deal with the frames in question. Ideally, we want to find all frames that come out of Telecide() still combed, and fix them on the next pass. This involves either: 1) correctly choosing the right field to match with, or 2) decimating the frame away.


Implementation:
The user specifies a number of bad frames within a certain range (N and M) to see if the pattern has been broken. So, if the user set N=3 and M=8, the program would find a bad frame, and then advance to see if there are 2 more bad frames within the next M-1 frames. If there are N bad frames within the M frames, the program guesses the proper field, and adds the entry into telecide_override.txt. If there are not N bad frames within M, the program assumes it was a single-frame decomb failure, (i.e. "bad decomb at scene change" failure), and adds the frame number to telecide_override.txt so it may be decimated away.

Like I said, this is maddingly simple If there is a group of bad frames, it assumes something changed in the scene, so all it does is switch the field to match with (i.e. p->c or c->p) if the frame is bad. If there is just a single combed frame surrounded by clean frames, it assumes (reasonably) that the frame is bad, or has no correct match and simply decimates it away.

Anyways, a more detailed description with the limitations of the program as well as a sample log and .avs file can be found at http://www.cae.wisc.edu/~gayeski/


@neuron2
I noticed on your journal that you were planning on writing a new version of decomb.dll, and I was wondering if you had any plans to include something like this in your next version. I plan to take a look at the source of decomb and see if I can put something like this in. Any ideas you have would be great, and thanks for the wonderful filter!

@any moderator/forum operator.
If someone could unlock my account (cuisinart) it would be easier than relaying messages. I just registered and still have 4 days left to wait. Thanks.

Mentar
25th May 2003, 17:15
Some quick comments from me: If someone had told me before that something as this might work, I'd have thought someone is selling me snake oil, but it's amazing. As far as my testing showed, this tool manages to

1) Get rid of "bad frames" before scene changes in hybrid clips by forcing them to be decimated.

2) What's even more important: In hybrid clips, when suddenly the pattern changes without having decomb recognize it (usually because I'm not skilled enough to find the right thresholds), it manages to "recognize" the wrong pattern by checking the number of combed frames, and simply forces the "other" match blindly.

Now the gag is: While this is no scientific approach and probably unwarranted, it works. It just works. I've been able to finish all the problem clips I've fed it so far, and the result was ALWAYS a big improvement.

3) At the very least it automatically generates a list of all problem frames in the clip you encode, so that you can manually tweak it to perfection.

Check it out yourself.

neuron2: With your huge indepth knowledge in decomb, would it be possible to implement the main idea (2-pass - collect information first and use this information to then base field matching decisions on it)? It sounds very feasible...

Guest
25th May 2003, 19:05
Originally posted by Mentar
@neuron2
I noticed on your journal that you were planning on writing a new version of decomb.dll, and I was wondering if you had any plans to include something like this in your next version. I plan to take a look at the source of decomb and see if I can put something like this in. Any ideas you have would be great, and thanks for the wonderful filter! I'm not planning on writing it, it is written! It needs only YV12 support (it's YUY2 right now) and the help file. On my Athlon XP1900 it decombs full DVD frames in real-time *with postprocessing and decimation*! The field matching and pattern guidance are dramatically improved. Follow my journal for full details and release plans.

Regarding your question about including something like you have implemented... No, I don't have any such plans. But I do plan to continue to provide the log file data that you would need. I don't see any point in integrating it into Decomb. It won't make anything easier as far as I can see. And when the next guy comes along wanting a variant of what you are doing...ugh! I provided the log file and override capability just for this kind of thing.

DoW
31st May 2003, 21:51
Does this utility work with the new decomb 5.00b4? Might save me a little time if it does.

Stigma
29th June 2003, 19:43
Im sure you have allready though about it, but let me ask anyway.

Telecide can detect interlaced frames pretty accurately right? And usually you only cange between matching to N and C? Then wouldnt this be a good idea?

1.Telecide matches like normal, using whatever method its using now
2.Telecide then checks to see if the frame is combed
If it is combed, telecide tries again to match, but this time using the C instead of N, or N instead of C.
3.Telecide check again to see if the frame is combed. If it is, it reverts to using the old match, but if it isnt it uses the new match.
----rinse and repeat for each frame---

The way i see it, then with this system the only thing stopping you from getting 100% of all possible matches from your source would be to adjust the threshold for detecting combed frames from clean frames (which shouldnt be too hard unless the combed area is really reall tiny)

Atleast it wouldnt be able to do anything wrong right? But it could potentially get rid of all those single frames that telecide has trouble finding in a lot of anime and other surces where the pattern changes a lot. I dont see the need for using 2-passes either since telecide can read a few frames ahead if i remember right.

Of course im sure you allready thought of this, but im still curious to why it would be troublesome to do... It sounds like its possible just using what you allready have, and a few extra instructions in the code.

-Stigma