Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4...

21
2.3: Video and Animation Basic concepts Television standards • MPEG Digital Video Broadcasting Computer-based animation Chapter 2: Basics Audio Technology Images and Graphics Video and Animation Chapter 3: Multimedia Systems – Communication Aspects and Services Chapter 4: Multimedia Systems – Storage Aspects Chapter 5: Multimedia Usage Video signal representation includes: Visual representation Transmission Digitization Several important measures for the visual representation: 1. Vertical Detail and Viewing Distance Smallest detail that can be reproduced is a pixel Ideally: One pixel for every detail of a scene In practice: Some details fall between scanning lines Kell factor: only 70% of the vertical details are represented, due to the fact that some of the details of the scene fall between the scanning lines (determined by experience, measurements) Video Signal Representation Scan lines A “detail” where only 2 out of 3 components can be represented The Kell factor of 0.7 is independent of the way of scanning, i.e. whether the scanning is progressive (sequential scanning of lines) or the scanning is interlaced (alternate scanning, line 1, line 3, ... line n-1, line 2, line 4, ...) Visual Representation Geometry of the television image is based on the aspect ratio, which is the ratio of the picture width W to the height H (W:H). The conventional aspect ratio for television is 4:3 = 1.33 Modern systems use 16:9 = 1.77 The viewing distance D determines the angle α subtended by the picture height H. This angle is measured by the ratio of the picture height to viewing distance: tan(α) = H/D. 700:525 = 4:3 (NTSC standard) 525 700 D H α Visual Representation 2. Horizontal Detail and Picture Width Picture width for conventional television service is 4:3 · picture height

Transcript of Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4...

Page 1: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 1Chapter 2.3: Video and Animation

2.3: Video and Animation• Basic concepts

• Television standards• MPEG• Digital Video Broadcasting

• Computer-based animation

Chapter 2: Basics• Audio Technology• Images and Graphics

• Video and Animation

Chapter 3: Multimedia Systems – Communication Aspects and Services

Chapter 4: Multimedia Systems – Storage Aspects

Chapter 5: Multimedia Usage

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 2Chapter 2.3: Video and Animation

Video signal representation includes:

• Visual representation• Transmission

• Digitization

Several important measures for the visual representation:

1. Vertical Detail and Viewing Distance

Smallest detail that can be reproduced is a pixel– Ideally: One pixel for every detail of a scene

– In practice: Some details fall between scanning linesKell factor: only 70% of the vertical details are represented, due to the fact that some of the details of the scene fall between the scanning lines (determined by experience, measurements)

Video Signal Representation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 3Chapter 2.3: Video and Animation

Scan lines

A “detail” where only 2 out of 3components can be represented

The Kell factor of ≈ 0.7 is independent of the way of scanning, i.e. whether• the scanning is progressive (sequential scanning of lines) or• the scanning is interlaced (alternate scanning, line 1, line 3, ... line n-1, line 2, line 4, ...)

Visual Representation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 4Chapter 2.3: Video and Animation

Geometry of the television image is based on the aspect ratio, which is the ratio of the picture width Wto the height H (W:H).

• The conventional aspect ratio for television is 4:3 = 1.33

• Modern systems use 16:9 = 1.77

The viewing distance D determines the angle αsubtended by the picture height H.

This angle is measured by the ratio of the picture height to viewing distance: tan(α) = H/D.

700:525 = 4:3(NTSC standard)

525

700

D

H

α

Visual Representation

2. Horizontal Detail and Picture Width

Picture width for conventional television service is 4:3 · picture height

Page 2: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 5Chapter 2.3: Video and Animation

3. Total Detail Content of the Image

Total number of picture elements = number of vertical elements · number of horizontal elements

= vertical resolution2 · aspect ratio= 5252 · 4/3 (for NTSC)

4. Perception of Depth (3D impression)• In natural vision: angular separation of the images received by the two

eyes• Television image: perspective appearance of objects, choice of focal

length of camera lens, changes in depth of camera focus

Visual Representation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 6Chapter 2.3: Video and Animation

5. Luminance and ChrominanceUsually not RGB, but YUV (or a variant) is used

6. Temporal Aspects of Illumination

Motion is represented by a rapid succession of slightly different still pictures (frames). A discrete sequence of pictures is perceived as a continuous sequence of picture (due to “Lucky weakness” of the human brain).

Between frames, the light is cut off briefly.For a realistic presentation, two conditions are required:– Repetition rate must be high enough to guarantee smooth motion

– The persistence of vision must extend over the interval between flashes

7. Continuity of MotionTo perceive continuous motion, the frame rate must be higher than 15 frames/sec.

For smooth motion the frame rate should be 24 - 30 frames/sec.

Visual Representation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 7Chapter 2.3: Video and Animation

8. FlickeringThrough slow motion a periodic fluctuation of brightness, a flicker effect, arises.

How to avoid this disturbing effect?• A first trick: display each picture several times

E.g.: 16 pictures per second: very inconvenient flicker effect→ display every picture 3 times, i.e. with a refresh rate of 3 · 16 = 48 Hz

• To avoid flicker, a refresh rate of at least 50 Hz is needed• Computer displays achieve 70 Hz of refresh rate by the use of a refresh buffer• TV picture is divided into two half-pictures by line interleaving

• Refresh rate of 25 Hz (PAL) for the full TV picture requires a scan rate of 2 · 25 Hz = 50 Hz.

Visual Representation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 8Chapter 2.3: Video and Animation

9. Temporal Aspect of Video Bandwidth

The eye requires a video frame to be scanned every 1/25 secondScan rate and resolution determines the video bandwidth needed for transmissionDuring one cycle of video frequency (i.e. 1 Hz) at most two horizontally adjacent pixels can be scannedVertical resolution and frame rate relate to horizontal (line) scan frequency:

vertical lines (b) · frame rate (c) = horizontal scan frequencyHorizontal resolution and scan frequency relate to video bandwidth:

horizontal lines (a) · scan frequency / 2 = video bandwidth

→ video bandwidth = a · b · c/2(since 2 horizontally adjacent pixels can be represented simultaneously

during one cycle of video frequency)

Visual Representation

A computer system with a resolution of a = 1312 and b = 800 pixels out of which 1024 · 786 are visible and a frame rate c = 100 Hz needs:

• a horizontal scan frequency of 800 · 100 Hz = 80 kHz• a video bandwidth of 1312 · 80 kHz / 2 = 52.48 MHz

