Log in

View Full Version : Remove noise/grain, before or aften resize?


Hvidgaard
11th July 2007, 14:28
The original question originated from some 320x136 encodes. If i denoised before the resize, the colours was quite different if denoised after the resize. For some reason that does not apply when encoding to the 640x272 resolution.


Hi,

I was encoding some videos for my iPod with the following command line:

--pass 2 --bitrate 1200 --stats ".stats" --level 3 --nf --no-cabac --subme 6 --analyse p8x8,b8x8,i4x4,p4x4 --qpmin 16 --vbv-maxrate 1500 --me umh --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output.mp4" "input.avs"

And I figured that since all the bells and whistles of x264 are turned off, I might as well remove some noise/grain to improve the overall PQ. In my complete lack of denoise/degrain knowledge I used TemporalSoften with the standart parameters:

TemporalSoften(4, 4, 8, 15, 2)
#(radius, luma_threshold, chroma_threshold, scenechange, mode)

First I used TemporalSoften before I resized, but to colours was off quite a bit (more pale), so I tried it after the resize and it wasn't much better (in the 320x136 they are more like the original).

Now I was wondering why are the colours different? And should I use another filter to denoise/degrain? Or should I just forget about denoise the movie since it bitrate are not high enough to avoid blocking anyway?

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

Video encoded without TemporalSoften:
http://www.hvidgaard.dk/upload/take_1.png
avs (http://www.hvidgaard.dk/upload/take_1.avs)
output (http://www.hvidgaard.dk/upload/take_1.mp4)

Video encoded with TemporalSoften before resize:
http://www.hvidgaard.dk/upload/take_2.png
avs (http://www.hvidgaard.dk/upload/take_2.avs)
output (http://www.hvidgaard.dk/upload/take_2.mp4)

Video encoded with TemporalSoften after resize:
http://www.hvidgaard.dk/upload/take_3.png
avs (http://www.hvidgaard.dk/upload/take_3.avs)
output (http://www.hvidgaard.dk/upload/take_3.mp4)

Source@640x272 (photoshop 'Bicubic' used to resize)
http://www.hvidgaard.dk/upload/source@640.png

Source@1280x544 (original)
http://www.hvidgaard.dk/upload/source.png

All screenshots was taken with Media Player Classic, except the source that MPC errored on, so used VLC (and it took me forever to get the correct frame...)

nullstuff
11th July 2007, 21:49
...maybe you can try with a RemoveGrain(mode=2) after resize.

-- nullstuff

Hvidgaard
13th July 2007, 13:33
Much better :) Also looks like RemoveGrain is quite a powerful filter.

Didée
13th July 2007, 13:41
BTW, the "more pale" colors you were experiencing are NOT related to, nor caused by TemporalSoften. Looking at the histograms of yor screenshots, it becomes apparent that the "pale" screenshots have undergone a PC[0,255]->TV[16,235] levels adjustment, somewhere in the chain from source to result. It's not clear where in the chain it happened - but for sure it wasn't TemporalSoften.

Hvidgaard
13th July 2007, 19:30
BTW, the "more pale" colors you were experiencing are NOT related to, nor caused by TemporalSoften. Looking at the histograms of yor screenshots, it becomes apparent that the "pale" screenshots have undergone a PC[0,255]->TV[16,235] levels adjustment, somewhere in the chain from source to result. It's not clear where in the chain it happened - but for sure it wasn't TemporalSoften.That means somewhere in the chain it choose randomly between the colourlevels :( Is there a way to force on or another?

chain should be like this

file -> haali's splitter -> ffdshow -> MPC -> render (default i MPC i think) during playback

I don't think it happened durring encode, or could it?