block-based coding multimedia systems and standards s2 if telkom university

26
Block-based coding Multimedia Systems and Standards S2 IF Telkom University

Upload: veronica-wheeler

Post on 17-Jan-2018

237 views

Category:

Documents


0 download

DESCRIPTION

Video frame format based on the Common Intermediate Format standardize the horizontal and vertical resolutions in pixels of YCbCr sequences 3

TRANSCRIPT

Page 1: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

Block-based coding

Multimedia Systems and StandardsS2 IF Telkom University

Page 2: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

2

Why block-based video coding?

the choice of a suitable video coder depends on the associated application and available resourcesPrimary reasons:

The quality of service they are designed to achieveachieve fairly high compression ratios in real-time scenarios. • Exp: H.263 < 64 kbit/s, 25 f/s and an average PSNR of

30 dBthe scalability of their output bit ratessource code is available

Page 3: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

3

Video frame formatbased on the Common Intermediate Format

standardize the horizontal and vertical resolutions in pixels of YCbCr sequences

Page 4: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

4

Chrom = ½ Lumthe human eye is less sensitive to the details of the colour information

Page 5: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

5

Layering structurevideo frame = k x 16 lines of pixels

k = 1 for sub-QCIF, 9 for QCIF, 18 for CIF, 4CIF and 16CIF

Video frames = Group of Blocks (GOB)6 for sub-QCIF, 9 for QCIF and 18 for CIF, 4CIF and 16CIF

GOB = macroblocks (MB)MB = 4 luminance blocks + 2 spatially corresponding colour difference blocksblock = 8 pixels by 8 lines of Y, U or V

Page 6: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

6

QCIF: picture - GOB

Page 7: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

7

QCIF: MB - block

Page 8: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

8

Methodsvideo frame is divided into a number macroblocks (16x16 blocks of pixels)two coding modes:

INTRA• coded as an independent still image without any

reference to precedent frames spatial redundanciesINTER• exploits the temporal redundancies between

successive frames• higher compression efficiency by employing

predictive coding

Page 9: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

9

INTER & INTRA codingcoding only the difference between a frame and its reference INTER frame or predicted frame (P-frame) codingif successive frames are not strongly correlated INTRA frame (I-Frame) codingin INTER frame coding, some MBs could still be INTRA coded mode flag in each MB

Page 10: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

10

INTER modemotion search: similarities between the current frame and the reference one the difference image (the residual error frame) is DCT-transformed and quantized converted to a one-dimensional matrix of coefficients using the zigzag-pattern coding

to exploit the long runs of zeros that appear in the picture after quantization.

run-length coder (Huffman coder) assigns variable-length codes to the non-zero levels and the runs of zeros in the resulting one-dimensional matrix.

Page 11: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

11

INTER vs qualityan accumulation of INTER coded frames could lead to fuzzy picture quality

the effect of repeated quantizationInsert INTRA frame: to refresh the picture quality after a certain number of INTER frames

Page 12: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

12

Motion estimationINTER coding: the block matching (BM) motion estimation process

Each MB in the current frame is compared to MBs of the previous reconstructed frame within a search window of user-defined size

Page 13: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

13

The matching criteriononly luminance is usedmay use any error measure e.g. mean square error (MSE), sum of absolute difference (SAD), MAD, SSE, SATD, etc.motion vector (MV): displacement vector between the current MB and its best match

vertical and horizontal components

Page 14: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

14

Page 15: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

15

INTRA within P-frameIf all SADs corresponding to 16x16 matrices within the search window < a certain motion activity threshold then the current MB is INTRA coded within the P-frame

Page 16: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

16

ITU-T H.263

Page 17: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

17

OperationFor each MB: the SADs are compared to a motion activity threshold to decide whether INTRA or INTER mode is to be used for a specific MBINTRA mode: the coefficients of the six 8x8 blocks are DCT transformed, quantized, zigzag coded, run-length coded, and then variable-length coded using a Huffman encoder

Page 18: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

18

INTER mode: the resulting MV is differentially coded and the same encoding procedure as in INTRA mode is applied on the residual matrix

Operation (cont’d)

Page 19: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

19

2-D 8x8 DCT

Page 20: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

20

Example of DCT

DC coefficients: assigned an 8-bit length codeword (coded more accurately)AC coefficients: run-length coded

Page 21: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

21

Quantizationcontrols the coding efficiency & the quality of the reconstructed video sequencebased on the human visual sensitivityTechniques:

scalar quantization: each sample is quantized independentlyvector quantization: quantization of a group of samples or vectors

Page 22: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

22

Quantization: lossymaps the values of the DCT transformed coefficients to a smaller range of valuesthe exact original pixel value cannot be restored

Page 23: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

23

H.263 QuantizationQuantisation

INTRADC coefficient: LEVEL = COF/8INTRA AC coefficients: LEVEL = |COF|/(2 x Qp)INTER coefficients: LEVEL = (|COF| - Qp/2)/(2 x Qp)

Inverse quantisationINTRADC coefficient: COF’ = LEVEL x 8INTRA or INTER coefficients:• |COF’| = 0 if LEVEL=0• |COF’| = 2Qp x LEVEL + Qp if LEVEL<> 0, Qp is odd• |COF’| = 2Qp x LEVEL x Qp -1 if LEVEL <> 0, Qp is

even

Page 24: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

24

example

Page 25: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

25

zigzag scan

Result?

Page 26: Block-based coding Multimedia Systems and Standards S2 IF Telkom University

26

Some block-based DCT video coding standards

Standard

Application Bit rates

MPEG-1

Audio/video storage on CD-ROM

1,5 – 2 Mbps

MPEG-2

HDTV/DVB 4 – 9 Mbps

H.261 Video over ISDN

p x 64 kbps

H.263 Video over PSTN

< 64 kbps