class YUVtoRGB(config={}, **kwds)[source]

Bases: pyctools.core.base.Component

YUV (YCbCr) to RGB converter.

Convert “YUV” (actually YCbCr) frames (with any UV subsampling) to RGB.

For 4:2:2 subsampling a high quality resampling filter is used, as specified in BBC R&D Report 1984/04. For other subsampling patterns, where the correct filtering is less well specified, simple bicubic interpolation is used.

The matrix config item chooses the matrix coefficient set. It can be '601' (”Rec. 601”, standard definition) or '709' (”Rec. 709”, high definition). In 'auto' mode the matrix is chosen according to the number of lines in the image.

WARNING: this component assumes Y input and RGB output both have black level 0 and white level 255, not the 16..235 range specified in Rec 601. See pyctools.components.colourspace.levels for components to convert the Y input or RGB output. The UV input should be in the range -112..112.

inputs = ['input_Y', 'input_UV']

Comments or questions? Please email