Apple Video
   HOME

TheInfoList



OR:

Apple Video is a
lossy In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data si ...
video compression and decompression algorithm (
codec A codec is a device or computer program that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder. In electronic communications, an endec is a device that acts as both an encoder and a decoder on a signal or ...
) developed by Apple Inc. and first released as part of QuickTime 1.0 in 1991. The codec is also known as QuickTime Video, by its FourCC RPZA and the name Road Pizza. (The codename "Road Pizza" is a reference to the idea that "when you run over an animal, you're basically compressing it on the freeway".) When used in the
AVI Avi is a given name, usually masculine, often a diminutive of Avram, Avraham, etc. It is sometimes feminine and a diminutive of the Hebrew spelling of Abigail. People with the given name include: * Avi (born 1937), Newbery award-winning Americ ...
container A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping. Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
, the FourCC AZPR is also used. The bit-stream format of Apple Video has been reverse-engineered and a decoder has been implemented in the projects XAnim and
libavcodec libavcodec is a free and open-source library of codecs for encoding and decoding video and audio data. libavcodec is an integral part of many open-source multimedia applications and frameworks. The popular MPV, xine and VLC media players u ...
.


Technical Details

The codec operates on 4×4 blocks of pixels in the
RGB The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three addi ...
colorspace. Each frame is segmented into 4×4 blocks in raster-scan order. Each block is coded in one of four coding modes: skip, single color, four color, or 16 color. Colors are represented by 16 bits with a bit-depth of 5 bit for each of the three components red, green, and blue, a format known as RGB555. Because Apple Video operates in the image domain without motion compensation, decoding is much faster than
MPEG The Moving Picture Experts Group (MPEG) is an alliance of working groups established jointly by ISO and IEC that sets standards for media coding, including compression coding of audio, video, graphics, and genomic data; and transmission and f ...
-style codecs which use
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
and perform coding in a transform domain. As a tradeoff, the compression performance of Apple Video is lower.


Skip mode

The skip mode realizes
conditional replenishment Conditional (if then) may refer to: * Causal conditional, if X then Y, where X is a cause of Y *Conditional probability, the probability of an event A given that another event B has occurred * Conditional proof, in logic: a proof that asserts a ...
. If a block is coded in skip mode, the content of the block at same location in the previous frame is copied to the current frame. Runs of skip blocks are coded in a
run-length encoding Run-length encoding (RLE) is a form of lossless data compression in which ''runs'' of data (sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original ...
scheme, enabling a high compression ratio in static areas of the picture.


Single color mode

In single color mode, all pixels in a block are decoded in the same color. This can be interpreted as a
palette Palette may refer to: * Cosmetic palette, an archaeological form * Palette, another name for a color scheme * Palette (painting), a wooden board used for mixing colors for a painting ** Palette knife, an implement for painting * Palette (company) ...
with a single color.


Four color mode

In four color mode, each pixel in a block is decoded as one of four colors which are specified in a palette. To select one of the four entries, 2 bits per pixel are written to the bit-stream. The same palette is used for a run of length between one and 32 blocks. Of the four colors, two are explicitly written to the bit-stream, while the other two are calculated at the decoder by
linear interpolation In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points. Linear interpolation between two known points If the two known poi ...
in the RGB colorspace using the following equations: ::\mathrm = \frac * \mathrm +\frac * \mathrm \approx \frac * \mathrm +\frac * \mathrm ::\mathrm = \frac * \mathrm +\frac * \mathrm \approx \frac * \mathrm +\frac * \mathrm where color0 and color3 are the two colors which are written in the bit-stream. The four colors can be interpreted as lying equidistantly spaced on a line segment in the three-dimensional vector space with the three components red, green, and blue. The end-points of this line are written in the bit-stream. A similar color-interpolation scheme is used in
S3 Texture Compression S3 Texture Compression (S3TC) (sometimes also called DXTn, DXTC, or BCn) is a group of related lossy texture compression algorithms originally developed by Iourcha et al. of S3 Graphics, Ltd. for use in their Savage 3D computer graphics accelerat ...
. Interpreted as
vector quantization Vector quantization (VQ) is a classical quantization technique from signal processing that allows the modeling of probability density functions by the distribution of prototype vectors. It was originally used for data compression. It works by di ...
, a three-dimensional vector with the components red, green, and blue is quantized using a codebook with four entries.


16 color mode

In 16-color mode, the color of each pixel in a block is explicitly written in the bit-stream. This mode is lossless and equivalent to raw
PCM Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the am ...
without any compression.


See also

* Indexed color *
Color quantization In computer graphics, color quantization or color image quantization is quantization applied to color spaces; it is a process that reduces the number of distinct colors used in an image, usually with the intention that the new image should be as v ...
* Block truncation coding, a similar coding technique for grayscale content * Color Cell Compression, a similar coding technique for color content, based on block truncation coding * Microsoft Video 1, a codec based on a similar design * QuickTime Graphics, a codec based on a similar design * Smacker video, a codec based on a similar design *
S3 Texture Compression S3 Texture Compression (S3TC) (sometimes also called DXTn, DXTC, or BCn) is a group of related lossy texture compression algorithms originally developed by Iourcha et al. of S3 Graphics, Ltd. for use in their Savage 3D computer graphics accelerat ...
, a texture compression format based on a similar design


References


External links


Apple Video decoder - FFmpeg
{{Compression formats Video codecs Lossy compression algorithms
Video Video is an electronic medium for the recording, copying, playback, broadcasting, and display of moving visual media. Video was first developed for mechanical television systems, which were quickly replaced by cathode-ray tube (CRT) sy ...