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 while adjusting
brightness, contrast and colour saturation level controls
(not currently implemented for when the source is in format ka_chroma_RGB).

a) RGB modes
8bpp  RGB using a given colour palette.
15bpp (A/T)(RGB/BGR) (5 bits per component, 1 bit Tranparency or Aplha).
16bpp RGB/BGR (5 bits for reg and blue, 6 bits for green).
32bpp (A/T)(RGB/BGR) (8 bits per component, 8 bits Tranparency or Aplha).
Full opacity is defined as T = 0 or A = max (1 for 1 bit, 0xff for 8-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%)

b) YUV modes (Video Overlays)
- at zoom 100% only
- with greyscale options
- C or NEON routines for biplanar formats NV12, NV21.
- C or NEON routines for triplanar formats YV12, YV16.
- C routines for single plane formats UYVY, YUY2.
