Video Coding. Video Coding

Similar documents
Multimedia Coding and Transmission. Video Coding. Ifi, UiO Norsk Regnesentral Vårsemester 2003 Wolfgang Leister. This part of the course...

Multimedia Coding and Transmission. Video Coding. Ifi, UiO Norsk Regnesentral Vårsemester 2005 Wolfgang Leister. This part of the course...

Video Coding. Video Coding. Video Coding. Authors... Ifi, UiO Norsk Regnesentral Vårsemester 2008 Wolfgang Leister

MPEG-2. ISO/IEC (or ITU-T H.262)

Multimedia Standards

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri

The Scope of Picture and Video Coding Standardization

VIDEO COMPRESSION STANDARDS

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Digital Video Processing

10.2 Video Compression with Motion Compensation 10.4 H H.263

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

Digital video coding systems MPEG-1/2 Video

Video coding. Concepts and notations.

ITU-T DRAFT H.263 VIDEO CODING FOR LOW BITRATE COMMUNICATION LINE TRANSMISSION OF NON-TELEPHONE SIGNALS. DRAFT ITU-T Recommendation H.

Fernando Pereira. Instituto Superior Técnico

Advanced Video Coding: The new H.264 video compression standard

Ch. 4: Video Compression Multimedia Systems

Video Coding Standards. Yao Wang Polytechnic University, Brooklyn, NY11201 http: //eeweb.poly.edu/~yao

Video Coding Standards

Video Coding Standards: H.261, H.263 and H.26L

Video Compression An Introduction

MPEG-2 Patent Portfolio License Illustrative Cross-Reference Chart Ctry. Patent No. Claims Category Description Standard Sections

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Chapter 10 ZHU Yongxin, Winson

Laboratoire d'informatique, de Robotique et de Microélectronique de Montpellier Montpellier Cedex 5 France

Introduction to Video Compression

Chapter 10. Basic Video Compression Techniques Introduction to Video Compression 10.2 Video Compression with Motion Compensation

Chapter 11.3 MPEG-2. MPEG-2: For higher quality video at a bit-rate of more than 4 Mbps Defined seven profiles aimed at different applications:

Using animation to motivate motion

Lecture 6: Compression II. This Week s Schedule

Video Compression MPEG-4. Market s requirements for Video compression standard

Standard Codecs. Image compression to advanced video coding. Mohammed Ghanbari. 3rd Edition. The Institution of Engineering and Technology

Image and video processing

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

PREFACE...XIII ACKNOWLEDGEMENTS...XV

5LSE0 - Mod 10 Part 1. MPEG Motion Compensation and Video Coding. MPEG Video / Temporal Prediction (1)

Digital Television DVB-C

AUDIO AND VIDEO COMMUNICATION MEEC EXERCISES. (with abbreviated solutions) Fernando Pereira

Compression and File Formats

VIDEO CODING STANDARDS FOR MULTIMEDIA COMMUNICATION 1. Video Coding Standards for Multimedia Communication: H.261, H.

Video Compression Standards (II) A/Prof. Jian Zhang

Lecture 4: Video Compression Standards (Part1) Tutorial 2 : Image/video Coding Techniques. Basic Transform coding Tutorial 2

MPEG-4. Today we'll talk about...

Compressed-Domain Video Processing and Transcoding

Introduction to Video Coding

Digital Video Compression and H.261 Recommendation

Multimedia Signals and Systems Motion Picture Compression - MPEG

INTERNATIONAL TELECOMMUNICATION UNION ITU-T H.263 (03/96) TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU TRANSMISSION OF NON-TELEPHONE SIGNALS VIDEO

Audio and video compression

CMPT 365 Multimedia Systems. Media Compression - Video Coding Standards

Chapter 2 MPEG Video Compression Basics

Triveni Digital Inc. MPEG Technology Series. MPEG 101 (MPEG 2 with a dash of MPEG 4 thrown in) Copyright 2011 Triveni Digital, Inc.

Fernando Pereira. Instituto Superior Técnico. Comunicação de Áudio e Vídeo, Fernando Pereira

The VC-1 and H.264 Video Compression Standards for Broadband Video Services

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Video Compression. Learning Objectives. Contents (Cont.) Contents. Dr. Y. H. Chan. Standards : Background & History

VIDEO COMPRESSION. Image Compression. Multimedia File Formats. Lossy Compression. Multimedia File Formats. October 8, 2009

Fundamentals of Video Compression. Video Compression

H.261. Lecture Special Topics in Signal Processing. Multimedia Communications: Coding, Systems, and Networking

