Prediction of Inter Macroblocks

in H.264 video coding

Qingyuan Guo

Abhishek Kedia

Index

  1. What is P-slice?
  2. What are Macroblocks?
  3. Motion Compensation.
  4. Interpolation.

P-slices

 

 The macroblocks are organized in slices, which generally represent subsets of a given picture that can be
decoded independently.

I stands for Intra, which means I-slices are reference image

P stands for predictive,  which means that P-slices are image that we obtain by motion estimation and motion

 compensation. While Inter prediction creates a prediction model from one or more previously encoded video frames.
 


 

Macroblocks

Macroblock is a processing unit in image and video compression. A macroblock typically consists of 16×16 samples, and is further subdivided into transform blocks, and may be further subdivided into prediction blocks. 

 If the macroblock is coded using the Inter-8x8 macroblock type, and each sub-macroblock is coded using the Inter-4x4 sub-macroblock type, a maximum of sixteen motion vectors may be transmitted for a single P-slice macroblock. This allow us to calculate a more accurate motion vector by using sub-pixel.
 

The AVC reference encoder selects the “best” partition size for each part of the frame.  

 In areas where there is little change between the frames (residual appears grey), a 16x16 partition is chosen; in areas of detailed motion (residual appears black or white), smaller partitions are more efficient.
 

Larger partition sizes would lead to fewer bits for encoding the motion vector and the reference frames, but could lead to more bits spent in encoding the residual  for partitions with high detail, choosing smaller partition sizes leads to more bits spent in encoding the motion vector and reference frames, but potentially fewer bits in encoding the residual. 


 Sub-pixel motion vectors
 

 

 Each partition in an inter-coded macroblock is predicted from an area of the same size in a reference picture. The motion vector has ¼-pixel precision (for the luma component)
 

Motion Compensation

Motion compensation exploits the fact that, often, for many frames of a movie, the only difference between one frame and another is the result of either the camera moving or an object in the frame moving. In reference to a video file, this means much of the information that represents one frame will be the same as the information used in the next frame.

Using motion compensation, a video stream will contain some full (reference) frames; then the only information stored for the frames in between would be the information needed to transform the previous frame into the next frame. This is to change the way information is represented to reduce the number of bytes/bits required to store it or send it.

Copy of deck

By shonitchamadia

Copy of deck

  • 83