Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(Chapter 9 continues)
Outline
Frame t-1
Frame t
Adjacent frames are similar and changes are due to object or camera motion
Predict a new frame from a previous frame and only code the prediction error Prediction error will be coded using the DCT method Prediction errors have smaller energy than the original pixel values and can be coded with fewer bits Those regions that cannot be predicted well will be coded directly using DCT Work on each macroblock (MB) (16x16 pixels) independently for reduced complexity
Motion compensation done at the MB level DCT coding of error at the block level (8x8 pixels)
Temporal Prediction
No Motion Compensation:
Work well in stationary regions
f (t , m, n) f (t 1, m, n)
Uni-directional Motion Compensation:
Does not work well for uncovered regions by object motion
f (t , m, n) f (t 1, m d x , n d y )
Bi-directional Motion Compensation
Can handle better covered/uncovered regions
f (t , m, n) wb f (t 1, m db, x , n db, y ) w f f (t 1, m d f , x , n d f , y )
Block-based: each frame divided into blocks of fixed size Hybrid: motion-compensated temporal prediction and transform coding VLC: variable-length coding (Hoffman)
6
If temporal prediction is successful, then prediction error block needs fewer bits than the original block. Called P-mode If not, code the original block directly using transform coding. Called intra-mode If use bidirectional prediction, then call B-mode Both B-mode and P-mode are inter-mode. Hence, I-frame, P-frame, B-frame Blocks for motion estimation and larger than blocks for DCT and called macroblocks (MB) Number of MBs form group of blocks (GOB) or slice, several GOBs form a picture.
4 8x8 Y blocks
1 8x8 Cb blocks
1 8x8 Cr blocks
10
MV
Search Region
The quantized DCT coefficients are zig-zag ordered and run-length coded
12
Depending on the motion compensation error, determine the coding mode (intra, inter-with-no-MC, inter-with-MC, etc.)
The original values (for intra mode) or motion compensation errors (for inter mode) in each of the DCT blocks (8x8) are DCT transformed, quantized, zig-zag/alternate scanned, and run-length coded
13
Same as for the P-mode, except a macroblock can be predicted from a previous picture, a following one, or both.
vf
vb
14
OBMC
Each pixel in the current block is predicted by a weighted average of several corresponding pixels in the reference frame The corresponding pixels are determined by the MVs of the current as well as adjacent MBs The weights for each corresponding pixel depends on the expected accuracy of the associated MV
15
16
Subject to
17
Option 1: using conventional block-matching method (BMA), minimize the prediction error (MAD) within each MB independently Option 2: minimize the prediction error assuming OBMC
Solve the MV for the current MB while keeping the MVs for the neighboring MBs found in the previous iterations
18
19
20
Rate Control
Rate control:
The coding method necessarily yields variable bit rate Rate control is necessary when the video is to be sent over a constant bit rate (CBR) channel, where the rate when averaged over a short period should be constant The fluctuation within the period can be smoothed by a buffer at the encoder output
21
Outline
Overview of Standards and Their Applications ITU-T (International telecommunication Union) Standards for Audio-Visual Communications
H.261 H.263 H.263+, H.263++
23
Standardization
ITU International Telecommunication Union 1865 International radiotelegraph Convention signed - 1906 CCIF International Telephone Consultative Committee 1924 CCIT International Telegraph Consultative Committee 1925 CCIR International Radio Consultative Committee 1927 CCIT + CCIF merge -> CCITT 1956, published H.261 in 1989 CCIR -> ITU-R; CCITT -> ITU-T - 1992 ITU-T has Study Groups (SG), SG 16 multimedia; SG divided into into Working Parties (WP) each dealing with several Questions
http://www.itu.int/home/index.html
24
Standardization
International Electromechanical Commission (IEC) 1906 International Organization for Standardization (ISO) 1947 Joint ISO/IEC Technical Commission 1 (JTC1) on Information Technology Subcommittee 24: Computer Graphics and Image Processing VRML Subcommittee 26: Coding - MPEG
http://www.iso.org/iso/en/ISOOnline.frontpage
25
Standards
Application
Video Format
Compressed Data Rate >=384 Kbps >=64 Kbps >=64 Kbps >=18 Kbps 1.5 Mbps 3-10 Mbps 28-1024 Kbps
H.320 (H.261) H.323 (H.263) H.324 (H.263) MPEG-1 MPEG-2 MPEG-4 GA-HDTV MPEG-7
Video conferencing over ISDN Video conferencing over Internet Video over phone lines/ wireless Video distribution on CD/ WWW Video distribution on DVD / digital TV Multimedia distribution over Inter/Intra net HDTV broadcasting Multimedia databases (content description and retrieval)
CIF QCIF 4CIF/ CIF/ QCIF QCIF CIF CCIR601 4:2:0 QCIF/CIF SMPTE296/295
<=700 Mbps
18--45 Mbps
26
Video Format:
CIF (352x288, above 128 Kbps) QCIF (176x144, 64-128 Kbps) 4:2:0 color format, progressive scan
Published in 1990 Each macroblock can be coded in intra- or inter-mode Periodic insertion of intra-mode to eliminate error propagation due to network impairments Integer-pel accuracy motion estimation in inter-mode
28
H.261 Encoder
T transform Q - quantizer
Coding Control
p flag, INTRA/INTER t flag qz quantizer infication q quantizing index for transform coeff d motion vector f on/off loop filter
F: Loop filter (low pass the prediction; P: motion estimation and compensation
29
30
Integer-pel accuracy in the range [-16,16] Methods for generating the MVs are not specified in the standard
Standards only define the bit stream syntax, or the decoder operation)
MVs coded differentially (DMV) Encoder and decoder uses the decoded MVs to perform motion compensation Loop-filtering can be applied to suppress propagation of coding noise temporally
Separable filter [1/4,1/2,1/4] Loop filter can be turned on or off
31
DCT coefficients are converted into run-length representations and then coded using VLC (Huffman coding for each pair of symbols)
Symbol: (Zero run-length, non-zero value range)
32
MTYPE macroblock type (intra vs. inter, zero vs. non-zero MV in inter) CBP coded block pattern (which blocks in a MB have non-zero DCT coefficients) MQUANT optional (allow the changes of the quantizer step size at the MB level) should be varied to satisfy the rate constraint MV (ideally should be determined not only by prediction error but also the total bits used for coding MV and DCT coefficients of prediction error) Loop Filter on/off
33
Formats supported
34
H.263 is the video coding standard in H.323/H.324, targeted for visual telephone over PSTN or Internet Developed later than H.261, can accommodate computationally more intensive options Initial version (H.263 baseline): 1995 H.263+: 1997 H.263++: 2000 Goal: Improved quality at lower rates Result: Significantly better quality at lower rates Better video at 18-24 Kbps than H.261 at 64 Kbps Enable video phone over regular phone lines (28.8 Kbps) or wireless modem
36
The options, when chosen properly, can improve the PSNR 0.5-1.5 dB over default at 20-70 kbps range.
37
Prediction of MVs
38
Prediction of MVs
Encoder needs to decide if for which MB 4 MV should be used: as extra bits needed for coding
39
PB-Picture Mode
PB-picture mode codes two pictures as a group. The second picture (P) is coded first, then the first picture (B) is coded using both the P-picture and the previously coded picture. This is to avoid the reordering of pictures required in the normal B-mode. But it still requires additional coding delay than P-frames only. In a B-block, forward prediction (predicted from the previous frame) can be used for all pixels; backward prediction (from the future frame) is only used for those pels that the backward motion vector aligns with pels of the current MB. Pixels in the white area use only forward prediction. An improved PB-frame mode was defined in H.263+, that removes the previous restriction.
40
Integer MC, +/- 16, loop filter Integer MC, +/- 32 Integer MC, +/- 16
42
/3
43
H.324 Terminal
44
Outline
Overview of Standards and Their Applications ITU-T (International telecommunication Union) Standards for Audio-Visual Communications
H.261 H.263 H.263+, H.263++
45