Slide 1

Slide 1 text

Introduction to VP8 郭⾄至軒 (KuoE0) [email protected]

Slide 2

Slide 2 text

Latest update: Nov 19, 2013, Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by-sa/3.0/

Slide 3

Slide 3 text

Situation

Slide 4

Slide 4 text

web m

Slide 5

Slide 5 text

web m

Slide 6

Slide 6 text

Video Codec VP8

Slide 7

Slide 7 text

An Open Source Codec

Slide 8

Slide 8 text

Developed by On2 Technology

Slide 9

Slide 9 text

Developed by On2 Technology February, 2010

Slide 10

Slide 10 text

Acquired by Google February, 2010

Slide 11

Slide 11 text

Patent

Slide 12

Slide 12 text

web m

Slide 13

Slide 13 text

March, 2013 web m

Slide 14

Slide 14 text

Royalty-Free Terms March, 2013 web m

Slide 15

Slide 15 text

Successor VP9

Slide 16

Slide 16 text

Successor VP9 May 15, 2013

Slide 17

Slide 17 text

Feature

Slide 18

Slide 18 text

focus on Internet web-based application

Slide 19

Slide 19 text

Low Bandwidth Requirement Image Quality: watchable (PSNR: ~30dB) visually lossless (PSNR: ~45dB)

Slide 20

Slide 20 text

Heterogeneous Client Hardware

Slide 21

Slide 21 text

Heterogeneous Client Hardware

Slide 22

Slide 22 text

Heterogeneous Client Hardware Efficient Implementations

Slide 23

Slide 23 text

Web Video Format YUV 420 color sampling 8 bit per channel depth Up to 16383 × 16383 pixels

Slide 24

Slide 24 text

Processing Flow

Slide 25

Slide 25 text

Coding Predict Transform + Quantize Entropy Code Loop Filter

Slide 26

Slide 26 text

Decoding Entropy Decode Predict Dequantize+Inverse Transform Loop Filter

Slide 27

Slide 27 text

Reference Frame

Slide 28

Slide 28 text

Golden Frame Last Frame Alternate Frame Reference Frame

Slide 29

Slide 29 text

Golden Frame Last Frame Alternate Frame At most 3 reference frames in VP8.

Slide 30

Slide 30 text

Last Frame

Slide 31

Slide 31 text

Last Frame

Slide 32

Slide 32 text

Last Frame

Slide 33

Slide 33 text

Last Frame Current Frame

Slide 34

Slide 34 text

Golden Frame Choose an arbitrary frame in the past. Define a number of flags to notify decoder when and how to update this buffer.

Slide 35

Slide 35 text

Golden Frame Choose an arbitrary frame in the past. Define a number of flags to notify decoder when and how to update this buffer.

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

set as the golden frame

Slide 39

Slide 39 text

Golden Frame Golden Frame

Slide 40

Slide 40 text

Golden Frame Golden Frame

Slide 41

Slide 41 text

Golden Frame Golden Frame

Slide 42

Slide 42 text

Golden Frame Golden Frame

Slide 43

Slide 43 text

Golden Frame Golden Frame

Slide 44

Slide 44 text

Golden Frame Golden Frame

Slide 45

Slide 45 text

Golden Frame Golden Frame

Slide 46

Slide 46 text

Golden Frame Golden Frame

Slide 47

Slide 47 text

Golden Frame Golden Frame

Slide 48

Slide 48 text

Reconstruct moving object background

Slide 49

Slide 49 text

Alternate Frame Other Frame Alternate Frame

Slide 50

Slide 50 text

Alternate Frame Other Frame Alternate Frame decode show

Slide 51

Slide 51 text

Alternate Frame Other Frame Alternate Frame decode show decode show

Slide 52

Slide 52 text

Alternate Frame Other Frame Alternate Frame decode show decode show store beneficial information

Slide 53

Slide 53 text

Construct from multi-frame

Slide 54

Slide 54 text

Construct from multi-frame

Slide 55

Slide 55 text

Construct from multi-frame

Slide 56

Slide 56 text

Construct from multi-frame Alternate Frame

