Live data from Hacker News

Dithering in Colour

obrhubr.org

61–68 of 68 posts

Re: Dithering in Colour

#62
post #59
post #42

Earlier quoted context omitted.

With 100+Hz displays it's not that hard to do temporal dithering as well. Your cones are surprisingly low bandwidth (why old color TVs even worked at 30Hz), while your rods provide danger/flicker cues outside the fovea. Getting an extra 2bits of hue (ab) while maintaining luminance (L) is quite doable except at the chroma and brightness extremes where your eye mostly ignores them anyway. That could be done pretty hig…

Old TV wasn't 30Hz. 60i isn't the same as 30p. Some TVs and monitors do temporal dithering for you... Accept 8-bit input, and temporal dither it for the 6-bit display doesn't look that bad. Probably extends well to 10-bit input.

Well, aktuuallly it's 59.94Hz and 29.97Hz, exactly BECAUSE the NTSC color "burst" carrier is only 3.579545MHz (note these are relatively prime 5×7×9/(8×11) MHz) and it has to be an exact multiple of 15734.2637Hz to generate the 30Hz color frames at ~487 lines (excluding vertical blanking lines which take it to 525). Of course those were interlaced to two sets of 262.5 lines.

Now, I'm hoping you're an old school CRT nerd, and if so then you'd also agree that the original color phosphor glow down periods were several ms and the eye's response to changing color is marginal at best. Uncorrelated subpixel scale dithering works just fine at 30Hz.

Re: Dithering in Colour

#63
post #46

Earlier quoted context omitted.

They seem to be using some kind of error diffusion. And getting error diffusion to play nice with linear colour space is nontrivial. I remember I had quite a bit of discussion with madshi when MadVR tried implementing it. You can do something that comes close by modifying the colour space into something that is gamma light in the integer part and linear light in the fractional part. If the value of a pixel is x you t…

Thank you for pointing that out. The Atkinson dithering I was using was indeed messing with the results. I'll be updating the post shortly :)

Still looks a bit dark to me, though the main issue is that webbrowsers simply refuse to display the image in a 1-1 resolution.

Edit: Oh and I see you suffer from the patterned runs of pixels that plagued madshi ;-) It's one of the reasons I prefer simple patterned dithers

Re: Dithering in Colour

#64
post #62
post #59

Earlier quoted context omitted.

Old TV wasn't 30Hz. 60i isn't the same as 30p. Some TVs and monitors do temporal dithering for you... Accept 8-bit input, and temporal dither it for the 6-bit display doesn't look that bad. Probably extends well to 10-bit input.

Well, aktuuallly it's 59.94Hz and 29.97Hz, exactly BECAUSE the NTSC color "burst" carrier is only 3.579545MHz (note these are relatively prime 5×7×9/(8×11) MHz) and it has to be an exact multiple of 15734.2637Hz to generate the 30Hz color frames at ~487 lines (excluding vertical blanking lines which take it to 525). Of course those were interlaced to two sets of 262.5 lines. Now, I'm hoping you're an old school CRT n…

You're downplaying "Of course those were interlaced to two sets of 262.5 lines". That is what makes interlaced video 59.94 different images per second, and the difference between 30hz updates and 60hz updates is most definitely noticeable.

The eye's response to changing color is slow, but the response to changing luminance is very fast.

Re: Dithering in Colour

#65
I've done this in the early '90s, when I implemented all published algorithms back then into a Turbo Pascal program, which was allowing me to see full-color images on poor post-Soviet color displays - it wasn't just doing dithering, but also allowing you to pan and zoom, while switching algorithms. Give the limitations of the hardware, I had to implement the algorithms with a running buffer, optimized for panning, i.e. incrementally dithering the image. As some could guess, not a small part of these images was erotic. The program also was able to print on a matrix printer and I was improving it and had some test printouts in my bag. As I was in high school back. At one point some kids put a classroom on fire and they were doing an investigation, so, at one point they asked me to open my school bag and show them the contents. And, yes, I got into a big, big trouble. It was really tough to provide a meaningful explanation that I had only limited set of true-color images and, of course, the most popular were erotic given the post-Soviet interest in erotica and pornography. So, every time when I read something about dithering here on HN, it brings back my memory of being taken to the police station by two cops in front of the entire school for "distributing pornographic materials".

Re: Dithering in Colour

#66
post #2

They may not want to imply that didder's linearized rabbit is wrong, but I'm comfortable saying so. It's not just a little dark, it's way dark, to the point of hiding detail. The linearized RGB palette is similarly awful. It clobbers a whole swath of colors, rendering them as nearly black. Purples are particularly brutalized. Yellows disappeared and became white. On my phone, the middle palette doesn't appear too bri…

Yeah, every time I see articles about importance of linear color space for gradients, and see images there, I observe the opposite of what’s written in the text of these articles. Gradients in sRGB color space look better. I have a suspicion that might be because I usually buy designer-targeted wide gamut IPS displays. I also set up low brightness on them, e.g. right now I’m looking at BenQ PD2700U display with brigh…

It's not you or your display, linear color just isn't great for gradients: https://bottosson.github.io/posts/colorwrong/

It can be better than sRGB for the color part of gradients but is awful for the brightness axis. The reason why linear color is so important for operations like blending light, antialiasing, and dithering is also why it is bad where perceptual uniformity is desired. sRGB isn't as good as Oklab or CIELAB perceptually, but a grayscale ramp rendered in linear color is so distorted towards white it's useless. Image formats also encode non-linear color for good reason. "Use linear color everywhere" is overly simplistic and bad advice.

Re: Dithering in Colour

#67
post #64
post #62

Earlier quoted context omitted.

Well, aktuuallly it's 59.94Hz and 29.97Hz, exactly BECAUSE the NTSC color "burst" carrier is only 3.579545MHz (note these are relatively prime 5×7×9/(8×11) MHz) and it has to be an exact multiple of 15734.2637Hz to generate the 30Hz color frames at ~487 lines (excluding vertical blanking lines which take it to 525). Of course those were interlaced to two sets of 262.5 lines. Now, I'm hoping you're an old school CRT n…

You're downplaying "Of course those were interlaced to two sets of 262.5 lines". That is what makes interlaced video 59.94 different images per second, and the difference between 30hz updates and 60hz updates is most definitely noticeable. The eye's response to changing color is slow, but the response to changing luminance is very fast.

You have expertly summarized the first and last lines of my original post about Color NTSC. Interlacing is effectively dithered color super-resolution at low frame rate with blur from fast motion line tearing at the interlace rate.

   Your cones are surprisingly low bandwidth (why old color TVs even worked at 
   30Hz), while your rods provide danger/flicker cues outside the fovea.
   
   Uncorrelated subpixel scale dithering works just fine at 30Hz.
Post reply on HN