Color Models

List of supported color models.

Note: the color models are endian independent, because the color components are defined by their position in memory, not by their significance in an uint32_t value.

For effects that work on the color components, RGBA8888 is the recommended color model for frei0r-1.2 effects. For effects that only work on pixels, PACKED32 is the recommended color model since it helps the application to avoid unnecessary color conversions.

Effects can choose an appropriate color model, applications must support all color models and do conversions if necessary. Source effects must not use the PACKED32 color model because the application must know in which color model the created framebuffers are represented.

For each color model, a frame consists of width*height pixels which are stored row-wise and consecutively in memory. The size of a pixel is 4 bytes. There is no extra pitch parameter (i.e. the pitch is simply width*4).

The following additional constraints must be honored:

- The top-most line of a frame is stored first in memory.
- A frame must be aligned to a 16 byte border in memory.
- The width and height of a frame must be positive
- The width and height of a frame must be integer multiples of 8

These constraints make sure that each line is stored at an address aligned to 16 byte.