ITUT Recommendation H 261 932021 H 261 VClab
ITU-T Recommendation H. 261 9/3/2021 H. 261 VClab 2009 1
H. 261 q. The Recommendation H. 261 describes the video coding and decoding methods for the moving picture component of audiovisual services (videophone, videoconference, etc. ) at the rates of p× 64 kbit/s, where p is in the range 1 to 30. 9/3/2021 H. 261 VClab 2009 2
H. 261 Coder Video in DCT Q Inverse DCT Loop Filter 9/3/2021 Motion Compensation H. 261 VClab 2009 3
Motion Estimation q. For each 16 16 macroblock (MB), ME searches the best match in the referenced frame, and returns a motion vector MV = (X, Y). q. Both X and Y have integer value not exceeding ± 15. q. Only the difference (residuals) between the MB and the best match is DCT encoded 9/3/2021 H. 261 VClab 2009 4
Coding of Motion Vectors MVD … -7&25 -6&26 -5&27 q. DPCM -4&28 -3&29 q. Example: -2&30 -1 0 15 14 -13 12 … 1 -1 -27 25 … 2&-30 3&-29 011 00001010 00000111 … 4&-28 5&-27 6&-26 7&-25 9/3/2021 H. 261 VClab 2009 … Code … 0000 0111 0000 1001 0000 1011 0000 111 0001 1 0011 1 010 0001 0 0000 110 0000 1000 0000 0110 5 …
Scan Line Order, MB by MB • Scan Line Order Frame n-1 Frame n • Search Range MV(1, 0) MV(0, 0) 9/3/2021 H. 261 VClab 2009 6
Motion Compensation & Motion Estimation q MC is optional for each MB q Only one MV for each MB q The ME compares a 16 x 16 macroblock in the luminance block (Y) throughout a small search area of the previously transmitted frame q Both horizontal and vertical components of these motion vectors have integer values not exceeding ± 15 q The MV is used for all 4 Y blocks. The MV for both Cb and Cr is derived by halving the component values of the MB MV. q The displacement with the smallest absolute macroblock difference, determined by the sum of the absolute values of the pel-to-pel difference throughout the block, is considered the MV for the particular MB 9/3/2021 H. 261 VClab 2009 7
• Compare the difference between two blocks (one is in the current frame, and the other is in the reference frame) | Candidate block 9/3/2021 | - p p = 1, sum of absolute difference p = 2, mean square error Current block H. 261 VClab 2009 8
Quantization q Within a MB, the same quantizer is used for all coefficient excepts the INTRA dc one q # of quantizers is 1 for INTRA dc coefficient and 31 for all other coefficients =2, 4, …, 62 q MB quantization factor, Q, sometimes termed MQUANT: – C(u, v) = F(u, v) / 2 Q – C(u, v) = (F(u, v) ± 1)/2 Q if Q is odd if Q is even (F>0 +, F<0 -) q Quantization for INTRA dc term: – C = (F+4) / 8 with inverse F = 8 C 9/3/2021 H. 261 VClab 2009 9
Loop Filter (FIL) q The filter is separable into one-dimensional horizontal and vertical functions. q The function is non-recursive with coefficients of ¼, ½, ¼ except at block edges. q The function has coefficients of 0, 1, 0 at block edges. q The filter is switched on/off for all 6 blocks in a MB according to MTYPE. ×¼ 9/3/2021 ×½ ×¼ H. 261 VClab 2009 10
H. 261 Decoder Intra Inverse DCT 9/3/2021 Inter Loop Filter H. 261 VClab 2009 Motion Compensation 11
H. 261 Video Formats Video Luminance (Y) Format pixels/lines/frame CIF QCIF 352 176 Chrominance(Cb, Cr) pixels/lines/frame 176 144 88 72 288 144 Y pixel Cb, Cr pixel Block boundary 9/3/2021 H. 261 VClab 2009 12
Arrangement of H. 261 176 48 288 352 1 3 5 7 9 11 176 2 4 6 8 10 12 176 48 1 2 3 QCIF 9/3/2021 H. 261 VClab 2009 13
Arrangements of H. 261 176 144 1 2 3 176 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 48 23 24 25 26 27 28 29 30 31 32 33 GOB (Group Of Block) QCIF picture Y 1 Y 2 16 Y 3 Y 4 16 9/3/2021 8 U 8 V 8 8 MB (Macro Block) H. 261 VClab 2009 14
Positioning of luminance and chrominance samples Y pixel Cb, Cr pixel Block boundary 9/3/2021 H. 261 VClab 2009 15
Data Structure of Compressed Bitstream in H. 261 Picture Header GOB data GOB Header … GOB data MB data … MB Header Block data MB data … TCOEFF Fixed Length Code Block data EOB Picture Layer GOB Layer MB Layer Block Layer Variable Length Code 9/3/2021 H. 261 VClab 2009 16
Structure of picture layer PSC TR PTYPE PEI … PSPARE PEI … GOB data • Picture start code (PSC) (20 bits) 0000 0001 0000 • Temporal reference (TR) (5 bits) It is formed by incrementing its value in the previously transmitted picture header by one plus the number of non-transmitted pictures since that last transmitted one. (Only the five LSBs used) 9/3/2021 H. 261 VClab 2009 17
Structure of picture layer PSC TR PTYPE PEI … PSPARE PEI … GOB data • Type information (PTYPE) (6 bits) Bit 1 Split screen indicator Bit 2 Document camera indicator, “ 0” off, “ 1” on; Bit 3 Freeze picture release, “ 0” off, “ 1” on; Bit 4 Source format, “ 0” QCIF, “ 1” CIF; Bit 5 Optional still image model HI_RES, “ 0” on, “ 1” off Bit 6 Spare where Bit 1 is MSB • Extra insertion information (PEI) (1 bit) “ 1” signals the presence of the following optional data field. 9/3/2021 H. 261 VClab 2009 18
GOB Layer GBSC GN GQUANT GEI … GSPARE GEI … MB data q. Group of blocks start code (GBSC) (16 bits) – 0000 0001 (if “ 0000” followed, then it is treated as a PSC) q. Group number (GN) (4 bits) – GN indicates the position of the group of blocks. 13, 14 and 15 are reserved for future use. 0 (0000) is used in the PSC. 9/3/2021 H. 261 VClab 2009 19
GOB Layer GBSC GN GQUANT GEI … GSPARE GEI … MB data q Quantizer information (GQUANT) (5 bits) – The quantizer to be used in the GOB until overridden by any subsequent MQUENT. q Extra insertion information (GEI) (1 bit) – “ 1” signals the presence of the following optional data field. q Spare information (GSPARE) (0/8/16… bits) 9/3/2021 – If GEI = “ 1”, then. H. 261 the following 8 -bits data is VClab 2009 GSPARE. 20
MB Layer MBA MTYPE MQUANT MVD CBP Block data q. Macroblock address(MBA) (Variable length: TABLE 1) – MBA indicates the position of a MB within a GOB. It is the difference between the absolute addresses of the MB and the last transmitted MB. q. Type information (MTYPE) (Variable length: TABLE 2) 9/3/2021 H. 261 VClab 2009 21
MB Layer MBA MTYPE MQUANT MVD CBP Block data q. Quantizer (MQUANT) (5 bits) – MQUANT is present only if so indicated by MTYPE (1, 3, 6, 9). 9/3/2021 H. 261 VClab 2009 22
MB Layer MBA MTYPE MQUANT MVD CBP Block data q Motion vector data (MVD) (Variable length: TABLE 3) – MVD is obtained from the MV (for the MB) by subtracting the vector of the preceding MB. The vector of the preceding MB is regarded as zero in the following three situations: • 1) evaluating MVD for MB 1, 12, 23. • 2)evaluating MVD for MBs in which MBA does not represent a difference of 1 • 3) MTYPE of the previous MB was not MC. 9/3/2021 – Only one of the pair will yield a MV falling H. 261 VClab 2009 within the permitted range. 23
MB Layer MBA MTYPE MQUANT MVD CBP Block data q Coded block pattern (CBP) (Variable length: TABLE 4) 9/3/2021 – CBP is present if indicated by MTYPE (2, 3, 5, 6, 8, 9). The codeword gives a pattern number signifying those blocks in the MB for which at least one transform coefficient is transmitted. – CBP = 32 P 1 + 16 P 2 + 8 P 3 + 4 P 4 + 2 P 5 + P 6 where Pn = 1 if any coefficient is present for block n, else 0. 1 2 C Cr 6 5 Y b H. 261 VClab 2009 24 3 4
Block Layer q Transform coefficients (TCOEFF) (Variable length: TABLE 5) – TCOEFF is always present for all six blocks in a MB when MTYPE indicates INTRA. In other cases MTYPE and CBP signal which blocks have coefficient data transmitted for them. – The most commonly occurring combination of successive zeros (RUN) and the following value (Run, Level) (LEVEL) are encoded with variable length codes in TABLE 5. Other combinations of (RUN, LEVEL) are encoded with a 20 -bit word consisting of 6 bits ESCAPE, 6 bits RUN and 8 bits LEVEL. 9/3/2021 H. 261 VClab 2009 25
Block Layer q There are two code tables in TABLE 5: – 1) Being used for the first transmitted LEVEL in INTER, INTER+MC, and INTER+MC+FIL blocks. (EOB is not included). – 2) Being used for all other LEVELs (EOB is included) except the first one in INTRA blocks which is fixed length coded with 8 bits. q Coefficients after the last non-zero one are not transmitted. EOB is always the last item in blocks for which coefficients are transmitted. 9/3/2021 H. 261 VClab 2009 26
Structure of H. 261 Bitstream PSC TR GBSC GN PTYPE PEI … PSPARE PEI … GOB data GQUANT GEI … GSPARE GEI … MB data … MBA MTYPE MQUANT MVD CBP Block data … 9/3/2021 H. 261 VClab 2009 27
Coding of H. 261 Bitstream Picture Layer PSC TR PTYPE PEI PSPARE GOB Layer GBSC 9/3/2021 GN GQUANT GEI H. 261 VClab 2009 GSPARE MB Layer 28
Coding of H. 261 Bitstream MB Layer MVD MBA MTYPE MQUANT MVD CBP Block Layer CBP MBA stuffing TCOEFF EOB Fixed length 9/3/2021 H. 261 VClab 2009 29 Variable length
H. 263 q H. 263 = (H. 261) + (MPEG-like features) q Compared to H. 261 – More allowable picture formats – Half-pixel motion estimation, no loop filter – Different VLC tables at macroblock and block levels – Four negotiable options q 3~4 d. B better PSNR than H. 261 at <64 kbps 9/3/2021 H. 261 VClab 2009 30
H. 263 Video Formats Sub. CIF Pels/line 128 QCIF 4 CIF 16 CIF 176 352 704 1408 Lines 144 288 576 1152 9/3/2021 96 H. 261 VClab 2009 31
Four Negotiable Options q Unrestricted Motion Vector: motion vectors can point outside the picture, -31. 5 to 31. 5 instead of – 16 to 15. 5 q Advanced Prediction Mode: 8 8 motion vectors, overlapped block motion compensation, and motion vectors can point outside the picture q Syntax-based Arithmetic Coding (about 5% decreasing in bit-rate) q PB-frame 9/3/2021 H. 261 VClab 2009 32
H. 263+ 12 Optional Modes q Annex D: New Unrestricted Motion Vector (mv range up to +/- 256) q Annex I: Advanced Intra Coding q Annex J: Deblocking Filter q Annex M: Improved PB-Frame q Annex O: Temporal, Spatial, and SNR Scalability q Annex P: Reference Picture Resampling q Annex Q: Reduced Resolution Update 9/3/2021 H. 261 VClab 2009 33
H. 263+ Optional Modes q. Annex S: Alternative Inter VLC q. Annex I: Modified Quantization Error Resilience q. Annex K: Slice Structured q. Annex R: Independent Segment Decoding q. Annex N: Reference Picture Selection 9/3/2021 H. 261 VClab 2009 34
Codec Implementation Issues q. Fast algorithm for motion estimation q. Fast algorithm for DCT/IDCT q. Huffman table implementation q. Program design – – 9/3/2021 Program diagram Memory assess (frame stores) Register assignment Program redundancy H. 261 VClab 2009 35
Supplemental Enhancement Information q Enhanced features ü Picture freeze and release ü Tagging information - Snapshot - Video segment start/end - Progressive refinement start/end ü Chroma key q Can be discarded by decoders that do not understand 9/3/2021 H. 261 VClab 2009 36
- Slides: 36