Skip to main content

Module frame_rate

Module frame_rate 

Source
Expand description

A frame rate as the fraction encoder parameters and bitstream timing take. A frame rate as the fraction of whole numbers that encoder parameters and bitstream timing take, read from the f64 a capture carries.

A caller names a rate by its fraction, carried as the f64 of that fraction: the NTSC rates are N * 1000 / 1001 (59.94 is 60000/1001), which no whole number or decimal names. The fraction nearest the f64 with a denominator up to MAX_DENOMINATOR is that fraction exactly, since any other in reach lies at least a millionth of a frame per second away, far past an f64’s error. A rate written with up to three decimals reads as its own decimal fraction, and any other rate as the nearest fraction in reach, within a thousandth of a frame per second.

Structs§

FrameRate
A frame rate of num / den frames per second, in lowest terms.