Page 3: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 9Chapter 2.3: Video and Animation

For image processing or transmission, the analog picture or video must be converted to a digital representation.

Digitization consists of:• Sampling, where the color/grey level in the picture is measured at a M×N array of

pixels.• Quantizing, where the values in a continuous range are divided into k intervals.

For a satisfiable reconstruction of a picture from quantized samples

– 100 or more quantizing levels might be needed– Very often 256 levels are used, which are representable within 8 Bits

A digital picture consists of an array of integer values representing pixels (as in a simple bitmap image format)

Digitization

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 10Chapter 2.3: Video and Animation

Super XGA (SXGA)

Video Controller Standards Resolution

320 x 200

640 x 350

640 x 480

1024 x 768

1024 x 768640 x 480

1024 x 768 24 Bits/pixel 2359 KBytes

8 Bits/pixel16 Bits/pixel

8 bits/pixel

8 Bits/pixel(256 colours)

4 Bits/pixel (i.e.16 colours are possible)

2 Bits/pixel

Colorpresentation

Storagecapacity

16 KBytes

112 KBytes

307 KBytes

786 KBytes

786 Kbytes614 KBytes

Colour Graphics Adapter (CGA)

Enhanced Graphics Adapter (EGA)

Video Graphics Array (VGA)

8514/A Display Adapter Mode

Extended Graphics Array (XGA)

Super VGA (SVGA)

A B C = A · B

Video Controller Standards

1280 x 1024 24 Bits/pixel 3932 KBytes

Ultra XGA (UXGA) 1600 x 1200 24 Bits/pixel 5760 KBytes

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 11Chapter 2.3: Video and Animation

Video format standard for conventional television systems in the USA (since 1954):

NTSC (National Television Systems Committee)• Picture size: 525 rows, aspect ratio 4:3, refresh rate of 30 frames/sec

• Uses a YIQ signal (in principle nothing but a slight variation of YUV scheme)

Television - NTSC

Y 0.30 R 0.59 G 0.11 B

I 0.60 R 0.28 G 0.32 B

Q 0.21 R 0.52 G 0.31 B

= ⋅ + ⋅ + ⋅= ⋅ − ⋅ + ⋅= ⋅ + ⋅ + ⋅

Composite signal for transmission of the signal to receivers:• Individual components (YIQ) are composed into one signal

• Basic information consists of luminance information and chrominance difference signals

• Use appropriate modulation methods to eliminate interference between luminance and chrominance signals

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 12Chapter 2.3: Video and Animation

Y Matrix

I Matrix

Q Matrix

Adder

1.3 MHz low pass filter

0.6 MHz low pass filter

QuadratureModulation

4.2 MHzlow pass filter Composite

NTSC out

R

G

B

Subcarrier

A Typical NTSC Encoder

Page 4: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 13Chapter 2.3: Video and Animation

• Required bandwidth to transmit NTSC signals is 4.2 MHz, 6 MHz including sound• The luminance (Y) or “monochrome” signal uses 3.58 MHz of bandwidth

• The I-signal uses 1.5 MHz of bandwidth, the Q-signal 0.5 MHz• The I-signal is In-phase with the 3.58 MHz carrier wave, the Q-signal is in Quadrature

(90 degrees out of phase) with the 3.58 MHz carrier wave.

NTSC

0 1 2 3 4 5-1

Picture Carrier

(Luminance)

Sound CarrierChromatic Subcarrier

I sidebands

Q sidebands

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 14Chapter 2.3: Video and Animation

PAL (Phase Alternating Line, invented by W. Bruch/Telefunken 1963)

• Frame rate of 25 Hz, delay between frames: 1000ms / 25 frames per sec. = 40ms• 625 lines, aspect ratio 4:3

• Quadrature amplitude modulation similar to NTSC• Bandwidth: 5.5 MHz

• Phase of the R-Y (V) signal is reversed by 180 degrees from line to line, to reduce color errors that occur from amplitude and phase distortion during transmission.

• The chrominance signal C for PAL transmission can be represented as:

( ) ( )

( ) ( ) ( ) ( )c c

c c

U VC sin t cos t U B -Y

2.03 1.14 0.493 B Y sin t 0.877 R Y cos t V R -Y

ω ω

ω ω

= ± =

= − ⋅ ± ⋅ − ⋅ =

Television - PAL

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 15Chapter 2.3: Video and Animation

Television Standards

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 16Chapter 2.3: Video and Animation

-i interlaced, -p progressive (non-interlaced)

System

NTSC -i

NTSC -p

PAL -i

PAL -p

TotalLines

525

525

625

625

VisibleLines

484

484

575

VerticalResolution

242

340

290

400

HorizontalResolution

330

330

425

425

VideoBandwidth

4.2 MHz

4.2 MHz

5.5 MHz

5.5 MHz

AspectRatio

4:3

OptimalViewingDistance

7 m

5 m

6 m

4.3 m575

4:3

4:3

4:3

Television Standards

“More modern” Television Standards:• SDTV (Standard Definition TV): low resolution, aspect ratio not specified

• EDTV (Enhanced Definition TV): minimum of 480 lines, aspect ratio not specified• HDTV (High Definition TV): minimum of 720 lines, aspect ratio of 16:9

Page 5: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 17Chapter 2.3: Video and Animation

EDTV systems are conventional systems which offer improved vertical and/or horizontal resolution by some “tricks”

• Comb filters improve horizontal resolution by more than 30% according to literature• Separate black and white from color information to eliminate rainbow effects while

extending resolution

• Progressive (non-interlaced) scanning improves vertical resolution• Insertion of “blank lines” in between “active lines”, which are filled with information

from: above line, below line, same line in previous picture

Enhanced Definition TV (EDTV)

Other EDTV developments is: IDTV (Improved Definition Television)• Intermediate level between NTSC and HDTV (High-Definition Television) in the U.S.

• Improve NTSC image by using digital memory to double scanning lines from 525 to 1050.

• One 1050-line image is displayed in 1/60 sec (60 frames/sec).

• Digital separation of chrominance and luminance signals prevents cross-interference

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 18Chapter 2.3: Video and Animation

HDTV is characterized by:

• Higher Resolution, approx. twice as many horizontal and vertical pixels as conventional systems (1024×768, up to 1920×1080)

• 24-bit pixels

• Bandwidth 5 - 8 times larger than for NTSC/PAL• Aspect Ratio: 16/9 = 1.777

