NAL Units

Coded H.264 data is stored or transmitted as a series of packets known as Network Abstraction Layer Units, NAL Units or NALUs. Each NAL Unit consists of a 1-byte NALU header followed by a byte stream containing control information or coded video data. The header indicates the NALU type. Parameter Sets and slices that are used for reference, i.e. used to predict further frames, are considered important or high priority. Since their loss could make it difficult to decode subsequent coded slices. Non-reference slices are considered to be less important to the decoder. Since their loss will not affect any further decoding. This information can optionally be used to prioritise certain NALUs during transmission.

NAL Units and Parameter Sets in H.264
H.264 hierarchical organization of syntax

A coded sequence begins with an Instantaneous Decoder Refresh (IDR) Access Unit, made up of one or more IDR slices, each of which is an Intra coded slice. This is followed by the default slice type,
i.e. a non-IDR coded slice, and/or by Data Partitioned slices. Non-VCL NAL units include Parameter Sets, Supplemental Enhancement Information parameters that may be useful for decoding and displaying video data, but are not essential for correct decoding, and delimiters that define boundaries between coded sections.

Parameter Sets

Parameter Sets are NAL units that carry decoding parameters common to a number of coded slices. Sending these parameters independently of coded slices can improve efficiency, since
common parameters need only be sent once. In a lossy transmission scenario, Parameter Sets may be sent with a higher quality of service using e.g. Forward Error Correction or a priority mechanism.

Sequence Parameter Set (SPS) contains parameters common to an entire video sequence such as the Profile and Level, the size of a video frame and certain decoder constraints such as the maximum number of reference frames. Each SPS has a unique identifier.

Picture Parameter Set (PPS) contains common parameters that may apply to a sequence or subset of coded frames, such as entropy coding type, number of active reference pictures
and initialization parameters.

NALU types