13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Media Data Atom TypesVideo MediaThe values of Y, Cb, and Cr can be represented using a variety of bit depths, trading off accuracy for file size.Similarly, the chrominance values can be subsampled, recording only one pixel’s color value out of two, forexample, or averaging the color value of adjacent pixels. This subsampling is a form of compression, but if noadditional lossy compression is performed on the sampled video, it is still referred to as “uncompressed” Y´CbCrvideo. In addition, a fourth component can be added to Y´CbCr video to record an alpha channel.The number of components (Y´CbCr with or without alpha) and any subsampling are denoted using ratios ofthree or four numbers, such as 4:2:2 to indicate 4 bits of Y to 2 bits each of Cb and Cr (chroma subsampling),or 4:4:4 for equal storage of Y, Cb, and Cr (no subsampling), or 4:4:4:4 for Y´CbCr plus alpha with no subsampling.The ratios do not typically denote actual bit depths.Uncompressed Y´CbCr video data is typically stored as follows:●●●Y´, Cb, and Cr components of each line are stored spatially left to right and temporally from earliest tolatest.The lines of a field or frame are stored spatially top to bottom and temporally earliest to latest.Y´ is an unsigned integer. Cb and Cr are twos-complement signed integers.The yuv2 stream, for example, is encoded in a series of 4-byte packets. Each packet represents two adjacentpixels on the same scan line. The bytes within each packet are ordered as follows:y0 u y1 vy0 is the luminance value for the left pixel; y1 the luminance for the right pixel. u and v are chromatic valuesthat are shared by both pixels.Accurate conversion between RGB and Y´CbCr color spaces requires a computation for each component ofeach pixel. An example conversion from yuv2 into RGB is represented by the following equations:r = 1.402 * v + y + .5g = y - .7<strong>14</strong>3 * v - .3437 * u + .5b = 1.77 * u + y + .5The r, g, and b values range from 0 to 255.The coefficients in these equations are derived from matrix operations and depend on the reference valuesused for the primary colors and for white. QuickTime uses canonical values for these reference coefficientsbased on published standards. The sample description extension for Y´CbCr formats includes a 'colr' atom,<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.170

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!