Introduction
1-5
depicts the working of the H.264 High Profile Encoder algorithm.
Figure 1-3 Working of H.264 Video Encoder
In H.264 Encoder, the operations are performed on set of specific N macro blocks. The selection of
N depends on the availability of internal memory. The operations such as motion compensation,
transform and quantization, run length encoding and inverse quantization, and inverse transform
blocks are called once for all the inter macro blocks in the set of N.
The encoder is designed such that, it always tries to maximize the throughput of each unit by
allowing it to perform on maximum possible number of macro blocks.
Motion Estimation is the step where encoder searches for the best match in the available reference
frame(s). After quantization, contents of some blocks become zero. The H.264 Encoder keeps track
of this information and passes the information of coded 4x4 blocks to inverse transform so that it
can skip computation for those blocks that contains all zero co-efficients and are not coded.
The H.264 Encoder defines in-loop filtering to avoid blocks across the 4x4 block boundaries. It is
the second most computational task of H.264 encoding process after motion estimation. In-loop
filtering is applied on all 4x4 edges as a post-process and the operations depend upon the edge
strength of the particular edge.
The H.264 Encoder applies entropy coding methods to use context based adaptivity, which in turn
improves the coding performance. All the macro blocks, which belong to a slice, must be encoded
in a raster scan order. Entropy coding methods such has Golomb coding, Context Adaptive
Variable Length Coding (CAVLC) and Context Adaptive Binary Arthmetic Coding (CABAC). Syntax
parameter, which will be used for decoding will be coded in Golomb code. CAVLC is the stage
where transformed and quantized co-efficients are entropy coded using context adaptive table
switching across different symbols. The syntax defined by the H264 Encoder stores the information
at 4x4 block level. CABAC coding depend on context based probability model is selected. Using
State and Most Probable Bit each bits of the syntax elements and residual data are encoded.