Log in

View Full Version : Idea to Donald Graft


Bulletproof
26th September 2002, 02:51
Hey, your Dup filter is pretty neat, but I was thinking about something. It measures 5x5 areas and determines how much of a percentage of movement there is between frames, and if it reaches a threshold it does not duplicate the previous frame, right?

Well, here's an example I have.

Let's say for example we have a scene (Animation) with a man standing on a podium making a speech, the camera is fixed on his face. Everything in this scene is static EXCEPT for his mouth. Now normally your filter would pass these frames through without duplicating, because the mouth movement is over the safe threshold.

BUT ...

What if instead of doing that, that the filter measures each 5x5 area INDIVIDUALLY, so in that example scene it would duplicate those 5x5 areas, except the mouth area. I'm not sure how good this would work, there might be some errors, but for animation there is a chance (I think) and very low thresholds. Or maybe a tighter radius for detection?

Belgabor
26th September 2002, 03:37
Simple question, what would be the use? The Dup filter was something like donalds tech example for decimate iirc, following up MarcFDs CopySame which was made to duplicate frames so XViD could actually DROP them, but thats only possible with complete frames.

Noise reduction? If you don't do that beforehand, you'll have static noise on your copied parts and non-static around moving parts. imho potentially more annoying. If you remove the noise beforehand, you dont need it anymore. So to have it work in this way you need to include code to use the duplicates to remove noise. Not completely bad (and has been discussed elsewhere), but you'd still have the noise around moving parts, creating something like a mosquito noise mpeg4 artefact even before encoding.

Perhaps I'm missing something, but imo this is not necesary.

Cheers
Belgabor

Bulletproof
26th September 2002, 03:51
I thought this too at first, but with animation this brings higher compressibility. No two frames are alike unless they are copied, although the temporal smoother helps, it is still not an exact copy. From my opinion, I think the XviD codec is advanced enough to see that the frames are 1:1 EXACT copies, therefore efficiently using a P-frame to encode this frame or the frame will end up being extremely small. The point is to combine the duplicator with the a temporal smoother AND spatial smoother for maximum compressibility.

Guest
26th September 2002, 04:23
It's a reasonable suggestion. After all, for some films, CopySame() and Dup() can give a bitrate saving even when the dup'ed frames are not dropped by an encoder. Given that, why not try this suggestion to get further savings. Would the noise difference be visible when the block is moving? Seems worth looking into.

As I mentioned previously I plan to return to Dup() after I release Decomb 4.00 (just finishing up the manual override feature). But, I really wish you'd have added your idea to the original thread as now I have to keep track of two. :(

And the box size is 16x16, not 5x5.

sh0dan
26th September 2002, 08:42
Made a test a few weeks ago, that does what you describe, except for working on blocks - i meant to to it up here for testing, but never got around to it.

It's a filter called "PixelLock", and it a temporal pixel locker, where it locks pixels that has a small amount of changes.
Chroma and luma are locked independently.

Usage is like this:

PixelLock(Luma Threshold, Chroma Threshold)
# Use very low thresholds, like 1-5 are recommended.

#Examples:
Pixellock(2,4) # Locks pixels, where lumachange is below two, or chroma below 4.

For a pixel to be locked, three consecutive frames must be below the threshold. To avoid the worst ghosting, the color of a locked pixel can be changed if two consequtive frames have exactly the same luma value.

It was made to increase compressability, but I have not seen it do so in my own tests, but please, test away!


So this is until Donald get's his filter out.