DolbyVisionRpu

data class DolbyVisionRpu(val header: DolbyVisionRpuHeader, val mapping: DolbyVisionMapping, val color: DolbyVisionColor)

Everything the RPU of one decoded frame says about turning its base layer into the graded picture, as FFmpeg's decoder parsed it into AVDOVIMetadata: the header, the reshaping and inverse quantization in mapping, and the matrices and levels of the signal in color.

Frame.composeDolbyVision applies the reshaping and the matrices on the CPU. This is for a caller that composes somewhere else, such as in a shader, or inspects the RPU. Frame.dolbyVision is the cheaper read when only the levels matter.

Every number is the one FFmpeg holds, exactly, so each can be checked against what ffprobe -show_frames prints. Pivots are code values of the base layer, of DolbyVisionRpuHeader.baseLayerBitDepth bits. Coefficients are fixed-point numbers over 2^DolbyVisionRpuHeader.coefficientLog2Denominator, because FFmpeg turns an RPU that codes them as floating point into that form too; coefficientValue gives one as a Double. Matrix entries and offsets are Rationals.

Constructors

Link copied to clipboard
constructor(header: DolbyVisionRpuHeader, mapping: DolbyVisionMapping, color: DolbyVisionColor)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun coefficientValue(coefficient: Long): Double

The number a fixed-point coefficient of this RPU stands for.