Slide 57

Slide 57 text

Typical Frame I B B P B B P B B I B B P

Slide 58

Slide 58 text

VP8 L G A G G G G G L G G G A G L

Slide 59

Slide 59 text

Prediction

Slide 60

Slide 60 text

Intra Prediction Inter Prediction use data within a single video frame use data from previously encoded frames

Slide 61

Slide 61 text

Intra Prediction Luma Luma Chroma

Slide 62

Slide 62 text

Intra Prediction Luma Luma Chroma 16 4 8

Slide 63

Slide 63 text

H_PRED (horizontal prediction) V_PRED (vertical prediction) DC_PRED (DC prediction) TM_PRED (TrueMotion prediction) Four Prediction Modes:

Slide 64

Slide 64 text

Horizontal Prediction Fills each column of the block with a copy of the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y

Slide 65

Slide 65 text

Horizontal Prediction Fills each column of the block with a copy of the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y e j o t y

Slide 66

Slide 66 text

Horizontal Prediction Fills each column of the block with a copy of the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y e j o t y e e e e e j j j j j o o o o o t t t t t y y y y y

Slide 67

Slide 67 text

Vertical Prediction Fills each row of the block with a copy of the above row. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y

Slide 68

Slide 68 text

Vertical Prediction Fills each row of the block with a copy of the above row. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y U V W X Y

Slide 69

Slide 69 text

Vertical Prediction Fills each row of the block with a copy of the above row. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y U V W X Y U V W X Y U V W X Y U V W X Y U V W X Y U V W X Y

Slide 70

Slide 70 text

DC Prediction Fills the block with a single value using the average of the pixels in the above row and the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y

Slide 71

Slide 71 text

DC Prediction Fills the block with a single value using the average of the pixels in the above row and the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y U V W X Y e j o t y Z = (U + V + W + X + Y + e + j + o + t + y) ÷ 10

Slide 72

Slide 72 text

DC Prediction Fills the block with a single value using the average of the pixels in the above row and the left column. a b c d e f g h i j k l m n o p q r s t u v w x y A B C D E F G H I J K L M N O P Q R S T U V W X Y U V W X Y e j o t y Z = (U + V + W + X + Y + e + j + o + t + y) ÷ 10 Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z

Slide 73

Slide 73 text

* * * * L0 * * * * L1 * * * * L2 * * * * L3 * * * * L4 * * * * * * * * * * * * * * * * * * * * A0 A1 A2 A3 A4 TrueMotion Prediction Horizontal differences between pixels in above row and vertical differences between pixels in left column are propagated (starting from C). * * * * * * * * * * * * * * * * * * * * * * * * C

Slide 74

Slide 74 text

* * * * L0 * * * * L1 * * * * L2 * * * * L3 * * * * L4 * * * * * * * * * * * * * * * * * * * * A0 A1 A2 A3 A4 A0 A1 A2 A3 A4 L0 L1 L2 L3 L4 TrueMotion Prediction Horizontal differences between pixels in above row and vertical differences between pixels in left column are propagated (starting from C). * * * * * * * * * * * * * * * * * * * * * * * * C C Xij = Ai + Lj - C

Slide 75

Slide 75 text

* * * * L0 * * * * L1 * * * * L2 * * * * L3 * * * * L4 * * * * * * * * * * * * * * * * * * * * A0 A1 A2 A3 A4 A0 A1 A2 A3 A4 L0 L1 L2 L3 L4 TrueMotion Prediction Horizontal differences between pixels in above row and vertical differences between pixels in left column are propagated (starting from C). * * * * * * * * * * * * * * * * * * * * * * * * C C Xij = Ai + Lj - C Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij Xij

Slide 76

Slide 76 text

Inter Prediction As mentioned above...

Slide 77

Slide 77 text

Inter Prediction Golden Frame Last Frame Alternate Frame

Slide 78

Slide 78 text

Motion Vector Reusing vectors from neighboring macroblocks. Flexible partitioning of a macroblock into sub- blocks.

Slide 79

Slide 79 text

