Video Compression Video : Sequence of frames Each Frame : 2-D Array of Pixels Video: 3-D data – 2-D Spatial, 1-D Temporal Video has both : – Spatial Redundancy (within each frame – Intra-Frame) – Temporal Redundancy (between Frames – Inter-Frame)
Video Coding Applications Broadcast TV Consumer Playback Apps. (ex. Interactive Games) Desktop Video (ex. Authoring/Editing) Video Conferencing/Video Telephony
Major Video Coding Techniques Intel Indeo Motion JPEG XYZ – Algorithm H.261/H.263 MPEG (Motion Pictures Expert Group)
Intel Indeo Interpolate Video Data (ex. 128 x 240 256 x 480) Subsample Color components 4:1 Use 16 bit codebook Use Frame differencing
Motion JPEG Each Frame treated separately Temporal Redundancy not exploited Baseline JPEG used to encode each frame Good Support for Random Access to Frames (Not a standard; but used in many systems)
XYZ Algorithm Uses spatial-temporal redundancy X, Y : Spatial Components ; Z : Temporal Component Divide each Frame into 8 x 8 block Video Cube : Corresponding blocks of 8 consecutive Frames Apply 3-D DCT to video cubes Quantize, Entropy code the coefficients
XYZ - Algorithm
Motion Estimation Techniques Gradient Techniques Pel-recursive Techniques Block-matching Techniques Frequency-domain Techniques (Block-matching techniques : most widely used)
Terminology Reference Frame : Frame in past (or future) used to predict in current frame Current Frame: Frame which is being analyzed to derive motion vectors Motion vector : The displacement of the closest matching block in reference frame for a block in current frame Motion Estimator : Process of determining the values of motion vectors for each frame
Block-Matching technique (BMT) Motion of a macroblock of pixels within a frame is estimated Ignores rotational motion Assumes all pixels within macroblock to have the same uniform motion Range of motion vector is constrained by ‘Search Window’
Outline of BMT For each macroblock in current Frame Do: Search in the reference frame within search area Find the closest matching macroblock Determine the displacement (motion vector)
Finding Best Matching Block
Finding Motion Vector
Distortion Measures Mean Square Error Mean Absolute Error Cross Correlation Function Pixel Difference Classification
Motion Vector Search Algorithms Exhaustive Search 3-step Search 2-Dimensional Search Conjugate Direction Search Hierarchical Motion Estimation
Three-Step Search Algorithm The vector chosen has location x=6, y=4
2-D Logarithm Search The motion vector chosen is x=6, y=4
Conjugate Direction Search
Hierarchical Motion Estimation