introduction to vp8

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

Upload: chih-hsuan-kuo

Post on 15-May-2015

651 views

Category:

Technology


0 download

DESCRIPTION

沒什麼內容的 VP8 簡介

TRANSCRIPT

Page 3: Introduction to VP8

Situation

Page 4: Introduction to VP8

web m

Page 5: Introduction to VP8

web m

Page 6: Introduction to VP8

Video Codec

VP8

Page 7: Introduction to VP8

An Open Source Codec

Page 8: Introduction to VP8

Developed by On2 Technology

Page 9: Introduction to VP8

Developed by On2 Technology

February, 2010

Page 10: Introduction to VP8

Acquired by Google

February, 2010

Page 11: Introduction to VP8

Patent

Page 12: Introduction to VP8

web m

Page 13: Introduction to VP8

March, 2013

web m

Page 14: Introduction to VP8

Royalty-Free TermsMarch, 2013

web m

Page 15: Introduction to VP8

Successor

VP9

Page 16: Introduction to VP8

Successor

VP9May 15, 2013

Page 17: Introduction to VP8

Feature

Page 18: Introduction to VP8

focus on

Internetweb-based

application

Page 19: Introduction to VP8

Low Bandwidth Requirement

Image Quality:

watchable (PSNR: ~30dB)

visually lossless (PSNR: ~45dB)

Page 20: Introduction to VP8

Heterogeneous Client Hardware

Page 21: Introduction to VP8

Heterogeneous Client Hardware

Page 22: Introduction to VP8

Heterogeneous Client Hardware

Efficient Implementations

Page 23: Introduction to VP8

Web Video Format

YUV 420 color sampling

8 bit per channel depth

Up to 16383 × 16383 pixels

Page 24: Introduction to VP8

Processing Flow

Page 25: Introduction to VP8

CodingPredict

Transform + Quantize

Entropy Code

Loop Filter

Page 26: Introduction to VP8

DecodingEntropy Decode

Predict

Dequantize+Inverse Transform

Loop Filter

Page 27: Introduction to VP8

Reference Frame

Page 28: Introduction to VP8

Golden FrameLast FrameAlternate Frame

Reference Frame

Page 29: Introduction to VP8

Golden Frame Last FrameAlternate

Frame

At most 3 reference frames in VP8.

Page 30: Introduction to VP8

Last Frame

Page 31: Introduction to VP8

Last Frame

Page 32: Introduction to VP8

Last Frame

Page 33: Introduction to VP8

Last Frame Current Frame

Page 34: Introduction to VP8

Golden Frame

Choose an arbitrary frame in the past.

Define a number of flags to notify decoderwhen and how to update this buffer.

Page 35: Introduction to VP8

Golden Frame

Choose an arbitrary frame in the past.

Define a number of flags to notify decoderwhen and how to update this buffer.

Page 36: Introduction to VP8
Page 37: Introduction to VP8
Page 38: Introduction to VP8

set as the golden frame

Page 39: Introduction to VP8

Golden Frame

Golden Frame

Page 40: Introduction to VP8

Golden Frame

Golden Frame

Page 41: Introduction to VP8

Golden Frame

Golden Frame

Page 42: Introduction to VP8

Golden Frame

Golden Frame

Page 43: Introduction to VP8

Golden Frame

Golden Frame

Page 44: Introduction to VP8

Golden Frame

Golden Frame

Page 45: Introduction to VP8

Golden Frame

Golden Frame

Page 46: Introduction to VP8

Golden Frame

Golden Frame

Page 47: Introduction to VP8

Golden Frame

Golden Frame

Page 48: Introduction to VP8

Reconstruct

moving objectbackground

Page 49: Introduction to VP8

Alternate Frame

Other Frame

Alternate Frame

Page 50: Introduction to VP8

Alternate Frame

Other Frame

Alternate Frame

decodeshow

Page 51: Introduction to VP8

Alternate Frame

Other Frame

Alternate Frame

decodeshow

decode show

Page 52: Introduction to VP8

Alternate Frame

Other Frame

Alternate Frame

decodeshow

decode show

store beneficial information

Page 53: Introduction to VP8

Construct from multi-frame

Page 54: Introduction to VP8

Construct from multi-frame

Page 55: Introduction to VP8

Construct from multi-frame

Page 56: Introduction to VP8

Construct from multi-frame

Alternate Frame

Page 57: Introduction to VP8

Typical Frame

I B B P B B P B B I B B P

Page 58: Introduction to VP8

VP8

L G

A

G G G G G L G G G

A

G L

Page 59: Introduction to VP8

Prediction

Page 60: Introduction to VP8

Intra Prediction

Inter Prediction

use data within a single video frame

use data from previously encoded frames

Page 61: Introduction to VP8

Intra Prediction

Luma

LumaChroma

Page 62: Introduction to VP8

Intra Prediction

Luma

LumaChroma

16 4 8

Page 63: Introduction to VP8

H_PRED (horizontal prediction)

V_PRED (vertical prediction)

DC_PRED (DC prediction)

TM_PRED (TrueMotion prediction)

Four Prediction Modes:

Page 64: Introduction to VP8

Horizontal Prediction

Fills each column of the block with a copy of the left column.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X Y

Page 65: Introduction to VP8

Horizontal Prediction

Fills each column of the block with a copy of the left column.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X Y

ejoty

Page 66: Introduction to VP8

Horizontal Prediction

