ubb-vga version 2, more image sources and better color mapping

Werner Almesberger werner at almesberger.net
Thu Apr 28 01:05:42 EDT 2011


ubb-vga2 has learned a few new tricks:

First of all, it can now generate a test image (ubb-vga2 -t),
which looks like this:

http://downloads.qi-hardware.com/people/werner/ubb/vga/ubb-vga2-tstimg.jpg

The test image reveals a number of bugs:

The diagonal lines should cross exactly at the edge of the display
area. We can see that a few pixels are missing on the left and at
the bottom. The top is good but hard to see in this picture. The
smears on the right are just stale data.

This test image also shows that the new board has twice the number
of colors: a lavish 16 of them !

The horizontal timing jitters by about one pixel time, which makes
the small text on the color bar difficult to read. There is also a
distortion at the top, which indicates that the beginning of the
frame is not exactly synchronized with the rest.


The next improvement is better color mapping. I originally used a
simple threshold-based algorithm that would only consider one
channel a time and that didn't know of the new luminance channel.

The new algorithm assigns a position in the RGB color cube for each
screen color and then searches for the closest color for every
pixel. I'll let the result speak for itself:

http://downloads.qi-hardware.com/people/werner/ubb/vga/ubb-ccube-jlime.jpg


Third, I've added a loader for PPM images. This loader also uses
the new color cube algorithm. This is what a screenshot of konqueror
looks like:

http://downloads.qi-hardware.com/people/werner/ubb/vga/ubb-vga2-ppm.jpg

- Werner




More information about the discussion mailing list


interactive