H.264 Architecture Basics
H.264 organises a picture into a grid of macroblocks, each covering a sixteen-by-sixteen sample region. All higher-level prediction, transform and coding decisions are expressed relative to that grid, which is why the macroblock is the natural unit for reasoning about the codec.
Prediction
The codec's efficiency comes from prediction. Intra prediction forms a block from previously decoded neighbours within the same picture, using directional modes that approximate edges and gradients. Inter prediction forms a block from a displaced region of a previously coded picture, described by a motion vector. The residual, the difference between prediction and reality, is what actually gets compressed.

Transform and quantisation
Residuals pass through an integer transform that decorrelates them, after which a quantisation step discards fine detail in a controlled way. Quantisation is where the quality dial acts; a coarser step yields fewer coefficients and more compression at the expense of visible artefacts.
Entropy coding and the profile ladder
Finally the coefficients and side information are entropy coded. Two coders exist, one context-adaptive and arithmetic in nature, one context-adaptive and variable-length. The more efficient coder belongs to higher profiles.
Profiles bound the toolset a decoder must implement. Baseline favours simplicity and robustness. Main adds bi-prediction and the arithmetic coder. High adds a finer transform and a more detailed prediction scheme, and is the typical distribution profile on this desk. Levels bound resolution, frame rate and bitrate combinations rather than features.
| Profile | Notable tools | Typical use |
|---|---|---|
| Baseline | Simplest prediction, no bi-prediction | Low-power legacy surface |
| Main | Bi-prediction, arithmetic coding | General distribution |
| High | Finer transform, richer intra modes | HD and UHD delivery |
H.264 remains the compatibility floor of any ladder. Compare it with HEVC and AV1 to see how each later generation extends the same reasoning.