Numerical Approximations
Prior to the development of fast SIMD floating-point processors, most digital implementations of RGB->Y'UV used integer math, in particular fixed-point approximations. In the following examples, the operator "" denotes a right-shift of a by b bits.
Traditional 8 bit representation of Y'UV with unsigned integers uses the following
1. Basic transform
2. Scale down to 8 bits with rounding
3. Shift values
Y' values are conventionally shifted and scaled to the range (referred to as studio swing) rather than using the full range of (referred to as full swing). This confusing practice derives from the MPEG standards and explains why 16 is added to Y' and why the Y' coefficients in the basic transform sum to 220 instead of 255. U and V values, which may be positive or negative, are summed with 128 to make them always positive.
Read more about this topic: YUV
Famous quotes containing the word numerical:
“The terrible tabulation of the French statists brings every piece of whim and humor to be reducible also to exact numerical ratios. If one man in twenty thousand, or in thirty thousand, eats shoes, or marries his grandmother, then, in every twenty thousand, or thirty thousand, is found one man who eats shoes, or marries his grandmother.”
—Ralph Waldo Emerson (18031882)