In the name of Allah. the compassionate, the merciful

Multimedia Communications: Coding, Systems, and Networking. Prof. Tsuhan Chen H.261

Lecture 3: Image & Video Coding Techniques (II) & Standards (I) A/Prof. Jian Zhang

Image Coding. Image Coding

Cross Layer Protocol Design

Multimedia Systems Video II (Video Coding) Mahdi Amiri April 2012 Sharif University of Technology

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics

Overview: motion-compensated coding

VC 12/13 T16 Video Compression

Introduction to Video Encoding

Wireless Communication

MPEG-2. And Scalability Support. Nimrod Peleg Update: July.2004

5.9. Video Compression (1)

H.264/AVC und MPEG-4 SVC - die nächsten Generationen der Videokompression

Video Codecs. National Chiao Tung University Chun-Jen Tsai 1/5/2015

Module 7 VIDEO CODING AND MOTION ESTIMATION

Encoding Video for the Highest Quality and Performance

How an MPEG-1 Codec Works

B C ISO/IEC INTERNATIONAL STANDARD

Mesh Based Interpolative Coding (MBIC)

Lesson 6. MPEG Standards. MPEG - Moving Picture Experts Group Standards - MPEG-1 - MPEG-2 - MPEG-4 - MPEG-7 - MPEG-21

IPTV 1

EE 5359 H.264 to VC 1 Transcoding

MPEG-l.MPEG-2, MPEG-4

VIDEO AND IMAGE PROCESSING USING DSP AND PFGA. Chapter 3: Video Processing

Lecture 5: Video Compression Standards (Part2) Tutorial 3 : Introduction to Histogram

The Basics of Video Compression

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

MPEG-4: Simple Profile (SP)

Multimedia Communications Multimedia Technologies & Applications. Prof. Dr. Abdulmotaleb El Saddik

STUDY AND IMPLEMENTATION OF VIDEO COMPRESSION STANDARDS (H.264/AVC, DIRAC)

Professor Laurence S. Dooley. School of Computing and Communications Milton Keynes, UK

Streaming Technologies Glossary

Lecture 3 Image and Video (MPEG) Coding

EE Multimedia Signal Processing. Scope & Features. Scope & Features. Multimedia Signal Compression VI (MPEG-4, 7)

Emerging H.26L Standard:

!"# () # : ./ & 01$2 $3,$*4! & */ 5& 6/ 7 8 9/ :* / ;< 8=> 8! 7 8? ' (3X & & & Y.& */!,& ' Z'F& &! & L$)F&.? &/$&

Lecture 13 Video Coding H.264 / MPEG4 AVC

Transcription:

Multimedia Coding and Transmission Ifi, UiO Norsk Regnesentral Vårsemester 2006 Wolfgang Leister This part of the course...... is held at Ifi, UiO... (Wolfgang Leister) and at University College Karlsruhe (Peter Oel, Clemens Knoerzer) 1

The story so far... Data compression information theory run length encoding Huffman coding Zif-Lempel(-Welch) algorithm Arithmetic coding Colour coding and raster images Overview Video Formats Container Formats: AVI,QuickTime MJPEG H.261 MPEG I, II MPEG TS H.263 2

AVI Audio Video Interleaved, by Microsoft Corp. specialisation of RIFF (Resource Interchange File Format) Container-Format File consists of blocks (chunks) Each chunk characterised by 4 letters format: ID (4Byte) length (4 Byte) data Each chunk can contain sub-chunks. AVI Supported compressors: (Status 1994/1995) Cinepack Codec by SuperMatch Intel Indeo Video R2.1, R3.1 and Raw Microsoft Video 1 Microsoft RLE Motion JPEG MPEG 3

QuickTime Charles Wiltgen Version 2.1 (of Juli 1996) Originally for Macintosh available for MS-windows and others Container-Format File built of blocks (tracks) Each block can contain sub-blocks QuickTime QuickTime for Macintosh 2.5 QuickTime for MS-Win. 2.1.1 QuickTime for MS-Win. 2.5 Animation r/w r r/w Cinepak r/w r r/w Component Video r/w r/w Graphics r/w r r/w M-JPEG A r/w r/w M-JPEG B r/w r/w None r/w r r/w Photo-JPEG r/w r r/w Video r/w r r/w Photo-CD r r r Intel Indeo r r r 4

MJPEG Motion-JPEG Sequence of JPEG-Frames not a standard many proprietary formats e.g., AVI and QuickTime only Baseline-JPEG audio track(s) MJPEG Compression as in JPEG Temporal dependencies are not used. suitable for video cutting software: cut is possible at each frame no quality decrease when cutting Hardware support possible! 5

