vc2_conformance.dimensions_and_depths: Picture dimension and depth calculation

The vc2_conformance.dimensions_and_depths module contains the compute_dimensions_and_depths() function which returns the picture dimensions and bit depths implied by a VC-2 video format.

compute_dimensions_and_depths(video_parameters, picture_coding_mode)

Compute the dimensions, bit depth and bytes-per-sample of a picture.

Parameters
video_parametersVideoParameters
picture_coding_modePictureCodingModes
Returns
OrderedDict

An ordered dictionary mapping from component name (“Y”, “C1” and “C2”) to a DimensionsAndDepths (width, height, depth_bits, bytes_per_sample) namedtuple.

class DimensionsAndDepths(width, height, depth_bits, bytes_per_sample)

A set of picture component dimensions and bit depths.

Parameters
width, heightint

The dimensions of the picture.

depth_bitsint

The number of bits per pixel.

bytes_per_sampleint

The number of bytes used to store each pixel value in raw file formats (see vc2_conformance.file_format).