View Page Source

Revision (current)
Last Updated by nanogyth on 12/1/2012 4:52 PM
Back to Page

%%TOC%%

!!ng_deblink

This function combines frames according to a mask. This is done using layer and it never leaves the RGB colorspace.

If no mask is given, then one is generated with ng_blinkmask. There are other ways to generate the mask, which I'll go over in the cases where ng_blinkmask fails.

I have ng_deblink setup to NOT change the framerate. This allows me to mix-and-match techniques more easily. A SelectEven() is needed to get it into 30fps YouTube form.  Use SelectEvery(5, 0,2,4) for PAL encodes. If the input is normalized to 60 or 50fps then using ChangeFPS(30) would work in both cases. But keep in mind that most emulators are NOT outputting at exactly 60fps.

[/Forum/Topics/12793|Forum thread].

!!ng_blinkmask
This function produces a mask which works well in many cases. It uses many tools which operate in the YV12 colorspace. The YV12 clips are not used by ng_deblink, just the binary mask produced. ng_deblink operates purely in RGB, so the subsampling of the intermediates should not be a cause of concern.

The magic of ng_blinkmask is to look at the scene and tell the difference between motion and blinking. It does this by looking for parts of the scene that match frame to frame. Moving sprites/background will be present in both frames, while blinking sprites exist in one frame but not the next.

Because it ignores motion, the most common problem case for ng_blinkmask is what I refer to as a shake. That is where the "blinking" object doesn't disappear, but merely moves on the screen. SelectEvery(4, 0,2,1,3) might work in these cases since the shaking hides unevenness of motion in the rest of the scene. 
 
!!ng_bighalo

This function makes the halo on subtitles bigger. The halo width on the standard subtitle function is fixed at 1, which means it disappears on YouTube encodes. This function is generally __slow__, but by picking points just on the edge of the circle it can be sped up considerably. I picked the points by hand so it only works for a radius of 12 right now. But you could also make 24 by chaining two 12s together.
http://pastebin.com/hpufrFFT