• Preferred Viewing Distance: between 2.4 and 3.3 meters

High Definition Systems (HDTV)

Digital Coding is essential in the design and implementation of HDTV:

• Composite Coding (sampling of the composite analog video signal i.e. all signal components are converted together into a digital form) is the straightforward and easiest alternative, but:

� cross-talk between luminance and chrominance in the composite signal� composite coding depends on the television standard� sampling frequency cannot be adopted to the bandwidth requirements of

components� sampling frequency is not coupled with color carrier frequency

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 19Chapter 2.3: Video and Animation

Alternative: Component Coding (separate digitization of various image components):• the more important luminance signal is sampled with 13.5 MHz,• the chrominance signals (R-Y, B-Y) are sampled with 6.75 MHz.

� Global bandwidth: 13 Mhz + 6.75 MHz > 19 MHz• Luminance and chrominance signals are quantized uniformly with 8 Bits.

Due to high data rates (1050 lines · 600 pixels/line · 30 frames/sec) bandwidth is approx. 19 MHz and therefore substandards (systems which need a lower data rate) for transmission have been defined.

High Definition Systems (HDTV)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 20Chapter 2.3: Video and Animation

Worldwide, 3 different HDTV systems are being developed:

United States• Full-digital solution with 1050 lines (960 visible) and a scan rate of 59.94 Hz

• Compatible with NTSC through IDTV

Europe

• HD-MAC (High Definition Multiplexed Analog Components)• 1250 lines (1000 visible), scan rate of 50 Hz• Halving of lines (625 of 1250) and of full-picture motion allows simple conversion to PAL

• HD-MAC receiver uses digital image storage to show full resolution and motion

Japan

• MUSE is a modification of the first NHK (Japan Broadcasting Company) HDTV Standard• MUSE is a Direct-Broadcast-from-Satellite (DBS) System, where the 20MHz bandwidth is

reduced by compression to the 8.15 MHz available on the satellite channel

• Full detail of the 1125 line image is retained for stationary scenes, with motion the definition is reduced by approx. 50%

High Definition Systems (HDTV)

Page 6: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 21Chapter 2.3: Video and Animation

-i interlaced, -p progressive (non-interlaced)

System

HDTV USA

HD-MAC

MUSE

NTSC i

PAL i

TotalLines

1050

1250

1125

525

VisibleLines

960

1000

1080

VerticalResolution

675

700

540

242

290

HorizontalResolution

600

700

600

330

425

TotalBandwidth

9.0 MHz

12.0 MHz

30.0 MHz

6 MHz

8 MHz

ScanRate (Hz)Camera

59.94 p

ScanRate (Hz)Display

59.94 p

100 p

60 i

59.94 i

50 i625

484

575

50 p

60 i

59.94 i

50 i

High Definition Systems (HDTV)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 22Chapter 2.3: Video and Animation

HDTV data rates for transmission

• total picture elements = horizontal resolution · vertical resolution• USA: 720,000 pixels · 24 Bits/pixel · 60 frames/sec. = 1036.8 MBits/sec!• Europe: 870,000 pixel · 24 Bits/pixel · 50 frames/sec = 1044 MBits/sec!

• HDTV with 1920×1080 pixel, 24 Bits/pixel, 30 frames/sec: 1.5 GB/sec!• Reduction of data rate is unavoidable, since required rates do not fit to “standard

capacities” provided by broadband networks (e.g. 155 or 34 MBits/sec)• Different substandards for data reduction are defined:

SubstandardsSampling Rates (MHz)

Luminance Chrominance

Data rate(Mbits/sec)

Substandard 1

Substandard 2

Substandard 3

11.25 = 5/6 · 13.5

10.125 = 3/4 · 13.5

9.0 = 2/3 · 13.5 2.25 = 1/3 · 6.75 108

3.375 = 1/2 · 6.75

5.625 = 5/6 · 6.75 180

125

Television - Transmission (Substandards)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 23Chapter 2.3: Video and Animation

Further reduction of data rates is required for picture transmission

Sampling gaps are left out (only visible areas are coded):• Luminance has 648 sample values per line, but only 540 of them are visible.

• Chrominance has 216 sample values per line, but only 180 are visible.• 575 visible lines: (540 + 180 + 180) samples/line · 575 lines/frame = 517,500

samples/frame

• 517,500 samples/frame · 8 Bits/sample · 25 frames/sec = 103.5 MBits/sec

Reduction of vertical chrominance resolution:

• Only the chrominance signals of each second line are transmitted.• 575 visible lines: (540 + 90 + 90) samples/line · 575 lines/frame = 414,000

samples/frame

• 414,000 samples/frame · 8 Bits/sample · 25 frames/sec = 82.8 MBits/sec

Different source coding:

• Using an intra-frame working ADPCM with 3 instead of 8 Bits/sample• 414,000 samples/frame · 3 Bits/sample · 25 frames/sec = 31.05 MBits/sec

Television: Transmission

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 24Chapter 2.3: Video and Animation

Compression Techniques

Still very high data rate:

• Video should have about 1.5 Mbits/sec to fit within CD technology• Audio should have about 64 – 192 kbit/channel

→ need for further compression techniques, e.g.

• MPEG for video and audio

Page 7: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 25Chapter 2.3: Video and Animation

Classification of Applications

Dialogue Mode Applications• Interaction among human users via multimedia information

• Requirements for compression and decompression:� End-to-end delay lower than 150 ms� End-to-end delay of 50 ms for face-to-face dialogue applications

Retrieval Mode Applications• A human user retrieves information from a multimedia database

• Requirements:� Fast forward and backward data retrieval with simultaneous display

� Fast search for information in multimedia databases� Random access to single images and audio frames with an access time less than

0.5 second

� Decompression should be possible without a link to other data units in order to allow random access and editing

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 26Chapter 2.3: Video and Animation

Dialogue and Retrieval Mode

Requirements for both dialogue and retrieval mode:

• Supporting scalable video in different systems� Format must be independent of frame size and video frame rate

• Support of various audio and video data rates� This will lead to different quality, thus data rates should be adjustable

• Synchronization of audio and video data� Lip synchronization

• Economy (i.e. reasonably cheap solutions):� Software realization: cheap, but low „speed“ and low quality

� Hardware realization (VLSI chips): more expensive (at first), but high quality

• Compatibility

� It should be possible to generate multimedia data on one system and to reproduce the data on another system

� Programs available on CD can be read on different systems

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 27Chapter 2.3: Video and Animation

