#
Color Space and Color Range Affecting Playback

Playback single step and plugins cause the render to be in the session color model, while continuous playback with no plugins tries to use the file’s best color model for the display (for speed). This can create a visible effect of a switch in color in the Compositor, usually shown as grayish versus over-bright.

The cause of the issue is that X11 is RGB only and it is used to draw the refresh frame. So single step is always drawn in RGB. To make a YUV frame into RGB, a color model transfer function is used. The math equations are based on color_space and color_range. In this case, color_range is the cause of the gray offset. The YUV mpeg color range is [16..235] for Y, [16..240] for UV, and the color range used by YUV jpeg is [0..255] for YUV.

Figure 17.3: Color space and Color range

The mpeg YUV color range [16..235] looks sort of like an old TV if it is viewed on a display with jpeg range [0..255]. A common expression for the short mpeg color range is compressed color range. If you are using color compressed data with no display decompression, or using uncompressed data and the display is configured to use compression, the color range will appear squished or stretched, as too gray or too much contrast.

The use X11 direct when possible preference with X11 as your video driver, generally means that you value speed over color range. When you use this feature and the color range preference is mismatched, the color switch offsets will still appear. This is a personal choice solely for improved speed.

There is now program code to look for RGB versus YUV color model mismatches. You can override the default setup, which mirrors the original code, via the following.

Settings → Preferences → Appearance tab in the lower left hand corner (Figure 17.3):

YUV color space
  default choice is BT601, alternate is BT709 (High Definition), BT2020 (UHD)
YUV color range
  default choice is JPEG, alternate is MPEG

Some general tips (See also 3.2 Color model and Overview on Color Management):

- If your hardware allows it use RGB-Float (in Settings → Format); this format does not lead to transfer errors from one model to another, but it uses more cpu.
- Use RGB-8 if the source is RGB and YUV-8 if the source is YUV (most commonly used).
- If you notice alterations in color/brightness representation, try playing with color models in Settings → Format and with YUV color space and YUV color range in Settings → Preferences → Appearance tab. Another possibility is to check if the display color model conforms to the project color model. A practical case that may arise is as follows1: YUV source with limited color range (MPEG or TV); CINELERRA-GG set with the color range to extended (JPEG or PC); the colors on the compositor will be flattened. If we set the color range to MPEG the colors will be correct but hard clipping will occur. In this case the best result is presented by setting the color range to JPEG but then doing a conversion of the source to JPEG color range via the ColorSpace plugin. Summary table:

Source | YUV Color Range | Colors
--- | --- | ---
MPEG | JPEG | Flat colors
MPEG | MPEG | Hard clipping
MPEG + conversion to JPEG | JPEG | Colors OK

#### Footnotes

... follows 1
  thanks to DeJay