• Save
Upcoming SlideShare
Loading in...5

Like this? Share it with your network



Uploaded on

BTC305 3: Interframe (MPEG) Compression

BTC305 3: Interframe (MPEG) Compression

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 9

http://learn.rave.ac.uk 9

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. BSc (Hons) Broadcast Technology Unit BTC305: Media Compression Handout Three: Interframe Compression (MPEG) Lecturer: Martin Uren 1
  • 2. Compression of Moving Images We have already examined the issues surrounding the compression of still images using JPEG and its subsequent adapting for video applications under the generic description of Motion JPEG (M-JPEG). Now we need to consider additional methods for the compression of video sequences. MPEG MPEG are the Moving Picture Experts group, originally established to set standards for the compression of feature films onto a CD format (called Video-CD and using the MPEG-1 standard), but later given the broader brief of compressing sound and pictures for a wide range of applications. They subsequently developed the MPEG-2 and MPEG-4 compression standards and the MPEG-7 standard for ‘metadata’ (the data describing video and audio content). MPEG deals with the compression of moving pictures and sound. In a typical video sequence, much of the picture content is the same from frame to frame, so MPEG devised techniques for only encoding the difference between frames. This can involve motion prediction and motion vectors to describe the movement of picture blocks from one frame to the next. Their first standard, MPEG-1 resulted in a 1.2Mbit/s video stream from a Video CD. This is a huge reduction in data and gives a picture quality a little better than VHS (most of the time!). The format was not commercially successful, but is still used for example in news production systems to give browse quality images on journalists’ workstations. MPEG-2 from a DVD is typically between 4Mbit/s and 7Mbit/s, and the resultant images are much higher quality than MPEG-1. When used in transmission (for example DVB (Digital Video Broadcasting)) typical data rates are between 2Mbit/s and 5Mbit/s. From this we can roughly gauge the picture quality by knowing the bit rate, but it’s not that simple. What factors will affect the viewed picture quality if JPEG or MPEG encoding is used? 2
  • 3. Quality Quality MPEG-4 HDTV Digital MPEG-2 Studio D6 MPEG-1 D5 Broadcast MPEG-4 Transmission Digital DV Video-CD Betacam DVD Video- MPEG-4 conference Video- H.261 Data Rate (bit/second) telephone 10k 50k 100k 500k 1M 5M 10M 50M 100M 500M 1G 2G Modem ADSL DTV SDI HDSDI Compression System Quality and Bit-Rates Interframe Techniques There are two basic techniques that are used: 1. Subtraction is used to find the differences between adjacent frames. Only the differences are coded. 2. Motion compensated prediction takes a shifted block from the previous frame to use as a prediction. A motion vector is generated to describe the shift in position. 3
  • 4. Motion Vectors Motion Vectors as used in the MPEG1 standards are the result of finding the best match for each macroblock in a picture using a Motion Estimator. A macroblock is a 16 x 16 pixel group of 4 blocks. Motion vectors are expressed in terms of vertical and horizontal displacement from one field or frame to the next. Block matching is used to decide where each macroblock has moved within a search area (perhaps 32 x 32 pixels). Each macroblock is therefore assigned a single motion vector. Block matching is used within MPEG to produce predicted frames with much higher levels of BRR than would otherwise be possible. The technique is illustrated in the drawing below. MotionVectors (or How to Turn a Daisy into a Golfball!) 1 Moving Picture Experts Group (originally Motion Picture Experts Group) 4
  • 5. MPEG-1 MPEG2 was set up by the ISO and the IEC in 1988 to standardise video and audio compression coding methods. What are the difficulties to consider when examining BRR methods for moving video images? Answer: MPEG set out to code moving pictures and audio for use primarily with compact disc formats. This work resulted in the MPEG-1 standard, usable over a range of bit rates, but optimised for video data rates of about 1.2Mbit/s (e.g. Philips Video-CD format). Note that MPEG-1 defines a multiplex of video, audio and data. MPEG-1 reduces a BT.601 TV signal to SIF (Standard Image Format) with 352 pixels x 288 lines (PAL) or 352 x 240 (NTSC). SIF also halves the vertical colour resolution (i.e. 2:1:0 format) and ignores interlace. This pre-processing reduces the data rate at the input to the main compression system. MPEG have defined a process that applies motion compensated interframe prediction to the JPEG digital image coder shown above. A shifted macroblock of four 8 x 8 pixel blocks from the previous frame is used as a prediction. A motion vector is generated to describe the shift in position of each macroblock in the frame. These motion vectors are encoded with the picture data in the MPEG-1 bitstream. The resulting encoder and decoder block diagrams are shown overleaf. MPEG-1 uses bi-directional prediction for some frames using past and future frames. How many motion vectors are there for each frame? Answer: 2 Moving Picture Experts Group, also known as Motion Picture Experts Group 5
  • 6. MPEG-1 (Continued) I/P RLC O/P Pre- process BRR Q & Buffer VLC Motion Estimator Motion Vectors Motion Motion Shifted Compen- Previous Frame sator Frame Inverse 1 Delay BRR Q MPEG Video Coder MPEG Video Decoder 6
  • 7. MPEG-2 MPEG set goals for the picture quality likely to be obtained from a compressed digital capacity, as shown in the table below. MPEG-1 was optimised for about 1.2Mbit/s, while MPEG-2 addresses higher quality moving images and is optimised for data rates of 2Mbit/s to 15Mbit/s. MPEG-2 also handles flexible, dynamically variable data rates, makes use of the temporal redundancy in interlaced pictures, and is designed to be fully compatible with the data rates used in telecomms networks. It is backwards compatible with MPEG-1. MPEG-2 Video Compression Source coding for the digital video follows the scheme shown above for MPEG-1. It results in an Elementary Stream. MPEG defined a family of sub-systems described in terms of Profiles and Levels, as shown in the table overleaf. MPEG-2 MP@ML (Main Profile at Main Level) has been almost universally used for digital transmission systems. However, it is not high enough quality for use in studios, so a further level was added. MPEG-2 was aimed at digital distribution and transmission systems. Much interest was expressed in using MPEG-2 in the production chain. This is where MPEG-2 MP@ML has some limitations: 1. 4:2:0 sampling (for 625 lines - 4:1:1 for 525 line systems), rather than the 4:2:2 sampling of BT.601. This reduces the colour resolution, most critically for chromakey applications. 2. Maximum data rate of 15Mbit/s. This is not adequate for contribution quality or use in a studio centre. 3. Only the active picture area is coded. These problems led to the establishment of a 422 sub-group of MPEG who developed the 422-profile (MPEG-2 4:2:2P@ML). 7
  • 8. MPEG-2 (Continued) Like MPEG-1, MPEG-2 uses bi-directional prediction for some frames using past and future frames. This makes the encoding and decoding more complex than JPEG, and also leads to difficulties in a studio centre with switching and editing. Three types of compressed frames are used: I = Intra coded picture P = Predictively coded picture B = Bidirectionally coded picture Frames are combined in a sequence, or GOP3. An example of a 12-frame GOP is shown overleaf. Betacam SX is a proprietary frame-accurate editable variant of MPEG- 2. It is an application of MPEG-2 422P@ML using 4:2:2 sampling and a 10:1 compression ratio. The data rate covers the range 15Mbit/s to 50Mbit/s. It also codes up to 608 lines, to include some field blanking lines, and uses a 2-frame GOP of the form I B I B. 12-Frame GOP 3 Group Of Pictures 8
  • 9. MPEG-2 (Continued) Compressed Approximate Quality Digital Equivalen Capacit ce y 1250 line HDTV with no perceptible degradation 40 Mbit/s HDTV quality with some distortion on critical scenes 20 Mbit/s 625 line studio quality with no perceptible degradation 10 Mbit/s BT.601 625 line quality with some distortion on critical scenes 5 Mbit/s PAL Reduced quality (312 line) with no perceptible degradation 2.5 Mbit/s Reduced quality (312 line) with some distortion on critical 1.2 Mbit/s VHS scenes MPEG Compressed Picture Quality Profiles SNR Spatially Simple Main Scalable Scalable High No B Frames B Frames B Frames B Frames B Frames Levels 4:2:0 4:2:0 4:2:0 4:2:0 4:2:0 & 4:2:2 High 1920 x 1152 80Mbit/s 100Mbit/s High 1440 1440 x 1152 60Mbit/s 60Mbit/s 80Mbit/s Main 720 x 576 15Mbit/s 15Mbit/s 15Mbit/s 20Mbit/s Low 352 x 288 4Mbit/s 4Mbit/s MPEG Family Members 9
  • 10. MPEG-2 (Continued) MPEG Video Bitstream 10