Encoding Mechanisms for Video

Basic encoding techniques like used in JPEG

Differential encoding for video

1. For newscast, video telephone applications, and soap operas• Background often remains the same for a long time

• Very small difference between subsequent images→ Run-length coding can be used

2. Motion compensation• Blocks of NxN pixels are compared in subsequent images

• Useful for objects moving in one direction, e.g. from left to right

Other basic compression techniques:

• Color Look-Up Tables (CLUT) for data reduction in video streams

� Often used in distributed multimedia systems

• Silence suppression for audio

� Data are only encoded if the volume level exceeds a certain threshold� Can be interpreted as a special case of run-length encoding

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 28Chapter 2.3: Video and Animation

MPEG

Growing need for a common format for representing compressed video and audio for data rates up to 1.5 Mbit/sec (typical rate of CD-ROM transfer: 1.2 Mbit/sec)→ Moving Pictures Expert Group (MPEG)

• Generic Approach → can be used widely

• Maximum data rate for video in MPEG is very high: 1,856,000 bit/sec • Data rates for audio between 32 and 448 Kbit/sec→ Video and audio compression of acceptable quality

• Suitable for symmetric as well as asymmetric compression:� Asymmetric compression: more effort for coding (once) than for decoding (often)

� Symmetric compression: equal effort for compression and decompression, restricted end-to-end delay (e.g. interactive dialogue applications)

Page 8: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 29Chapter 2.3: Video and Animation

MPEG Today

MPEG

• Coding for VCD (Video CD) quality• Data rate of 0.9 - 2 Mbit/secMPEG-2

• Super-set of MPEG-1: rates up to 8 Mbit/sec • Can do HDTV

MPEG-4• Coding of objects, not frames

• Lower bandwidth (Multimedia for the web and mobility)MPEG-7

• Allows multimedia content description (ease of searching)MPEG-21• Content identification and management

MP3• For coding audio only

• MPEG Layer-3

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 30Chapter 2.3: Video and Animation

The MPEG Family

MPEG-4: Coding of Audio-visual Objects

MPEG-1(VCD)

MPEG-2(DVD, HDTV)

MPEG-7 : Multimedia Content Description Interface

Content Presentation Content Description

MPEG-21: Multimedia Framework

Content Identification and Usage

MPEG-7 data model

Dublin Core data model

RDFSMPTE

XML

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 31Chapter 2.3: Video and Animation

First: MPEG

Exact image format of MPEG is defined in the image preparation phase (which is similar to JPEG)

• Video is seen as a sequence of images (video frames)

• Each image consists of 3 components (YUV format, called Y, CB, CR)� Luminance component has twice as many samples in horizontal and vertical axes

than other two components (chrominance): 4:2:2 scheme

� Resolution of luminance component maximal 768×576 pixels (8 bit per pixel)

• Data stream includes further information, e. g.:

� Aspect ratio of a pixel (14 different image aspect ratios per pixel provided), e.g. 1:1 (square pixel), 16:9 (European and US HDTV) etc.

� Image refresh frequency (number of images per second; 8 frequencies between 23.976 Hz and 60 Hz defined, among them the European standard of 25 Hz)

• The encoding basically is as in JPEG: DCT, quantization, entropy encoding, but with considering several “images”

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 32Chapter 2.3: Video and Animation

Compression Steps

• Subsampling of chrominance information - human visual system less sensitive to chrominance than to luminance information → only 1 chrominance pixel for each 2×2 neighborhood of luminance pixels

• Image preparation – form blocks of 8×8 pixels and group them to macro blocks

• Frequency transformation - discrete cosine transform converts an 8×8 block of pixel values to an 8×8 matrix of horizontal and vertical spatial frequency coefficients → most of the energy concentrated in low frequency coefficients, esp. in DC coefficient

• Quantization – for suppressing high frequencies• Variable length coding - assigning codewords to values to be encoded

Additionally to techniques like in JPEG, the following is used before performing DCT:• Predictive coding – code a frame as a prediction based on the previous / the

following frame

• Motion compensation - prediction of the values of a pixel block by relocating the block from a known picture

Page 9: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 33Chapter 2.3: Video and Animation

Macro Blocks

Still images - temporal prediction yields considerable compression ratio

Moving images - non-translational moving patterns (e.g. rotations, waves, ...) require storage of large amount of information due to irregular motion patterns

• Therefore: predictive coding makes sense only for parts of the image → division of each image into areas called macro blocks

• Macro blocks turn out to be suitable for compression based on motion estimation• Partition of macro blocks into 4 blocks for luminance and one block for each

chrominance component; each block consists of 8×8 pixels. Size of macro block is a compromise between (storage) cost for prediction and resulting compression

10

2 3

4 5

luminance Y

CB CR

chrominance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 34Chapter 2.3: Video and Animation

Motion Compensation Prediction

• Motion Compensation Prediction is made between successive frames• Idea: coding a frame as prediction to the previous frame is useless for fast changing

sequences

• Thus: consider moving objects by search for the new position of a macro block from the previous frame

• Code the prediction to the macro block of the previous frame together with the motion vector

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 35Chapter 2.3: Video and Animation

Motion Compensation Prediction

How to find the best fitting position in the new image?

• Search only a given window around the old position, not the whole image!• Consider only the average of all pixel values, not detailed values!

• Set a fault threshold: stop searching if a found macro block fits „good enough“

• Search Pattern can be a spiral:

this procedure in general does not give the best result, but is fast

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 36Chapter 2.3: Video and Animation

Motion Compensation Prediction

Alternative search procedure:

• Store motion vector for a macro block of the previous image• Move the search window for the next search by the old vector

• Start searching the window by a coarse pattern• Refine the search for the “best” patterns found

Left: lighter grey blocks are the searched blocks on coarse scale. Best matching fields are examined more detailed by also searching the 8 neighbored blocks. Right: when we would refine all blocks, such a picture would result; the lighter a block, the better the matching; the “lightest” block is taken for motion prediction. [Note: in reality not allblocks are refined, only the “lightest” ones; by this maybe the best block isn’t found.]

Page 10: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 37Chapter 2.3: Video and Animation

Types of Frames

4 different types of frame coding are used in MPEG for efficient coding with fast random access

• I-frames: Intra-coded frames (moderate compression but fast random access)

• P-frames: Predictive-coded frames (with motion compensation, prediction to the previous I- or P-frame)

