Talk:Floyd–Steinberg dithering

message: Ideally, should the FSD algorithm round the quantization errors to the nearest integer, or not? Or doesn't it matter at all? Shinobu 15:57, 4 September 2007 (UTC)
replies: text: FSD doesn't make an assumption about the representation of the pixel values. It works just as well when the pixels are floating point numbers between 0 and 1. For speed reasons, an implementation might do everything in integer math, but the result won't be as good. Suppose all pixels have value 1, but you have to encode with a palette with either 0 or 2. So the quantization error is 1 each time, but 7/16 and the other distributed errors are all rounded to 0 and the algorithm won't work. Han-Kwang (t) 21:47, 4 September 2007 (UTC)
thread_title:  Rounding? 

message: I propose we move this article to error-diffusion dithering, because I will be adding a few other error-diffusion dithering algorithms here that could not stand on their own as separate articles, but are clearly related to Floyd-Steinberg in the sense that they too use an error-diffusion process. Shinobu 23:44, 5 September 2007 (UTC)
replies: text: I would be fine with that. I didn't know it was called like that, but the first few google hits are much nicer references than what I could find when I was looking for references for this article. They also explain the artifacts in FSD. Han-Kwang (t) 20:53, 6 September 2007 (UTC)

text: Sounds like a good idea to me. Certainly all variants of error-diffusion that only differ by the diffusion filter can be on the same page (I don't know why they are typically presented as though they were different algorithms). --DavidHopwood 02:31, 29 October 2007 (UTC)
thread_title:  Move to error-diffusion dithering? 

message: According to some sources, Floyd-Steinberg dithering is not dithering, but dithering plus noise shaping, being the noise shaping part the important one. The quantization noise is moved to high frequencies where our eye is more sensitive.--80.24.18.223 (talk) 08:05, 27 May 2008 (UTC)
thread_title:  Isn't it noise shaping instead of just dither? 

message: Using this to reduce color from 16 bits to 8 bits:
find_closest_palette_color(oldpixel) = (oldpixel + 128) / 256
Isn't this going to create 257 colors including 0 and 256, if the old colors are from 0 to 65535? If the '/' is simple truncation, of course.  —Preceding unsigned comment added by Rachel2046 (talk • contribs) 00:19, 10 June 2009 (UTC)
replies: text: I think you are right. Reducing a 16 bit value to a 8 bit value can be thought as a shift of the original value to the right, for eight positions. This is equivalent to a division by 256. I'll modify the location in question. Wrev (talk) 16:40, 28 January 2020 (UTC)
thread_title:  About the quantization method

message: Is it normal that the reference value used to determine the error is a value modified by diffusing the previous errors rather than the actual "source" value? I know that would prevent doing the dithering in-place (because you have to keep the original value somehow), but I heard error was always calculated from the theoretical value, not intermediary stuff...
That would make the pseudocode such:
 for each y from top to bottom
    for each x from left to right
       pixel[x][y]  := sourcepixel[x][y]
 for each y from top to bottom
    for each x from left to right
       oldpixel  := pixel[x][y]
       newpixel  := find_closest_palette_color(oldpixel)
       pixel[x][y]  := newpixel
       quant_error  := sourcepixel[x][y] - newpixel
       pixel[x+1][y  ] := pixel[x+1][y  ] + quant_error * 7/16
       pixel[x-1][y+1] := pixel[x-1][y+1] + quant_error * 3/16
       pixel[x  ][y+1] := pixel[x  ][y+1] + quant_error * 5/16
       pixel[x+1][y+1] := pixel[x+1][y+1] + quant_error * 1/16
Medinoc (talk) 20:18, 26 January 2015 (UTC)
thread_title:  Error calculated from modified pixel value? 

message: I can't find it anywhere.  I'd like to see how they presented this originally. Dicklyon (talk) 22:00, 4 September 2021 (UTC)
thread_title:  Does anyone have the Floyd–Steinberg paper?