Log in

View Full Version : Another interesting, dubiously-useful filter.


goldenpi
17th December 2011, 15:34
http://birds-are-nice.me/video/pixeltweek.shtml

This time includes the plugin so you can verify. I've only tested it on animation, but those numbers show it does actually achieve something. Not a great deal, admitidly, but it works. An increase in SSIM from 18.484db to 18.567db with no increase in bitrate through pre-processing the video with this filter, and no discernable loss of perceptual quality (So long as the clip doesn't have dithered colors - it'll mangle those nastily). And it doubles as an impulse noise remover.

Curiously though, makes huffyuv perform slightly worse. Not all compressors benefit.

I'm going to keep coming up with new ideas like this until I eventually have one that turns out to be really useful.

goldenpi
25th December 2011, 00:14
Nothing? If this isn't any use, I'd like people to at least tell me why. Does it not work on most video, and I was just picked unusually well-suited test clips? Are people having trouble making it work?

Didée
25th December 2011, 21:20
Perhaps it's because of RemoveGrain.dll for Avisynth, existing for 6 years now, performing a quite similar operation, directly in YV12, at a speed of 200~400 fps ?

amtm
25th December 2011, 22:44
Yeah, statements such as

On this 640x480 test video it was barely able to manage 5fps.
The somewhat-badly-written and rather slow
An attempt at using this technique on video proved successful, but the benefits were too small to be of much practical use.

don't inspire a lot of confidence to use it. Especially when you only get a .45% PSNR increase for processing that will take a magnitude or more longer than other filters that can do basically same thing.

goldenpi
26th December 2011, 14:46
It's a proof-of-concept at the moment. In princible I could make it much faster, but that would require effort that I don't want to invest until I am satisfied the concept is good. A 0.45% PSNR increase would still be of interest if the filter were fast enough to just tag on to the end of an existing filter chain. If it has no advantages over removegrain, what would be the point?

The current implimentation is written for clarity at the expense of efficiency. It could be adapted for other color spaces easily enough.

Removegrain is similar in concept, but far more complicated (And powerful). It appears that we both stumbled upon the same interesting little effect: A denoising filter may substantially improve compression even if it has no visible effect on the image. The main difference is removegain's use of a median filter where pixeltweek uses a mode filter and limits its application to very specific circumstances in order to be quite sure of not removing desired detail from the image.. even though this means much of the noise slips through.

So what I want are just the thoughts and some experimenting from others more knowledgeable than me to decide if this avenue of research is worth continuing, and turning from a barely-useably-slow and buggy RGB-only proof of concept into something that would actually be practical to use.

akupenguin
27th December 2011, 02:51
A denoising filter may substantially improve compression even if it has no visible effect on the image.
A good denoising filter does, but your numbers don't show that you achieved that.
How do you know it improved compression? Maybe it removed features that were going to be quantized away anyway, thus reducing the difference between input and output images (which SSIM measures) by changing the input and not the output. Or maybe it introduced more than .1dB of distortion (which isn't easily visible) in the process of removing .1dB of the kind of noise that the encoder dislikes.

goldenpi
27th December 2011, 11:17
A good point. I'm not sure how I could test to see if that is the case though. When I was conducting still-image tests I did some examination of differences, which confirmed that only areas of flat color were affected... exactly the type of thing that x264 would filter out anyway. So even the tiny benefit it does bring may well be purely illusionary. The same could be true of RemoveGrain - other than RG's use of a median filter vs PT's use of a mode filter, they function in quite similar ways.

I work on the assumption that if I develop enough bad ideas, sooner or later I'll have to come up with something that actually proves to be useful. The shotgun approach. Most of what I've written does work, just not well enough to be practical.