• B-frames: Bi-directionally predictive-coded frames (referencing to the previous and the following I- or P-frames)

• D-frames: DC frames (Limited use: encodes only DC components of intraframe coding)

IB

B

P

B-frame can be decoded only afterthe subsequent P-frame has been decoded

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 38Chapter 2.3: Video and Animation

Types of Images

...

...

...

BB

BB

I

P

P

Prediction

Bi-directionalprediction

Time

I : P : B = 1 : 2 : 6

BB

I

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 39Chapter 2.3: Video and Animation

I-Frames

• I-Frames are self-contained, i.e. represent a full image→ Coded without reference to other images

• Treated as still images → Use of JPEG, but compression in real-time

• I-Frames may serve as points of random access in MPEG streams

• DCT on 8×8 blocks within macro blocks + DPCM coding of DC coefficients

• Typically, an I-frame may occur 3 times per second to give reasonably fast random access

• Typical data allocation:� I-frames allocate up to 3 times as many bits as P-frames� P-frames allocate 2 – 5 times as many bits as B-frames

→ In case of little motion in the video, a greater proportion of the bits should be assigned to I-frames, since P- and B-frames only need very low number of bits

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 40Chapter 2.3: Video and Animation

P-Frames and B-Frames

P-Frame

• Requires information about previous I-frame and/or previous P-frame• Motion estimation is done for the macro blocks of the coded frame:

� The motion vector (difference between locations of the macro blocks) is specified

� The (typically small) difference in content of the two macro blocks is computed and DCT/entropy encoded

• That means: P-frames consist of I-frame macro blocks (if no prediction is possible) and predictive macro blocks

I ... P ... P ... PB-Frame• Requires information about previous and following I- and/or P-frame→ B-frame = difference of prediction of past image and following P-/I-frame

• Quantization and entropy encoding of the macro blocks will be very efficient on such double-predicted frames

• Highest compression rate will be obtained

• Decoding only is possible after receiving the following I- resp. P-frame

B B B B PPI

Page 11: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 41Chapter 2.3: Video and Animation

Group of Pictures (GOP)MPEG gives no instruction in which order to code the different frame types, but can be

specified by a user parameter.

But: each stream of MPEG frames shows a fixed pattern, the Group of Pictures:

• It typically starts with an I-frame

• It typically ends with frame right before the next I-frame

• “Open” GOP ends in B-frame, “Closed” in P-frame� Very flexible: GOPs could be independently decoded, but they also could

reference to the next GOP

• Typical patterns:� I B B P B B P B B I

� I B B P B B P B B P B B I

• Why not have all P and B frames?

→ It is clear that with the loss of one frame, a newfull-image (I-frame) is needed to allow thereceiver to recover from the information loss

Typical compression performance:Type Size Compression---------------------------------------I 18 KB 7:1P 6 KB 20:1B 2.5 KB 50:1

Avg 4.8 KB 27:1---------------------------------------

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 42Chapter 2.3: Video and Animation

D-Frames

Intraframe encoded, but only lowest frequencies of an image (DC coefficients) are encoded

• Used (only) for fast forward or fast rewind mode

• Could also be realized by suitable order of I-frames• Slow rewind playback requires a lot of storage capacity:

� Thus all images in a "group of pictures" (GOP) are decoded in the forward mode and stored, after that rewind playback is possible

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 43Chapter 2.3: Video and Animation

Preprocessing

FrameMemory

+-

DCT

MotionCompensation

MotionEstimation

FrameMemory

+

IDCT

Quantizer(Q)

Regulator

VLCEncoder

Buffer

Q-1

Output

Input

Pre

dict

ive

fram

e

Mot

ion

vect

ors

Coding Process

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 44Chapter 2.3: Video and Animation

Layers of MPEG Data Streams

1. Sequence Layer� Sequence header + one or more groups of picture

� Header contains parameters like picture size, data rate, aspect ratio, DCT quantization matrices

2. Group of Pictures Layer

� Contains at least one I-frame for random access� Additionally timing info and user data

3. Picture Layer

� I-, P-, B- or D-frame, with synchronization info, resolution, range of motion vectors4. Slice Layer

� Subdivision of a picture providing certain immunity to data corruption5. Macro block Layer

� Basic unit for motion compensation and quantizer scale changes6. Block Layer

� Basic coding unit (8×8 pixels): DCT applied at this block level

Page 12: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 45Chapter 2.3: Video and Animation

Chrom. blocks

Hirarchical Structure of Data

3 4

1 2

Picture dimensions

Start code

Aspect ratio

Picture rate

Buffer size

Quant. matrices

GOP 1 GOP 2 GOP 3 GOP gSequence Layer

…..

Sequence parameters

Start code

(optional) quantization weighting matrix

Profile Pic 1 Pic 2 Pic 3 Pic pGOP Layer

…..

Picture flags

Start code

Slice 1 Slice 2 Slice 3 Slice sPicture Layer

…..

Slice address

Start code

Quantization value

Macro 1 Macro 2 Macro 3 Macro mSliceLayer

…..

ModeMacro block

address(optional)

quantization valueMotion vectors

Luminance blocksMacroblockLayer

BlockLayer

8×8 pixels YCB CR

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 46Chapter 2.3: Video and Animation

Audio Encoding

Audio Encoding within MPEG

• Picture encoding principles can be modified for use in audio as well

• Sampling rates of 32, 44.1 and 48 kHz

• Transformation into frequency domain by Fast Fourier Transform (FFT) similar to the technique which is used for video

• Audio spectrum is split into 32 non-interleaved subbands (for each subband, the audio amplitude is calculated); noise level determination by psychoacoustical model

� “Psychoacustical model” means to consider the human brain, e.g. recognizing only a single tone if two similar tones are played very close together, or not perceiving the quieter tone if two tones with highly different loudness are played simultaneously

� Each subband has its own quantization granularity� Higher noise level: rough quantization (and vice versa)

• “Single channel”, “two independent channels” or “Stereo” are possible (in the case of “stereo”: redundancy between the two signals is used for higher compression ratio)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 47Chapter 2.3: Video and Animation

Audio Encoding

UncompressedAudio Data

Filter BanksPsychoacoustical

Model

Control

Quantization

CompressedAudio Data

32 Sub-bands

MultiplexerHuffman Coder

each subbandcorresponds to a frequency

transform coefficient

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 48Chapter 2.3: Video and Animation

Audio Encoding

3 different layers of encoder and decoder complexity are used