Fills each column of the block with a copy of the left column.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X Y

ejoty

e e e e ej j j j jo o o o ot t t t ty y y y y

Page 67: Introduction to VP8

Vertical Prediction

Fills each row of the block with a copy of the above row.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X Y

Page 68: Introduction to VP8

Vertical Prediction

Fills each row of the block with a copy of the above row.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X YU V W X Y

Page 69: Introduction to VP8

Vertical Prediction

Fills each row of the block with a copy of the above row.

a b c d ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X YU V W X Y

U V W X YU V W X YU V W X YU V W X YU V W X Y

Page 70: Introduction to VP8

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 ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X Y

Page 71: Introduction to VP8

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 ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X YU V W X Y

ejoty

Z = (U + V + W + X + Y + e + j + o + t + y) ÷ 10

Page 72: Introduction to VP8

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 ef g h i jk l m n op q r s tu v w x y

A B C D EF G H I JK L M N OP Q R S TU V W X YU V W X Y

ejoty

Z = (U + V + W + X + Y + e + j + o + t + y) ÷ 10

Z Z Z Z ZZ Z Z Z ZZ Z Z Z ZZ Z Z Z ZZ Z Z Z Z

Page 73: Introduction to VP8

* * * * 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

Page 74: Introduction to VP8

* * * * L0

* * * * L1

* * * * L2

* * * * L3

* * * * L4

* * * * ** * * * ** * * * ** * * * *

A0 A1 A2 A3 A4A0 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).

* * * * ** * * * ** * * * ** * * * ** * * * CC

Xij = Ai + Lj - C

Page 75: Introduction to VP8

* * * * L0

* * * * L1

* * * * L2

* * * * L3

* * * * L4

* * * * ** * * * ** * * * ** * * * *

A0 A1 A2 A3 A4A0 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).

* * * * ** * * * ** * * * ** * * * ** * * * CC

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

Page 76: Introduction to VP8

Inter Prediction

As mentioned above...

Page 77: Introduction to VP8

Inter Prediction

Golden Frame Last FrameAlternate

Frame

Page 78: Introduction to VP8

Motion VectorReusing vectors from neighboring macroblocks.

Flexible partitioning of a macroblock into sub-blocks.

Page 79: Introduction to VP8

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

Page 80: Introduction to VP8

Hybrid Transform & Quantization

Page 81: Introduction to VP8

Divide into Macroblocks

One 16×16 block of luma pixels (Y)Two 8×8 blocks of chroma pixels (U, V)

Typical Method

Page 82: Introduction to VP8
Page 83: Introduction to VP8
Page 84: Introduction to VP8
Page 85: Introduction to VP8
Page 86: Introduction to VP8
Page 87: Introduction to VP8

16 8 8

Page 88: Introduction to VP8

Divide into blocks

VP8 MethodAll blocks of luma and chroma are 4×4 blocks

Page 89: Introduction to VP8
Page 90: Introduction to VP8
Page 91: Introduction to VP8

4 4 4

Page 92: Introduction to VP8

Discrete Cosine Transform

Fast implementation

Slightly worse in energy compaction than KLT

Content-independency

Page 93: Introduction to VP8

Coding2-D DCT

Decoding4×4 variant of LLM implementation

Page 95: Introduction to VP8

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))

Page 96: Introduction to VP8

H.264/AVCuse multiplication-less integer transform

slightly better thanEnergy compaction is

Page 97: Introduction to VP8

It is efficient in processors with

SIMD capability.

Page 98: Introduction to VP8

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.

Page 99: Introduction to VP8

Adaptive Quantization

128 quantization level.

Different quantization level in single frame.1st order luma DC1st order luma AC2st order luma DC2st order luma AC

2st order chroma DC2st order chroma AC

Page 100: Introduction to VP8

Entropy Coding

Page 101: Introduction to VP8

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

Page 102: Introduction to VP8

Adaptive Loop Filter

Page 103: Introduction to VP8

Removing blocking artifacts introduced by quantization and transformation.

Page 104: Introduction to VP8

Removing blocking artifacts introduced by quantization and transformation.

Page 105: Introduction to VP8

Removing blocking artifacts introduced by quantization and transformation.

Slight Filtering

Page 106: Introduction to VP8

Removing blocking artifacts introduced by quantization and transformation.

Slight Filtering

Strong Filtering

Page 107: Introduction to VP8

Removing blocking artifacts introduced by quantization and transformation.

Slight Filtering

Strong Filtering

No Filtering

Page 108: Introduction to VP8

Parallel Processing

Page 109: Introduction to VP8

Data Partition

Compressed Data

Page 110: Introduction to VP8

Data Partition

Compressed Data

marcoblock code mode& motion vector

transform coefficients

Page 111: Introduction to VP8

More Transform Coefficient Partition

transform coefficients

support up to 8 token partitions

Page 112: Introduction to VP8

More Transform Coefficient Partition

transform coefficients

support up to 8 token partitions

Page 113: Introduction to VP8

Compare to H.264

Page 114: Introduction to VP8

100120140160180200220240260280300

Night 720p 2000kbps Sheriff 720p 2000kbps Tulip 720p 2000kbps

Deocding speed in Frame/second

VP8 H.264 High Profile

Intel Core i7 3.2GHz

Page 115: Introduction to VP8

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

Page 116: Introduction to VP8

Any Questions?

Page 117: Introduction to VP8

Thanks for your listening :)