MPEG & MP3 -supplement - from “ Graham McAllister - Nortel Networks ”

Preview:

Citation preview

MPEG & MP3MPEG & MP3MPEG & MP3MPEG & MP3-supplement supplement

- from “from “Graham McAllister - Nortel NetworksGraham McAllister - Nortel Networks””

Technique Compression Ratio

When?

Huffman 1.5-2:1 1952

RLE 4-10:1 1966

LZW 2-10:1 1977&84

Quadtree 2:1 1980

VQ 10:1 1984

Directional Filtering

10-40:1 1985

Fractals 10-1000:1 1988

MPEG-1 10-100:1 1993

Surface Methods

10-50:1 1995

MPEG-2 10-200:1 1995

MPEG-4 10-500:1 1999

time

MPEG Today• MPEG-2

– Super-set of MPEG-1– Rates up to 10 Mbps (720x486)– Can do HDTV (no MPEG-3)

• MPEG-4– Around Objects, not Frames– Lower bandwidth

• MPEG-7– Not (yet) a standard– Allows content-description (ease of searching)

• MPEG-21• MP3

– For audio– MPEG-1 Layer-3

Digital video formats

MPEG / MJPEGFiles with a .mpg extension

Apple QuickTimeFiles with a .mov or .qt extension

Microsoft AVIFiles with a .avi extension

Real PlayerFiles with a .rm extension

1. Image Sequence Compression

• Uses Inter-frame encoding

• Also known an image sequence or temporal coding

Temporal Redundancy Reduction

MPEG Process• How does it work?• 1. Sub-sample

• Reduces data by around 50%

R G B Y U V

luminance

MPEG Process II• 2. Motion Detection – on luminance block

only• three types of frame …• I Frames – intra-coded• P Frames – prediction from previous frame• B frames – use bi-directional prediction

1

I

2

B

3

B

4

P

5

B

6

P

7

B

8

I

• Example sequence transmitted as I P B B I B B

Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Frame 7

I frame B frame B frame P frame B frame B frame I frame

MPEGcompression

Forwardprediction

Bidirectionalprediction

Compressedstream

Inputstream

Motion Compensation• I-Frame

– Independently reconstructed

• P-Frame– Forward predicted

from the last I-Frame or P-Frame

• B-Frame– forward predicted

and backward predicted from the last/next I-frame or P-frame

Transmitted as - I P B B B P B B B

Motion Prediction

Motion Estimation

Motion Estimation (cont’d)

Temporal Redundancy Reduction

• I frames are independently encoded• P frames are based on previous I, P frames• B frames are based on previous and following I and P frames

– In case something is uncovered

MPEG Process III - Schematic

Image Sequences

RGBTo

YUV

Motion Estimation DCT

QuantizeRLEVLCOutput Buffer

No compression achieved

MPEG-1 & MPEG-2• MPEG-1

– Designed for video playback at 150KB/s - single speed CD-ROM

– Used in VCD technology

• MPEG-2– Much higher bandwidth – 3MB/s– DVD technology

MPEG-4• Very different from previous generations

• Aimed at low-bandwidth applications – at upper end, good enough for digital TV

• Digital Camcorders

MPEG-4 II - Meshes• 2-D animated meshes

• Textures mapped onto meshes• Store vertices of mesh and movement parameters

MPEG-4 III - Sprites• MPEG-4 is object based – state of the art

• Panoramic images – massive compression ratios – 1000:1

2. Audio Compression• Techniques from image compression can

be used– Huffman encodes output– DCT

• MP3 – huge!!!!

MP3 – MPEG-1 Layer 3• 1. Minimal Audition Threshold

– Don’t store anything under 5Khz

• 2. Masking Effect– Uses psychoacoustic model of the ear– Don’t store quiet and loud noises

simultaneously

MP3 II• 3. Joint Stereo (JS) coding

– 1. Intensity Stereo (IS)• Ear unable to locate some frequencies – bass• Store signal in mono + minimum for spatialization

– 2. Mid/Side (MS) Stereo• Used if left and right speakers are similar• Store middle (L+R) plus a side speaker (L or R)

e.g. L R

10 57 5Store:

Raw:Fewer bits

Decompress: 10 5

MP3 III - schematic

Recommended