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ยง
- Frame
Rate - A frame rate of
num / denframes per second, in lowest terms.
Constantsยง
- MAX_
DENOMINATOR ๐ - The largest denominator a rate is read with: 1001 holds every NTSC rate and every rate written with up to three decimals.
- MAX_FPS ๐
- MIN_FPS ๐
- The span of rates a capture runs at, in frames per second.
Functionsยง
- gcd ๐
- limit_
denominator ๐ - The fraction nearest
num / denwhose denominator is at mostmax_den, in lowest terms: the last continued-fraction convergent within the bound, or the semiconvergent past it where that lies nearer.