1、 SMPTE 2003-2013 All rights reserved Approved October 8, 2013 _ SMPTE ST 421:2013 Revision of SMPTE 421M-2006 SMPTE STANDARD VC-1 Compressed Video Bitstream Format and Decoding Process _ Intellectual Property Notice Copyright 2003-2013 THE SOCIETY OF MOTION PICTURE AND TELEVISION ENGINEERS 3 Barker
2、Avenue White Plains, NY 10601 +1 914 761 1100 Fax +1 914 761-3115 E-mail engsmpte.org Web http:/www.smpte.org The users attention is called to the possibility that compliance with this document may require use of inventions covered by patent rights. By publication of this document, no position is ta
3、ken with respect to the validity of these claims or of any patent rights in connection therewith. The patent holders have, however, filed statements of willingness to grant a license under these rights on fair, reasonable and nondiscriminatory terms and conditions to applicants desiring to obtain su
4、ch a license. Contact information may be obtained from the SMPTE. No representation or warranty is made or implied that these are the only licenses that may be required to avoid infringement in the use of this document. ii SMPTE 2003-2013 All rights reserved Foreword SMPTE (the Society of Motion Pic
5、ture and Television Engineers) is an internationally-recognized standards developing organization. Headquartered and incorporated in the United States of America, SMPTE has members in over 80 countries on six continents. SMPTEs Engineering Documents, including Standards, Recommended Practices and En
6、gineering Guidelines, are prepared by SMPTEs Technology Committees. Participation in these Committees is open to all with a bona fide interest in their work. SMPTE cooperates closely with other standards-developing organizations, including ISO, IEC and ITU. SMPTE Engineering Documents are drafted in
7、 accordance with the rules given in Part XIII of its Operations Manual. SMPTE ST 421 was prepared by Technology Committee 10E. SMPTE 2003-2013 All rights reserved Approved October 8, 2013 Introduction This section is entirely informative and does not form an integral part of this Engineering Documen
8、t. This document was prepared for the primary purpose of documenting the bitstream format and decoding process used in the VC-1 video decoder. It defines the bitstream syntax, semantics and constraints for compressed video bitstreams and describes the complete process required to decode them. VC-1,
9、as defined in this document, consists of three profiles: Simple, Main, and Advanced. Simple and Main profile were originally developed for use in lower-bit-rate networked computing environments. As such, certain assumptions were made regarding the display environment (e.g. square pixel aspect ratio)
10、 to improve compression efficiency. The Advanced Profile adds extensive in-band metadata support to allow for optimized experience on a wide range of display devices. This revision corrects typographical errors and provides clarifying text to support correct interpretation of the standard as describ
11、ed in Amendment 1-2007 to SMPTE 421M-2006 and in Amendment 2:2011 to SMPTE 421-M:2006.SMPTE ST 421:2013 2013 SMPTE iv SMPTE Standard: VC-1 Compressed Video Bitstream Format and Decoding Process Table of Contents TABLE OF CONTENTS IV TABLE OF FIGURES X TABLE OF TABLES XV 1 SCOPE 1 2 NORMATIVE REFEREN
12、CES 1 3 OVERVIEW 2 3.1 SYNTAX OVERVIEW (INFORMATIVE) 2 3.2 DECODING PROCESS OVERVIEW 4 3.3 ENCODING PROCESS OVERVIEW (INFORMATIVE) 6 3.4 DOCUMENT STRUCTURE (INFORMATIVE) 7 4 NOTATION 8 4.1 CONFORMANCE NOTATION 8 4.2 ARITHMETIC OPERATORS 9 4.3 LOGICAL OPERATORS 10 4.4 RELATIONAL OPERATORS 10 4.5 BITW
13、ISE OPERATORS 10 4.6 ASSIGNMENT 11 4.7 PRECEDENCE ORDER OF OPERATORS 11 4.8 MNEMONICS 11 4.9 PSEUDO-CODE OPERATIONS 11 4.10 BITSTREAM PARSING OPERATIONS 12 4.11 FUNCTION DEFINITIONS 13 4.12 DEFINITION OF TERMINOLOGY 14 4.13 INTERMEDIATE VARIABLES 20 4.14 ACRONYM DEFINITIONS 21 4.15 GUIDE TO INTERPRE
14、TING SYNTAX DIAGRAMS AND SYNTAX ELEMENTS 21 5 PICTURE SAMPLING AND OVERALL BITSTREAM STRUCTURE 22 5.1 INTRODUCTION 22 5.2 PROGRESSIVE CODING MODE 22 5.2.1 Input/output Format 22 5.2.2 Hierarchical Elements 22 5.3 INTERLACE CODING MODE 23 5.3.1 Input/Output Format for 4:2:0 Interlace 23 5.4 FRAME ORD
15、ERING 24 5.5 CONSTRAINTS 25 5.5.1 Minimum and maximum frame sizes 25 5.5.2 Maximum size of compressed bits 25 5.5.3 Bitstream Construction Constraints 26 5.6 FRAME BUFFER MANAGEMENT (INFORMATIVE) 26 SMPTE ST 421:2013 2013 SMPTE v 6 SEQUENCE AND ENTRY-POINT BITSTREAM SYNTAX AND SEMANTICS 27 6.1 SEQUE
16、NCE-LEVEL SYNTAX AND SEMANTICS 27 6.1.1 Profile (PROFILE)(2 bits) 31 6.1.2 Level (LEVEL)(3 bits) 31 6.1.3 Color-Difference Format (COLORDIFF_FORMAT) (2 bits) 31 6.1.4 Post processing Indicators 31 6.1.5 Post processing Flag (POSTPROCFLAG) (1 bit) 33 6.1.6 Maximum Horizontal Size of Picture (MAX_CODE
17、D_WIDTH)(12 bits) 33 6.1.7 Maximum Vertical Size of Picture (MAX_CODED_HEIGHT)(12 bits) 33 6.1.8 Pull down Flag (PULLDOWN) (1 bit) 33 6.1.9 Interlace Content (INTERLACE) (1 bit) 33 6.1.10 Frame Counter Flag (TFCNTRFLAG) (1 bit) 33 6.1.11 Frame Interpolation Flag (FINTERPFLAG)(1 bit) 33 6.1.12 Reserv
18、ed Advanced Profile Flag (RESERVED)(1 bit) 33 6.1.13 Progressive Segmented Frame (PSF)(1 bit) 34 6.1.14 Display Extension Flag (DISPLAY_EXT) (1 bit) 34 6.1.15 Hypothetical Reference Decoder Indicator Flag (HRD_PARAM_FLAG)(1 bit) 40 6.2 ENTRY-POINT HEADER SYNTAX AND SEMANTICS 41 6.2.1 Broken Link Fla
19、g (BROKEN_LINK) (1 bit) 44 6.2.2 Closed Entry Point (CLOSED_ENTRY) (1 bit) 44 6.2.3 Pan Scan Present Flag (PANSCAN_FLAG) (1 bit) 44 6.2.4 Reference Frame Distance Flag (REFDIST_FLAG) (1 bit) 44 6.2.5 Loop Filter Flag (LOOPFILTER) (1 bit) 44 6.2.6 Fast UV Motion Compensation Flag (FASTUVMC) (1 bit) 4
20、4 6.2.7 Extended Motion Vector Flag (EXTENDED_MV)(1 bit) 44 6.2.8 Macroblock Quantization Flag (DQUANT)(2 bit) 44 6.2.9 Variable Sized Transform Flag (VSTRANSFORM)(1 bit) 44 6.2.10 Overlapped Transform Flag (OVERLAP) (1 bit) 45 6.2.11 Quantizer Specifier (QUANTIZER) (2 bits) 45 6.2.12 HRD Buffer Ful
21、lness (HRD_FULLNESS)(Variable Size) 45 6.2.13 Coded Size Flag (CODED_SIZE_FLAG) (1 bit) 45 6.2.14 Extended Differential Motion Vector Range Flag (EXTENDED_DMV)(1 bit) 46 6.2.15 Range Mapping Luma Flag (RANGE_MAPY_FLAG)(1 bit) 46 6.2.16 Range Mapping Color-Difference Flag (RANGE_MAPUV_FLAG)(1 bit) 46
22、 7 PROGRESSIVE BITSTREAM SYNTAX AND SEMANTICS 47 7.1 PICTURE-LEVEL SYNTAX AND SEMANTICS 47 7.1.1 Picture layer 94 7.1.2 Slice Layer 107 7.1.3 Macroblock Layer 107 7.1.4 Block Layer 113 7.2 BITPLANE CODING SYNTAX 121 7.2.1 Invert Flag (INVERT) (1-bit) 121 7.2.2 Coding Mode (IMODE) (variable) 121 7.2.
23、3 Bitplane Coding Bits (DATABITS) (variable) 122 8 PROGRESSIVE DECODING PROCESS 122 8.1 PROGRESSIVE I FRAME PICTURE DECODING 122 8.1.1 Progressive I Frame Picture Layer Decode 122 8.1.2 Macroblock Layer Decode 124 8.1.3 Block Layer Decode 125 8.2 PROGRESSIVE BI FRAME PICTURE DECODING 138 8.2.1 BFRAC
24、TION following picture type (main profile only) 138 8.2.2 No picture resolution index (RESPIC) 138 8.3 PROGRESSIVE P FRAME PICTURE DECODING 138 8.3.1 Skipped Frame Pictures 138 8.3.2 Out-of-bounds Reference Pixels 139 SMPTE ST 421:2013 2013 SMPTE vi 8.3.3 P Picture Types 139 8.3.4 P Picture Layer De
25、code 140 8.3.5 Macroblock Layer Decoding 142 8.3.6 Block Layer Decode 155 8.3.7 Rounding Control (RND) 166 8.3.8 Intensity Compensation 167 8.4 PROGRESSIVE B FRAME PICTURE DECODING 168 8.4.1 Skipped Anchor Frames 168 8.4.2 Out-of-bounds Reference Pixels 168 8.4.3 Progressive B Frame Picture Types 16
26、8 8.4.4 Progressive B Frame Picture Layer Decode 168 8.4.5 B Frame Macroblock Layer Decode 170 8.4.6 B Block Layer Decode 176 8.5 OVERLAPPED TRANSFORM 177 8.5.1 Overlap Smoothing in Main and Simple Profiles 178 8.5.2 Overlap Smoothing in Advanced Profile 179 8.6 IN-LOOP DEBLOCK FILTERING 180 8.6.1 I
27、 Picture In-loop Deblocking 180 8.6.2 P Picture In-loop Deblocking 181 8.6.3 B Picture In-loop Deblocking 183 8.6.4 Filter Operation 183 8.7 BITPLANE CODING 191 8.7.1 INVERT 192 8.7.2 IMODE 192 8.7.3 DATABITS 192 8.8 SYNC MARKERS (SIMPLE AND MAIN PROFILES ONLY) 197 8.9 PAN SCAN 200 8.9.1 Number of P
28、an Scan Windows 200 8.9.2 Pan Scan Parameters 200 8.9.3 Pan Scan Restrictions 201 9 INTERLACE BITSTREAM SYNTAX AND SEMANTICS 201 9.1 PICTURE-LEVEL SYNTAX AND SEMANTICS 201 9.1.1 Picture layer 242 9.1.2 Slice Layer 251 9.1.3 Macroblock Layer 251 9.1.4 Block Layer Syntax Elements 254 10 INTERLACE DECO
29、DING PROCESS 255 10.1 INTERLACE FIELD I PICTURE DECODING 255 10.1.1 Macroblock Layer Decode 255 10.1.2 Block Layer Decode 255 10.2 INTERLACE BI FIELD DECODING 256 10.3 INTERLACE FIELD P PICTURE DECODING 256 10.3.1 Handling of Top-Field First (TFF) 256 10.3.2 Out-of-bounds Reference Pixels 256 10.3.3
30、 Reference Pictures 257 10.3.4 P Picture Types 260 10.3.5 Macroblock Layer Decode 260 10.3.6 Block Layer Decode 285 10.3.7 Rounding Control 286 10.3.8 Intensity Compensation 286 10.4 INTERLACE FIELD B PICTURE DECODING 287 10.4.1 Handling of TFF 288 10.4.2 Out-of-bounds Reference Pixels 288 10.4.3 Re
31、ference Pictures 289 10.4.4 B Picture Types 289 SMPTE ST 421:2013 2013 SMPTE vii 10.4.5 B Macroblock Layer Decode 289 10.4.6 MV Prediction in B fields 293 10.4.7 Block Layer Decode 296 10.5 INTERLACE FRAME I PICTURE DECODING 296 10.5.1 Macroblock Layer Decode 297 10.5.2 Block Decode 297 10.6 INTERLA
32、CE BI FRAME DECODING 298 10.7 INTERLACE FRAME P PICTURE DECODING 298 10.7.1 Skipped Frames 298 10.7.2 Out-of-bounds Reference Pixels 299 10.7.3 Macroblock Layer Decode 299 10.7.4 Block Layer Decode 318 10.8 INTERLACE FRAME B PICTURE DECODING 318 10.8.1 Skipped Anchor Frames 319 10.8.2 Out-of-bounds
33、Reference Pixels 319 10.8.3 BFRACTION 319 10.8.4 Bitplane coding of direct mode 319 10.8.5 4MVSWITCH and 4MVBPTAB 319 10.8.6 B Macroblock Layer Decode 319 10.8.7 B Block Layer Decode 323 10.9 OVERLAPPED TRANSFORM 324 10.9.1 Overlap Smoothing for Interlace Field Pictures 324 10.9.2 Overlap Smoothing
34、for Interlace Frame Pictures 324 10.10 IN-LOOP DEBLOCK FILTERING 324 10.10.1 I Interlace Field Picture In-loop Deblocking 324 10.10.2 P Interlace Field Picture In-loop Deblocking 324 10.10.3 B Interlace Field Picture In-loop Deblocking 325 10.10.4 Interlace Frame Pictures In-loop Deblocking 325 11 T
35、ABLES 331 11.1 INTERLACE PICTURES MV BLOCK PATTERN VLC TABLES 331 11.1.1 4-MV Block Pattern Tables 331 11.1.2 2-MV Block Pattern Tables 333 11.2 INTERLACE CBPCY VLC TABLES 334 11.3 INTERLACE MV TABLES 340 11.4 INTERLACE PICTURES MB MODE TABLES 353 11.4.1 Interlace Field P / B Pictures Mixed MV MB Mo
36、de Tables 353 11.4.2 Interlace Field P / B Pictures 1-MV MB Mode Tables 355 11.4.3 Interlace Frame P Picture 4-MV MBMODE Tables 357 11.4.4 Interlace Frame P / B Pictures Non 4-MV MBMODE Tables 359 11.5 I-PICTURE CBPCY TABLES 361 11.6 P AND B-PICTURE CBPCY TABLES 362 11.7 DC DIFFERENTIAL TABLES 366 1
37、1.7.1 Low-motion Tables 366 11.7.2 High-motion Tables 368 11.8 TRANSFORM AC COEFFICIENT TABLES 371 11.8.1 High Motion Intra Tables 371 11.8.2 Low Motion Intra Tables 382 11.8.3 Low Motion Inter Tables 386 11.8.4 Mid Rate Intra Tables 391 11.8.5 Mid Rate Inter Tables 395 11.8.6 High Rate Intra Tables
38、 399 11.8.7 High Rate Inter Tables 404 11.9 ZIGZAG TABLES 410 11.9.1 Intra zigzag tables 410 11.9.2 Inter zigzag tables 411 11.10 MOTION VECTOR DIFFERENTIAL TABLES 412 SMPTE ST 421:2013 2013 SMPTE viii 12 BIBLIOGRAPHY 416 ANNEX A TRANSFORM SPECIFICATION 417 A.1 INVERSE TRANSFORM 417 A.2 FORWARD TRAN
39、SFORM (INFORMATIVE) 418 ANNEX B SPATIAL ALIGNMENT OF VIDEO SAMPLES IN VARIABLE RESOLUTION CODING 419 B.1 SPATIAL ALIGNMENT OF SAMPLES IN DOWN-SAMPLED FRAME 419 B.2 DECODER UP-SAMPLING 419 B.3 ENCODER DOWN-SAMPLING (INFORMATIVE) 420 B.4 ANTI-ALIAS FILTERING (INFORMATIVE) 420 ANNEX C HYPOTHETICAL REFE
40、RENCE DECODER 421 C.1 LEAKY BUCKET MODEL 421 C.1.1 Leaky bucket algorithm 421 C.1.2 Constant delay mode constraints 423 C.1.3 CBR and VBR bitstreams 423 C.2 MULTIPLE LEAKY BUCKETS 423 C.3 BITSTREAM SYNTAX FOR THE HYPOTHETICAL REFERENCE DECODER 424 C.3.1 Constant-delay mode, Advanced profile constrai
41、nts. 424 C.3.2 Encoder considerations (informative) 425 C.4 INTERPOLATING LEAKY BUCKETS (INFORMATIVE) 425 C.5 DISPLAY ISSUES (INFORMATIVE) 426 C.6 TIME-CONFORMANT DECODERS 426 C.7 VARIABLE-DELAY MODE 427 C.8 BENEFITS OF MULTIPLE LEAKY BUCKETS (INFORMATIVE) 427 C.9 DEFAULT BIT RATES 428 ANNEX D PROFI
42、LE AND LEVELS 429 D.1 OVERVIEW (INFORMATIVE) 429 D.2 PROFILES (INFORMATIVE) 430 D.3 LEVELS 431 D.4 SYNTAX (INFORMATIVE) 435 ANNEX E START CODES AND EMULATION PREVENTION 436 E.1 DETECTION OF START CODES AND EBDU 436 E.2 EXTRACTION OF RBDU FROM EBDU 437 E.3 START CODES AND ENCAPSULATION AN ENCODER PER
43、SPECTIVE (INFORMATIVE) 437 E.4 CONSTRAINTS ON BYTE STREAM DATA PATTERNS 438 E.5 START CODE SUFFIXES FOR BDU TYPES 438 ANNEX F USER DATA 440 ANNEX G BITSTREAM CONSTRUCTION CONSTRAINTS ADVANCED PROFILE 441 G.1 SEQUENCE START CODE 442 G.2 END-OF-SEQUENCE START CODE 442 G.3 ENTRY POINT START CODE 442 G.
44、3.1 Case of I frame in Progressive mode 442 G.3.2 Case of I/P frame in Field Interlace mode 443 G.3.3 Case of P/I frame in Field Interlace mode 444 G.3.4 Case of I/I frame in Field Interlace mode 445 G.3.5 Case of I frame in Frame Interlace mode 446 G.4 FRAME START CODE 446 G.5 FIELD START CODE 446
45、G.6 SLICE START CODE 446 G.7 USER DATA START CODES 447 SMPTE ST 421:2013 2013 SMPTE ix G.7.1 Sequence-level user data 447 G.7.2 Entry-Point level user data 447 G.7.3 Frame-level User Data 448 G.7.4 Field-level user data 449 G.7.5 Slice-level user data 450 G.8 START CODE USAGE RULES 451 ANNEX H POST
46、PROCESSING FOR CODING NOISE REDUCTION 452 H.1 DEBLOCKING FILTER 452 H.2 DE-RINGING FILTER 454 H.2.1 Threshold determination 454 H.2.2 Index acquisition 455 H.2.3 Adaptive smoothing 455 ANNEX I DISPLAY METADATA FOR THE ADVANCED PROFILE 457 I.1 OVERVIEW 457 I.2 FRAME RATE 457 I.2.1 Repeating Progressi
47、ve Frames 457 I.2.2 Field Order 457 I.2.3 Repeating Fields 457 I.2.4 Frame Interpolation Flag 458 I.3 CODED PICTURE SIZE 458 I.4 DISPLAY GEOMETRY INFORMATION 458 I.4.1 Target Display Size 458 I.4.2 Sample Aspect Ratio 458 I.4.3 Relating Display Size to Coded Picture Size 459 I.5 PAN SCAN REGIONS 459
48、 I.6 POST-PROCESSING INFORMATION 459 ANNEX J DECODER INITIALIZATION METADATA 461 J.1 INITIALIZATION METADATA ELEMENTS 461 J.1.1 Profile (PROFILE) 461 J.1.2 Level (LEVEL) 461 J.1.3 Horizontal Size of Picture (HORIZ_SIZE) 461 J.1.4 Vertical Size of Picture (VERT_SIZE) 461 J.1.5 HRD Rate (HRD_RATE) 461
49、 J.1.6 HRD Buffer Size (HRD_BUFFER) 462 J.1.7 Quantized Frame Rate for Post processing Indicator (FRMRTQ_POSTPROC) 462 J.1.8 Quantized Bit Rate for Post processing Indicator (BITRTQ_POSTPROC) 462 J.1.9 Loop Filter Flag (LOOPFILTER) 462 J.1.10 Multi-resolution Coding (MULTIRES) 463 J.1.11 FAST UV Motion Compensation Flag (FASTUVMC) 463 J.1.12 Extended Motion Vector Fla