MJPEG by Parallax Header Pointer to Index Frame Offset 1 Offset 2... Offset n Offset 1 Frame Frame... Frame Offset 2... Load Video Load Video EoFrame Load Audio Videodata Videodata Audiodata EoFrame Offset n MJPEG by Parallax Header Id / Version Frames per second / number of frames Width / Height Bandwidth Quantising factor Number of Audio Tracks / Sampling Rate Offset of frame index 6

H.261 CCITT (Commité Consultatif International de Télécommunications et Télégraphique) ITU-T (International Telecommunication Union) Video Codec for Audiovisual Services at p x 64 kbit/s P64 Developed for image telephony and video conferences H.261 Adapted for ISDN (p x 64 kbit/s) Const. data rate by feedback 4:2:0 Sampling (Chrominance-channels with half the resolution of luminance channel (number of rows and columns)) Two Resolutions: CIF: 352 x 288 (Common Intermediate Format) QCIF: 176 x 144 (Quarter CIF) 7

Subsampling A:B:C Notion of CCIR-601 4:2:2 horizontal 2:1 downsampling of colour channels 4:1:1 horizontal 4:1 downsampling of colour channels 4:2:0 horizontal and vertical 2:1 downsampling of colour channels Example Y C b, C r each 4:2:2 352 x 288 176 x 288 4:1:1 352 x 288 88 x 288 4:2:0 352 x 288 176 x 144 8

H.261 Two frame types: IntraFrames Very similar to JPEG-Image (DCT, Quantising, Coding) InterFrames Code differences to previous frame. Movements are compensated by motionestimation. Intra- / InterFrames IntraFrame InterFrames InterFrames IntraFrame 9

Motion Estimation Motion-Estimation 10

H.261 Motion-Vector max. ±15 Pixels all DCT-Coefficients are quantised with same value Quantising controled by output stream (feedback). Quantising has dead zone H.261 data layout 11

MPEG Motion Picture Expert Group ISO/IEC 11172 (MPEG-1) / 13818 (MPEG-2) Video / Audio compression and coding MPEG History MPEG-1: video and audio (1992) MPEG-2: Digital TV and DVD (1994) MPEG-3: HDTV (withdrawn) MPEG-4: Multimedia applications (1998) MPEG-7: MM search and filtering (2001) MPEG-21: Multimedia framework 12

MPEG History MPEG-1: video and audio (1992) MPEG-2: Digital TV and DVD (1994) MPEG-3: HDTV (withdrawn) MPEG-4: Multimedia applications (1998) MPEG-7: MM search and filtering (2001) MPEG-21: Multimedia framework MPEG-1 ISO 11172 Part 1: Systems Part 2: Video Part 3: Audio (Layer I, II, III) Part 4: Conformance Part 5: Software Simulation 13

MPEG-2 ISO 13818 Parts 1-5 as in MPEG-1 Part 6: DSM-CC (Digital Storage Medium Command and Control) Part 7: NBC (Non-Backwards Compatible Audio) Part 8: 10-bit video extension (withdrawn) Part 9: RTI (Real-time interface betw. set-top box and head end server) MPEG Which parts of MPEG 2 are of interest for this course? Part 2: Video Part 3: Audio (Layer I, II, III) Part 1: Systems Part 6: DSM-CC 14

MP3 = MPEG-1 Audio Layer 3! MPEG Differences to H.261 Motion-Vectors not limited to ±15 Pixels Motion-Vektors not necessarily integer numbers 3 (4) Frame-Types (I-, P-, B-Frames) Data stream not limited to p x 64 kbit/s. Quantising of coefficients with matrix 15

Macro blocks Adjacent 8x8-Blocks of channels are joined to macro blocks. Depending on sub sampling several 8x8 blocks are in one macro block Example 4:2:2 Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r Y C b C Y r C r C r C Y C b Y Y C b Y Y C b Y r 16

Example 4:2:0 Y Y Y Y Y Y C b C r C b C r C b C r Y Y Y Y Y Y Y Y Y Y Y Y C b C r C b C r C b C r Y Y Y Y Y Y MPEG Frame-Types: I-Frame: Like IntraFrames of H.261 (ca. every 15. Frame) P-Frame: Like InterFrames of H.261 (Predicted Frame). Related to previous I or P-Frame B-Frame: (Bidirectional predicted Frame) No equivalent of H.261. Related to previous and successor I- or P-Frame 17

I-, P- and B-Frames I-Frame P-Frame I-Frame P-Frame B-Frames B-Frames B-Frames I-, P- and B-Frames I P B-Frames B-Frames B-Frames P I 18

