6
VIDEO CODER ARCHITECTURE
•Image / Video Coding Based on Block-Matching
–Assume frame f-1 has been encoded and reconstructed, and frame f is the
current frame to be encoded
•Exploiting the redundancies
–Temporal
MC-Prediction (P and B frames)
–Spatial
Block DCT
–Color
Color Space Conversion
•Scalar quantization of DCT coefficients
•Zigzag scanning, runlength and Huffman coding of the nonzero
quantized DCT coefficients
7
VIDEO CODER ARCHITECTURE…
•VideoEncoder
–Divideframefintoequal-sizeblocks
–Foreachsourceblock,
Find its motion vector using the block-matching algorithm based on the
reconstructed frame f-1
Compute the DFD of the block
–Transmitthemotionvectorofeachblocktodecoder
–CompressDFD’sofeachblock
–TransmittheencodedDFD’stodecoder
8
VIDEO CODER ARCHITECTURE…
•VideoEncoder
9
VIDEO CODER ARCHITECTURE…
•VideoDecoder
–Receivemotionvectorofeachblockfromencoder
–Basedonthemotionvector,findthebest-matchingblockfromthe
referenceframe
ie,, Find the predicted current frame from the reference frame
–ReceivetheencodedDFDofeachblockfromencoder
–DecodetheDFD.
–Eachreconstructedblockinthecurrentframe=ItsdecompressedDFD+
thebest-matchingblock
10
VIDEO CODER ARCHITECTURE…
•VideoDecoder
11
VIDEO CODEC STANDARDS
12
VIDEO CODEC STANDARDS…
•Based on the same fundamental building blocks
–Motion-compensated prediction (I, P, and B frames)
–2-D Discrete Cosine Transform (DCT)
–Color space conversion
–Scalar quantization, runlengths, Huffman coding
•Additional tools added for different applications:
–Progressive or interlaced video
–Improved compression, error resilience, scalability, etc.
•MPEG-1/2/4, H.261/3/4
–Frame-based coding
•MPEG-4
–Object-based coding and Synthetic video
13
VIDEO CODEC STANDARDS…
14
HEVC
15
HEVC
•Video Coding Standards Overview
Next Generation Broadcasting
18
HEVC…
•HEVC = High Efficiency Video Coding
•Joint project between ISO/IEC/MPEG and ITU-T/VCEG
–ISO/IEC: MPEG-H Part 2 (23008-2)
–ITU-T: H.265
•JCT-VC committee
–Joint Collaborative Team on Video Coding
–Co-chairs: Dr. Gary Sullivan (Microsoft, USA) and Dr. Jens-Reiner Ohm (RWTH
Aachen, Germany)
•Target
–Roughly half the bit-rate at the same subjective quality compared to H.264/AVC (50%
over H.264/AVC)
–x10 complexity max for encoder and x2/3 max for decoder
•Requirements
–Progressive required for all profiles and levels
Interlaced support using field SEI message
–Video resolution: sub QVGA to 8Kx4K, with more focus on higher resolution video
content (1080p and up)
–Color space and chroma sampling: YUV420, YUV422, YUV444, RGB444
–Bit-depth: 8-14 bits
–Parallel Processing Architecture
19
HEVC…
•H.264 Vs H.265
20
HEVC…
•Potential applications
–Existing applications and usage scenarios
IPTV over DSL : Large shift in IPTV eligibility
Facilitated deployment of OTT and multi-screen services
More customers on the same infrastructure: most IP traffic is video
More archiving facilities
–Existing applications and usage scenarios
1080p60/50 with bitrates comparable to 1080i
Immersive viewing experience: Ultra-HD (4K, 8K)
Premium services (sports, live music, live events,…): home theater, Bars
venue, mobile
HD 3DTV Full frame per view at today’s HD delivery rates
What becomes possible with 50% video rate reduction?
21
HEVC…
•Tentative Timeline
22
HEVC…
•History
23
HEVC…
•H.264 Vs H.265
24
HEVC…
•H.264 Vs H.265
25
HEVC…
•HEVC Encoder
26
HEVC…
•HEVC Decoder
27
HEVC…
•Video Coding Techniques : Block-based hybrid video coding
–Interpicture prediction
Temporal statistical dependences
–Intrapicture prediction
Spatial statistical dependences
–Transform coding
Spatial statistical dependences
•Uses YCbCrcolor space with 4:2:0 subsampling
–Y component
Luminance (luma)
Represents brightness (gray level)
–Cband Cr components
Chrominance (chroma).
Color difference from gray toward blue and red
28
HEVC…
•Video Coding Techniques : Block-based hybrid video coding
–Motion compensation
Quarter-sample precision is used for the MVs
7-tap or 8-tap filters are used for interpolation of fractional-sample
positions
–Intrapicture prediction
33 directional modes, planar (surface fitting), DC (flat)
Modes are encoded by deriving most probable modes (MPMs) based
on those of previously decoded neighboring PBs
–Quantization control
Uniform reconstruction quantization (URQ)
–Entropy coding
Context adaptive binary arithmetic coding (CABAC)
–In-Loop deblockingfiltering
Similar to the one in H.264 and More friendly to parallel processing
–Sample adaptive offset (SAO)
Nonlinear amplitude mapping
For better reconstruction of amplitude by histogram analysis
29
HEVC…
•Coding Tree Unit (CTU) -A picture is partitioned into CTUs
–TheCTUisthebasicprocessingunitinsteadofMacroBlocks(MB)
–Contains lumaCTBs and chromaCTBs
A lumaCTB covers L ×L samples
Two chromaCTBs cover each L/2 ×L/2 samples
–HEVC supports variable-size CTBs
The value of L may be equal to 16, 32, or 64.
Selected according to needs of encoders -In terms of memory and
computational requirements
Large CTB is beneficial when encoding high-resolution video content
–CTBs can be used as CBs or can be partitioned into multiple CBs using
quadtreestructures
–The quadtreesplitting process can be iterated until the size for a luma
CB reaches a minimum allowed lumaCB size (8 ×8 or larger).
30
HEVC…
•Block Structure
–Coding Tree Units (CTU)
Corresponds to macroblocksin earlier coding standards (H.264, MPEG2, etc)
Lumaand chromaCoding Tree Blocks (CTB)
Quadtreestructure to split into Coding Units (CUs)
16x16, 32x32, or 64x64, signaled in SPS
32
HEVC…
•Block Structure
–Coding Units (CU)
Lumaand chromaCoding Blocks (CB)
Rooted in CTU
Intra or inter coding mode
Split into Prediction Units (PUs) and Transform Units (TUs)
33
HEVC…
•Block Structure
–Prediction Units (PU)
Lumaand chromaPrediction Blocks (PB)
Rooted in CU
Partition and motion info
34
HEVC…
•Block Structure
–Transform Units (TU)
Rooted in CU
4x4, 8x8, 16x16, 32x32 DCT, and 4x4 DST
37
HEVC…
•Intra Prediction
–Adaptive reference sample filtering
3-tap filter: [1 2 1]/4
Not performed for 4x4 blocks
For larger than 4x4 blocks, adaptively performed for a subset of modes
Modes except vertical/near-vertical, horizontal/near-horizontal, and DC
–Mode dependent adaptive scanning
4x4 and 8x8 intra blocks only
All other blocks use only diagonal upright scan (left-most scan pattern)
38
HEVC…
•Intra Prediction
–Boundary smoothing
Applied to DC, vertical, and horizontal modes, lumaonly
Reduces boundary discontinuity
–For DC mode, 1st column and row of samples in predicted block are
filtered
–For Hor/Vermode, first column/row of pixels in predicted block are filtered
39
HEVC…
•Inter Prediction
–Fractional sample interpolation
¼ pixel precision for luma
–DCT based interpolation filters
8-/7-tap for luma
4-tap for chroma
Supports 16-bit implementation
with non-normative shift
–High precision interpolation and
biprediction
–DCT-IF design
Forward DCT, followed by
inverse DCT
46
HEVC…
•Tile
–Self-containedandindependentlydecodablerectangularregions
–Tilesprovideparallelismatacoarselevelofgranularity
Tiles more than the cores Not efficient Breaks dependencies
47
HEVC…
•WPP
–AsliceisdividedintorowsofCTUs.Parallelprocessingofrows
–Thedecodingofeachrowcanbebegunassoonafewdecisionshave
beenmadeintheprecedingrowfortheadaptationoftheentropycoder.
–Bettercompressionthantiles.Parallelprocessingatafinelevelof
granularity.
No WPP with tiles !!
48
HEVC…
•DependentSlices
–SeparateNALunitsbutdependent(Canonlybedecodedafterpartof
thepreviousslice)
–Dependentslicesaremainlyusefulforultralowdelayapplications
RemoteSurgery
–Errorresiliencygetsworst
–Lowdelay
–GoodEfficiency
Goes well with WPP
58
HEVC…
•Complexity Analysis
–Software-based HEVC decoder capabilities
(published by NTT Docomo)
Single-threaded: 1080p@30 on ARMv7
(1.3GHz),1080p@60 decoding on i5
(2.53GHz)
Multi-threaded: 4Kx2K@60 on i7 (2.7GHz),
12Mbps, decoding speed up to 100fps
–Other independent software-based HEVC
real-time decoder implementations published
by Samsung and Qualcomm during HEVC
development
–Decoder complexity not substantially higher
More complex modules: MC, Transform, Intra
Pred, SAO
Simpler modules: CABAC and deblocking