Colorspaces conversions
-----------------------

The following source chroma formats are defined:

1) ka_chroma_luminance

The source is composed of a single 8-bit plane for the luminance (Y)
of each pixel.

2) ka_chroma_YUV420

The source is composed of 3 8-bit planes. One plane for the luminance (Y)
of each pixel and two planes for chrominances (U and V). These last planes
are twice as small as the luminance one in each direction, so that
each chrominance value covers a 2x2 pixel area.

3) ka_chroma_YUV422

The source is composed of 3 8-bit planes. One plane for the luminance (Y)
of each pixel and two planes for chrominances (U and V). These last planes
are twice as small horizontally as the luminance one, so that
each chrominance value covers a 2x1 pixel area.

4) ka_chroma_YUV444

The source is composed of 3 8-bit planes. One plane for the luminance (Y)
of each pixel and two planes for chrominances (U and V). These last planes
are the same size as the luminance one, so that each chrominance value covers
a 1x1 pixel area.

5) ka_chroma_RGB

The source is composed of a single 32-bit plane giving the RGB value
of each pixel. Each component as an 8-bit depth and its position
within the 32-bit word is defined by KA_RGB_<x>_SHIFT.



Drawing routines are provided to output images from one of these chroma formats
to the following types of screen output available on RISC OS:

8bpp  RGB using a given colour palette.
15bpp RGB (5 bits per component, 1 unused bit).
16bpp RGB (5 bits for reg and blue, 6 bits for green).
32bpp RGB (8 bits per component, 8 unused bits).

- at the following zooms:

  50%, 100%, 200%, 300%, 400%

- with greyscale and dithering options
  (dithering option is only used in 15bpp and 16bpp at 200%)

- with brightness, contrast and colour saturation level controls
  (not currently implemented for when the source is in format ka_chroma_RGB).
