Quote:
Originally Posted by PhrostByte
if you scan left->right, then l1 is an offset to the left pixel, and r1 is an offset to the right pixel.
it alternates between scanning left->right and right->left (see the calculation of x). I flip the sign on l1/r1 each line too, so r1 is always an offset to the pixel next in line.
it's called "serpentine scanning" and helps avoid some rare bad looking patterns.
|
Ah, yes I missed this code
Code:
color::dimension_type x = (y & 1) ? (width - xx - 1) : xx;
You have obviously thought about this a lot. So on the Even lines you diffuse error with this kernel
Code:
1 [ - # 7 ]
16 [ 4 5 0 ]
and on the Odd line with this kernel
Code:
1 [ 7 # - ]
16 [ 0 5 4 ]
What other advantages have you found instead of using the default Floyd and Steinberg kernel?
Code:
1 [ - # 7 ]
16 [ 3 5 1 ]