Unformatted text preview:

ECE160Spring 2008Lecture 10Basic Video Compression Techniques1ECE160 / CMPS182MultimediaLecture 10: Spring 2008Basic Video Compression TechniquesH.261, MPEG-1 and MPEG-2ECE160Spring 2008Lecture 10Basic Video Compression Techniques2Introduction to Video Compression• A video consists of a time-ordered sequence offrames, i.e., images.• An obvious solution to video compression wouldbe predictive coding based on previous frames.• Compression proceeds by subtracting images:subtract in time order and code the residualerror.• It can be done even better by searching for justthe right parts of the image to subtract from theprevious frame.ECE160Spring 2008Lecture 10Basic Video Compression Techniques3Video Compressionwith Motion Compensation• Consecutive frames in a video are similar - temporalredundancy exists.• Temporal redundancy is exploited so that not everyframe of the video needs to be coded independently as anew image.• The difference between the current frame and otherframe(s) in the sequence will be coded - small valuesand low entropy, good for compression.• Steps of Video compression based onMotion Compensation (MC):1. Motion Estimation (motion vector search).2. MC-based Prediction.3. Derivation of the prediction error, i.e., the difference.ECE160Spring 2008Lecture 10Basic Video Compression Techniques4Motion Compensation• Each image is divided into macroblocks of size NxN.– By default, N = 16 for luminance images. For chrominanceimages, N = 8 if 4:2:0 chroma subsampling is adopted.• Motion compensation operates at the macroblock level.– The current image frame is referred to as Target Frame.– A match is sought between the macroblock in the Target Frameand the most similar macroblock in previous and/or futureframe(s) (referred to as Reference frame(s)).– The displacement of the reference macroblock to the targetmacroblock is called a motion vector MV.ECE160Spring 2008Lecture 10Basic Video Compression Techniques5Motion Compensation• Macroblocks and Motion Vector in Video Compression.• MV search is usually limited to a small immediate neighborhood –both horizontal and vertical displacements in the range [− p,p].This makes a search window of size (2p+1)(2p+1).ECE160Spring 2008Lecture 10Basic Video Compression Techniques6Search for Motion Vectors• The difference between two macroblocks can then bemeasured by their Mean Absolute Difference (MAD):• The goal of the search is to find a vector (i,j) as themotion vector MV = (u,v), such that MAD(i,j) is minimum:ECE160Spring 2008Lecture 10Basic Video Compression Techniques7Sequential Search• Sequential search: sequentially search the whole(2p+1)x(2p+1) window in the Reference frame(also referred to as Full search).• A macroblock centered at each of the positions withinthe window is compared to the macroblock in the Targetframe pixel by pixel and their respective MAD is thenderived using the equation above.• The vector (i,j) that offers the least MAD is designated asthe MV (u,v) for the macroblock in the Target frame.• Sequential search method is very costly -assuming each pixel comparison requires threeoperations (subtraction, absolute value, addition),the cost for obtaining a motion vector for a singlemacroblock is (2p+1).(2p+1).N2.3 ) => O(p2N2).ECE160Spring 2008Lecture 10Basic Video Compression Techniques8Logarithmic Search• Logarithmic search: a cheaper version, that issuboptimal but still usually effective.• The procedure for 2D Logarithmic Search ofmotion vectors takes several iterations and isakin to a binary search:– As illustrated in the Figure below, initially only ninelocations in the search window are used as seeds fora MAD-based search; they are marked as `1'.– After the one that yields the minimum MAD is located,the center of the new search region is moved to it andthe step-size ("offset") is reduced to half.– In the next iteration, the nine new locations aremarked as `2', and so on.ECE160Spring 2008Lecture 10Basic Video Compression Techniques92D Logarithmic Search for Motion VectorsECE160Spring 2008Lecture 10Basic Video Compression Techniques10Hierarchical Search• The search can benefit from a hierarchical(multiresolution) approach in which initial estimationof the motion vector is obtained from imageswith a significantly reduced resolution.• The Figure below shows a three-level hierarchicalsearch in which the original image is at Level 0,images at Levels 1 and 2 are obtained by down-sampling from the previous levels by a factor of 2,and the initial search is conducted at Level 2.• Since the size of the macroblock is smallerand p can also be proportionally reduced,the number of operations required is greatly reduced.ECE160Spring 2008Lecture 10Basic Video Compression Techniques11Three-level Hierarchical Searchfor Motion VectorsECE160Spring 2008Lecture 10Basic Video Compression Techniques12Hierarchical Search• Given the estimated motion vector (uk,vk)at Level k, a 3x3 neighborhood centeredat (2.uk,2.vk) at Level k − 1 is searched forthe refined motion vector.• The refinement is such that at Level k − 1the motion vector (uk− 1,vk−1) satisfies:ECE160Spring 2008Lecture 10Basic Video Compression Techniques13Comparison of ComputationalCost of Motion Vector SearchECE160Spring 2008Lecture 10Basic Video Compression Techniques14H.261H.261: An earlier digital video compression standard, itsprinciple of MC-based compression is retained in all latervideo compression standards.• The standard was designed for videophone, videoconferencing and other audiovisual services over ISDN.• The video codec supports bit-rates of px64 kbps, wherep ranges from 1 to 30 (Hence also known as px64).• Require that the delay of the video encoder be less than150 msec so that the video can be used for real-timebidirectional video conferencing.ECE160Spring 2008Lecture 10Basic Video Compression Techniques15H.261 Video FormatsH.261 belongs to the following set of ITU recommendationsfor visual telephony systems:1. H.221 - Frame structure for an audiovisual channelsupporting 64 to 1,920 kbps.2. H.230 - Frame control signals for audiovisual systems.3. H.242 - Audiovisual communication protocols.4. H.261 - Video encoder/decoder for audiovisualservices at px64 kbps.5. H.263 - Improved video coding standard for videoconferencing at bit-rates of less than 64 kbps.6. H.320 - Narrow-band audiovisual terminal equipmentfor px64 kbps transmission.ECE160Spring 2008Lecture 10Basic Video


View Full Document

UCSB ECE 160 - Lec10Basic Video Compression

Download Lec10Basic Video Compression
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lec10Basic Video Compression and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lec10Basic Video Compression 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?