• Quantized spectral portions of layers 1 and 2 are PCM encoded

• Quantized spectral portions of layer 3 are Huffman encoded –MPEG layer 3 is known as “mp3”

• 14 fixed bit rates for encoded audio data stream on each layer� minimal rate: 32 Kbit/sec for each layer

� maximal rate: 448 Kbit/sec (layer 1), 384 Kbit/sec (layer 2), 320 Kbit/sec (layer3)

• Variable bit rate support is possible only on layer 3

Page 13: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 49Chapter 2.3: Video and Animation

Audio Data Stream

General Background on the MPEG Audio Data Stream

• MPEG specifies syntax for interleaved audio and video streams – e.g. synchronization information

• Audio data stream consists of frames, divided into audio access units composed of slots

• Slots consist of 4 bytes (layer 1, lowest complexity) or 1 byte (other layers)• A frame always consists of a fixed number of samples

• Audio access unit: smallest possible audio sequence of compressed data to be decoded independently of all other data

• Audio access units of one frame lead to playing time between 8 msec (48 Hz) and 12 msec (32 Hz)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 50Chapter 2.3: Video and Animation

MPEG-2

Why another MPEG standard?• Higher data rate as MPEG-1, but compatible extension of MPEG-1

• Target rate of 40 Mbit/sec• Higher resolution as needed in HDTV

• Support a larger number of applications - definition of MPEG-2 in terms of extensible profiles and levels for each important application class, e.g.

� Main Profile: for digital video transmission (2 to 80 Mbit/sec) over cable, satellite and other broadcast channels, digital storage, HDTV etc.

� High Profile: HDTV� Scalable Profile: compatible with terrestrial TV/HDTV, packet-network video

systems, backward compatibility with MPEG-1 and other standards, e.g. H.261• The encoding standard should be a toolkit rather than a flat procedure

� Interlaced and non-interlaced frame

� Different color subsampling modes e.g., 4:2:2, 4:2:0� Flexible quantization schemes – can be changed at picture level

� Scalable bit-streams

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 51Chapter 2.3: Video and Animation

MPEG-2 - Profiles and Levels

High-1440 Level

1440 pixels/line1152 lines

Main Level720 pixels/line

576 lines

Low Level352 pixels/line

288 lines

≤ 15 Mbits/s ≤ 15 Mbits/s ≤ 15 Mbits/s ≤ 20 Mbits/s

≤ 60 Mbits/s

≤ 80 Mbits/s

≤ 4 Mbits/s ≤ 4 Mbits/s

≤ 60 Mbits/s ≤ 80 Mbits/s

Simple Profile

No B-frames4:2:0

Not Scalable

Main Profile

4:2:0Not Scalable

SNR ScalableProfile

4:2:0SNR Scalable

Spatially ScalableProfile

4:2:0SNR or Spatial

Scalable

High Profile

4:2:0 or 4:2:2

SNR or SpatialScalable

High Level

1920 pixels/line

1152 lines

≤ 100 Mbits/s

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 52Chapter 2.3: Video and Animation

Scalable Profiles

A signal is composed of several streams (layers):• Base (Lower) layer is a fully decodable image

• Enhancement (Upper) layer gives additional information� Better resolution

� Higher frame rate� Better quality

→ Corresponds to JPEG hierarchical mode

Page 14: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 53Chapter 2.3: Video and Animation

Scalable Profiles

Scaling can be done on different parameters:

• Spatial scaling: � Frames are given in different resolutions

� Base layer frames are used in any case� Upper layer frames are stored as prediction from base layer frames

→ Single data stream can include different image formats (CIF, CCIR 601, HDTV ...)

• SNR scaling: � The error on the lower layer given by quantization is encoded and sent on the upper

layer

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 54Chapter 2.3: Video and Animation

MPEG-2: Effects of Interlacing

• Prediction Modes and Motion Compensation� Frame prediction: current frame predicted from previous frame

� Dual prime motion compensation:• Top field of current frame is predicted from two motion vectors coming

from the top and bottom field of reference frame

• Bottom field of previous frame and top field of current frame predicts the bottom field of current frame

� 16 × 8 motion compensation mode

• A macroblock may have two of them• A B-image macro block may have four

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 55Chapter 2.3: Video and Animation

MPEG-2 Audio Standard

• Low bit rate coding of multi-channel audio

• Up to five full bandwidth channels (left, right, center, 2 surround) plus additional low frequency enhancement channel and/or up to 7 commentary/multilingual channels

• Extension of MPEG-1 stereo and mono coding to half sampling rates (16 – 24 kHz) → improving quality for bit rates at 64 kbits/sec per channel

MPEG-2 Audio Multi-channel Coding Standard:• Backward compatibility with existing MPEG-1 Audio Standard

• Organizes formal testing of proposed MPEG-2 multi-channel audio codecs and non-backward-compatible codecs (rates 256 – 448 Kbits/sec)

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 56Chapter 2.3: Video and Animation

MPEG-2 Streams

• MPEG-2 system defines how to combine audio, video and other data into single or multiple streams suitable for storage and transmission→ syntactical and semantically rules for synchronizing the decoding and presentation of

video and audio information and avoiding buffer over- or underflow

• Streams include timestamps for decoding, presentation and delivery

• Basic multiplexing step: each stream is added system-level information and packetized→ Packetized Elementary Stream (PES)

• PESs combined to Program or Transport Stream (supporting large number of applications):

� Program Stream: similar to MPEG-1 stream→ error-free environment, variable packet lengths, constant end-to-end delay

� Transport Stream: combines PESs and independent time bases into single stream→ use in lossy or noisy media, packet length 188 bytes including header→ suited for digital TV and videophony over fiber, satellite, cable, ISDN, ATM

� Conversion between Program and Transport Stream possible (and sometimes reasonable)

Page 15: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 57Chapter 2.3: Video and Animation

MPEG-4

• Originally a MPEG-3 standard for HDTV was planned

→ But MPEG-2 scaling was sufficient; development of MPEG-3 was cancelled

• MPEG-4 initiative started in September 1993

→ Very low bit rate coding of audio-visual programs

• February 1997: description of requirements for the MPEG-4 standard approved

• Idea: development of fundamentally new algorithmic techniques→ New sorts of interactivity (dynamic instead of static objects)

→ Integration of natural and synthetic audio and video material→ Simultaneous use of material coming from different sources