I-, P- and B-Frames I P B-Frames B-Frames B-Frames P I Motion Motion compensation normative part of MPEG Decoder s point of view Motion estimation NOT normative part of MPEG Encoder s point of view 19

Motion Compensation 1 motion vector for each region region = macro block 1 motion vector per macro block Precision: 1 Pel, ½ Pel motion vector coded differentially (prediction derived from preceding macro block) Rules for resetting motion displacements Motion Compensation P-Pictures: forward motion vectors B-Pictures: forward motion vectors backward motion vectors if both used: average of pel values from forward and backward motion-compensated reference picture 20

Motion Compensation MPEG-2: as in MPEG-1 (previous slide) uses different names Dual Prime Motion for interlaced video averaging predictions from two adjacent fields of opposite parity Motion-Estimation I/P B I/P 21

Motion-Estimation Criterion for block matching Mean Square Error Mean Absolute Distortion MAD(x, y) = (1/256) 15 15 i= 0 j= 0 V n (x + i, y + i) V m(x + dx + i, y + dy + i) Sum of Absolute Distortions (SAD) Minimization of the bitstream Motion Estimation Correlation between motion vectors 22

Motion Estimation Motion displacement search algorithms pel-recursive iterative process use intensity gradient and frame difference block matching compute measure of distortion select vector that minimizes distortion Motion Estimation Fast search algo - sparse sampling Variable resolution search techniques Statistically sparse searches Spatial continuity Telescopic search 3D spatial/temporal estimation Phase correlation others... 23

Motion Estimation Overview in: Mitchell, Pennebaker, Fogg, and LeGall: MPEG Video Compression Standard, Chapman&Hall, 1996 p 301 ff. Frame Order Display order I 0 B 1 B 2 P 3 B 4 B 5 P 6 B 7 B 8 I 9... I 0 P 3 B 1 B 2 P 6 B 4 B 5 I 9 B 7 B 8 Coding order 24

MPEG data layout MPEG Encoder Frame Re-order Motion Estimator Motion-Vectors Modes Regulator - DCT Q VLC Multi - Buffer plex Framestor e and Predictor Q -1 DCT -1 + 25

MPEG Decoder Quantizer Stepsize Buffer MUX -1 Q DCT -1 Side Information Motion-Vectors -1 + Framestor e and Predictor MPEG TS Packetised Elementary Stream (PES) MPEG-2 Programme Stream MPEG-2 Transport Stream (TS) fixed size 188 bytes packets DSM-CC: Digital Storage Medium Command and Control Service Information Tables Information on streams, programmes, networks, conditional access, textual description, rating,... MPEG-1 compatibility 26

MPEG-2 TS MPEG-2 Multiplexer 27

Presentation Unit Access Unit PES 28

Programme Stream Multiplex Pack Header contains system clock reference must occur every 0.7 sec. MPEG-2 TS 29

MPEG-2 Transport Packet MPEG-2 TS 30

PSI PSI = Programme Specific Information Programme Map Table (PMT) what belongs to a programme? PSI PSI = Programme Specific Information Programme Map Table (PMT) Programme Association Table (PAT) which PMT are available? PID=0 31

PSI PMT: PID=1127 PAT: PID=0 (always) PSI PSI = Programme Specific Information Programme Map Table (PMT) Programme Association Table (PAT) Network Information Table (NIT) PMT=0 optional, content not defined by MPEG channel frequencies satellite transponder modulation characteristics service originator, service name, 32

PSI PSI = Programme Specific Information Programme Map Table (PMT) Programme Association Table (PAT) Network Information Table (NIT) Conditional Access Table (CAT) scrambling system(s) in use PID for conditional access management PIC for entitlement information not defined by MPEG PSI PSI = Programme Specific Information Programme Map Table (PMT) Programme Association Table (PAT) Network Information Table (NIT) Conditional Access Table (CAT) Programme Stream Map for programme streams 33

PSI Programme Map Table (PMT) Programme Association Table (PAT) Network Information Table (NIT) Conditional Access Table (CAT) MPEG and IP MPEG is both storage and transport medium MPEG streams can be transported on IP UDP packets can be transported on MPEG Unidirectional application protocols Broadcast Multicast Unicast 34

Time Multiplexer / Decoder Clock measure time in units of 27 MHz, 42 bit Time Stamps expressed in units of 90 khz, 33 bit Programme Stream: System Clock Reference (SCR) at least every 0.7 sec Transport Stream: Programme Clock Reference (PCR) at least every 0.1 sec Time Presentation Time Stamp (PTS) Decoding Time Stamp (DTS) temporarily stored at DTS, not shown I and P pictures (accessed for B pictures) PTS > DTS 35

