give good results and doesn't seem to be much faster anyway)
Clip RGB values before converting to LAB, to allow more easily
experimenting with not clipping the result of dithering, i.e. allowing
quantization error to take RGB values out of the 0..255 range. This
may not improve quality but need to do more experiments.
- use float32 representation instead of uint8
- Vectorize applying dither
- Improve quality of 560px images by looking ahead N pixels,
evaluating all 2^N colour choices and minimizing the total error.
560x192 where each pixel has a choice of two colours.
The latter doesn't give good results currently, it produces long runs
of colour, presumably when the immediate next choice for dithering is
worse than the current one. i.e. it gets easily stuck in a local
minimum.
Looking ahead N pixels and computing the 2^N options should improve
this.
dithering. This is important for linear treatment of quantization
errors.
- Implement Jarvis dithering
- Implement CIE2000 perceptual diff for colour matching, and the
CIR601 luminosity weighting used by bmp2dhr (which might come from
https://bisqwit.iki.fi/story/howto/dither/jy/ - I can't find any
other source references for this yet). The former seems to give
much better results, although it is also several times slower.
- Switch back to treating the display as 140x192x16 colours,
i.e. ignoring NTSC colour fringing.
- Add sRGB palettes for Virtual II and OpenEmulator (based on sampling
screen display when rendering full-screen colour)