→ Model-based image coding of human interaction with multimedia environments→ Low-bit rate speech coding e.g. for use in GSM

• Basic elements:� Coding tools for audio-visual objects: efficient compression, support of object

based interactivity, scalability and error robustness

� Formal methods for syntactic description of coded audio-visual objects

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 58Chapter 2.3: Video and Animation

Core Idea of MPEG-4

Object based RepresentationRepresentation of the video scene is understood as a composition of video objects with respect to their spatial and temporal relationship (same with audio!)

→ Individual objects in a scene can be coded with different parameters, at different quality levels and with different coding algorithms

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 59Chapter 2.3: Video and Animation

MPEG-4: Objects and Scenes

A/V object• A video object within a scene

• The background• An instrument or voice

• Coded independently

A/V scene

• Mixture of objects• Individual bitstreams are multiplexed and transmitted

• One or more channels• Each channel may have its own quality of service

• Synchronization information

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 60Chapter 2.3: Video and Animation

Objects of a Scene

Primitive Objects

Video Objects (VO) Audio Objects (AO)

natural synthetically natural synthetically

Scene Graph

• Graph without cycles• Embeds objects in a coordinate system (including synchronization information)

• MPEG-4 provides a language for describing objects (oriented at VRML – Virtual Reality Modeling Language)

• Usable for as well video as animated objects

Page 16: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 61Chapter 2.3: Video and Animation

An Example MPEG-4 Scene

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 62Chapter 2.3: Video and Animation

Compositor

Scene Descr.com-press

decom-press

DelIvery

Interface

(DAI)

DelIvery

Interface

(DAI)

com-press

com-press

com-press

com-press

decom-press

decom-press

decom-press

decom-press

Object Descr.

MPEG-4 Stream Composition and Delivery

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 63Chapter 2.3: Video and Animation

ObjectDescriptorID

ObjectDescriptor{

OD_ID_1List of {

ElementaryStreamDescriptors

}}

