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

Thread Tools Search this Thread Display Modes
Old 6th February 2017, 17:27   #1  |  Link
Registered User
Join Date: Oct 2010
Posts: 27
Decimating Ghost interlaced frames

I have been playing around with various algorithms for removing ghost interlaced frames. I have been using a modified Fdecimate as the original source.

To set the stage, I have an old movie that I want to use Spot Remover, so I first deinterlaced it. But it seems the original had been ghost interlaced, and then 3/2 interlaced by another program, so I ended up with 4 good frames and 1 50/50 ghost interlaced. I suspect the ghost interlacing was done mechanically with a double exposure of 2 frames to create a 30fps film for easy TV broadcasts.

Basically I have found that the original decimation algorithm only found some of the ghost frames. Just putting in a search for current - 1/2 last - 1/2 previous worked somewhat better, but not good enough. Then I tried changing the metric to looking at the standard deviation. Discarding pixels that only had a very small difference also helped. The metric strongly identified ghosted images. The big problem is of course the random noise in the old video which can mess up the algorithm.

OK, now I am trying to rewrite it to just discard the ghosted images. The threshold is useless. Actually fdecimate misbehaves for a high threshold and puts frames out of order.

So the basic question is in the logic of avisyth. Is there some documentation on the logic of plugins, especially ones that can decimate frames. Actually I only want to quinquemate 1 in 5 rather than decimate 1 in 10.
JClement is offline   Reply With Quote
Old 6th February 2017, 21:37   #2  |  Link
HeartlessS Usurer
StainlessS's Avatar
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,965
If I recall correctly, FDecimate just throws away the first frame in x frames that comes in under a difference threshold.
[EDIT: IIRC, Will also insert dupe frames if requested output framerate is higher than input frame rate.]

A Note from author on FDecimate:- https://forum.doom9.org/showthread.p...75#post1644675
[EDIT: NOTE, author not too pleased with FDecimate, also I did not like metrics method, and was also bugged as far as Chroma metrics was concerned {presume you also modified metrics as per the problems}]

In MDec2():- https://forum.doom9.org/showthread.php?t=168397
I used modified FDecimate metrics, and output metrics file for use by MultiDecimate addon executables Multidecimate.exe and ProcessMD.exe.
In 2nd pass of MDec2(), we just decimate as per decision made in Multidecimate.Exe/ProcessMD.exe addons.
[EDIT: MultiDecimate(), only for YUY2, MDec2() YUY2, RGB, + all incl v2.6 Planar.]

I guess that you could use whatever detector you like, and output similar formatted metrics to the mfile.txt output by Multidecimate and
then use its addons to create the decimate dfile.txt for use by either MDec2() or Multidecimate.
If done as above, all you have to do it output suitable metrics and leave the decimation to the 2nd pass of mdec2, or multidecimate.
(lo numbers would be more likely decimated, only requirement of metric numerics [IIRC],
EDIT: If your metrics are "arse about face", eg in range (KEEP)0.0 -> 255.0(DROP), then convert to 255.0 - YourMetrics for write to mfile.txt).

Decide for yourself which source you would find easier to mod, Multidecimate() or Mdec2().

good luck.

EDIT: NOTE, args to MDec2() are not identical to Multidecimate().

Decide for yourself which source you would find easier to mod, Multidecimate() or Mdec2().
Ooops, just remembered, Multidecimate source never published, so that is one decision you dont have to make.

Actually I only want to quinquemate 1 in 5 rather than decimate 1 in 10.
From dictionary
    1) Kill one in every ten, as of mutineers in Roman armies.
    2) Kill in large numbers.
Guess definition 2) is generally used in video.
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th February 2017 at 08:43.
StainlessS is online now   Reply With Quote

decimation, ghost, interlacing

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 13:26.

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