8-899 Special Topics in Signal Processing Multimedia Communications: Coding, Sstems, and Networking Prof. Tsuhan Chen tsuhan@ece.cmu.edu Lecture 4 H.6
H.6 ITU-T Stud Group 5, 984-99 Videophone and video conferencing Low bit rates and low dela Originall for m 384 kbits/s (m=...5), changed to p 64 kbits/s (p =...3) in 988. Also called p 64 4 kbits/s to Mbits/s A hbrid coding algorithm Block-based motion-compensated DCT coding Basis of most video coding standards INTRA coding: 8 8 DCT (similar to JPEG) INTER coding: INTER and INTRA Block matching for motion estimation (6 6) Previous Frame (reference frame) Motion vectors are coded Residue is DCT coded (as in INTRA) Current Frame
Encoder Video In DCT Q IQ Intra IDCT Inter Loop Filter Motion Es timation and Compens ation Loop Filter: Low pass filter with [/4,/,/4] Encoder (more detail) Coding Control inter/intra flag transmit or not flag quant scale video in DCT Quant quant index Inverse Quant IDCT To Video Multiplex Coder "" Filter Pict Mem, Mot Est and Comp and motion vector filter on/off 3
Decoder Intra IQ IDCT Inter Loop Filter Motion Compensation Picture Formats Onl two picture formats are allowed CIF (common intermediate format) (~CGA) QCIF (quarter-cif) Pels/line Lines Uncompressed Bit Rate QCIF 76 44 9. Mbits/s CIF 35 88 36.5 Mbits/s Color components As in ITU-R 6 (CCIR 6) 6 6 6 35 4 4 Y C C B R =.57.48.439.54.9.368.98.439.7 R G B + 6 8 8 4
Positions of Samples Luminance (Y) and chrominance (C B, C R ) = Y Pels = C B and C R Pels = Block Edges 4:: Format Blocks, Macroblocks and Groups of Blocks 5 6 3 4 Y C B C R A mac robloc k 3 4 5 6 7 8 9 3 4 5 6 7 8 9 3 4 5 6 7 8 9 3 3 3 33 A group of bloc ks (GOB) GOB GOB GOB 3 GOB 4 GOB 5 GOB 6 GOB GOB 7 GOB 8 GOB 3 GOB 9 GOB GOB 5 GOB GOB QCIF CIF GOB s truc utre s in a pic ture 5
Quantization No quantization tables (cf. JPEG) Intra DC: Uniform quantization with step size 8 All others: Uniform quantization with dead-zone Noise removal quantized quantized original original Quantization without dead zone Quantization with dead zone Quantization (cont.) Step size ma change at ever MB or GOB Step size = QUANT ; QUANT= 3 Threshold can be used at the encoder Adaptive threshold (e.g., RM8) to increase the run of zeros, e.g., Coefficients 5 33 34 4 33 34 3 Threshold 3 3 33 34 35 36 37 38 3 3 3 33 New coeff. 5 4 33 34 6
Zigzag Scan and Entrop Coding Zigzag scan: Same as in JPEG Entrop coding DC: Differential coding, same as in JPEG AC: Run-level coding AC Coding Run-level smbols run: Length of the zero run level: Amplitude of the nonzero coefficient Huffman coding Short codes for frequent smbols D table of variable length codes (VLC) 7
Length of VLC EOB = bits Absolute Level 3 4 5 6 7 8 9 3 4 5 R u n 3 4 5 6 7 8 9 3 4 3 5 6 8 9 9 3 3 3 3 4 4 4 4 4 7 9 3 4 4 5 8 3 6 9 6 3 3 4 7 7 3 7 3 8 3 8 4 9 4 9 9 9 3 6 bit Fixed Length Codes Escape(6bits)+Run(6bits)+ Level(8bits) 8 6 7 63 4 An Example... Run Level Code EOB 3 3 4 5 6 7 8 9 3 4 5 3 4 5 6 7 3 4 5 s If first coefficient in block s Not first coefficient in block s s s s s s s s s s s s s s s s s s s s s s s s s s s - 6 3 EOB 8
Coding of Motion Vectors MVs have integer values in [-5,5] Differential coding in each direction VLC for MV difference MVD 7 & 5 6 & 6 5 & 7 4 & 8 3 & 9 & 3 & 3 3 & 9 4 & 8 5 & 7 6 & 6 7 & 5 Code Example: 5 4-3 - -7 5...... Microblock Tpe (MTYPE) MTYPE Modes input block No MC MC Inter Intra Inter VLC Table for MTYPE Modes Coded Coded+MQ Not Coded Coded Coded+MQ Coded Coded+MQ Not Coded Filter No Filter Filter No Filter Filter No Filter Prediction MQUANT MVD CBP TCOEFF VLC Intra Intra Inter Inter Inter + MC Inter + MC Inter + MC Inter + MC +FIL Inter + MC +FIL Inter + MC +FIL 9
Sntax Diagram Picture Laer PSC TR PTYPE PEI PSPARE GOB Laer Group of blocks Laer GBSC GN GQUANT GEI GSPARE MB Laer Macroblock Laer MVD MBA MTYPE MQUANT MVD CBP Block Laer CBP MBA stuffing Block Laer TCOEFF EOB FLC VLC Sntax Diagram (cont.) Picture laer PSC ( bits): Picture Start Code TR (5 bits): Temporal Reference PTYPE (6 bits): CIF or QCIF, etc. If PEI =, PSPARE: spare bits for future GOB laer GBSC (6 bits): GOB Start Code GN (4 bits): Group Number GQUANT: Group quantizer, 3 If GEI =, GSPARE: spare bits MB laer MBA: MB Address MQAUNT: MB quantizer, 3 MVD: MV Data CBP: Coded Block Pattern
Reference Model (RM) 8 Encoder specification Motion estimation: 3-step search Quantization Inter/intra decision MC/No MC decision Buffer and rate control Loop filter on/off Inter/Intra Decision Intra VAROR INTER 64 INTRA 64 VAR Inter VAR = ( (pel - mc_pel) ) / 56 VAROR = ( (pel - blk_avg) ) / 56
MC/No MC Decision Y = DFD 56 Y 5 MC off = x /. MC Frame Difference.7 MC on.5.5 3 X 6 X = FD 56 Frame Difference Buffer Control Quantization step size varies from to 6 with step Buffer size of q*64 kbits, q determines video bitrate Bitrate=q*64 kbits/s, frame rate= 3/k Hz (k=...4) Mean bits/mb for CIF is 5*k*q and for QCIF is *k*q step = * INT (buffer fullness / [*q]) + Buffer Fullness Quantizer Step size < *q < 4*q 4 < 6*q 6 < 8*q 8 < 6*q < 6*q 6 6
Hpothetical Reference Decoder HRD tn + dn + bn + R(t)dt B tn HRD buffer occupanc (bit) tn+ R(t)dt tn B dn+ bn t n t n+ bn+ Time (CIF interval) NOTE Time (t n+ t n) is an integer number of CIF picture periods (/9.97, /9.97, 3/9.97,...). H.6 Qualit vs. Bit Rates CIF QCIF kbits/sec so so poor 64 kbits/sec fair fair+ kbits/sec good good+ 3 kbits/sec good excellent 3
Multipoint Considerations Freeze picture request causes decoder to freeze picture until release request or time-out Fast update request causes encoder to encode next picture in INTRA mode Freeze release request causes decoder to exit freeze picture mode and go in normal mode Used b Multipoint Control Unit (MCU) Example... References Ming Liou, Overview of the p 64 kbit/s video coding standard, Comm. of the ACM, April 99 Arun N. Netravali, and Barr G. Haskell, Chapter 8, Digital Pictures: Representation, Compression, and Standards, nd Edition, Plenum Publishing Corp., New York, NY Joan L. Mitchell et al., Sec. 9., MPEG Video: Compression Standard, Chapman & Hall, New York, NY 4