ObjectDescriptor{

OD_ID_2List of {

Elementary.....

OD_ID_2

OD_ID_1

Linking Streams into the Scene

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 64Chapter 2.3: Video and Animation

MPEG-7

• Objectives

� A flexible, extensible, and multi-level standard framework for describing (not coding!) multimedia and synchronize between content and descriptions

� Enable fast and efficient content searching, filtering and identification

� Define low-level features, structure, semantic, models, collections, creation, etc.� Goal: To search, identify, filter and browse audiovisual content

• Description of contents� Descriptors

• Describe basic characteristics of audiovisual content• Examples: Shape, Color, Texture, …

� Description Schemes• Describe combinations of descriptors• Example: Spoken Content

Page 17: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 65Chapter 2.3: Video and Animation

Simple Description

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 66Chapter 2.3: Video and Animation

MPEG-21

• MPEG 21

� Solution for access to and management of digital media� E.g. offering, searching, buying, Digital Rights Management, …

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 67Chapter 2.3: Video and Animation

Digital Video Broadcasting

• 1991 foundation of the ELG (European Launching Group)Goal: development of digital television in Europe

• 1993 renaming into DVB (Digital Video Broadcasting)goal: introduction of digital television based on� satellite transmission (DVB-S)

� cable network technology (DVB-C)� later also terrestrial transmission (DVB-T)

SDTVEDTVHDTV

Multimedia PC

B-ISDN, ADSL,etc. DVD, etc.

TerrestrialReceiver

Cable

Multipoint Distribution

System

Satellites DVBDigital VideoBroadcastingIntegrated

Receiver-Decoder

DVB-S

DVB-C

DVB-T

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 68Chapter 2.3: Video and Animation

DVB Container

DVB transmits MPEG-2 container

• High flexibility for the transmission of digital data• No restrictions regarding the type of information

• DVB Service Information specifies the content of a container� NIT (Network Information Table): lists the services of a provider, contains additional

information for set-top boxes

� SDT (Service Description Table): list of names and parameters for each service within a MPEG multiplex channel

� EIT (Event Information Table): status information about the current transmission, additional information for set-top boxes

� TDT (Time and Date Table): Update information for set-top boxes

multimediadata broadcasting

MPEG-2/DVBcontainer

single channelhigh definition television

MPEG-2/DVBcontainer

HDTV

multiple channelsstandard definition

MPEG-2/DVBcontainer

SDTV

multiple channelsenhanced definition

MPEG-2/DVBcontainer

EDTV

Page 18: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 69Chapter 2.3: Video and Animation

DVB Worldwide

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 70Chapter 2.3: Video and Animation

Computer-based Animation

To animate = “to bring to life”

Animation covers changes in:• time-varying positions (motion dynamics)

• shape, color, transparency, structure and texture of an object (update dynamics) as well as lightning, camera position, camera orientation and focus

Basic Concepts of animation are

• Input Process� Key frames, where animated objects are at extreme or characteristic positions

must be digitized from drawings

� Often a post-processing by a computer is required• Composition stage

• Inbetween process• Changing colors

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 71Chapter 2.3: Video and Animation

• Foreground and background figures are combined to generate an individual frame• Placing of several low-resolution frames of an animation in an array leads to a trail film

(pencil test), by the use of the pan-zoom feature (This feature is available for some frame buffers)

• The frame buffer can take a part of an image (pan) and enlarge it to full screen (zoom)

• Continuity is achieved by repeating the pan-zoom process fast enough

Composition Stage

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 72Chapter 2.3: Video and Animation

• Composition of intermediate frames between key frames• Performed by linear interpolation (lerping) between start- and end-positions

• To achieve more realistic results, cubic spline-interpolation can be used

Key frames

Interpolatedframes

Rather unrealistic motion (in most

cases)

Inbetween Process

Page 19: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 73Chapter 2.3: Video and Animation

A function s is called cubic interpolating spline to the points a = X0 < X1 < ... < Xn+1 = b, if

1. s is twice continuous differentiable2. for i = 0, ..., n it is a polynomial of degree 3

This line is smooth, because the polynomials have equal primary and secondary derivatives at the points X0 , X1 ,... ,Xn+1

Spline 1 Spline 2

x0 x1 x2

more realisticmotion achieved

by two cubicsplines

Inbetween Process

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 74Chapter 2.3: Video and Animation

Calculation of successive cubic splines:

S0(x)S1(x)

S2(x)

S3(x)

f(x0) f(x1) f(x2)f(x3)

x0 x1 x2 x3 x4

• si(x) are polynomials of degree 3• Let s0(x) be given

• Then s1(x) = a3·x3 + a2·x2 + a1·x + a0 is constructed as follows:

( ) ( )( ) ( )( ) ( )( ) ( )

3 21 1 3 1 2 1 1 1 0 1

3 21 2 3 2 2 2 1 2 0 2

21 1 3 1 2 1 1 0 1

1 1 3 1 2 0 1

ˆ

ˆ

3 2 ˆ

6 2 ˆ

s x a x a x a x a f x

s x a x a x a x a f x

s x a x a x a s x

s x a x a s x

= ⋅ + ⋅ + ⋅ + =

= ⋅ + ⋅ + ⋅ + =′ ′= ⋅ + ⋅ + =″ ″= ⋅ + =

4 equations for a3, a2, a1, a0

Inbetween Process

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 75Chapter 2.3: Video and Animation

Two techniques are possible

1. CLUT animation

Changing of the Color Look Up Table (CLUT) of the frame buffer. This changes the colors of the image.

2. New color information for each frameFrame buffer: 640 x 512 pixel · 8 Bits/pixel · 30 frames per sec. = 78.6 MBits/sec data rate for complete update

The first technique is much faster than the second, since changing the CLUT requires the transmission of only 0.3 - 3 Kbytes (here 2. is more than 300 times faster than 1.)

Changing Colors

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 76Chapter 2.3: Video and Animation

Categories for Animation languages• Linear-list Notations

� Events are described by starting and ending frame number and an action (event)� 17, 31, C, ROTATE “HOUSE”, 1, 45 means:

Between frames 17 and 31 rotate the object HOUSE around axis 1 by 45 degrees, determining the amount of rotation at each frame from table C

• General-purpose Languages

� Embed animation capability within programming languages� Values of variables as parameters to the routines that perform animation

� e.g. ASAS, which is built on top of LISP:(grasp my-cube): cube becomes current object

(cw 0.05): spin it clockwise, by a small amount

• Graphical Languages

� Describe animation in a more visual way than textual languages� Express, edit and comprehend the changes in an animation� Explicit descriptions of actions are replaced by a picture of the action

Animation Languages

Page 20: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 77Chapter 2.3: Video and Animation

Techniques for controlling animations (independent of the language which describes the animation):

• Full Explicit Control– Complete way of control, because all aspects are defined:

Simple changes (scaling, translation, rotation) are specified or key frames and interpolation methods (either explicit or by direct manipulations by mouse, joystick, data glove) are provided

• Procedural Control– Communication between objects to determine properties– Physically-based systems: position of one object may influence motion of another

(ball cannot pass a wall)– Actor-based systems: actors pass their position to other actors to affect their

behavior (actor A stays behind actor B)

Controlling of Animation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 78Chapter 2.3: Video and Animation

Constraint-based Systems

• “Natural” way of moving from A to B is via a straight line, i.e. linearly. However, veryoften the motion is more complicated

• Movement of objects is determined by other objects, they are in contact with

• Compound motion may not be linear and is modeled by constraints (ball follows apathway)

Tracking Live Action

• Trajectories of animated objects are generated by tracking live action• Rotoscoping: Film with real actors as template, designers draw over the film, change

background and replace human actors with animated counterparts

• Attach indicators to key points of actor’s body. Tracking of indicator positions provides key points in the animation model

• Another example: Data glove measures

� position and orientation of the hand� flexion and extension of fingers and fingerparts

From these information we can calculate actions, e.g. movements

Controlling of Animation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 79Chapter 2.3: Video and Animation

Kinematics:

• Description using the position and velocity of objects.• E.g. at time t = 0 the CUBE is at the origin. It moves with the constant acceleration of

0.5 m/s2 for 2 sec. in the direction of (1,1,4)

Dynamics:• Takes into consideration the physical

laws that define the kinematics

• E.g. at time t = 0 the CUBE is in position(0 meters, 100 meters, 0 meters) and has a mass of 5 kg. The force of gravity acts on the cube (Result in this case: the ball will fall down)

(0, 0, 0) → (1, 1, 4)2 secondsb = 0.5m/s2

kinematical description of the motion of a cube

yz

x

(0, 100, 0)

Controlling of Animation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 80Chapter 2.3: Video and Animation

For the display of animations with raster systems the animated objects have to be scan-converted to their pixmap in the frame buffer. This procedure has to be done at least 10 (better: 20) times per second in order to give a reasonably smooth effect.

ProblemFrame rate of 20 pictures/sec. requires manipulation, scan-conversion and display of an object in only 50 msec. Scan conversion should only use a small fraction of these 50 msec since other operations (erasing, redrawing, ... etc) have to be done, too

SolutionDouble-buffering: frame buffer is divided into two images, each with half of the bits of the overall frame buffer (“pipeline”). While the operation (like rotating) and scan-conversion is processed for the second half of the pixmap, the first half is displayed and vice versa.

Pic 1 Pic 0

Pic 2 Pic 1

Pic 3 Pic 2

Time

Preparation Display

Display of Animation

Page 21: Video Signal Representation - RWTH Aachen...Visual Representation Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme Chapter 2.3: Video and Animation Page 6 5. Luminance

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 81Chapter 2.3: Video and Animation

Symbolic Representation

• Graphical descriptions (circle) of an animated object (ball) + operations (roll)• Animation is displayed at the receiver by scan-conversion of objects to pixmap

• Transmission rate depends on (transmission rate is context dependent):� size of the symbolic representation structure, size of operation structure

� number of animated objects and of commands

Pixmap Representation

• Longer times for data transmission than with symbolic representation, because of the large data size of pixmap

• Shorter display times, because no scan-conversion is necessary at receiver side

• Transmission rate = size of pixmap · frame rate (fixed transmission rate)

Transmission of Animation

Lehrstuhl für Informatik 4

Kommunikation und verteilte Systeme

Page 82Chapter 2.3: Video and Animation

Conclusions

NTSC and PAL as television standards• Widespread, but only belong to Enhanced Definition TV systems

• Needed for better quality: High Definition TV (HDTV)• Problem: compression is needed for HDTV systems

MPEG as standard for video and audio compression• High-quality video/audio compression based on JPEG-techniques

• Additionally: Motion prediction between video frames• Newer versions (MPEG-4) achieve further compression by considering objects

Video Transmission• DVB as one standard for broadcasting SDTV, EDTV, HDTV or any MPEG content to

the customer

Animation• Technique for artificially creating “videos”