Cracking the H.264 Codec
—Baseline Profile (BP)—Primarily for lower-cost applications with limited computing resources, this profile is used widely in videoconferencing and mobile applications.
—Main Profile (MP)—Originally intended as the mainstream consumer profile for broadcast and storage applications, the importance of this profile faded when the High Profile was developed for those applications.
—Extended Profile (XP)—Intended as the streaming video profile, this profile has relatively high compression capability and some extra tricks for robustness toward data loss and server stream switching.
—High Profile (HiP)—The primary profile for broadcast and disc storage applications, particularly for high-definition television applications (this is the profile adopted into HD DVD and Blu-ray Disc, for example).
—High 10 Profile (Hi10P)—Going beyond today’s mainstream consumer product capabilities, this profile builds on top of the High Profile—adding support for up to 10 bits per sample of decoded picture precision.
—High 4:2:2 Profile (Hi422P)—Primarily targeting professional applications that use interlaced video, this profile builds on top of the High 10 Profile—adding support for the 4:2:2 chroma subsubsampling format while using up to 10 bits per sample of decoded picture precision.
—High 4:4:4 Predictive Profile (Hi444PP)—This profile builds on top of the High 4:2:2 Profile—supporting up to 4:4:4 chroma sampling, up to 14 bits per sample, and additionally supporting efficient lossless region coding and the coding of each picture as three separate color planes.
To continue with our example, players conforming to the Baseline Profile may not be able to decode bitstreams using B-frames, meaning that the profile should be utilized on relatively low-powered devices such as cell phones or the earliest iPods. The cited Wikipedia reference contains a detailed table identifying the features supported by each profile as well as the configuration options available at each level.
To a great degree, an H.264 compressionist’s most important job is to make sure that the selected encoding parameters don’t exceed the level supported by the target playback device so that the target device can play the stream. Within the profile, you’re then free to choose among a range of encoding options that typically balance encoding speed against encoding quality, which I discuss in the third section of this article.
Encoding tools usually try to help in two ways. First, when a player is well-defined, they contain player-specific templates that are customized and tested for the profile and level supported by the player. Second, they tailor the options you can configure to the selected profile. Take, for example, Telestream’s Episode Pro H.264 encoding interface. Since I’ve selected the Baseline Profile, Telestream disables the "Entropy coding" mode, forcing me to use CAVLC (context-adaptive variable-length coding) with no access to CABAC (context-adaptive binary arithmetic coding). The "Number of B-frames" option is also disabled, preventing me from creating a set of configuration options that might not work on a player that supports only the Baseline Profile. Note that I explain B-frames and entropy encoding below.
Companies and Suppliers Mentioned