Video Compression

VideoNerd

On motion vectors over picture boundaries (or unrestricted MV mode)

History: The unrestricted motion vector mode appeared already in H.263 video standard (the predecessor of h264/avc, as extension “Unrestricted Motion Vectors”). The idea of Unrestricted Motion Vectors is not new. To best my recollection the first serious description of Unrestricted Motion Vectors was in the paper “Image and Video Coding—Emerging Standards and Beyond“, by Barry […]

Why Some Paremeters in SPS/PPS are Exp-Golomb-Coded?

Overhead of SPS and PPS is typically negligible (excepting bizarre cases when all frames are black and takes several dozens bytes). SPS and PPS are usually transmitted once per closed GOP and the size of SPS and PPS is negligible to the size of the whole GOP. So, why dozens parameters in SPS and PPS […]

idr_pic_id and Redundant Pictures in H.264/AVC

The purpose of idr_pic_id is vaguely specified in the H.264/AVC spec. The parameter idr_pic_id is signaled in the slice header of IDR picture only (i.e. if NAL type is 5). On the one hand the standard of H.264/AVC clearly says: “When two consecutive access units in decoding order are both IDR access units, the value […]

Hierarchical B-Frames or B-Pyramid

General What’s Hierarchical B-Frame Mode or B-pyramid (notice that in my opinion B-pyramid is a bad term)? If there is a run of B frames and some B-frames in the run are used for backward reference for some other B frames – then this mode is called Hierarchical B-Frames Coding or B-pyramid. The following figure […]

Frames with Negative POCs in H264

Frames with negative POCs (do not confuse with pic_order_cnt_lsb ) in AVC/H.264 are allowed, it’s not nonsense. To explain how a frame with negative POC can occur in AVC/H.264 stream, let’s introduce a new conception of Leading Frames (actually the notion of leading pictures is taken from HEVC/H.265) :            Leading pictures – pictures following […]

Difference Between NAL HRD and VCL HRD

The difference between NAL HRD and VCL HRD is whether SPS/PPS/SEIs are counted or not in HRD calculations. In NAL HRD mode all non-VLC NALs (i.e. SPS, PPS, SEIs) as well as VCL NALs (i.e. Slices) are counted in HRD while in VCL HRD mode non-VCL NALs are ignored (consequently in VCL HRD mode access […]

A Pitfall of AVC/H.264 HRD Analysis

 Don’t Hurry To Consider Your AVC/H.264 Stream as HRD non-compatible if a HRD Analyzer Reports on Overflow with Excess 1 Bit One of subtle drawbacks of AVC/H.264 HRD is that division operations are specified as abstract mathematical divisions, denoted by the symbol ÷ . The AVC/H.264 spec. specifies this symbol as follows: ÷ Used to […]

How POC Difference Delta Can Impact on Playback

Usually for progressive streams POC difference between successive frames in presentation order is 2 (x264 and JM encoder keep the POC difference equal to 2). For illustration, let’s consider GOP structure of  IPPP… , where the POC of the first frame is 0 (if the first frame is IDR then POC must be 0, otherwise […]

How Cope with I-frame Bit-Rate Peaks

Problem Description:  I-frames usually produce bitrate peaks (since temporal redundancy is not exploited). I-frame peaks make difficult to keep HRD compliancy and some devices can fail to cope with the peaks. Solutions: I observe three techniques in AVC/H.264 to smooth I-frame peaks: 1)      Encode I-frame with a coarse QP.  Disadvantage – poor quality of the […]