ColorSpaceInfo

data class ColorSpaceInfo(val matrix: ColorMatrix = ColorMatrix.Bt709, val primaries: ColorPrimaries = ColorPrimaries.Bt709, val transfer: ColorTransfer = ColorTransfer.Bt709, val fullRange: Boolean = false, val chromaLocation: ChromaLocation = ChromaLocation.Left, val rangeSpecified: Boolean = true, val matrixSpecified: Boolean = true, val primariesSpecified: Boolean = true, val transferSpecified: Boolean = true)

The colour metadata a renderer must honour to produce a correct picture.

Every field here changes what the viewer sees. Ignoring matrix shifts hues, most visibly on saturated reds. Ignoring fullRange turns blacks grey and clips whites. Ignoring chromaLocation bleeds colour half a pixel at sharp edges. None of this is subtle once it is wrong, and all of it is already known at decode time.

Constructors

Link copied to clipboard
constructor(matrix: ColorMatrix = ColorMatrix.Bt709, primaries: ColorPrimaries = ColorPrimaries.Bt709, transfer: ColorTransfer = ColorTransfer.Bt709, fullRange: Boolean = false, chromaLocation: ChromaLocation = ChromaLocation.Left, rangeSpecified: Boolean = true, matrixSpecified: Boolean = true, primariesSpecified: Boolean = true, transferSpecified: Boolean = true)

Types

Link copied to clipboard
object Companion

The values a decoder reports when the source says nothing.

Properties

Link copied to clipboard

True when every field here is the source's own word rather than a guess.

Link copied to clipboard
Link copied to clipboard

True for 0 to 255, false for the 16 to 235 studio range. Most video is studio range.

Link copied to clipboard

True when the transfer function means high dynamic range.

Link copied to clipboard
Link copied to clipboard

False when the source declared no matrix and matrix is this library's guess.

Link copied to clipboard
Link copied to clipboard

False when the source declared no primaries. See matrixSpecified.

Link copied to clipboard

False only when the source did not declare a range and fullRange is a rendering fallback.

Link copied to clipboard
Link copied to clipboard

False when the source declared no transfer function. See matrixSpecified.