Sub-pixel Interpolation Quarter pixel accurate motion vectors for luma pixels. High performance six-tap interpolation filters. [3, -16, 77, 77, -16, 3]/128 for 1⁄2 pixel positions [2, -11, 108, 36, -8, 1]/128 for 1⁄4 pixel positions [1, -8, 36, 108, -11, 2]/128 for 3⁄4 pixel positions

Slide 80

Slide 80 text

Hybrid Transform & Quantization

Slide 81

Slide 81 text

Divide into Macroblocks One 16×16 block of luma pixels (Y) Two 8×8 blocks of chroma pixels (U, V) Typical Method

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

16 8 8

Slide 88

Slide 88 text

Divide into blocks VP8 Method All blocks of luma and chroma are 4×4 blocks

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

4 4 4

Slide 92

Slide 92 text

Discrete Cosine Transform Fast implementation Slightly worse in energy compaction than KLT Content-independency

Slide 93

Slide 93 text

Coding 2-D DCT Decoding 4×4 variant of LLM implementation

Slide 94

Slide 94 text

Coding 2-D DCT Decoding 4×4 variant of LLM implementation Practical fast 1-D DCT algorithms with 11 multiplications

Slide 95

Slide 95 text

I1 I2 I3 I4 O1 O2 O3 O4 Inverse DCT Graph in VP8 y0 y1 x0 x1 y0 = √2(x0×sin(π/8)-x1×cos(π/8)) y1 = √2(x0×cos(π/8)+x1×sin(π/8))

Slide 96

Slide 96 text

H.264/AVC use multiplication-less integer transform slightly better than Energy compaction is

Slide 97

Slide 97 text

It is efficient in processors with SIMD capability.

Slide 98

Slide 98 text

Walsh-Hadamard Transform Y = HXHT H = 1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 [ ] HT is the transpose of H. Take advantage of the correlation to reduce redundancy.

Slide 99

Slide 99 text

Adaptive Quantization 128 quantization level. Different quantization level in single frame. 1st order luma DC 1st order luma AC 2st order luma DC 2st order luma AC 2st order chroma DC 2st order chroma AC

Slide 100

Slide 100 text

Entropy Coding

Slide 101

Slide 101 text

Supports distribution updates on a per-frame basis Boolean arithmetic coder Stable probability distributions within one frame Keyframes reset the probability values to the defaults

Slide 102

Slide 102 text

Adaptive Loop Filter

Slide 103

Slide 103 text

Removing blocking artifacts introduced by quantization and transformation.

Slide 104

Slide 104 text

Removing blocking artifacts introduced by quantization and transformation.

Slide 105

Slide 105 text

Removing blocking artifacts introduced by quantization and transformation. Slight Filtering

Slide 106

Slide 106 text

Removing blocking artifacts introduced by quantization and transformation. Slight Filtering Strong Filtering

Slide 107

Slide 107 text

Removing blocking artifacts introduced by quantization and transformation. Slight Filtering Strong Filtering No Filtering

Slide 108

Slide 108 text

Parallel Processing

Slide 109

Slide 109 text

Data Partition Compressed Data

Slide 110

Slide 110 text

Data Partition Compressed Data marcoblock code mode & motion vector transform coefficients

Slide 111

Slide 111 text

More Transform Coefficient Partition transform coefficients support up to 8 token partitions

Slide 112

Slide 112 text

More Transform Coefficient Partition transform coefficients support up to 8 token partitions

Slide 113

Slide 113 text

Compare to H.264

Slide 114

Slide 114 text

100 120 140 160 180 200 220 240 260 280 300 Night 720p 2000kbps Sheriff 720p 2000kbps Tulip 720p 2000kbps Deocding speed in Frame/second VP8 H.264 High Profile Intel Core i7 3.2GHz

Slide 115

Slide 115 text

20 25 30 35 40 45 Night 720p 2000kbps Sheriff 720p 2000kbps Tulip 720p 2000kbps Deocding speed in Frame/second VP8 H.264 High Profile Intel Atom N270 1.66GHz

Slide 116

Slide 116 text

Any Questions?

Slide 117

Slide 117 text

Thanks for your listening :)