MPEG - I Resolution: 360 x 288 x 25 (CIF Eur.) 352 x 240 x 30 (CIF US) Bitrate <= 1,862 Mbit/s Macroblocks/Frame <= 396 Macroblocks/Second <= 9900 (396 x 25, 330 x 30) No Interlace Audio: 2 Channels (Stereo) MPEG - II Resolutions low: 360 x 288 (352 x 240) main: 720 x 596 (704 x 480) high1440: 1440 x 1152 (HDTV 4:3) high: 1920 x 1080 (HDTV 16:9) Bitrate: 2-80 Mbit/s Interlace Support 5 Audio-Channels 36

Data rates MPEG-1 SIF 1.15 Mbit/s MPEG-2 601 4.00 Mbit/s I-Distance : 15 P-Distance: 3 Frametyp I P B 150.000 50.000 20.000 38.000 400.000 200.000 80.000 130.000 MPEG-4 MPEG-3 MPEG-7 MPEG-21 These are subject to another session be patient 37

H.263 ITU-T approved standard Video coding for low bit rate communication v1 1996 v2 1998 = H.263+; focus today v3? H.263++/H.26L Unspecified, variable bit rate (<28.8 kbps) Developed for low delay environments H.263 block diagram Video in T Q P CC p t qz q v T CC Transform Quantizer Picture Memory with motion compensated variable delay Coding control Flag for INTRA/INTER Flag for transmitted or not Quantizer indication Quantizing index for transform coefficients Motion vector Q P Q T p t qz q v To video multiplex coder 38

H.263 sampling blocks 4:2:0 sampling luminance Y to chrominance C B, C R Block: 8 x 8 pixels Y Macroblock (MB): C 4 Y + C B + C R blocks Y Group of blocks (GOB): One or more rows of MBs In GOB header: resynchronization Y Y H.263 resolutions Five standardized resolutions CIF: 352 x 288 (as in H.261) QCIF: 176 x 144 (as in H.261) Sub-QCIF: 128 x 96 4CIF: 704 x 576 (little used?) 16CIF: 1408 x 1152 (little used?) Custom resolutions negotiable multiple of 4 in both directions 39

H.263 frames Two (six) frame types: I-frames: intra P-frames: predictive (inter) B-frames (optional): bidirectional predicted PB-frames (optional): decoded B and P frame as one unit EI-frames (optional): enhanced I-frame EP-frames (optional): enhanced P-frame H.263 coding Spatial redundancy (intra coding): DCT Variable length coding (Huffman) Quantisation Temporal redundancy (inter coding): Motion compensation Block-based comparison (MB or block) Nonintegral motion vector values (half-pixel) Motion estimation 40

H.263 coding options (1) 16 modes, negotiable at session start: Efficiency / improved picture quality (10) Unrestricted Motion Vector Syntax-Based Arithmetic Coding Advanced Prediction! Four Motion Vectors per Macroblock Overlapped Block Motion Compensation PB Frame Advanced Intra Coding Alternate Inter VLC Modified Quantization Deblocking Filter Improved PB Frame H.263 coding options (2) Error robustness (3) (lossy channel) Slice-Structured Reference Picture Selection Independent Segment Decoding Scalability! Temporal, signal-to-noise ratio (SNR), spatial Reference Picture Resampling Reduced Resolution Update 41

H.263 levels Preferred combination of supported options (profiles) Level 1: advanced intra coding, deblocking filter, full-frame freeze, modified quantization Level 2: unrestricted motion vector, slicestructured, reference picture resampling + level 1 Level 3: advanced prediction, improved PB frames, independent segment decoding, alternate VLC + level 2 Literature Joan L. Mitchell, William B. Pennebaker, Chad E. Fogg, and Didier J. LeGall: MPEG Video Compression Standard, Chapman&Hill, ISBN 0-412- 08771-5, 1996 Ming-Ting Sun, and Amy R. Reibman: Compressed Video over Networks, Marcel Dekker, ISBN 0-8247- 9423-0, 2001, Kap. 2 Wolfgang Leister, Svetlana Boudko, Ole Aamodt, Peter Holmes: Digital TV - a survey, NR Report 988, 2002. http://publications.nr.no/digitv.pdf 42

Literature MPEG System: P.A. Sarginson: MPEG-2: Overview of the System Layer, 1996, http://www.bbc.co.uk/rd/pubs/reports/1996-02.pdf The End of this Lecture 43