This file is raw output from pdftotext and may not be ideal for distribution. If you are a maintainer for Hackipedia, please sit down when you have time and clean this text version up. Source PDF: /mnt/main/jmc-storage/docs/SCTE/ANSI SCTE 020 Methods for Carriage of Closed Captions and non-real time sampled video (2004).pdf Like all conversions the text below should be fully readable as UTF-8 unicode text. --------------------------------------------------------------- ENGINEERING COMMITTEE Digital Video Subcommittee AMERICAN NATIONAL STANDARD ANSI/SCTE 20 2004 METHODS FOR CARRIAGE OF CLOSED CAPTIONS AND NON-REAL TIME SAMPLED VIDEO NOTICE The Society of Cable Telecommunications Engineers (SCTE) Standards are intended to serve the public interest by providing specifications, test methods and procedures that promote uniformity of product, interchangeability and ultimately the long term reliability of broadband communications facilities. These documents shall not in any way preclude any member or non- member of SCTE from manufacturing or selling products not conforming to such documents, nor shall the existence of such standards preclude their voluntary use by those other than SCTE members, whether used domestically or internationally. SCTE assumes no obligations or liability whatsoever to any party who may adopt the Standards. Such adopting party assumes all risks associated with adoption of these Standards, and accepts full responsibility for any damage and/or claims arising from the adoption of such Standards. Attention is called to the possibility that implementation of this standard may require the use of subject matter covered by patent rights. By publication of this standard, no position is taken with respect to the existence or validity of any patent rights in connection therewith. SCTE shall not be responsible for identifying patents for which a license may be required or for conducting inquiries into the legal validity or scope of those patents that are brought to its attention. Patent holders who believe that they hold patents which are essential to the implementation of this standard have been requested to provide information about those patents and any related licensing terms and conditions. Any such declarations made before or after publication of this document are available on the SCTE web site at http://www.scte.org. All Rights Reserved © Society of Cable Telecommunications Engineers, Inc. 140 Philips Road Exton, PA 19341 Contents 1. INTRODUCTION .......................................................................................................2-5 1.1 Purpose .............................................................................................................................. 2-5 1.2 Revisions ............................................................................................................................ 2-5 1.3 Scope .................................................................................................................................. 2-5 2. APPLICABLE DOCUMENTS ......................................................................................2-7 3. ACRONYMS AND ABBREVIATIONS ........................................................................2-8 4. VIDEO USER DATA EXTENSIONS .............................................................................2-9 4.1 Closed Captioning ............................................................................................................ 2-9 4.2 Non-Real-Time Sampled Video....................................................................................... 2-9 5. PICTURE USER DATA SYNTACTIC EXTENSIONS.....................................................2-10 5.1 Syntax Conventions and Definitions............................................................................. 2-10 5.1.1 Method of Describing Bitstream Syntax.................................................................... 2-10 5.1.2 Reserved, Forbidden & Marker Bits .......................................................................... 2-11 5.1.3 Operators .................................................................................................................... 2-11 5.1.4 Mnemonics ................................................................................................................. 2-11 5.1.5 Start Codes ................................................................................................................. 2-12 5.1.6 Definition of Functions .............................................................................................. 2-12 5.2 Picture User Data Syntax............................................................................................... 2-13 6. PICTURE USER DATA SEMANTIC EXTENSIONS ......................................................2-15 6.1 User Data Type ............................................................................................................... 2-15 6.1 VBI Data Constructs ...................................................................................................... 2-15 6.1.1 Closed Captioning...................................................................................................... 2-15 6.1.2 Non-Real-Time Sampled Video................................................................................. 2-16 List of Figures Figure 5–1. Next Start Code Function Syntax..........................................................2-12 Figure 5–2. Picture User Data Syntax........................................................................2-13 List of Tables Table 5–1. Bitstream Data Elements and Conditions .............................................2-10 Table 5–2. Start Code Values .......................................................................................5-2 Table 6–1. Field Number for Picture User Data ........................................................2-16 Table 6–2. Non Real Time Video Field Number .......................................................2-16 1. Introduction 1.1 Purpose This document defines a standard for the carriage of Vertical Blanking Interval (VBI) services in MPEG-2 compliant bitstreams constructed in accordance with ISO/IEC 13818-2 (Reference [1]). 1.2 Revisions This version is the initial release. 1.3 Scope The sections in this standard describing video user data extensions to MPEG-2 are organized as follows: • Section 1—Provides an introduction • Section 2— Lists normative and informative references • Section 3—Defines the acronyms and abbreviations used in this specification • Section 4—Provides an overview of the VBI services supported • Section 5—Specifies the video bitstream syntax for picture user data extensions • Section 6—Describes the video bitstream semantics for picture user data extensions 2 References 2.1 Normative References 1. ISO/IEC 13818-2:2000: Information technology -- Generic coding of moving pictures and associated audio information – Part 2: Video (MPEG-2 Video) 2. ITU-R BT.601-5, Studio Encoding Parameters of Digital Television for Standard 4:3 and Wide-Screen 16:9 Aspect Ratios, ITU Radiocommunication Assembly, 1995 3. EIA 608-B, Line 21 Data Services, 2000 2.2 Informative References 4. ITU-R BT.470-6, Conventional Television Systems, ITU Radiocommunication Assembly, 1998 3. Acronyms and Abbreviations bslbf bit string left bit first CEA Consumer Electronics Association FCC Federal Communications Commission IEC International Electrotechnical Commission ISO International Standards Organization ITU International Telecommunication Union LL Low Level lsb least significant bit ML Main Level MP Main Profile MPEG Moving Picture Experts Group msb most significant bit uilsbfopbl unsigned integer least significant bit first odd parity bit last NTSC National Television System Committee PAL Phase Alternate Line uimsbf unsigned integer most significant bit first VBI Vertical Blanking Interval VITS Vertical Interval Test Signal 4. Video User Data Extensions The video user data extensions to the MPEG-2 syntax and semantics described in this standard provide a means to support VBI services. This new feature allows carriage and reinsertion of VBI data into the same field from which it originates. The VBI enhancements relative to MPEG-2 main and simple profiles include: a) Closed captioning for single and multiple lines b) Non-real-time sampled video 4.1 Closed Captioning Many television services carry closed caption information in line 21 (field 1 as well as field 2) of the VBI (Reference [3]). The user data syntax described herein supports the carriage and decoder reinsertion of closed captioning information. This feature requires logic to parse, store and reorder closed caption data as well as to synthesize the Federal Communications Commission (FCC) standard closed caption waveform. Certain system service providers use the closed caption format to carry additional data in VBI lines other than line 21. The user data syntactic constructs described in this document allow multiple VBI lines per display field, including any standard closed caption usage described in the above paragraph. A compatible decoder shall be able to process and rebuild up to four lines per display field. 4.2 Non-Real-Time Sampled Video Primarily intended to support Vertical Interval Test Signals (VITS), non-real-time sampled video can potentially be used for other VBI services as well. Non-real-time sampled video supports the carriage and decoder reinsertion of VITS information, with the maximum refresh rate of once in every 22 frames of video (32 pixels of data * 22 = 704 pixels). User data syntactic constructs include logic to parse and store multiple lines of VBI video luma and chroma for this purpose. 5. Picture User Data Syntactic Extensions The method used in this document for describing video bitstream syntax is the same as that used in the MPEG-2 International Standard, ISO/IEC 13818-2 (Reference [1]). The syntactic extensions to MPEG-2 MP@ML operation for VBI services are implemented using the picture user data syntax defined in subsection 5.2. 5.1 Syntax Conventions and Definitions 5.1.1 Method of Describing Bitstream Syntax Those ISO/IEC 13818-2 conventions and definitions that appear in VBI user data syntax are reviewed in the remainder of this subsection. As exemplified in Table 5–1, this syntax resembles C-code and uses the convention that a variable or expression evaluating to a non-zero value is equivalent to a condition that is true. Table 5–1. Bitstream Data Elements and Conditions while ( condition ) { If the condition is true, then the group of data elements data_element occurs next in the data stream. This repeats until the ... condition is not true. } do { data_element The data element always occurs at least once. ... } while ( condition ) The data element is repeated until the condition is not true. if ( condition) { If the condition is true, then the first group of data data_element elements occurs next in the data stream. ... } else { If the condition is not true, then the second group of data data_element elements occurs next in the data stream. ... } for ( i = 0; i < n; i++) { The group of data elements occurs n times. Conditional data_element constructs within the group of data elements may depend ... on the value of the loop control variable i, which is set to } zero for the first occurrence, incremented to one for the second occurrence, and so forth. /* comment ... */ Explanatory comment that may be deleted entirely without in any way altering the syntax. Each data item in the bitstream appears in bold type and is described by its name, its length in bits, and a mnemonic for its type and order of transmission. The action caused by a decoded data element in a bitstream depends on the value of that data element and on data elements previously decoded. The constructs in normal type in the above table are used to express the conditions when data elements are present. A group of data elements may contain nested conditional constructs. For compactness, the { } are omitted when only one data element follows. Array data is represented as follows: data_element[n] the n+1th element of an array of data data_element[m][ the m+1, n+1th element of a two-dimensional array of data n] While the syntax descriptions given in this document are expressed in procedural terms, it should not be assumed that subsection 5.1 implements a satisfactory decoding procedure. In particular, it defines a correct and error-free input bitstream for compatible encoders. Actual decoders must include means to look for start codes in order to begin decoding correctly, and to identify errors, erasures and insertions while decoding. Neither the methods to identify these situations nor the actions to be taken are specified in this document. 5.1.2 Reserved, Forbidden & Marker Bits The terms reserved and forbidden are used in the description of some values of several fields in the coded bitstream. Reserved—Indicates that the value may be used in the future for ISO/IEC-defined extensions. Forbidden—Indicates a value that shall never be used (usually in order to avoid emulation of start codes). marker_bit— A marker_bit is a 1-bit field that has the value '1'. 5.1.3 Operators + Addition. - Subtraction (as a binary operator) or negation (as a unary operator). ++ Increment. -- Decrement. > Greater than. >= Greater than or equal to. < Less than. <= Less than or equal to. == Equal to. != Not equal to. = Assignment operator. 5.1.4 Mnemonics The following mnemonics are defined to describe the different data types used in the user data syntax described in subsection 5.2: bslbf Bit string, left bit first, where “left” is the order in which bit strings are written in the specification. Bit strings are written as a string of 1s and 0s within single quote marks, e.g. ‘1000 0001’. Blanks within a bit string are for ease of reading and have no significance. uimsbf Unsigned integer, most significant bit first. uilsbfopbl Unsigned integer least significant bit first odd parity bit last 5.1.5 Start Codes Start codes are specific bit patterns that do not otherwise occur in the video stream. Each start code consists of the 24-bit start code prefix string ‘0000 0000 0000 0000 0000 0001’ followed by an 8-bit integer that identifies the type of start code as described in ISO/IEC 13818-2. Start codes are always byte aligned, and may be preceded by any number of zero stuffing bits. 5.1.6 Definition of Functions The following utility functions for picture coding algorithms are defined:. bytealigned() returns 1 if the next bit in the bitstream is the first bit in a byte. Otherwise it returns 0. nextbits() permits comparison of a bit string with the next bits to be decoded in the bitstream. next_start_code() removes any zero bit and zero byte stuffing and locates the next start code as defined in Figure 5-1. next_start_code() { No. of bits Mnemonic while ( !bytealigned() ) zero_bit 1 0 while ( nextbits() != '0000 0000 0000 0000 0000 0001' ) zero_byte 8 0000 0000 } Figure 5–1. Next Start Code Function Syntax 5.2 Picture User Data Syntax Picture user data syntax to support VBI services is shown in Figure 5-2. user_data(2) { No. of bits Mnemonic user_data_start_code 32 bslbf user_data_type_code 8 uimsbf if (user_data_type_code == '0x03') { ‘1000 000’ 7 bslbf – See Note 1 vbi_data_flag 1 bslbf if (vbi_data_flag) { cc_count 5 uimsbf for (i=0 ; i