1、 Copyright 2014 by THE SOCIETY OF MOTION PICTURE AND TELEVISION ENGINEERS 3 Barker Avenue, White Plains, NY 10601 (914) 761-1100 Approved March 12, 2014 Table of Contents Page Foreword . 5 Intellectual Property 5 Introduction 5 1 Scope . 7 2 Conformance Notation . 7 3 Normative References . 7 4 Glos
2、sary . 7 5 Notation 12 5.1 Codec State Parameters 12 5.2 Number Representations 12 5.3 Arithmetic Right Shift 12 6 Overview (Informative) . 12 7 Component Arrays . 14 7.1 Component Array Requirements 14 7.2 Component Array Representation 14 7.3 Component Array Dimensions 14 7.4 Component Value Preci
3、sion . 14 8 Bitstream Syntax 16 8.1 Syntax Elements . 16 8.2 Bitstream Segments . 16 8.3 Tag-Value Pairs 16 8.3.1 Tag-Value Syntax 16 8.3.2 Required Tag-Value Pairs . 16 8.3.3 Optional Tag-Value Pairs 16 8.4 Chunk Elements 16 8.4.1 Chunk Element Syntax 16 8.4.2 Chunk Payload Size 17 8.4.3 Small Chun
4、k Payloads 17 8.4.4 Large Chunk Payloads 17 8.5 Bitstream Constraints . 17 8.6 Bitstream Start Marker 18 8.7 Bitstream Header 18 8.8 Codeblock Elements . 18 Page 1 of 50 pages SMPTE ST 2073-1:2014 SMPTE STANDARD VC-5 Video Essence Part 1: Elementary Bitstream SMPTE ST 2073-1:2014 Page 2 of 50 pages
5、9 Codec State 18 9.1 Codec State Parameters 18 9.2 Codec State Initialization 19 9.3 External Parameter Values 19 9.4 Explicit Parameter Changes . 19 9.5 Codec State Changes 19 9.5.1 Subband State Change 19 9.5.2 Channel State Change . 19 10 Subband Coding 20 10.1 Coefficient Order 20 10.2 Subband C
6、odeblocks . 20 10.3 Lowpass Band Codeblocks . 20 10.4 Highpass Band Codeblocks . 20 10.4.1 Run-Length Coding 20 10.4.2 Non-Zero Coded Values . 20 10.4.3 Band End Marker 21 11 Wavelet Transforms 21 11.1 Spatial Wavelet Transform (Informative) . 21 11.2 Spatial Wavelet Sequence . 23 11.3 Inverse Wavel
7、et Transforms 26 11.4 Wavelet Transform Requirements . 27 11.4.1 Wavelet Height Requirement . 27 11.4.2 Wavelet Width Requirement . 27 12 Decoding Process 28 12.1 Subband Decoding 28 12.2 Entropy Decoding 28 12.3 Inverse Companding 28 12.4 Inverse Quantization 28 12.5 Inverse Wavelet Processing 28 1
8、2.6 Component Array Order 28 Annex A Inverse Spatial Wavelet Transform (Normative) 29 A.1 Inverse Horizontal and Vertical Transforms . 29 Annex B Codec State Parameters (Normative) 30 B.1 Parameter Descriptions . 30 B.1.1 ImageWidth . 30 B.1.2 ImageHeight 30 B.1.3 BitsPerComponent 30 B.1.4 ChannelCo
9、unt 30 B.1.5 SubbandCount . 30 B.1.6 ChannelNumber 30 B.1.7 SubbandNumber . 30 B.1.8 LowpassPrecision 30 B.1.9 Quantization 30 B.1.10 PrescaleShift . 30 B.1.11 ChannelWidth 31 B.1.12 ChannelHeight . 31 B.2 Tag-Value Pairs 31 B.3 Chunk Headers . 32 B.3.1 Small Chunk Headers. 32 B.3.2 Large Chunk Head
10、ers 32 SMPTE ST 2073-1:2014 Page 3 of 50 pages B.4 Image Dimensions (Informative) . 33 Annex C Codebook (Normative) . 34 C.1 Coefficient Magnitudes and Zero Runs. 34 C.2 Special Codewords . 39 Annex D Decoding Process (Informative) . 40 D.1 Decoding Overview . 40 D.2 Initial Codec State . 40 D.3 Mem
11、ory Allocation. 40 D.4 Entropy Decoding 40 D.5 Lower Resolution Decoding 41 D.6 Image Repacking Process 41 D.7 Decoding Resource Requirements . 41 Annex E Encoding Process (Informative) . 42 E.1 Codec State Synchronization 42 E.2 Image Processing 43 E.3 Image Unpacking 43 E.4 Prescale Shifts . 43 E.
12、5 Lowpass Transform . 43 E.6 Highpass Transform 43 E.7 Quantization 44 E.8 Companding 44 E.9 Entropy Coding 45 E.9.1 Non-Zero Coefficients . 45 E.9.2 Runs of Zeros . 45 E.10 Subband Encoding Order . 45 Annex F Inverse Companding and Dequantization (Normative) 46 Annex G Additional Notation (Informat
13、ive) . 47 G.1 Arithmetic Operators 47 G.2 Logical Operators 47 G.3 Relational Operators 47 G.4 Bitwise Operators 48 G.5 Assignment Operator . 48 G.6 Operator Precedence 48 G.7 Compound Statements 49 G.8 Elementary Functions 49 G.9 Bitstream Functions . 49 Annex H Bibliography (Informative) 50 SMPTE
14、ST 2073-1:2014 Page 4 of 50 pages Figures Figure 1 Overview of the encoding and decoding processes (informative). 13 Figure 2 Component arrays are represented as separate channels in the bitstream. . 15 Figure 3 Two-dimensional spatial wavelet transform as a horizontal wavelet transform followed by
15、a vertical wavelet transform. 22 Figure 4 Three levels of spatial wavelet transform showing the lowpass bands used as inputs to the next wavelet level and the numbering of subbands. Each channel is encoded using this sequence of spatial wavelet transforms. 25 Figure 5 Sequence of operations used to
16、encode a component array into the bitstream. . 26 Figure E.1 Synchronizing the codec state between the encoder and decoder. . 42 Tables Table 1 Subband numbering for the sequence of wavelets in each channel. 23 Table 2 Notation used in Figure 5. . 24 Table B.1 Packed representation of the prescale s
17、hifts. 31 Table B.2 Codec state parameters. 32 Table B.3 Symbolic names and numbers for tags that identify large chunk elements. 33 Table C.1 Codebook for non-negative coefficients (codewords listed in hexadecimal). 35 Table C.2 Special codewords. 39 Table D.1 Highpass band codeblock decoding algori
18、thm. . 41 Table E.1 Prescale shifts versus the number of bits per component value. 43 Table G.1 Elementary arithmetic operators used in this document. 47 Table G.2 Logical operators used in this document. 47 Table G.3 Relational operators used in the document. 47 Table G.4 Bitwise operators used in
19、this document. 48 Table G.5 Assignment operators used in this document 48 Table G.6 Operator precedence. 48 Table G.7 Elementary functions operate on the argument x with unlimited precision. 49 Table G.8 Functions for sequentially reading the bitstream. 49 SMPTE ST 2073-1:2014 Page 5 of 50 pages For
20、eword SMPTE (the Society of Motion Picture 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 S
21、tandards, Recommended Practices, and Engineering 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. SMP
22、TE Engineering Documents are drafted in accordance with the rules given in its Standards Operations Manual. SMPTE ST 2073-1 was prepared by Technology Committee 10E. Intellectual Property At the time of publication no notice had been received by SMPTE claiming patent rights essential to the implemen
23、tation of this Engineering Document. However, attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. SMPTE shall not be held responsible for identifying any or all such patent rights. Introduction This section is entirely informative and
24、 does not form an integral part of this Engineering Document. The VC-5 codec is a variable-bit-rate codec intended for high-quality video acquisition and post-production, capable of encoding diverse image and video formats. The key design goals of the VC-5 codec are: (1) Very high visual quality (vi
25、sually lossless in most applications); (2) Efficient implementation of both decoders and encoders; (3) Support for any color space or color difference component sampling; (4) Direct encoding of camera sensor output without conversion to a different format; (5) Adaptability and ease of use in video e
26、diting and post-production. The VC-5 codec uses reversible integer wavelet transforms applied to the entire image to prevent blocking artifacts. Since the transforms are reversible, the only losses are due to quantization. Lowpass wavelet coefficients are encoded without quantization to preserve vis
27、ual quality. The wavelet transforms can be implemented efficiently using only integer shift and add operations. Highpass wavelet coefficient values equal to zero are run length coded. Runs of zeros and non-zero coefficients are represented using variable-length codes that are efficient for both deco
28、ding and encoding. The VC-5 bitstream can represent any image that can be unpacked into component arrays by an image unpacking process prior to encoding (Figure 1). A component array is like an image plane and typically would contain a single type of color or data, although component arrays containi
29、ng multiple types of image data are not precluded by this standard. Each of the component arrays represented in the bitstream can have different dimensions. SMPTE ST 2073-1:2014 Page 6 of 50 pages The image unpacking process is not specified by this standard and can implement image pre-processing al
30、gorithms, which also are not defined in this standard. The encoding process takes an ordered set of component arrays and represents the component arrays in the bitstream such that a decoding process can reconstruct the set of component arrays that were input to the encoding process in the same order
31、 as input to the encoding process. The reconstructed set of component arrays duplicates the component arrays input to the encoder except for losses due to compression. The decoding process can be followed by an image repacking process that converts the ordered set of component arrays into a packed r
32、epresentation of the image. The image repacking process is not specified by this standard. The image repacking process can implement image post-processing algorithms as required by the application. An image display process that transforms the packed image into a displayable picture can follow the im
33、age repacking process. For example, the packed image can include data values that must be mapped to colors to create a displayable image. The VC-5 codec is intended to accept common image formats, including images with RGB and YCbCr color components with an optional alpha channel. Image formats can
34、use color difference component sampling, for example YCbCr with 4:2:2 or 4:2:0 sampling. The VC-5 codec is not restricted to a particular set of image dimensions, pixel formats, or color standards. Color Filter Array (CFA) images, including Bayer pattern images, can be unpacked into component arrays
35、 that can be represented in a VC-5 bitstream without conversion to a different image format. Component arrays containing non-color data, such as disparity values, can be represented in a VC-5 bitstream. Component arrays can use up to 24 bits of precision to represent each value in the component arra
36、y. The syntax of a VC-5 bitstream is based on tag-value pairs that allow for future extensions. Each tag is a 16-bit number and only a small number of tags have been assigned. The value is a 16-bit number, but a tag-value pair can be used to represent the type and size of a large block of data, prov
37、iding support for values larger than 16 bits. The number of component arrays and the width and height of each component array is limited only by the scheme for representing information as tag-value pairs. A VC-5 bitstream can include all of the information required by a decoding process to reconstru
38、ct the component arrays represented in the bitstream, but the bitstream does not have to include information that is provided by an external source. For example, a bitstream that is embedded in a media container can omit information that is provided by the container. The VC-5 codec can adapt to spec
39、ific applications by representing an image using minimal syntax or including extensive information required to describe the output of sophisticated image sensors or complex workflows. Wavelet transforms are applied recursively to each component array with the lowpass band from each wavelet transform
40、 input to the next transform. Fewer inverse transforms can be applied during decoding to produce a lower resolution proxy image, allowing a decoder to balance decoding speed and image quality as required by specific applications. SMPTE ST 2073-1:2014 Page 7 of 50 pages 1 Scope This standard specifie
41、s the compressed representation and decoding process for the core VC-5 bitstream. 2 Conformance Notation Normative text is text that describes elements of the design that are indispensable or contains the conformance language keywords: “shall“, “should“, or “may“. Informative text is text that is po
42、tentially helpful to the user, but not indispensable, and can be removed, changed, or added editorially without affecting interoperability. Informative text does not contain any conformance keywords. All text in this document is, by default, normative, except: the Introduction, any section explicitl
43、y labeled as “Informative“ or individual paragraphs that start with “Note:” The keywords “shall“ and “shall not“ indicate requirements strictly to be followed in order to conform to the document and from which no deviation is permitted. The keywords, “should“ and “should not“ indicate that, among se
44、veral possibilities, one is recommended as particularly suitable, without mentioning or excluding others; or that a certain course of action is preferred but not necessarily required; or that (in the negative form) a certain possibility or course of action is deprecated but not prohibited. The keywo
45、rds “may“ and “need not“ indicate courses of action permissible within the limits of the document. The keyword “reserved” indicates a provision that is not defined at this time, shall not be used, and may be defined in the future. The keyword “forbidden” indicates “reserved” and in addition indicate
46、s that the provision will never be defined in the future. A conformant implementation according to this document is one that includes all mandatory provisions (“shall“) and, if implemented, all recommended provisions (“should“) as described. A conformant implementation need not implement optional pr
47、ovisions (“may“) and need not implement them as described. Unless otherwise specified, the order of precedence of the types of normative information in this document shall be as follows: Normative prose shall be the authoritative definition; tables shall be next; followed by formal languages; then f
48、igures; and then any other language forms. 3 Normative References The following standards contain provisions that, through reference in this text, constitute provisions of this recommended practice. At the time of publication, the editions indicated were valid. All standards are subject to revision,
49、 and parties to agreements based on this recommended practice are encouraged to investigate the possibility of applying the most recent edition of the standards indicated below. None. 4 Glossary For the purposes of this standard, the following definitions shall apply: 4.1 big-endian order of bytes that comprise a number with more significant bytes before less significant bytes SMPTE ST 2073-1:2014 Page 8 of 50 pages 4.2 bitstream