8-796 Multimedia Communications: Coding, Sstems, and Networking Prof. Tsuhan Chen tsuhan@ece.cmu.edu 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 Basic framework of most video coding standards Inter and Intra Intra coding: 8 8 DCT (similar to JPEG) Inter coding: Block matching for motion estimation (6 6) Previous Picture (reference picture) Motion vectors are coded Residue is DCT coded (as in Intra) Current Picture
Codec (intra mode) x(n) DCT Q IQ IDCT x (n) Codec (inter mode) x(n) + + r(n) DCT Q Entrop Codec IQ IQ IDCT IDCT r (n) + r (n) + x MC (n-) MC D x (n) x (n-) x (n) D x (n-) MC x MC (n-) MV MV x(n) ME x (n-) or x(n-) 3
Inter/Intra Switching and Loop Filter x(n) + DCT Q + IQ x MC (n-) LF x MC (n-) IDCT r (n) + MC D x (n) x (n-) Loop Filter (LF): Low pass filter with [/4,/,/4] Q: Switching at decoder? Information to be Sent Coding Control inter/intra flag transmit or not flag quant scale video in DCT Quant quant index Inverse Quant IDCT To Video Multiplex Coder "" and Filter Pict Mem, Mot Est and Comp D motion vector filter on/off 4
Onl two picture formats are allowed CIF (Common Intermediate Format) (~CGA) QCIF (Quarter-CIF) Color components Picture Formats Pels/line Lines Uncompressed Bit Rate QCIF 76 44 9. Mbits/s CIF 35 88 36.5 Mbits/s YUV (or YC B C R ) b ITU-R 6 (CCIR 6) 6L 6L 6L 35 Y.57 4 = CB.48 4 CR.439.54.9.368.98 R.439 G +.7 B 6 8 8 Q: YC B C R to RGB? Positions of Samples Luminance (Y) and chrominance (C B, C R ) = Y Pels = C B and C R Pels = Block Edges 4:: Format 5
Blocks, Macroblocks and Groups of Blocks 5 6 3 4 Y C B C R A macroblock 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 blocks (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 strucutres in a picture Quantization No quantization tables (cf. JPEG) Intra DC: Uniform quantization with step size 8 All others: Uniform quantization with dead-zone quantized quantized original original Quantization without dead zone Quantization with dead zone (Noise removal) 6
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 Zigzag Scan and Entrop Coding Zigzag scan: Same as in JPEG Entrop coding DC: Differential coding, same as in JPEG AC: Run-level coding 7
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) 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 6 4 7 63 3 6 bit Fixed Length Codes Escape(6bits)+Run(6bits)+ Level(8bits) 8 8
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 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...... 9
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 Nonexistent Mode Picture Laer Sntax Diagram 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 VAROR INTER 64 INTRA 64 VAR VAR = ( VAROR = ( (pel - mc_pel) (pel - blk_avg) ) / 56 ) / 56 MC/No MC Decision Y = DFD 56 5 Y 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 < 6*q < 8*q 4 6 8 < 6*q < 6*q 6 6 Hpothetical Reference Decoder HRD HRD buffer occupanc (bit) dn + bn + tn+ R(t)dt tn tn+ tn R(t)dt B 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,...). 3
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 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... 4
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 5