| I looked at several approaches, but I absolutely wanted to do floyd-steinberg, as this is what were, for me, "realistic" images on my Mac back in the 80s. The example on the website are identical to the ones in the first video, as the simple looping gif is a by-product of the encoding. On the second video (the one with sound), you cannot compare, as the video is compressed and not all the parts of the image are updated. But the algo is the same. The swimmy bits come from the fact that I encode images using the preceeding one, and use the pixels from the preceeding images to "control" where the error gets diffused, to try to get some temporal stability in error diffusion (I have a long blog post that explains that, but I never got around finishing it, it seems people were more interested by having me coding sound). I am not completely sure why the swim effect seems to always be in the north-west direction (I understand why pixels go in that diagonal, but no why they always seem to crawl on the top-left, and never the bottom-right). The dithering code can be found in the encoder, on github: https://github.com/fstark/macflim/blob/main/flimmaker.cpp#L3... If you have other dithering ideas, let me know. I am happy with the one I have, which matches what I was looking for, but we never know. Also, for the compressed version (the one with sound), the dithering have a huge impact on the ability to play on slow machines. (Btw, I tried ordered dithering, but I have always found it awful looking. Maybe in motion it would fare better?). |
https://beyondloom.com/blog/dither.html