Bildverarbeitung – Image Processing Anwendung

Transcription

Bildverarbeitung – Image Processing Anwendung
Anwendung von Bilddatenkompressionsverfahren
Projektseminar Bildverarbeitung – Image Processing
Guido H. Bruck
[email protected]
Kommunikations
Technik

Wahlpflichtfach

Projektseminar „Anwendung von Bilddatenkompressionsverfahren“

MPEG-1, -2, -4, Realmedia, Windows Media etc.

Jede Gruppe ein Verfahren

Besprechung und Vorträge der Gruppen bei Treffen

Anmeldung online bis zum 15.4.2016 unter
www.kommunikationstechnik.org

Kommunikations
Technik
•
•
•
Guido H. Bruck
Bildverarbeitung - Folie 2
25.09.2013
•
Software finden
•
Software installieren
•
Bildsequenzen für verschiedene Parameter codieren
•
Bildqualitäten vergleichen
•
Ziel: Welches Verfahren ist derzeit das geeignetste für welche Parameter und ...
•
Quelle: c‘t 10/2001, S. 122ff ; c‘t 10/2003 S. 146ff ; c‘t 10/2005 S. 146ff
Guido H. Bruck
Bildverarbeitung - Folie 3
25.09.2013
Vorgehensweise
•
•
•
Freitags von 12:00 Uhr -15:00 Uhr, Beginn 22.4.2016, Raum BB130
Kennenlernen von verschiedenen Verfahren zur Bilddatenkompression
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 1
25.09.2013
Projektseminar (Praktikum) Bildverarbeitung – Image Processing
•
Gesamtprojekt in Teilprojekte aufspalten
Gruppen von Studenten bilden
Teilprojekte den Studentengruppen zuordnen. Jede Studentengruppe
bearbeitet ein Teilprojekt selbständig
Jede Woche berichtet jede Gruppe mit einem kurzen Vortrag über den
Fortgang der Arbeiten, stellt Fragen zur Diskussion und sammelt Vorschläge
ein.
Die Präsentation fasst jede Gruppe auf „Papier“ zusammen und stellt sie allen
anderen Gruppen zur Verfügung
Am Ende des Semesters haben wir das Gesamtprojekt bearbeitet und die
Fragen gelöst.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 4
25.09.2013
1
Interessierende Bildgrößen und Datenraten
Verfahren zur Untersuchung
•
•
•
Bildgrößen
Video-Quellmaterial 720 x 576 Bildelemente
Reduziertes Video-Quellmaterial 544 x 432 Bildelemente
Source Input Format 352 x 288 Bildelemente
Quarter SIF 176 x 144
Datenraten
von 2MBit/s (LAN) bis 50kBit/s (ISDN, Modem, Mobil?)
•
•
•
•
•
•
•
MPEG-1, MPEG-2:
Tsunami MPEG-Encoder:
DivX-3.11
DivX-6:
RealVideo:
Windows Media Video 9:
MediaRig:
On2:
Xvid
http://www.tmpgenc.net/
http://www.divx-digest.com
http://www.divxnetworks.com
http://www.realnetworks.com
http://www.microsoft.com/windows/windowsmedia
http://www.ligos.com/
http://www.on2.com/
http://www.xvid.org/
http://www.netzwelt.de/software/3384-xvid-codec.html/
http://www.netzwelt.de/software/3585-xvid-codec-koepi.html/
http://www.netzwelt.de/software/3407-xvid-codec-nics.html
Kommunikations
Technik
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 5
25.09.2013
Testsequenzen zur Bildcodierung
Vorgehensweise
•
•
•
•
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 7
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 6
25.09.2013
Informationen zu Codierungsprogramm im Internet finden, lesen, nötige
Software herunterladen
Software auf PC installieren nach Absprache
Software in Betrieb nehmen
Verschiedene Bildsequenzen mit unterschiedlichen Parametereinstellungen
codieren und beurteilen
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 8
25.09.2013
2
Weitere interessante Internet-Seiten mit interessanter Software
•
•
•
•
•
•
•
•
H.264/AVC
http://forum.doom9.org/showthread.php?s=95e4af6393a64adbc027f77ac360fef7&threadid=73022
Digital Digest
http://www.digital-digest.com/
Vcd-Helper
http://www.vcdhelp.com/
Tha video capturing source
http://home.swipnet.se/~w-129483/
Virtual Dub
http://www.virtualdub.org/
http://forum.dvdboard.de/
http://www.videotools.net/
http://www.math.berkeley.edu/~benrg/index.html
http://www.doom9.org/
x264
http://de.wikipedia.org/wiki/X264
mpegable
mpegable provides a free VFW AVC/H.264 Enc/Decoder (not based on the reference), which uses P-Frames only
http://mpegable-x4-live.softonic.de/
MainConcept
MainConcept's AVC/H.264 implementation (based on the reference software?) is currently available as a free
preview version (adds a watermark)
http://www.mainconcept.com
JM (Reference Software)
The Reference Software of the AVC/H.264 standard already offers a very rich featureset
http://iphome.hhi.de/suehring/tml/
Hdot264
Hdot264 is an opensource (GPL) VFW version of the reference software, written by doom9 member charact3r
http://sourceforge.net/projects/hdot264/
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 9
25.09.2013
http://forum.doom9.org/showthread.php?t=96059
- x264: the first publically available High Profile encoder, opensource (GPL) (Source), available for VFW: x264vfw, ffdshow (output .avi), as
commandline: x264cli (outputs .mp4, .mkv, raw), mencoder (outputs raw, .avi) (Doom9's MeGUI) or ffmpeg
x264 supports 2pass, CABAC, Loop, multiple B-Frames, B-References, multiple Reference Frames, 4x4 P-Frame, 8x8 B-Frame Blocksizes,
anamorphic signalling and High Profile: 8x8 dct and intra prediction, lossless and custom quant matrices
- NeroDigital AVC: useable in Nero Recode2, outputs .mp4
ND AVC supports 2pass, CABAC, (adaptive) Loop, multiple B-Frames, mulitple Reference Frames, weighted prediction, 8x8 P-Frame Blocksizes,
16x16 B-Frame Blocksizes, Adaptive Quant. (Psy High)
- Sorenson: useable in Sorenson Squeeze 4, outputs .mp4,
Sorenson supports 2pass, max 2 B-Frames, B-References, Loop and multiple Slices
- Apple: useable in Quicktime 7, outputs .mp4, .3gp and .mov, totally slow
uses 2pass, max 1 B-frame, Loop (0,0), P8x8,B8x8,I4x4, Adapt. Quant, 5 Slices, no CABAC, no Weighted Pred., no multi Ref.
- JM: The AVC Reference Software offers in v9.3 Main and High Profile: B/SP-Frames, CABAC, Loop Filter, 4x4 Blocksizes, multiple Reference
Frames, Adaptive Quant, Error Resilience, RDO, Lossless Coding, Custom Quants, Rate Control aso...
- Hdot264: opensource (GPL) VFW version of the reference software by doom9 member charact3r, still based on a very old version of the
reference (JM 4.0c)
- VSS: free preview VFW Encoder (limited to 5 days), based on the reference encoder
- Elecard: useable in Elecard Mobile Converter, outputs .mp4 and MainConcept's v2 encoder, outputs .264 and .mpg PS/TS
not publically available anymore:
- Moonlight: useable in Moonlight's OneClick Compressor v1.1 and CyberLink's PowerEncoder, outputs .mpg
Moonlight supports 1pass (VBR/CBR/Fixed Quants), CABAC, Loop, 2 B-Frames, 8x8 P-Frame Sizes, Adapt. Quant, PAR, Interlacing
- MainConcept: was useable in the v1 encoder (adds a watermark), outputs .264 and .mpg PS/TS
1pass (CBR/VBR/fixed Quants), P-Frame Reorder, CABAC, Loop, Multiple B-Vops, Multiple Ref, 4x4 P-Frame Sizes, PAR, RDO
- mpegable: offered for some time a free VFW Encoder (not based on the reference), doesnt handle YV12
mpegable supports 1pass (fixed quants) uses P-Frames only, 8x8 P-Frame Blocksizes, CAVLC only, Loop
- Envivio: useable in 4Coder, outputs .mp4
Pro Gruppe bis zu 5 Teilnehmer
Gruppe 1 MPEG-1, MPEG-2
Gruppe 2 RealVideo
Gruppe 3 Windows Media Series 9
Gruppe 4 DivX-6, DivX-3.11
Gruppe 5 H.264/AVC
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 11
25.09.2013
H.264/AVC
Gruppeneinteilung I
•
•
•
•
•
•
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 10
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 12
25.09.2013
3
Grundlagen
Beurteilung der Qualität von Videosignalen
•
•
•
•
•
Bildqualitätsbeurteilung, Untersuchungsparameter
Irrelevanzreduktion
Zeilensprung (Interlace)
Beispiel für Bilddatenkompression
– Pixelanzahlen
– Abtastformate
– MPEG-Codierung
Testsequenzen bei unterschiedlichen Datenraten beurteilen
5
Reihe2
4,5
Reihe4
Reihe6
4
3,5
3
2,5
2
1,5
1
0,5
0
0
Kommunikations
Technik
100
200
300
400
500
600
700
800
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 13
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 15
25.09.2013
Beurteilung der Qualität von Videosignalen
Beurteilung der Qualität von Videosignalen
•
•
•
•
•
•
•
Testsequenzen bei unterschiedlichen Datenraten beurteilen
– 2MBit/s
720x576 Pixel,
25fps
– 1MBit/s
720x576 Pixel, 352x288 Pixel, 25fps
– 500 kBit/s 720x576 Pixel, 352x288 Pixel, 25fps
– 300 kBit/s 720x576 Pixel, 352x288 Pixel, 25fps
– 150 kBit/s
352x288 Pixel, 25fps
– 64 kBit/s
352x288 Pixel, 25fps
•
Datenrate R:
•
Beurteilung auf der 5-stufigen „Impairment scale“ nach ITU-R BT 500
5.0 = transparent (this should be the original signal)
4.0 = perceptible, but not annoying (first differences noticable)
3.0 = slightly annoying
2.0 = annoying
1.0 = very annoying
to annoy = stören, ärgern, lästig sein
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 14
25.09.2013
Kommunikations
Technik
900
R
S
 1
n  25 
 s

S  25
n s
S=Dateigröße
n=Anzahl der Bilder in der Sequenz
Guido H. Bruck
Bildverarbeitung - Folie 16
25.09.2013
4
3.1.1a Digitale Fernsehstandards
1.4.1 Nutzung der Unvollkommenheiten des menschlichen
Gesichtssinns zur Irrelevanzreduktion
In der elektronischen Bildübertragungstechnik nutzt man das begrenzte örtliche
Auflösungsvermögen des menschlichen Auges dadurch aus, dass man das
einzelne Bild in streifenförmige Elemente (“Zeilen” gelegentlich auch „Spalten“) mit
Breiten zerlegt, die vom menschlichen Auge aus dem
Normalbetrachtungsabstand unter einem Winkel gesehen werden, der kleiner als
1' ist und die über die Streifenbreite variierende Leuchtdichte z. B. durch deren
“Mittelwert” ersetzt.
Bei der elektronischen Bewegtbildübertragungstechnik wird zusätzlich das
begrenzte zeitliche Auflösungsvermögen des menschlichen Gesichtssinns dadurch
ausgenutzt, dass man eine begrenzte Anzahl von Bildern pro Zeiteinheit überträgt.
Bei digitalen Bildübertragungsverfahren wird die Anzahl der Bits zur
Amplitudendarstellung so gewählt, dass zu einem kontinuierlichen Signal kein
Unterschied sichtbar wird.
Kommunikations
Technik
•
•
•
•
•
DVB (-S, -C, -T…)
ATSC
ISDB (-T)
ISDTV
DTMB
Europa, teilw. Andere Kontinente
USA, Korea
Japan, Brasilien
Brasilien
China
ATSC
Video Digitization MPEG-2
Dolby AC-3
Audio
Digitization
Multiplexing
Signal
Transmission
DVB-T
ISDB-T
ISDTV
DTMB
MPEG-2
MPEG-2
H.264
MPEG-2
MPEG-2 AAC
MPEG-2 AAC
H.264
MPEG-2
MPEG
MPEG
MPEG
MPEG
MPEG
8-VSB
modulation
Multiplex
COFDM
Multiplex
COFDM
Multiplex
COFDM
SCM and
MCM
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 17
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 19
25.09.2013
3.1.1b Digitale Fernsehstandards
1.4.2 Nutzung der Unvollkommenheiten des menschlichen
Gesichtssinns zur Irrelevanzreduktion
Prinzip der Standard-Bildzerlegung in zwei Teilbilder:
Blendenöffnung bei der Aufnahme
Bei den eingeführten
bzw. Leuchtfleck bei der Wiedergabe
1
Fernsehsystemen verwendet
2
man das Teilbildverfahren.
Horizontalrücklauf
3
Bei ihm wird ein Vollbild in
4
zwei Teilbilder (Halbbilder)
5
6
zerlegt, die zeilenweise
7
ineinander verschachtelt sind
8
(Zeilensprungverfahren,
9
10
Interlace-Verfahren).
•
•
•
•
•
•
•
•
•
•
•
•
DVB = Digital Video Broadcast
ATSC = Advanced Telecision Systems Comitee (USA, Korea)
ISDB = Integrated Services Digital Broadcasting (Japan, Brasilien)
ISDTV = International System for Digital Television (Brasilien)
DTMB = Digital Terrestrial Television Multimedia Broadcasting (China)
MPEG = Moving Pictures Experts Group
Dolby AC-3 = Dolby Digital („Audio Coding 3“)
AAC = Advanced Audio Coding
VSB = Vestigial Side Band – Restseitenband
COFDM = Coded Orthogonal Frequency Division Multiplex
SCM = Single Carrier Modulation
MCM = Multi Carrier Modulation
11
Vertikalrücklauf
1. Teilbild
2. Teilbild
Kommunikations
Technik
Zerlegung in 11 “Zeilen” nach
dem Zeilensprungverfahren
Guido H. Bruck
Bildverarbeitung - Folie 18
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 20
25.09.2013
5
3.1.1c Digitales Fernsehen - SDTV
3.1.4 Bild-Abtastformate (Vollbild-Schemata)
Für die digitale Übertragung von Videosignalen werden für die Übertragung im Studio
und für die Übertragung zum Endteilnehmer unterschiedliche Standards verwendet.
Standard für die Studioanwendung (ITU-R, BT.601)
Bei diesem Standard werden das Luminanzsignal (Y) und zwei Chrominanzsignale
(CR,CB) getrennt, aber in fester zeitlicher bzw. räumlicher Zuordnung zueinander
abgetastet. Die Abtastfrequenzen werden im Verhältnis 4:2:2 gewählt. Für die
Standards, denen die Parameter Z = 625 und fv = 50 Hz zugrunde liegen, gilt:
Anzahl der Abtastwerte pro Zeile Abtastfrequenz
Y:
864 (brutto) 720 (netto)
13,5MHz
CR,CB:
432 (brutto) 360 (netto)
6,75MHz
Die Signale werden einer gleichförmigen Quantisierung mit einer Auflösung
entsprechend 8 Bit unterzogen.
Im Interesse einer einfachen standardübergreifenden Konvertierbarkeit der Signale
gelten die Werte für die Abtastfrequenz und die Anzahl der Abtastwerte pro Zeile
weltweit.
Aus den o.a. Werten ergibt sich eine Gesamtdatenrate von 216 Mbit/s (brutto).
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 21
25.09.2013
3.1.3 Bild-Abtastformate (Vollbild-Schemata)
Kommunikations
Technik
4:2:0-Format:
X: Luminanz-Signal (Y) ;
Kommunikations
Technik
: Chrominanz-Signal (CR,CB)
Guido H. Bruck
Bildverarbeitung - Folie 23
25.09.2013
3.1.5 Standard für die Übertragung zum Endteilnehmer
4:4:4-Format:
X: Luminanz-Signal (Y) ;
4:2:2-Format:
Die in 3.1.1 genannte Datenrate ist für die Übertragung zum Endteilnehmer viel zu
hoch. Zur Senkung der Rate verwendet man eine redundanz- und
irrelevanzreduzierende Datenreduktion („Datenkompression“). Sie erfolgt
weltweit nach den sogenannten MPEG-Standards (Speziell: MPEG-2-Standard
„ISO/IEC IS 13818“).
Der MPEG-2-Standard: (MPEG: „Motion Picture Experts Group“)
Bei Bildsignalen bestehen große Abhängigkeiten zwischen zeitlich
aufeinanderfolgenden Bildern und ebenfalls Abhängigkeiten zwischen benachbarten
Bildelementen in eine Bild. Diese Abhängigkeiten sind in den Quellsignalen
enthalten. Durch eine Entfernung dieser Abhängigkeiten lässt sich die zur
Übertragung nötige Datenmenge reduzieren. Die Abhängigkeiten können auf der
Empfangsseite in das Signal wieder eingefügt und so das Quellsignal rekonstruiert
werden.
: Chrominanz-Signal (CR,CB)
Guido H. Bruck
Bildverarbeitung - Folie 22
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 24
25.09.2013
6
3.1.6 Diskrete-Cosinus-Transformation (DCT)
3.1.7 Diskrete-Cosinus-Transformation (DCT)
Bei Bildcodierungsverfahren wird häufig eine Transformationscodierung unter
Verwendung einer 2-dimensionalen DCT verwendet. Damit lassen sich
Abhängigkeiten der Bildelemente innerhalb eines Bildes verringern. Dies geschieht
auch beim MPEG-2-Standard. Die 2-dimensionale DCT ist beschrieben durch:
Basisfunktionen der 1-dimensionalen DCT für eine Blocklänge von N=8:
F ( , ) 
f ( x, y ) 
N 1 N 1
 2 x  1  cos  2 y  1
2
C ( )C ( )   f ( x, y ) cos
N
2N
2N
x 0 y 0
2
N
N 1 N 1
 C ( )C ( ) F ( , )
 
0 0
cos
 2 x  1 
2N
cos
 2 y  1
2N
 1
für  ,  0
2
mit C ( ), C ( )  
und (üblich): N  8
1 sonst
Kommunikations
Technik
3.1.6a Diskrete-Cosinus-Transformation (DCT)
F ( , ) 
N 1
 2 x  1 
2
C ( )   F ( x, ) cos
N
2N
x 0
f x ( , y ) 
 2 y  1
2 N 1
 C ( ) F ( , )cos 2 N
N  0
f ( x, y ) 
 2 x  1 
2 N 1
C ( ) f x ( , y )cos

N  0
2N
0,25
0,15
0,05
-0,05
-0,15
-0,25
0
0
0
0
1
1
1
1
2
2
2
2
3
3
3
3
4
4
4
4
5
5
5
5
6
6
6
6
7
7
7
7
n=0
n=1
n=2
n=3
0,25
0,15
0,05
-0,05
-0,15
-0,25
0,25
0,15
0,05
-0,05
-0,15
-0,25
0,25
0,15
0,05
-0,05
-0,15
-0,25
0,25
0,15
0,05
-0,05
-0,15
-0,25
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
Kommunikations
Technik
n=4
n=5
n=6
n=7
Guido H. Bruck
Bildverarbeitung - Folie 27
25.09.2013
3.1.8 Diskrete-Cosinus-Transformation (DCT)
Die 2-dimensionale DCT kann wegen ihrer Separierbarkeit auch als
Hintereinanderschaltung zweier eindimensionaler DCT aufgefasst werden:
N 1
 2 y  1
2
C ( )   f ( x, y ) cos
N
2N
y 0
0,25
0,15
0,05
-0,05
-0,15
-0,25
0,25
0,15
0,05
-0,05
-0,15
-0,25
Guido H. Bruck
Bildverarbeitung - Folie 25
25.09.2013
F ( x, ) 
0,25
0,15
0,05
-0,05
-0,15
-0,25
Basisfunktionen der 2dimensionalen DCT für
eine Blocklänge von
N=8:
 1
für  ,  0
2
mit C ( ), C ( )  
und (üblich): N  8
1 sonst
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 26
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 28
25.09.2013
7
3.1.9 Diskrete-Cosinus-Transformation (DCT)
3.1.11 Die Quantisierung
DCT-Explorer von Lutz Lißeck
Download von den Internet-Seiten des Fachgebiets KT („Freie Software“)
Quantisierungstabellen für MPEG-2:
8
16
19
22
22
26
26
27
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 29
25.09.2013
3.1.10 Die Quantisierung
Zur Transformation werden jeweils 8*8 Bildelemente (Pixel) zu einem
Transformationsblock zusammengefaßt.
Aus 8*8 Originalwerten entstehen durch die Transformation 8*8 Spektralwerte. Zur
im Regelfall irrelevanzreduzierenden Codierung werden in einem nachfolgenden
Verarbeitungsschritt die Spektralkoeffizienten einer Quantisierung unterzogen.
Sie geschieht dadurch, dass man die Spektralkoeffizienten zunächst durch ihnen
zugeordnete Q-Werte dividiert und die Ergebniswerte auf ganze Zahlen rundet. Die
Q-Werte sind den Blöcken entsprechend in zweidimensional angeordneten Tabellen
zusammengefasst. Dabei sind für unterschiedliche Bildtypen und Verfahren auch
unterschiedliche Tabellen üblich:
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 30
25.09.2013
16
16
22
22
26
27
27
29
19 22 26
22 24 27
26 27 29
26 27 29
27 29 32
29 32 35
29 34 38
35 38 46
QI ( , )
27
29
34
34
35
40
46
56
29
34
34
37
40
48
56
69
34
37
38
40
48
58
69
83
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16 16 16 16
16 16 16 16
16 16 16 16
16 16 16 16
16 16 16 16
16 16 16 16
16 16 16 16
16 16 16 16
QP,B ( , )
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
16
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 31
25.09.2013
3.1.12 Codierung eines Blocks mittels der DCT
Das folgende Beispiel einer JPEG-Codierung (Joint Photographic Experts Group),
einem der MPEG-2-Codierung ähnlichen Codierungsverfahren für Standbilder, zeigt
die Anwendung der 2-dimensionalen DCT mit N=8 und Quantisierung der
Spektralkoeffizienten für einen Bildblock.
Signalwerte des Originalbildes
139 144 149 153 155 155 155 155
DCT-Spektralkoeffizienten
1259, 6
1, 0 12,1
5, 2
2,1
1, 7 2, 7
144 151 153 156 159 156 156 156
22, 6 17,5
6, 2 3, 2 2,9 0,1
150 155 160 163 158 156 156 156
10,9
9,3
1, 6
159 161 162 160 160 159 159 159
159 160 161 162 162 155 155 155
7,1
0, 6
1,9
0,8
0, 2
1,5
1,5
0, 4
1,3
1, 2
0, 2 0,9 0, 6 0,1
1,5
0,9 0,1
1, 6 0,1 0, 7
0,3
1,3
161 161 161 161 160 157 157 157
1,8
0, 2
1,5
1, 0
1, 0
162 162 161 163 162 157 157 157
1,3
0, 4
0,3
1,5 0,5
1, 7
1,1
0,8
162 162 161 161 163 158 158 158
2, 6
1, 6
3,8
1,8
1, 2 0, 6 0, 4
Kommunikations
Technik
1, 6 0,3 0,8
0, 0
0, 6
1,9
Guido H. Bruck
Bildverarbeitung - Folie 32
25.09.2013
8
3.1.15 8x8 DCT Beispiel
3.1.13 Codierung eines Blocks mittels der DCT
Die DCT Spektralkoeffizienten werden durch die ihnen zugeordneten Q-Werte
dividiert und die Ergebniswerte auf ganze Zahlen gerundet. Die so entstandenen
Zahlen seine als „normalisierte Spektralkoeffizienten“ bezeichnet.
Quantisierungstabelle (Q-Werte)
Normalisierte Spektralkoeffizienten
0
1 0 0 0 0 0
16 11 10 16
24
40
51
61
79
12 12 14 19
26
58
60
55
2 1
0
0 0 0 0 0
14 13 16 24
40
57
69
56
1 1
0
0 0 0 0 0
14 17 22 29
18 22 37 56
51
68
87 80
109 103
62
77
0
0
0
0
0 0 0 0 0
0 0 0 0 0
24 35 55 64
81
104 113
0
0
92
0
0
0
0 0 0 0 0
49 64 78 87 103 121 120 101
0
0
0
0 0 0 0 0
72 92 95 98 112 100 103
0
0
0
0 0 0 0 0
99
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 33
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 35
25.09.2013
3.1.16 8x8 DCT-Beispiel
3.1.14 Codierung eines Blocks mittels der DCT
Auf der Empfangsseite werden die normalisierten Spektralkoeffizienten mit den
zugehörigen Q-Werten multipliziert (oftmals irreführend als „inverse Quantisierung“
bezeichnet). Mittels der DCT-Rücktransformation wird dann aus den
denormalisierten Spektralkoeffizienten ein Bildsignalblock rekonstruiert.
Denormalisierte Spektralkoeffizienten
10 0 0 0 0 0
Rekonstruierte Bildsignalwerte
1264
0
24
12
0
0 0 0 0 0
14
13
0
0 0 0 0 0
155 156 157 158 158 157 156 155
0
0
0
0
0
0
0 0 0 0 0
0 0 0 0 0
160 161 161 162 161 159 157 155
163 163 164 163 162 160 158 156
0
0
0
0 0 0 0 0
163 164 164 164 162 160 158 157
0
0
0
0 0 0 0 0
160 161 162 162 162 161 159 158
0
0
0
0 0 0 0 0
158 159 161 161 162 161 159 158
Kommunikations
Technik
144 146 149 152 154 156 156 156
148 150 152 154 156 156 156 156
Guido H. Bruck
Bildverarbeitung - Folie 34
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 36
25.09.2013
9
3.1.17 8x8 DCT-Beispiel
3.2.2 Der MPEG-2-Standard
Makroblock-Struktur beim Main-Profile
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 37
25.09.2013
3.2.1 Der MPEG-2-Standard
Y (EY)
Block 0
Block 1
Y (EY)
Y (EY)
Block 2
Block 3
CB (EU)
CR (EV)
Block 4
Block 5
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 39
25.09.2013
3.2.3 Der MPEG-2-Standard
Im allgemeinen wird man davon ausgehen können, dass das zu codierende
Programmaterial dem Studio-Standard entsprechend im 4:2:2-Format vorliegt. Die
Werteauflösung entspricht dabei 8 Bit (in Sonderfällen 10 Bit).
Der Codierung nach dem MPEG-2-Standard liegt in der Regel das 4:2:0–
Abtastformat zugrunde. Ausgehend vom 4:2:2–Format wird bei den
Chrominanzsignalen, im Standard mit CR und CB bezeichnet, eine AbtastratenKonversion vorgenommen. Sie bewirkt neben der Konversion der Abtastfrequenzen
in vertikaler Richtung auch die Veränderung der „Abtastposition“ um einen halben
Zeilenabstand.
Zur Transformation werden jeweils 8*8 Bildelemente (Pixel) zu einem
Transformationsblock zusammengefaßt. Bei Vorliegen eines 4:2:0-Abtastformats
deckt dementsprechend ein Chrominanzsignalblock die vierfache Bildfläche eines
Luminanzsignalblocks ab. Vier im Quadrat angeordnete Luminanzsignalblöcke und
zwei zugeordnete Chrominanzblöcke bilden einen Makroblock.
Kommunikations
Technik
Y (EY)
Guido H. Bruck
Bildverarbeitung - Folie 38
25.09.2013
Im MPEG-2-Standard unterscheidet man verschiedene Bildtypen:
I-Bilder:
Intraframe codierte Bilder
P-Bilder:
Unidirektional prädizierte Bilder
B-Bilder:
Bidirektional prädizierte Bilder
Die Abfolge der verschiedenen Bildtypen in einer Bildfolge ist weitgehend durch
den Codierer festlegbar. Eine für die fernsehtechnische Anwendung günstige
Abfolge zeigt Abb. 1.
1
2
3
4
5
6
7
8
9
10 11 12 13
I
B
B
P
B
B
P
B
B
P
Kommunikations
Technik
Abb. 1
B
B
I
Guido H. Bruck
Bildverarbeitung - Folie 40
25.09.2013
10
3.2.3 Der MPEG-2-Standard
3.2.5 Der MPEG-2-Standard
Die I-Bilder werden eigenständig, ohne den Einsatz einer Prädiktion codiert. Sie
stellen „Stützbilder“ dar und erlauben dem Empfänger einen Einstieg in die
Decodierung der Bilder.
Die P-Bilder werden unter Verwendung eines jeweils vorausgegangenen I- oder PBildes prädiziert. Das prädizierte Bild ist aber nicht einfach ein entsprechendes
vorausgegangenes Bild, sondern ein durch Bewegungsschätzung aus dem
vorausgegangenen hervorgehendes Bild. Die Bewegungsschätzung erfolgt
makroblockweise. Dazu wird untersucht, welcher Block mit den Abmessungen
eines Makroblocks einen Makroblock in einem aktuellen Block am besten annähert.
Die Blockbewegungen werden in Form von Bewegungsvektoren zum Empfänger
übertragen.
Die B-Bilder werden jeweils aus einem vorausgegangenen I- oder P-Bild und einem
nachfolgenden I- oder P-Bild geschätzt. Dazu werden auch bidirektional
geschätzte Bewegungsvektoren ermittelt. Durch die Verwendung von B-Bildern
kann die datenreduzierende Wirkung der Codierung merklich gesteigert werden.
Zur Bildprädiktion werden Bildspeicher benötigt. Auch die
Bewegungsvektorschätzung ist mit einem Speicherbedarf verbunden. Um den
Speicherbedarf auf der Empfängerseite so klein wie möglich zu halten, sieht der
MPEG-2-Standard eine Bildumsortierung vor. Z.B. die in 3.2.3 dargestellte Bildfolge
erfährt zur Übertragung folgende Umsortierung:
IBBPBBPBBPBBI
IPBBPBBPBBIBB
Durch das beschriebene Bild-Prädiktionsverfahren wird eine Wertedekorrelation in
den Differenz-Bildern erreicht. Dementsprechend ist die dekorrelierende Wirkung der
DCT in diesen Bildern im Vergleich mit der in den I-Bildern gering. Dies findet
Berücksichtigung in der Auslegung der Quantisierungtabellen in 3.1.10. Für die IBilder werden die QI(-Werte und für die P- und B-Bilder die QP,B(-Werte
verwendet. Die Tabelle der QI(-Werte berücksichtigt, dass die wesentliche
Energie eines I-Bild-Blocks in den „niederfrequenten“ Spektralanteilen steckt.
Die I-, P- und B-Bilder werden in Blöcke eingeteilt und die DCT-Spektralkoeffizienten
berechnet und quantisiert.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 41
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 43
25.09.2013
3.2.4 Der MPEG-2-Standard
3.2.6 Der MPEG-2-Standard
Ein zur Bewegungsvektorschätzung häufig eingesetztes Verfahren ist das BlockMatching-Verfahren.
Die quantisierten Spektralkoeffizienten werden vor ihrer Übertragung noch einer
redundanzmindernden Codierung unterzogen, und zwar einer Lauflängencodierung
und einer anschließenden „Optimalkodierung“ (z.B. Huffmann-Codierung).
Die entsprechend den Originalwerten ebenfalls im Quadrat angeordneten
Spektralwerte werden zunächst in eine eindimensionale Wertefolge umgewandelt.
Die Wertefolge enthält im allgemeinen mehr oder weniger lange Null-Folgen, die als
Runs bezeichnet werden. Ein Run wird jeweils in Kombination mit einem
nachfolgenden Nicht-Null-Wert, einem sogenannten Level, codiert. Dabei sind auch
Runs der Länge Null möglich. Die Run-Level-Kombinationen werden einer
„Optimalcodierung“ (entsprechend einer abgebrochenen Huffmann-Codierung)
unterzogen.
Beispiel:
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 42
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 44
25.09.2013
11
3.2.7 Der MPEG-2-Standard
3.2.9 Der MPEG-2-Standard
Die Überführung der quadratisch angeordneten Spektralwerte-Koeffizienten in
eindimensionaler Folge wird mithilfe eines sogenannten Zick-Zack-Scans
vorgenommen. Ein solcher Scan ist in Abb. 1 gezeigt. Er schließt den Koeffizienten
des Gleichanteils aus. Dieser wird in Form eines Differenzwertes gegenüber dem
des vorausgegangenen Blocks getrennt codiert.
Abb. 1 zeigt die MPEG-2-Decodierungsschaltung.
QD
MUX-1
B
Q-1
VLC-1
DCT-1
RLC-1

P

Abb. 1
MV
MUX-1:
Demultiplexer
RLC-1: Zu RLC und VLC inverse Operationen
VLC-1: Zu RLC und VLC inverse Operationen
Durch die Verwendung der Operationen DCT-1 und Q-1 auch auf der Codierungsseite
wird sichergestellt, dass im Coder und Decoder gleiche Werte prädiziert werden.
Abb. 1
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 45
25.09.2013
3.2.8 Der MPEG-2-Standard
DCT
Q
QF
RLC
VLC
DCT-1
MC
Kommunikations
Technik
P
PS
MV
Abb. 1
MUX
DCT:
DCT-1:
Q:
Q-1:
„Q-1“
ME
Guido H. Bruck
Bildverarbeitung - Folie 47
25.09.2013
3.2.10 Der MPEG-2-Standard
Die Gesamtstruktur des MPEG-2-Coders geht aus Abb. 1 hervor (z.B. mit PBildschätzung).
QD
Kommunikations
Technik
RLC:
VLC:
ME:
MC:
P:
PS:
MV:
MUX:
B:
QF:
QD:
B
Diskrete Kosinus-Transformation
Inverse Diskrete Kosinus-Transformation
Quantisierungseinheit
Rückgewinnung der (quantisierten)
Spektralkoeff.
Lauflängen-Codierung
„Optimalcodierung“
Bewegungsschätzung
Bewegungskompensation
Prädiktor
Bildspeicher
Bewegungsvektoren
Multiplexer
Puffer
Quantisierungsfaktor
Quantisierungsdaten
Guido H. Bruck
Bildverarbeitung - Folie 46
25.09.2013
1920*1152 Pixel
(960*576)
100(80,25) Mbit/s
1920*1152 Pixel
High
Level
80 Mbit/s
1440*1152 Pixel
High-1440
Level
1440*1152 Pixel 1440*1152 Pixel
(720*576)
(720*576)
60(40,15) Mbit/s 80(60,20) Mbit/s
60 Mbit/s
Main
Level
720*576 Pixel
720*576 Pixel
720*576 Pixel
15 Mbit/s
15 Mbit/s
15(10) Mbit/s
352*288 Pixel
352*288 Pixel
4 Mbit/s
4(3) Mbit/s
Low
Level
Levels
Simple
Profile
Profiles
(wie Main Profile,
ohne B-Bilder)
Kommunikations
Technik
Main
Profile
(4:2:0, keine
Scal.)
720*576 Pixel
(352*288)
20(15,4) Mbit/s
SNR Scalable Spatial Scalable
Profile
Profile
(wie Main Profile
+ SNR Scal.)
(wie SNR Prof.,
+ Spat. Scal.)
High
Profile
(wie Spat. Prof.,
+ 4:2:2-Cod.)
Guido H. Bruck
Bildverarbeitung - Folie 48
25.09.2013
12
3.2.11 Der MPEG-2-Standard
3.3.2 MPEG-4
Der MPEG-2-Standard beschreibt einen sogenannten generischen Code
(Gatterungscode) für die „Gatterung“ Bewegtbildcodierung. Er unterteilt deren
Gesamtbereich in Merkmalsbereiche, die hinsichtlich „qualitativer“ und „quantitativer“
Merkmale unterschieden werden. In der Sprache der MPEG werden die
Merkmalsbereiche nach Profils und Levels unterschieden.
MPEG-4 Entwicklungen des Standards im Bereich Visual:
Eine Übersicht über die Profile-Level-Struktur des Standards gibt 3.2.10. Die in der
Übersicht angegebenen Parameterkombinationen sind als Maximumwerte zu
verstehen. Die in Klammern stehenden Werte beziehen sich auf niedere, sogenannte
Layer der Profile-Level-Kombinationen der Formen der skalierbaren Codierung. Die
MPEG-2-Codierung ist abwärtskompatibel aufgebaut. Das bedeutet: Ein Decoder, der
einem Feld in der Tabelle zugeordnet ist, muss auch die Datenströme entsprechend
den links und unterhalb dieses Feldes liegenden Felder decodieren können.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 49
25.09.2013
MPEG-4-Standard ISO 14496, Part 2, Visual
• Version 1: Basic MPEG-4, International Standard (IS) Mai 1999
• Version 2: Neue Tools und Profiles, IS Feb. 2000
• Amendment 1, Studio Profile: Tools und Profiles für Studio und Produktion IS
März 2001
• Amendment 2, Streaming Video Profile: Weitere Tools und Profiles, IS März
2001
• Amendment 3, Neue Levels und Tools: IS Dec. 2002
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 51
25.09.2013
3.3.1 MPEG-4
3.3.3 MPEG-4
MPEG-4 hat eine gegenüber MPEG-2 erweiterte Funktionalität:
• Kompression
• Flexibilität
• keine Festlegung auf bestimmtes Verfahren, oft nur Interfaces standardisiert
• stattdessen: Sammlung verschiedener „Tools“
• „Profiles“ limitieren Tools, die der Decoder implementieren kann
 optimale Qualität für spezielle Anwendungen
Die zu übertragenen Daten werden auf unterschiedliche Art und Weise codiert:
• Szene wird in „Einheiten“ unterteilt, sog. „Audio-Visual Objects“
• Zusammensetzung der Audio-Visual Objects wird gespeichert im
„Szenengraph“
• Audio-Visual Objects:
• Video Objects
• Natural (Kamera)
• Synthetic (computergeneriert)
• Audio Objects
• Natural (Mikrofon)
• Synthetic (computergeneriert)
• Szenengraph sorgt für korrekte Positionierung der Media Objects
• räumlich
• zeitlich
• Realisiert durch gerichteten, azyklischen Graphen
•
Wie bei MPEG-1 und –2 sind der Decoder und der Datenstrom standardisiert.
Verschiedene Hersteller können so verschiedene Encoder herstellen, die
zusammen mit einem standardgemäßen Decoder unterschiedliche
Bildqualitäten liefern.
Wegen der besseren Darstellung wird hier teilweise der Codierungsvorgang dargestellt.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 50
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 52
25.09.2013
13
3.3.4 MPEG-4 Szenegraph
3.4.1 Datenstrom MPEG-4 Visual
Jedes Audio-Visual Object besitzt ein eigenes Koordinatensystem
Szenengraph verfügt selbst auch über ein Koordinatensystem
• durch Berechnung: „virtuelle Kamera“ möglich
• Blickwinkel
• Ausschnitt
• Audio-Visual Objects einer Szene sind hierarchisch sortiert
• Blätter: Primitive Audio-Visual Objects
• Still Images - unbewegte Bilder (z. B. Hintergrund)
• Video Objects (z. B. Person)
scene
• Audio Objects (z. B. Stimme)
Codierung von visuellen Objekten in natürlichen und synthetischen, bewegten Bildern.
Hierarchische Beschreibung einer „visual scene“:
• Visual Object Sequence (VS): Die komplette MPEG-4-Szene kann beliebig viele
2D oder 3D natürliche oder synthetische Objekte und deren Erweiterungen
enthalten
• Video Object (VO): Entspricht einem bestimmten (2D-)Objekt in der Szene.
Im einfachsten Fall ein rechteckiges Bild oder ein beliebig geformtes Objekt
• Video Object Layer (VOL): Jedes Video-Objekt kann skalierbar (multi
layer) codiert werden. Es gibt räumliche (spatial) und zeitliche
(temporal) Skalierbarkeit, von grober bis zu feiner Auflösung. Der
Decoder kann die passende Skalierung einstellen.
• Group of Video Object Planes (GOV): Sie fasst mehrere Video
Object Planes zusammen. Auf den Anfang einer GOV kann
wahlfrei zugegriffen werden.
• Video Object Plane (VOP)
Person
voice
Kommunikations
Technik
2D Background
Video
picture
Quelle: MPEG-4 – Ein Überblick, Paderborn
Center for mobile Computing
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 53
25.09.2013
3.3.5 MPEG-4 Codierung
3.4.2 Datenstrom MPEG-4 Visual
Bespiel für die Codierung einzelner Audio-Visual Objects
•
Guido H. Bruck
Bildverarbeitung - Folie 55
25.09.2013
Video Object Plane (VOP): Sie stellt einen zeitlichen Abtastwert eines VideoObjektes dar und kann unabhängig oder durch Bewegungskompensation in
Abhängigkeit von anderen VOPs codiert werden. Ein herkömmliches Videobild
kann durch eine VOP mit rechteckiger Form repräsentiert werden.
Ein natürliches Video-Objekt enthält die folgenden Informationen:
• Form (shape)
• Bewegungsinformation (motion)
• Texturen (texture)
•
Kommunikations
Technik
Quelle: Kohtaro Asai and Fuminobu Ogawa:
MPEG Coding Technologies, Mitsubishi
Electric ADVANCE December 1998
Guido H. Bruck
Bildverarbeitung - Folie 54
25.09.2013
Zusätzliche Kompression durch sprite Coding
Sprites: zeitunveränderliche Video-Objekte, größer als das übliche Bild, zur
Repräsentation größerer, statischer Bildinhalte (Hintergrund).
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 56
25.09.2013
14
3.4.3 Datenstrom MPEG-4 Visual
3.4.5 Datenstrom MPEG-4 Visual
•
•
Beispiel einer Überlagerung mehrerer Video Object Planes (VOPs):
Entsprechend enthalten die VOPs in Makroblöcken:
• Zeitliche Abtastwerte des Video-Objekts:
• Form-Informationen (Shape)
• Bewegungsvektoren und –parameter
• Texturdaten:
Luminanzsignal und unterabgetastetes Chrominanzsignal wie bei
MPEG-2 im Abtastformat 4:2:0 für DCT-Codierung in 8x8-Blöcken
Kommunikations
Technik
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 57
25.09.2013
Quelle: Andrew Perkis: MPEG-4 visual,
SIE2070 Multimedia signal processing,
4/3/2002
Guido H. Bruck
Bildverarbeitung - Folie 59
25.09.2013
3.4.4 Datenstrom MPEG-4 Visual
3.5.1 Tools zur Codierung von VOPs natürlicher Video-Objekte
•
•
Beispiel einer VOP-Decodierung in MPEG-4 ohne Sprites
•
•
•
•
•
•
•
Kommunikations
Technik
Quelle: Touradj Ebrahimi and Caspar Horne:
MPEG-4 Natural Video Coding - An overview,
aus dem Internet
Guido H. Bruck
Bildverarbeitung - Folie 58
25.09.2013
Shape Coding Tools
• Binary Shape Coding
• Gray Scale Shape Coding
Bewegungskompensation (Motion Compensation Tools) mit optionalen
Erweiterungen:
• Overlapped Motion Compensation,
• Advanced Motion Compensation
Texturcodierung
Sprites
Skalierbarkeit
• Räumliche Skalierbarkeit
• Zeitliche Skalierbarkeit
Error Resilence
...
...
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 60
25.09.2013
15
3.6.1 Binary-Shape-Coding
•
3.6.3 Gray-Scale-Shape-Coding
•
Binary-Shape-Coding
• Matrix (Binary Alpha Map)
• definiert, ob Pixel zu Objekt gehört
• 0 - liegt nicht drin
• 255 - liegt drin
•
0
0
0
255
0
0
0
0
0
255
255
255
0
0
0
255
255
255
255
255
0
255
255
255
255
255
255
255
Kommunikations
Technik
Entspricht der Binary-Shape-Coding mit dem Unterschied, dass jeder Wert der
Maske Werte zwischen 0 (transparent) und 255 (undurchsichtig) annehmen kann
und mit den dazwischen liegenden Werten die Transparenz des zugehörigen
Pixels beschrieben wird.
Gray-Scale-Shape-Information wird mit einer bewegungskompensierten DCT
ähnlich der Texturcodierung codiert
Quelle: MPEG-4 – Ein Überblick, Paderborn
Center for mobile Computing
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 61
25.09.2013
3.6.2 Binary-Shape-Coding
3.7.1 Bewegungskompensation (Motion Compensation)
•
•
•
•
•
•
•
Jede VOP wird von einer „Bounding Box“
umschlossen
Zu der VOP gehört eine binäre Maske, die
für jedes Pixel, das zur VOP gehört, den Wert
255 enthält. Alle anderen Pixel haben der Wert 0.
Die binäre Maske wird in „Binary Alpha Blocks“
(BAB) der Größe 16x16 Pixel unterteilt, die
einzeln codiert werden.
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Haben alle Pixel den Wert 0, ist der Block
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
transparent und es erfolgt keine weitere Codierung.
Haben alle Pixel den Wert 255, ist der Block undurchsichtig, er gehört zur VOP
und es erfolgt eine Codierung.
BAB werden durch eine „Context based Arithmetic Encoding“ (CAE) mit
Bewegungskompensation codiert. Dabei gibt es InterCAE und IntraCAE mit und
ohne Bewegungskompensation.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 62
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 63
25.09.2013
Die bekannten Verfahren anderer Video-Codierungsstandards wurden an die
VOP-Struktur von MPEG-4 angepasst. Daher gibt es drei Typen von Video
Object Planes (VOP):
• Eine VOP wird unabhängig von anderen VOPs codiert. Diese VOP wird
Intra-VOP (I-VOP) genannt.
• Eine VOP wird durch Bewegungskompensation auf Basis einer anderen
vorher codierten VOP codiert. Solche VOPs werden Predicted VOP
(P-VOP) genannt.
• Eine VOP wird durch Bewegungskompensation auf Basis von früheren und
zukünftigen VOPs codiert. Diese VOP werden Bidirectional Interpolated
VOPs (B-VOP) genannt. Sie dürfen nur auf Basis von I-VOPs und P-VOPs
interpoliert werden.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 64
25.09.2013
16
3.8.1 Texturcodierung
3.7.2 Bewegungskompensation (Motion Compensation)
•
•
•
Die Skizze zeigt verschiedene
Typen von VOPs.
Wenn ein 16x16 Pixel großer
Macroblock ganz in der VOP liegt,
geschieht die
Bewegungskompensation auf Basis
eines Block-Matching mit den
Macroblöcken bzw. mit 8x8 Pixeln
großen Blöcken im „Advanced
Prediction Mode“.
•
•
•
•
Die Texturinformation eines Video-Objektes wird mit Hilfe des Luminanzsignals Y
und den beiden Chrominanzsignalkomponenten CR und CB beschrieben.
Im Fall von I-VOPs enthalten das Luminanzsignal und das Chrominanzsignal direkt
die zugehörigen Werte. Im Fall von bewegungskompensierten VOPs enthalten sie
nur die nach der Bewegungskompensation verbleibenden Fehlersignale.
Zur Codierung der Texturinformation wird eine übliche 8x8 blockbasierte DCT
verwendet.
Zeilensprung-Bilder: Field-DCT Coding
Progressive Bilder: Frame DCT-Coding
Eine Übersicht über den Codierungsvorgang zeigt das folgende Bild:
VOP
Textur
Kommunikations
Technik
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Guido H. Bruck
Bildverarbeitung - Folie 65
25.09.2013
DCT
Quantisierung
Kommunikations
Technik
Prädiktion der
Koeffizienten
Scan der
Koeffizienten
Codierung mit
variabler
Wortlänge
Datenstrom
Guido H. Bruck
Bildverarbeitung - Folie 67
25.09.2013
3.7.3 Bewegungskompensation (Motion Compensation)
3.8.2 Texturcodierung
•
Diskrete Cosinus-Transformation (DCT)
• Blöcke der Größe 8x8 Pixel werden der VOP überlagert. Blöcke innerhalb der VOP
werden ohne Veränderung codiert. Blöcke, die teilweise auf der Grenze der VOP
liegen, werden anders behandelt.
Wenn ein Macroblock nicht ganz innerhalb der VOP liegt, werden verschiedene
Füllverfahren für die außerhalb liegenden Teile sowie modifizierte-Block (Polygon)Matching-Verfahren verwendet.
Kommunikations
Technik
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Guido H. Bruck
Bildverarbeitung - Folie 66
25.09.2013
Kommunikations
Technik
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Guido H. Bruck
Bildverarbeitung - Folie 68
25.09.2013
17
3.8.3 Texturcodierung
3.8.5 Texturcodierung
•
Quantisierung
• Die nach der Transformation vorliegenden Spektralkoeffizienten werden quantisiert,
indem die Spektralkoeffizienten durch einen Wert dividiert und die Ergebnisse auf
ganze Zahlen gerundet werden. Dabei gibt es verschiedene Methoden:
• Division durch Werte einer Quantisierungsmatrix ähnlich wie bei MPEG-2.
• Division durch einen festen Wert.
• Eine ungleichförmige Quantisierung („non-linear“) des DC-Koeffizienten ist
möglich.
•
•
•
Blöcke der Größe 8x8 Pixel an den Grenzen der VOP enthalten nur teilweise Werte
aus der VOP. Die übrigen Werte, die außerhalb der VOP lokalisiert sind, werden
aus den Werten der VOP extrapoliert:
Bei Luminanzsignal-Blöcken wird auf Basis 16x16 extrapoliert, bei
Chrominanzsignal-Blöcken auf Basis 8x8.
Bei P- und B-Blöcken werden außerhalb der VOP liegende Pixel mit dem Wert Null
gefüllt.
Bei I-Blöcken werden die außerhalb der VOP liegenden Werte durch einen
zweistufigen Prozess mit Werten gefüllt. Dieser Prozess wird Low Pass
Extrapolation (LPE) genannt.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 69
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 71
25.09.2013
3.8.6 Texturcodierung
3.8.4 Texturcodierung
Low Pass Extrapolation:
1. Die Werte außerhalb der VOP werden auf den Mittelwert der Werte innerhalb
der VOP gesetzt:
 N : Anzahl der Pixel pro Block
1
f r ,c  r ,c VOP 
f x , y mit 

N  x , y VOP
 f x , y : Signalwert an der Stelle  x, y 
2. Die Werte in der Nähe des Randes der VOP werden angepasst:
f
f
 f r ,c 1  f r 1,c
f r ,c  r ,c VOP  r ,c 1 r 1,c
4
Als Signalwerte für die rechte Seite der obigen Gleichung kommen nur Werte
in Betracht, die innerhalb der VOP liegen. Wenn Werte außerhalb liegen,
werden sie nicht berücksichtigt und der Nenner des Bruches entsprechend
angepasst.
Nach der Erweiterung werden die Randblöcke genauso behandelt wie die inneren
Blöcke.
Kommunikations
Technik
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 70
25.09.2013
Prädiktion der Spektralkoeffizienten in Abhängigkeit der Unterschiede der Koeffizienten
in den Blöcken A, B und C
DC-Prädktion
AC-Prädiktion
Nachbarblock B
Kandidatenblock C
Nachbarblock B
Kandidatenblock C
Kandidatenblock A
Aktueller
Block
Kandidatenblock A
Aktueller
Block
Prädiktion des DC-Koeffizienten durch
den Koeffizienten von Block A oder
von Block C
Kommunikations
Technik
Entweder die Koeffizienten der ersten
Zeile oder der ersten Spalte werden
aus den entsprechenden Koeffizienten
eines ausgewählten Kandidatenblocks
prädiziert.
Guido H. Bruck
Bildverarbeitung - Folie 72
25.09.2013
18
3.8.7 Texturcodierung
3.9.1 Sprites
Scan der Koeffizienten
Sprites sind Hintergrund-Objekte, die sich nicht bewegen und nur einmal übertragen
werden. Sie werden wie I-VOPs am Anfang eines Datenstroms übertragen und stehen
dann in einem Speicher dem Empfänger zur Verfügung. Bei einem Wechsel der
Kameraposition rechnet der Empfänger den jeweils sichtbaren Teil aus den im Speicher
vorliegenden Daten aus. Es lassen sich große Kompressionraten erzielen.
Die Koeffizienten werden in vorgegebener Weise in einen eindimensionalen
Datenvektor überführt. Dazu dient der Zig-Zag-Scan nach 3.2.7 oder zwei alternative
Muster (Alternate-horizontal scan und Alternate-vertical scan), die in Abhängigkeit von
der Prädiktion der DC-Koeffizienten benutzt werden.
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 73
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 75
25.09.2013
3.8.8 Texturcodierung
3.10.1 Skalierbarkeit
Statische Texturen
Durch verschiedene Video-Object-Layer wird eine räumliche oder zeitliche Skalierung
implementiert.
Beispiel: Base-Layer und Enhancement-Layer
Im Fall der räumlichen Skalierung enthält der Base-Layer Informationen über das
Videoobjekt mit geringer Auflösung und der Enhancement-Layer die nötige
Zusatzinformation zur Auflösungserhöhung.
Mit MPEG-4 können statische Texturen, die sich also nicht bewegen, auf animierte 2Doder 3D-Oberflächen abgebildet werden. Zu diesem Zweck verfügt MPEG-4 über
Methoden zur Codierung von statischen Texturen, die eine größere Skalierbarkeit
ermöglichen als die Codierung mittels der DCT.
Die Codierung beruht auf einer Wavelet-Transformation, wobei die DC- und ACKomponenten unterschiedlich codiert werden. Die sich ergebenden Koeffizienten
werden quantisiert und mit einem sog. Zero-Tree-Algorithmus und arithmetischer
Codierung codiert.
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 74
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 76
25.09.2013
19
3.10.4 Zeitliche Skalierbarkeit (Temporal Scalability)
Bei der zeitlichen Skalierbarkeit wird die Wiederholrate der VOPs verbessert, der
Enhancement-Layer enthält die Informationen, die zwischen den Bildern des BaseLayers wiedergegeben werden sollen.
Base Layer
Enhancement Layer
Zwei Typen:
Enhancement
• Typ I: Der Enhancement-Layer
Typ I
verbessert nur die Auflösung
VOL 0: Ges. Bild
VOL 1: Auto
eines Teils des Base-Layers.
• Typ II: Der Enhancement-Layer
verbessert die Auflösung des
Enhancement
gesamten Base-Layers.
Typ II
VO 0
3.10.2 Räumliche Skalierbarkeit (Spatial Scalability)
Der VOPs des Base-Layers werden codiert wie vorher beschrieben.
Die VOPs des Enhancement-Layers werden als P-VOPs oder als B-VOPs codiert.
VOL 1: Ges. Bild
VO 1
VOL 0: Ges. Bild
VOL 0: Auto
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 77
25.09.2013
3.10.3 Räumliche Skalierbarkeit (Spatial Scalability)
Quelle: Andrew Perkis: MPEG-4 visual,
SIE2070 Multimedia signal processing,
4/3/2002
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Verbesserter Bereich
Guido H. Bruck
Bildverarbeitung - Folie 79
25.09.2013
3.10.5 Zeitliche Skalierbarkeit (Temporal Scalability)
Typ I: Der Enhancement-Layer Verbessert nur die zeitliche Auflösung eines Teils des
Base-Layers.
Beispiel für eine räumliche Skalierbarkeit, hier mit zwei Enhancement-Layern
Kommunikations
Technik
Kommunikations
Technik
VOL 1: Auto
Guido H. Bruck
Bildverarbeitung - Folie 78
25.09.2013
Kommunikations
Technik
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Guido H. Bruck
Bildverarbeitung - Folie 80
25.09.2013
20
3.10.6 Zeitliche Skalierbarkeit (Temporal Scalability)
3.11.1 Error-Resilence-Tools
Typ II: Der Enhancement-Layer verbessert die zeitliche Auflösung des gesamten
Base-Layers.
Speziell für die Übertragung über gestörte Kanäle, wie z.B. über Mobilfunkkanäle, sind
sog. Error-Risilence-Tools vorhanden, die die sichtbaren Auswirkungen von
Übertragungsfehlern verringern sollen:
• Resynchronization Markers
Das Bild zeigt die Auswirkungen dieser
• Extended Header Code
Tools auf die Datenstrom-Syntax
• Data Partitioning
• Reversible VLCs
Kommunikations
Technik
Quelle: Touradj Ebrahimi, MPEG-4 Natural
Video Tools, Signal Processing Laboratory
Swiss Federal Institute of Technology,
Lausanne
Vorwärts-Decodierung
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 81
25.09.2013
3.10.7 Zeitliche Skalierbarkeit (Temporal Scalability)
Guido H. Bruck
Bildverarbeitung - Folie 83
25.09.2013
MPEG-4 enthält verschiedene Tools, um synthetische Video-Objekte zu übertragen
(Auswahl):
•
•
•
•
•
Quelle: Andrew Perkis: MPEG-4 visual,
SIE2070 Multimedia signal processing,
4/3/2002
Quelle: Touradj Ebrahimi, MPEG-4 Natural Video Tools, Signal
Processing Laboratory Swiss Federal Institute of Technology, Lausanne
3.12.1 Synthetische Video-Objekte
Beispiel für eine zeitliche Skalierbarkeit mit zwei Enhancement-Layern
Kommunikations
Technik
Rückwärts-Decodierung
Guido H. Bruck
Bildverarbeitung - Folie 82
25.09.2013
Facial Animation - Animation von Gesichtern
Body Animation – Animation von Körpern
2D-Meshes (2D-Gittermodelle)
3D-Meshes (3D-Gittermodelle)
View-dependent Scalability
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 84
25.09.2013
21
3.12.2 Facial Animation
3.12.4 2D-Meshes
Form, Textur und Gesichtsausdruck werden nur durch
Parameter übergeben
• Facial Definition Parameters (FDP)
Gesicht wird durch 84 FDPs
beschrieben
• FDPs werden vom Decoder in Gesicht
umgesetzt
Animation:
• Facial Animation Parameters
Gesichtsausdrücke
Aufteilung des 2-dimensionalen Raumes in Polygone
• in MPEG-4 nur Dreiecke
Textur wird über das Gittermodell gelegt
• Texture Mapping
Animation
• Verschieben der Knotenpunkte
Quelle: MPEG-4 – Ein Überblick, Paderborn Center for mobile Computing
Kommunikations
Technik
Quelle: MPEG-4 – Ein Überblick, Paderborn
Center for mobile Computing
Guido H. Bruck
Bildverarbeitung - Folie 85
25.09.2013
3.12.3 Body Animation
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 87
25.09.2013
3.12.5 View-dependent Scalebility
Vergleichbar mit der Face Animation.
Form, Textur und Haltung des Körpers werden nur durch Parameter übergeben
• wird in 3D-Welten benutzt
• ermöglicht Übertragung von Texturen
• nur sichtbare Informationen werden übertragen
spart Bandbreite
• Berechnung auf Encoder- und Decoder-Seite
Rückkanal erforderlich
Quelle: MPEG-4 – Ein Überblick, Paderborn
Center for mobile Computing
Kommunikations
Technik
„Body Control Points“ in unteren Körperteilen
Quelle: Streaming Multimedia – The MPEG-4 Approach, Circuit Cellular,
Issue 137, Dec. 2001
Guido H. Bruck
Bildverarbeitung - Folie 86
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 88
25.09.2013
22
3.13.1 Profile (Profiles)
3.13.3 Profile (Profiles) für natürliche Videobilder („natural Video“)
Auswahl von Video-Tools zu einigen Video-Objekttypen
Die meisten Anwendungen benötigen nur einen Teil der vielfältigen Werkzeuge
(„Tools“), die im MPEG-4-Standard definiert sind. Die Codierungswerkzeuge werden
zu sog. Profilen („Profiles“) zusammengefasst. Diese Profile werden auf bestimmte
Anwendungen angepasst, dadurch verringert sich der Implementierungsaufwand in
Encoder und Decoder. Für jedes Profil kann es verschiedene „Levels“ geben, die die
Komplexität z.B. in Form von Bildgröße, Anzahl der Video-Objekte, Speicherbedarf,
einschränken.
Typen von Profilen:
• Szenenbeschreibung
• Objektbeschreibungen
• Audio (natürliche und synthetische): Typen von Objekten
• Visual (natürliche und synthetische): Typen von Objekten
• Grafiken
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 89
25.09.2013
MPEG-4 video tools
Basic(I and P-VOP, coefficient
prediction, 4-MV, unrestricted MV)
Error resilience
Short Header
B-VOP
P-VOP with OBMC (Texture)
Method 1/Method 2 Quantization
P-VOP based temporal scalability
Binary Shape
Grey Shape
Interlace
Sprite
Temporal Scalability (Rectangular)
Spatial Scalability (Rectangular)
N-Bit
Scalable Still Texture
MPEG-4 video object types
Main
Simple
N-bit
Scalable
Simple
Core
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
Still
Scalable
Texture
x
x
x
x
x
x
x
„Simple“: Nur rechteckförmige Video-Objekte (keine Shape-Verarbeitung)
Kommunikations
Technik
Quelle: Touradj Ebrahimi and Caspar Horne: MPEG-4 Natural Video Coding - An
overview, aus dem Internet
Guido H. Bruck
Bildverarbeitung - Folie 91
25.09.2013
3.13.2 Profile (Profiles)
3.13.4 Profile (Profiles) für natürliche Videobilder („natural Video“)
Beispiel für die Bearbeitung von Profilen in einem MPEG-4 Encoder/Decoder. Profile
werden in Form von Video-Objekt-Typen definiert
Auswahl von Typen von Video-Objekten, die innerhalb einer Auswahl von Profiles
bearbeitet werden können:
MPEG-4 video profiles
Simple
MPEG-4
video object
types
Simple
x
Core
Main
Simple
Scaleable
N-Bit
Scalable Still
Texture
Kommunikations
Technik
Quelle: Olivier Avaro: Overview of MPEG-4 Developments, Davic European
Information Day, Geneva, 12 January 1999
Guido H. Bruck
Bildverarbeitung - Folie 90
25.09.2013
Kommunikations
Technik
Core
Main
Simple
Scalable
N-Bit
x
x
x
x
x
x
x
x
Scalable
Texture
x
x
x
Quelle: Touradj Ebrahimi and Caspar Horne: MPEG-4 Natural Video Coding - An
overview, aus dem Internet
x
Guido H. Bruck
Bildverarbeitung - Folie 92
25.09.2013
23
3.13.5 Profile (Profiles) für natürliche Videobilder („natural Video“)
3.13.7 Levels
Wichtige vorgesehene Anwendungen der Profiles:
• Simple: Einfache fehlergeschützte Übertragung von rechteckigen Bildern, z.B. für
Übertragung in Mobilfunksystemen
• Simple Scalable: Anwendung, wo Skalierbarkeit z.B. wegen unterschiedlicher zur
Verfügung stehender Bandbreite eingeschränkt wird, oder bei Begrenzungen von
Rechenleistungen: Internet oder Software-Decodierung
• Core: Übertragung für beliebig geformte Bildobjekte. Für einfache Interaktivität, z.B.
Internet-Multimedia-Anwendungen
• Main Visual: Für interaktive, Fernseh- und DVD-Anwendungen
Mit sog. Levels werden Parametervorgaben für den Datenstrom gemacht. Die folgende
Tabelle gibt einige Levels für die wichtigsten Profiles wider. In der Spalte „Total mblk
memory“ ist die für den Decodiervorgang nötige Speichermenge in „Macroblock-Units“
angegeben.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 93
25.09.2013
3.13.6 Profile (Profiles) für natürliche Videobilder („natural Video“)
Weitere Ergänzungen durch neue Tools und Profiles:
• Advanced Simple: Verbesserte Codierverfahren gegenüber dem simple Profile.
• Simple Studio: Hohe Bildqualität, Verwendung für die Bildbearbeitung im Studio, nur
I-VOPs, Datenrate bis 2GBit/s.
• Core Studio: Wie Simple-Studio, aber zusätzlich mit P-VOPs, die eine verbesserte
Datenreduktion erlauben aber gleichzeitig einen erhöhnten
Implementierungsaufwand verlangen.
• Core Scalable: Wie Core, aber zusätzlich Skalierbarkeit. Anwendung im Internet, bei
Mobilfunkübertragung und für Rundfunkzwecke.
• Advanced Real-Time Simple: Für Echtzeitanwendungen wie Videotelefon,
Telekonferenz.
• Advanced Coding Efficiency: Mit allen neuen Verfahren zur verbesserten Codierung,
für mobile Rundfunkübertragung, Camcorder etc.
• Fine Granularity Scalable: Mehrere Verfahren zur Skalierbarkeit, um den Datenstrom
schnell veränderlichen Datenübertragungsraten besser anpassen zu können
(Streaming Video).
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 94
25.09.2013
Typical
scene size
Profile and Level
L1
Simple
L2
Profile
L3
L1
Core Profile
L2
L2
Main Profile L3
L4
Kommunikations
Technik
QCIF
CIF
CIF
QCIF
CIF
CIF
ITU-R 601
1920x1088
Size in
Pixels
176x144
352x288
352x288
176x144
352x288
352x288
720x576
1920x1088
Bitrate
(bit/s)
64 k
128 k
384 k
384 k
2M
2M
15 M
38.4 M
Quelle: Touradj Ebrahimi and Caspar Horne: MPEG-4 Natural Video Coding - An
overview, aus dem Internet
Maximum Total mblk
number of
memory
objects
(mblk units)
4
4
4
4
16
16
32
32
198
792
792
594
2376
2376
9720
48960
Guido H. Bruck
Bildverarbeitung - Folie 95
25.09.2013
3.13.8 Datenrate
Die Datenrate kann sowohl für Anwendungen mit variabler Datenrate (VBR – Variable
Bitrate) als auch für Anwendungen mit fester Datenrate (CBR – Constant Bitrate)
eingestellt werden. Dazu ist ein Algorithmus erforderlich, der die Quantisierung der zu
übertragenden Größen einstellt.
Bei VBR-Anwendungen wird versucht, die optimale Bildqualität mit einer vorgegebenen
Bitrate zu erreichen.
Bei CBR-Anwendungen muss die vorgegebene Verzögerungszeit und die vorgegebene
Größe des Pufferspeichers berücksichtigt werden, der die ungleichmäßig anfallenden
Datenbits zwischenspeichert, bevor sie mit konstanter Datenrate über den
Übertragungskanal geschickt werden. Ein vergleichbarer Pufferspeicher ist auf der
Decoderseite vorhanden.
Wenn der Pufferspeicher droht überzulaufen, wird die Quantisierung vergröbert, so
dass weniger Daten anfallen. Wenn der Pufferspeicher droht leer zu laufen, wird die
Quantisierung feiner eingestellt, so dass mehr Daten anfallen.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 96
25.09.2013
24
3.14.1 H.264/AVC
3.14.3 H.264/AVC - New features
• In the early 1990’s, the first video compression standards were introduced:
– H.261 (1990) and H.263 (1995) from ITU
– MPEG-1 (1993) and MPEG-2 (1996) from ISO
• Since then, the technology has advanced rapidly
– H.263 was followed by H.263+, H.263++, H.26L
– MPEG-1/2 followed by MPEG-4 visual
– But industry and research coders are still way ahead
• H.264/AVC is a joint project of ITU and ISO, to create an up-to-date
standard.
• New features in H.264
– Motion compensation and intra-prediction
– Image transform
– Deblocking filters
– Entropy coding
– Frames and slices
Quellen:
Gidon Shavit The H.264/AVC Video Coding Standard, Based on Material from IEEE Transactions on Circuits and Systems for Video
Technology, July 2003, www.cs.washington.edu/ homes/gidon/presentations/h264.ppt
Tom McMahon: The Emerging H.264/AVC Video Coding Standard, www.itl.nist.gov/div895/isis/jvtslides.ppt
Dr. Pankaj Topiwala H.264: The Next Revolution? www.hpaonline.com/files/public/topiwala.ppt
Mohsen Saneei: H-264 ece.ut.ac.ir/classpages/Multimedia/h264.ppt
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 97
25.09.2013
3.14.2 H.264/AVC - Scope and Context
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 99
25.09.2013
3.14.4 H.264/AVC - Changes in Motion Compensation
• Aimed at providing high-quality compression for various services:
– IP streaming media (50-1500 kbps)
– SDTV and HDTV Broadcast and video-on-demand (1 - 8+ Mbps)
– DVD
– Conversational services (<1 Mbps, low latency)
• Standard defines:
– Decoder functionality (but not encoder)
– File and stream structure
• Final results: 2-fold improvement in compression
• Same fidelity, half the size compared to H.263 and MPEG-2
• Quarter-pixel accuracy
– A gain of 1.5-2dB across the board over ½-pixel
• Variable block-size:
– Every 16x16 macroblock can be subdivided
– Each sub-block gets predicted separately
• Multiple and arbitrary reference frames
– Vs. only previous (H.263) or previous and next (MPEG).
• Anti-aliasing sub-pixel interpolation
– Removes some common artifacts in residual
– MPEG-4 Part 10 (Official MPEG Term)
• ISO/IEC 14496-10 AVC
– H.264 (Official ITU Term)
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 98
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 100
25.09.2013
25
3.14.5 H.264/AVC - Variable Block-Size MC
3.14.7 H.264/AVC - Motion Scale Example
• Motivation: size of moving/stationary objects is variable
– Many small blocks may take too many bits to encode
– Few large blocks give lousy prediction
• In H.264/AVC, each 16x16 macroblock may be:
– Kept whole,
– Divided horizontally (vertically) into two sub-blocks of size 16x8 (8x16)
– Divided into 4 sub-blocks
16x16
16x8
8x16
– In the last case, the 4 sub-blocks may MB
0
0
0 1
Types
be divided once more into 2 or 4
1
smaller blocks.
4x8
8x4
8x8
0
– Bit rate savings of more than 15% as
8x8
0 1
0
Types
1
compared to using only a
Motion vector accuracy 1/4
16x16 block size.
Kommunikations
Technik
8x8
0 1
2
3
4x4
0 1
2
3
Guido H. Bruck
Bildverarbeitung - Folie 101
25.09.2013
3.14.6 H.264/AVC - Variable Block Sizes
Kommunikations
Technik
T=1
Kommunikations
Technik
T=2
Guido H. Bruck
Bildverarbeitung - Folie 103
25.09.2013
3.14.8 H.264/AVC - Motion Scale Example
T=1
Guido H. Bruck
Bildverarbeitung - Folie 102
25.09.2013
Kommunikations
Technik
T=2
Guido H. Bruck
Bildverarbeitung - Folie 104
25.09.2013
26
3.14.11 H.264/AVC – Arbitrary Reference Frames
3.14.9 H.264/AVC - Motion Scale Example
• In H.263, the reference frame for prediction is always the previous frame
• In MPEG and H.26L, some frames are predicted from both the previous
and the next frames (bi-prediction)
• In H.264/AVC, any one frame may be used as reference:
– Encoder and decoder maintain synchronized buffers of available frames
(previously decoded)
– Reference frame is specified as index into this buffer
• In bi-predictive mode, each macroblock may be:
– Predicted from one of the two references
– Predicted from both, using weighted
mean of predictors
Multiple Reference Frames for
T=1
Kommunikations
Technik
Motion Compensation
T=2
Guido H. Bruck
Bildverarbeitung - Folie 105
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 107
25.09.2013
3.14.12 H.264/AVC – Intra Prediction
3.14.10 H.264/AVC – Variable Block Size Example
• Motivation: intra-frames are natural images, so they exhibit strong spatial
correlation
– Implemented to some extent in H.263++ and MPEG-4, but in transform
domain
• Macroblocks in intra-coded frames are predicted based on previously-coded ones
– Above and/or to the left of the current block
– The macroblock may be divided into 16 4x4 sub-blocks which are predicted in
cascading fashion
• An encoded parameter specifies which neighbors should be used to predict, and
how
T=1
Kommunikations
Technik
T=2
Guido H. Bruck
Bildverarbeitung - Folie 106
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 108
25.09.2013
27
3.14.13 H.264/AVC – Intra Prediction
3.14.15 H.264/AVC – 4x4 Intra Prediction Modes
• For example in Mode 3 (Diagonal-Down-Left prediction) the values
of a to p are given as follows:
– a is equal to (A+2B+C+2)/4
– b, e are equal to (B+2C+D+2)/4
– c, f, i are equal to (C+2D+E+2)/4
– d, g, j, m are equal to (D+2E+F+2)/4
– h, k, n are equal to (E+2F+G+2)/4
– l, o are equal to (F+2G+H+2)/4
– p is equal to (G+3H+2)/4
• Mode 2 (DC)
– Predict all pixels from
– (A+B+C+D+I+J+K+L+4)/8 or (A+B+C+D+2)/4 or (I+J+K+L+2)/4
• For I macroblocks
• For luminance samples
– 4x4 prediction process
– 16x16 prediction process
• For chrominance samples
– 8x8 prediction process
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 109
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 111
25.09.2013
3.14.16 H.264/AVC – 4x4 Intra Prediction Modes
3.14.14 H.264/AVC – 4x4 Intra Prediction Modes
• 9 types for luminance signal
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 110
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 112
25.09.2013
28
3.14.17 H.264/AVC - Intra Prediction
3.14.19 H.264/AVC - Image Transform
Intra 16x16 luminance (smooth
macroblocks containing little detail) and
8x8 chrominance prediction modes
– Mode 0 (Vertical)
– Mode 1 (Horizontal)
– Mode 2 (DC)
– Mode 4 (Plane): a linear “plane”
function is fitted to the upper and
left-hand samples H and V.
• Motivation:
– DCT requires real-number operations, which may cause inaccuracies in
inversion
– Better motion compensation means less spatial correlation – no need for 8x8
transform
• H.264 uses a very simple integer 4x4 transform
– A (pretty crude) approximation to 4x4 DCT
– Transform matrix contains only +/-1 and +/-2
• Can be computed with only additions, subtractions, and shifts
• Results show negligible loss in quality (~0.02dB)
If any of the 8x8 blocks in the luminance
component are coded in Intra mode, both
chrominance blocks (Cr,Cb) are also intra
coded
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 113
25.09.2013
3.14.18 H.264/AVC - Intra Prediction
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 115
25.09.2013
3.14.20 H.264/AVC - Image Transform
• EXACT MATCH Simplified Transform
• Based primarily on 4x4 transform (all prior standards: 8x8)


T



1
1
1
1  1  2
1 1 1
1

1 2
2
1
1
2
 1 1
T

 1 1
• Requires only 16 bit arithmetic (including intermediate values)
• Easily extensible to 10-12 bits per component
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 114
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 116
25.09.2013
29
3.14.21 H.264/AVC - Image Transform
3.14.23 H.264/AVC - Deblocking Filters
Transform in “baseline” profile of H.264/AVC
• 4x4 block transform for residual data
• 4x4 transform of luminance DC coefficients in intra macroblocks
(intra predicted in 16x16 mode)
• 2x2 transform of chrominance DC coefficients (in any macroblock)
• Motivation: block-based MC and transforms generate blocking artifacts
– Very visible to human eye at low bit-rates
• Previous standards applied simple filters to “smudge” edges between blocks
• H.264/AVC adaptively chooses for each edge which one of 5 deblocking filters to
apply.
– For instance, if both blocks have the same motion vector, less filtering is
needed.
• Improves objective quality as well: about 7-9% reduction in bit-rate for same
PSNR.
Kommunikations
Technik
Luminance signal
Guido H. Bruck
Bildverarbeitung - Folie 117
25.09.2013
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 119
25.09.2013
3.14.24 H.264/AVC - Deblocking Filters
3.14.22 H.264/AVC - Image Transform
• In “adaptive block size transform” mode
– further transforms are chosen depending on the motion
compensation block size(4x8, 8x4, 8x8, 16x8, etc)
– transform operates on 4x4 blocks of residual data after motioncompensated prediction or Intra prediction
1) Without Filter
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 118
25.09.2013
Kommunikations
Technik
2) with H264/AVC Deblocking
Guido H. Bruck
Bildverarbeitung - Folie 120
25.09.2013
30
3.14.25 H.264/AVC - Entropy Coding
3.14.27 H.264/AVC - Frames and Slices
• Motivation: traditional coders use fixed, variable-length codes
– Essentially Huffman-style codes
– Non-adaptive
– Can’t encode symbols with probability > 0.5 efficiently, since at least one bit
required
• H.263 Annex E defines an arithmetic coder
– Still non-adaptive
– Uses multiple non-binary alphabets, which results in high computational
complexity
• H.264/AVC uses two entropy codings:
– CAVLC (context-adaptive variable length coding) and UVLC (Uniform Variable
Length Coding)
– CABAC (context-adaptive binary arithmetic coding)
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 121
25.09.2013
3.14.26 H.264/AVC - Entropy Coding: CABAC
• In H.263 and MPEG, each frame is either inter (P-frame) or intra (I-frame).
– Exception: some macroblocks in P-frames may be intra-coded, and are called
I-blocks.
• H.264/AVC generalizes this: each frame consists of one or more slices
– Contiguous groups of macroblocks
– Processed in internal raster order
– Each is independently encoded and decoded
• I-slices, P-slices, B-slices (two reference frames)
Slice 0
Slice 1
Slice 2
Kommunikations
Technik
3.14.28 H.264/AVC vs MPEG-2, Low Rate
• Arithmetic coding framework designed specifically for H.264
• Binarization: all syntax symbols are translated to bit-strings
• 399 predefined context models, used in groups
– E.g. models 14-20 used to code macroblock type for inter-frames
– The model to use next is selected based on previously coded information (the
context)
– Each context model adapts to empirical distribution
Foreman, QCIF, 30 fps
MPEG-2
203 kbps
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 123
25.09.2013
Guido H. Bruck
Bildverarbeitung - Folie 122
25.09.2013
Kommunikations
Technik
H.264
39 kbps!
Guido H. Bruck
Bildverarbeitung - Folie 124
25.09.2013
31
3.14.29 Quick Look at WM9
3.14.31 Profiles
• WM4 onward were variants of MPEG-4
• WM9 is a variant of H.264/AVC
– Fast, 16-bit integer transform
– Sophisticated motion estimation
– Scalar quantization
– Adaptive VLC (no CABAC)
• This would give it performance similar to H.264/AVC
– Might expect ~10% less since no CABAC
– In our tests, they appear comparable
• WM9 performed well in tests at DVD Forum. But
– WM9 may have used optimized, tuned, 2-pass encoding, prefiltering.
– H.264/AVT used 1-pass ref. sw. (No 2-pass, tuning, filtering, opt.)
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 125
25.09.2013
3.14.30 Profiles
I and P Slices
B Slices
SI and SP Slices
Multiple Reference Frames
In-Loop Deblocking Filter
CAVLC Entropy Coding
CABAC Entropy Coding
Flexible Macroblock Ordering (FMO)
Arbitrary Slice Ordering (ASO)
Redundant Slices (RS)
Data Partitioning
Interlaced Coding (PicAFF, MBAFF)
4:2:0 Chroma Format
4:2:2 Chroma Format
4:4:4 Chroma Format
8 Bit Sample Depth
Kommunikations
Technik
9 and 10 Bit Sample Depth
11 and 12 Bit Sample Depth
8x8 vs. 4x4 Transform Adaptivity
Quantization Scaling Matrices
Separate Cb and Cr QP control
Monochrome Video Format
Residual Color Transform
Predictive Lossless Coding
Baseline
Nein
Nein
Nein
Nein
Nein
Nein
Nein
Nein
Kommunikations
Technik
Extended
Nein
Nein
Nein
Nein
Nein
Nein
Nein
Nein
Main
Nein
Nein
Nein
Nein
Nein
Nein
Nein
Nein
High
Nein
Nein
Ja
Ja
Ja
Ja
Nein
Nein
High 10
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
High 4:2:2
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
High 4:4:4
Ja
Ja
Ja
Ja
Ja
Ja
Ja
Ja
Guido H. Bruck
Bildverarbeitung - Folie 127
25.09.2013
3.14.32 Levels und Profiles
Baseline
Ja
Nein
Nein
Ja
Ja
Ja
Nein
Ja
Ja
Ja
Nein
Nein
Ja
Nein
Nein
Ja
Extended
Ja
Ja
Ja
Ja
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Ja
Ja
Nein
Nein
Ja
Main
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
Nein
Nein
Ja
Ja
Nein
Nein
Ja
High
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
Nein
Nein
Ja
Ja
Nein
Nein
Ja
High 10
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
Nein
Nein
Ja
Ja
Nein
Nein
Ja
High 4:2:2
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
Nein
Nein
Ja
Ja
Ja
Nein
Ja
High 4:4:4
Ja
Ja
Nein
Ja
Ja
Ja
Ja
Nein
Nein
Nein
Nein
Ja
Ja
Ja
Ja
Ja
Guido H. Bruck
Bildverarbeitung - Folie 126
25.09.2013
Macroblocks pro Beispiele für
Videobitrate (VCL) für Profiles
Baseline
Auflösung/Bildrate
High 4:2:2
Extended
Level Frame Sekunde
High
High 10
dieses Levels
High 4:4:4
Main
64 kbit/s
80 kbit/s
192 kbit/s
256 kbit/s
1
176 × 144 / 15
1 485
99
128 × 96 / 30
1b
128 kbit/s 160 kbit/s
384 kbit/s
512 kbit/s
352 × 288 / 7.5
3 000
320 × 240 / 10
1.1
192 kbit/s 240 kbit/s
576 kbit/s
768 kbit/s
176 × 144 / 30
352 × 288 / 15
396
6 000
320 × 240 / 20
1.2
384 kbit/s 480 kbit/s
1152 kbit/s
1536 kbit/s
176 × 144 / 60
1.3
768 kbit/s 960 kbit/s
2304 kbit/s
3072 kbit/s
352 × 288 / 30
11 880
320 × 240 / 40
2
2 Mbit/s 2,5 Mbit/s
6 Mbit/s
8 Mbit/s
352 × 576 / 25
19 800
4 Mbit/s
5 Mbit/s
12 Mbit/s
16 Mbit/s
2.1
792
352 × 288 / 50
720 × 480 / 15
1 620
20 250
4 Mbit/s
5 Mbit/s
12 Mbit/s
16 Mbit/s
2.2
352 × 288 / 50
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 128
25.09.2013
32
3.14.33 Levels und Profiles
3.14.35 AVCHD 2.0
Macroblocks pro Beispiele für
Videobitrate (VCL) für Profiles
Baseline
Auflösung/Bildrate
High 4:2:2
Extended
Level Frame Sekunde
High
High 10
dieses Levels
High 4:4:4
Main
720 × 576 / 25
40 500
10 Mbit/s 12,5 Mbit/s
30 Mbit/s
40 Mbit/s
3
1 620
720 × 480 / 30
1280 × 720 / 30
3 600 108 000
14 Mbit/s 17,5 Mbit/s
42 Mbit/s
56 Mbit/s
3.1
720 × 576 / 60
1280 × 1024 / 40
5 120 216 000
20 Mbit/s 25 Mbit/s
60 Mbit/s
80 Mbit/s
3.2
1280 × 720 / 60
4
20 Mbit/s 25 Mbit/s
60 Mbit/s
80 Mbit/s
1920 × 1080 / 30
8 192 245 760
1280 × 720 / 60
4.1
50 Mbit/s 62,5 Mbit/s
150 Mbit/s
200 Mbit/s
8 704 522 240
2048 × 1080 / 60
4.2
50 Mbit/s 62,5 Mbit/s
150 Mbit/s
200 Mbit/s
3072 × 1620 / 30
168,75
22 080 589 824
5
135 Mbit/s
405 Mbit/s
540 Mbit/s
2048 × 1080 / 60
Mbit/s
4096 × 2304 / 25
5.1 36 864 983 040
240 Mbit/s 300 Mbit/s
720 Mbit/s
960 Mbit/s
2048 × 1080 / 100
Kommunikations
Technik
Frame size in pixels
Frame rate
AVCHD Progressive
1440×1080
1920×1080
AVCHD 3D (stereoscopic)
1280×720
1920×1080
23.976, progressive
59.94, progressive
59.94, progressive
25, interlaced
50, progressive
50, progressive
29.97, interlaced
16:9
MPEG-4 AVC/H.264
Frame aspect ratio
Video Compression
Luminance sampling
111.4 MHz
148.5 MHz
74.25 MHz
frequency
Chroma sampling
4:2:0
format
Quantization
8 bits (both luminance and chrominance)
System
Stream type
MPEG transport stream
System data rate
up to 28 Mbit/s
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 131
25.09.2013
3.15.1 High Efficiency Video Coding (HEVC)
High Definition(AVCHD-HD)
Standard Definition(AVCHD-SD)
1920×1080
1280×720
720×480
720×576
1440×1080
29.97, interlaced
59.94, progressive
25, interlaced
50, progressive
29.97, interlaced
25, interlaced
23.976, progressive 23.976, progressive
16:9
4:3, 16:9
MPEG-4 AVC/H.264
74.25 MHz
74.25 MHz
13.5 MHz
13.5 MHz
55.7 MHz
Frame aspect ratio
Video Compression
Luminance sampling
frequency
Chroma sampling
4:2:0
format
Quantization
8 bits (both luminance and chrominance)
System
Stream type
MPEG transport stream
up to 18 Mbit/s (DVD media)
System data rate
up to 24 Mbit/s (all other media)
Kommunikations
Technik
Frame rate
Guido H. Bruck
Bildverarbeitung - Folie 129
25.09.2013
3.14.34 AVCHD
Subtype
Subtype
Frame size in pixels
Guido H. Bruck
Bildverarbeitung - Folie 130
25.09.2013
•
•
•
•
MPEG-H part 2 (ISO/IEC 23008-2)
ITU-T Recommendation H.265
Increased video resolution
Increased parallel processing architectures
• The video coding layer of HEVC employs the same hybrid approach (inter/intrapicture prediction and 2-D transform coding) used in all video
compression standards since H.261.
Kommunikations
Technik
Guido H. Bruck
Bildverarbeitung - Folie 132
25.09.2013
33
3.15.2 High Efficiency Video Coding (HEVC)
3.15.4 High Efficiency Video Coding (HEVC)
• The encoder duplicates the decoder processing loop (see gray-shaded boxes in
3.15.2 such that both will generate identical predictions for subsequent data.
• Video material to be encoded by HEVC is generally expected to be input as
progressive scan imagery.
• No explicit coding features are present in the HEVC design to support the use of
interlaced scanning, as interlaced scanning is no longer used for displays and is
becoming substantially less common for distribution.
• A metadata syntax has been provided in HEVC to allow an encoder to indicate that
interlace-scanned video has been sent by coding each field (i.e., the even or odd
numbered lines of each video frame) of interlaced video as a separate picture or that
it has been sent by coding each interlaced frame as an HEVC coded picture. This
provides an efficient method of coding interlaced video without burdening decoders
with a need to support a special decoding process for it.
Typical HEVC video encoder
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 133
25.09.2013
3.15.3 High Efficiency Video Coding (HEVC)
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 135
25.09.2013
3.15.5 High Efficiency Video Coding (HEVC)
• Each picture is split into block-shaped regions, with the exact block partitioning
being conveyed to the decoder.
• The first picture of a video sequence is coded using only intrapicture prediction, with
no dependence on other pictures
• For all remaining pictures of a sequence or between random access points,
interpicture temporally predictive coding modes are typically used for most blocks.
The encoding process for interpicture prediction consists of choosing motion data
comprising the selected reference picture and motion vector (MV) to be applied for
predicting the samples of each block. The encoder and decoder generate identical
interpicture prediction signals by applying motion compensation (MC) using the MV
and mode decision data, which are transmitted as side information.
• The residual signal of the intra- or interpicture prediction, which is the difference
between the original block and its prediction, is transformed by a linear spatial
transform. The transform coefficients are then scaled, quantized, entropy coded,
and transmitted together with the prediction information.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 134
25.09.2013
Kommunikations
Technik
Quelle: Jérôme VIERON HEVC: High-Efficiency Video Coding - Next generation video compression - WBU-ISOG FORUM 27 28 November 2012
Guido H. Bruck
Bildverarbeitung - Folie 136
25.09.2013
34
3.15.6 High Efficiency Video Coding (HEVC)
3.15.8 High Efficiency Video Coding (HEVC)
Coding tree units and coding tree block (CTB) structure:
• size selected by the encoder, can be larger than a traditional macroblock.
• The CTU consists of a luma CTB and the corresponding chroma CTBs and syntax
elements. The size L×L of a luma CTB can be chosen as L = 16, 32, or 64 samples,
with the larger sizes typically enabling better compression.
• HEVC then supports a partitioning of the CTBs into smaller blocks using a tree
structure and quadtree-like signaling.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 137
25.09.2013
Kommunikations
Technik
Quelle: Jérôme VIERON HEVC: High-Efficiency Video Coding - Next generation video compression - WBU-ISOG FORUM 27 28 November 2012
Guido H. Bruck
Bildverarbeitung - Folie 139
25.09.2013
3.15.7 High Efficiency Video Coding (HEVC)
3.15.9 High Efficiency Video Coding (HEVC)
Coding units (CUs) and coding blocks (CBs):
• The quadtree syntax of the CTU specifies the size and positions of its luma and
chroma CBs. The root of the quadtree is associated with the CTU.
• Hence, the size of the luma CTB is the largest supported size for a luma CB. The
splitting of a CTU into luma and chroma CBs is signaled jointly. One luma CB and
ordinarily two chroma CBs, together with associated syntax, form a coding unit (CU).
• A CTB may contain only one CU or may be split to form multiple CUs, and each CU
has an associated partitioning into prediction units (PUs) and a tree of transform
units (TUs).
Prediction units and prediction blocks (PBs):
• The decision whether to code a picture area using interpicture or intrapicture
prediction is made at the CU level. A PU partitioning structure has its root at the CU
level.
Transform Units (TUs) and transform blocks (TBs):
• The prediction residual is coded using block transforms. A TU tree structure has its
root at the CU level. The luma CB residual may be identical to the luma transform
block (TB) or may be further split into smaller luma TBs. The same applies to the
chroma TBs. Integer basis functions similar to those of a discrete cosine transform
(DCT) are defined for the square TB sizes 4×4, 8×8, 16×16, and 32×32. For the 4×4
transform of luma intrapicture prediction residuals, an integer transform derived from
a form of discrete sine transform (DST) is alternatively specified.
Motion vector signaling:
• Advanced motion vector prediction (AMVP) is used, including derivation of several
most probable candidates based on data from adjacent PBs and the reference
picture. A merge mode for MV coding can also be used, allowing the inheritance of
MVs from temporally or spatially neighboring PBs. Moreover, compared to
H.264/MPEG-4 AVC, improved skipped and direct motion inference are also
specified.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 138
25.09.2013
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 140
25.09.2013
35
3.15.10 High Efficiency Video Coding (HEVC)
3.15.12 High Efficiency Video Coding (HEVC)
Motion compensation:
• Quarter-sample precision is used for the MVs, and 7-tap or 8-tap filters are used for
interpolation of fractional-sample positions (compared to six-tap filtering of halfsample positions followed by linear interpolation for quarter-sample positions in
H.264/MPEG-4 AVC). Similar to H.264/MPEG-4 AVC, multiple reference pictures are
used. For each PB, either one or two motion vectors can be transmitted, resulting
either in unipredictive or bipredictive coding, respectively.
Intrapicture prediction:
• The decoded boundary samples of adjacent blocks are used as reference data for
spatial prediction in regions where interpicture prediction is not performed.
Intrapicture prediction supports 33 directional modes (compared to eight such
modes in H.264/MPEG-4 AVC), plus planar (surface fitting) and DC (flat) prediction
modes. The selected intrapicture prediction modes are encoded by deriving most
probable modes (e.g., prediction directions) based on those of previously decoded
neighboring PBs.
Quantization control:
• As in H.264/MPEG-4 AVC, uniform reconstruction quantization (URQ) is used in
HEVC, with quantization scaling matrices supported for the various transform block
sizes.
Entropy coding:
• Context adaptive binary arithmetic coding (CABAC) is used for entropy coding. This
is similar to the CABAC scheme in H.264/MPEG-4 AVC, but has undergone several
improvements to improve its throughput speed (especially for parallel-processing
architectures) and its compression performance, and to reduce its context memory
requirements.
In-loop deblocking filtering:
• A deblocking filter similar to the one used in H.264/MPEG-4 AVC is operated within
the interpicture prediction loop. However, the design is simplified in regard to its
decision-making and filtering processes, and is made more friendly to parallel
processing.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 141
25.09.2013
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 143
25.09.2013
3.15.11 High Efficiency Video Coding (HEVC)
3.15.13 High Efficiency Video Coding (HEVC)
Intrapicture prediction modes
Sample adaptive offset (SAO):
• A nonlinear amplitude mapping is introduced within the interpicture prediction loop
after the deblocking filter. Its goal is to better reconstruct the original signal
amplitudes by using a look-up table that is described by a few additional parameters
that can be determined by histogram analysis at the encoder side.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 142
25.09.2013
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 144
25.09.2013
36
3.15.14 High Efficiency Video Coding (HEVC)
3.15.16 High Efficiency Video Coding (HEVC)
• New features are introduced in the HEVC standard to enhance the parallel
processing capability or modify the structuring of slice data for packetization
purposes.
Tiles:
• The option to partition a picture into rectangular regions called tiles has been
specified. The main purpose of tiles is to increase the capability for parallel
processing rather than provide error resilience. Tiles are independently decodable
regions of a picture that are encoded with some shared header information. Tiles
can additionally be used for the purpose of spatial random access to local regions of
video pictures. A typical tile configuration of a picture consists of segmenting the
picture into rectangular regions with approximately equal numbers of CTUs in each
tile. Tiles provide parallelism at a more coarse level of granularity (picture/
subpicture), and no sophisticated synchronization of threads is necessary for their
use.
Dependent slice segments:
• A structure called a dependent slice segment allows data associated with a
particular wavefront entry point or tile to be carried in a separate NAL unit, and thus
potentially makes that data available to a system for fragmented packetization with
lower latency than if it were all coded together in one slice. A dependent slice
segment for a wavefront entry point can only be decoded after at least part of the
decoding process of another slice segment has been performed. Dependent slice
segments are mainly useful in low-delay encoding, where other parallel tools might
penalize compression performance.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 145
25.09.2013
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 147
25.09.2013
3.15.15 High Efficiency Video Coding (HEVC)
3.15.17 High Efficiency Video Coding (HEVC)
Wavefront parallel processing:
• When wavefront parallel processing (WPP) is enabled, a slice is divided into rows of
CTUs. The first row is processed in an ordinary way, the second row can begin to be
processed after only two CTUs have been processed in the first row, the third row
can begin to be processed after only two CTUs have been processed in the second
row, and so on. The context models of the entropy coder in each row are inferred
from those in the preceding row with a two-CTU processing lag. WPP provides a
form of processing parallelism at a rather fine level of granularity, i.e., within a slice.
WPP may often provide better compression performance than tiles (and avoid some
visual artifacts that may be induced by using tiles).
Transform Coding
• HEVC uses transform coding of the prediction error residual in a similar manner as
in prior standards. The residual block is partitioned into multiple square TBs. The
supported transform block sizes are 4×4, 8×8, 16×16, and 32×32.
Core Transform:
• Two-dimensional transforms are computed by applying 1-D transforms in the
horizontal and vertical directions. The elements of the core transform matrices were
derived by approximating scaled DCT basis functions, under considerations such as
limiting the necessary dynamic range for transform computation and maximizing the
precision and closeness to orthogonality when the matrix entries are specified as
integer values. For simplicity, only one integer matrix for the length of 32 points is
specified, and subsampled versions are used for other sizes.
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 146
25.09.2013
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 148
25.09.2013
37
3.15.18 High Efficiency Video Coding (HEVC)
3.15.20 High Efficiency Video Coding (HEVC)
Level
1
2
2.1
3
3.1
4
4.1
5
5.1
5.2
6
6.1
6.2
Kommunikations
Technik
Quelle: Jérôme VIERON HEVC: High-Efficiency Video Coding - Next generation video compression - WBU-ISOG FORUM 27 28 November 2012
Guido H. Bruck
Bildverarbeitung - Folie 149
25.09.2013
Max Luma picture size Max luma sample rate Main Tier
(samples)
(samples/sec)
Max bit rate
(1000 bits/s)
128
36,864
552,960
1 500
122 880
3,686 400
3 000
245 760
7,372 800
6 000
552 960
16 588,800
10 000
983 040
33 177 600
12 000
2,228 224
66 846,720
20 000
2,228,224
133 693,440
25 000
8,912,896
267 386,880
40 000
8,912 896
534 773,760
60 000
8,912 896
1,069,547,520
1,069,547,520
60 000
33,423,360
2 005 401,600
120 000
33,423 360
4,010,803,200
240 000
33,423,360
Kommunikations
Technik
High Tier
max bit rate
(1000 bits/s)
30000
50,000
100 000
160 000
240 000
240,000
480 000
800,000
Quelle: Jérôme VIERON HEVC: High-Efficiency Video Coding - Next generation video compression - WBU-ISOG FORUM 27 28 November 2012
Min comp. ratio
2
2
2
2
2
4
4
6
8
8
8
8
6
Guido H. Bruck
Bildverarbeitung - Folie 151
25.09.2013
3.15.19 High Efficiency Video Coding (HEVC)
Kommunikations
Technik
Quelle: Gary J. Sullivan, Jens-Rainer Ohm, Woo-Jin Han, Thomas Wiegand: Overview of the High Efficiency Video Coding (HEVC) Standard IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 22, NO. 12, DECEMBER 2012
Guido H. Bruck
Bildverarbeitung - Folie 150
25.09.2013
38