novideo_srgb icon indicating copy to clipboard operation
novideo_srgb copied to clipboard

About Dithering

Open James-F2 opened this issue 2 years ago • 5 comments

A few words to clarify the dithering options available in novideo_srgb.

First, an image worth a thousand words;

D

I would immediately suggest not to use Temporal dithering because it is at the mercy of your LCD panel speed, overdrive overshoot, and refresh rate. which might not produce accurate shade even though it is a small change each frame. If you are not working with static images like editing magazines, forget about Temporal dithering now.

I will use MadVR in 2bit to demonstrate Static and Dynamic dithering.

2bit No Dithering; 2bit no dithering

2bit Static Dithering; 2bit Static Dithering

2bit Dynamic Dithering; 2bit Dynamic Dithering

Static dithering has almost no overshoot error on LCD panels, and the least amount of flickering and noise. With a modern high DPI true 8bit panels the the dithering pattern is completely invisible, the pixels are too small and too close in color/shade.

Dynamic dithering will change the dithering pattern every Hz/Frame of your monitor refresh rate. Theoretically it should "hide" the dithering pattern at the cost of random pixel noise, but since we are talking about modern high resolution and high refresh rate 8bit panels the noise is completely invisible in this case too. Theoretically we "could" see some random pixel overshoot under a microscope..... no.

Personally I would suggest Static because it does the job perfectly, but if you are sure that you actually see the random 8bit dithering pattern (I highly doubt it) you can bump up to Dynamic.

This is my take on things, I'll be happy to learn if I missed something. Cheers

James-F2 avatar Mar 14 '22 18:03 James-F2

What about 2x2?

So we should most likely use SpacialStatic or SpatialStatic2x2?

Why should we pick one over the other?

nicko88 avatar Mar 15 '22 02:03 nicko88

TL;DR SpatialDynamic2x2 is best.

From Nvidia: "DitheringMode": controls the flat panel dithering mode; possible values are:, 'Dynamic-2x2' (a 2x2 dithering pattern is updated for every frame), 'Static-2x2' (a 2x2 dithering pattern remains constant throughout the frames), and 'Temporal' (a pseudo-random dithering algorithm is used). Source: https://download.nvidia.com/XFree86/Linux-x86_64/470.57.02/README/xconfigoptions.html

Setting the dithering option to 6bit in novideo_srgb I can see the dithering pattern with my eyes on certain shades, nose touching the screen.

SpatialStatic has a 4x4 pixels checkerboard pattern, SpatialStatic2x2 has a 2x2 pattern (duh), it's not checkerboard, it's smaller and harder to see with the naked eye, probably a Bayer pattern. Temporal looks like random noise, (not consecutive shades), it is VERY noisy even for 6bit and visible from siting distance.

SpatialStatic 4x4

SpatialStatic2x2 2x2

To my eye Dynamic further hides the visibility of the dithering pattern. I can still barely see the pattern in SpatialDynamic, but with SpatialDynamic2x2 the pattern is completely gone. Note again that I'm doing this test in 6bit so I can see the dithering pattern, in 8bit I don't see any difference between any of the options.

Please, do the experiment for yourself and don't ask me 'why' and what 'should' you use, I'm not your boss.

James-F2 avatar Mar 15 '22 10:03 James-F2

I can see slight additional banding with novideo_srgb's clamp/calibration active in AIDA64 orange - black gradient with 8 bit SpatialDynamic2x2. It is gone with temporal. So imho first go temporal and check if you notice noise/flickering with it (which I do not with my 1440p 27" 144Hz IPS monitor), as it apparently is more effective.

aufkrawall avatar Mar 15 '22 21:03 aufkrawall

I'm not knowledgeable on the subject, so for a 6 bits + FRC panel is it better to use 6 bit dithering or 8 bit? I'm using an MSI G241 which is listed at 8 bits in Windows but the specifications list it as 6 bits + FRC and not true 8 bit.

0rb1t5l avatar Mar 16 '22 23:03 0rb1t5l

Dither depth should always be display output depth, I think, which is still 8 bit for displays that are 6 bit + FRC. If your display does FRC badly, i.e. there already is banding without color processing by the graphics driver, you might want to try forcing 6 bit output (+6 bit dither depth) via custom EDID if the default EDID doesn't offer it (it's just a few clicks in Custom Resolution Utility by ToastyX).

aufkrawall avatar Mar 16 '22 23:03 aufkrawall