Ana səhifə

International organisation for standardisation organisation internationale de normalisation


Yüklə 1.39 Mb.
səhifə11/23
tarix25.06.2016
ölçüsü1.39 Mb.
1   ...   7   8   9   10   11   12   13   14   ...   23

2.4.3.4 Adaptation field



Table 2-6 -- Transport Stream adaptation field

Syntax

No. of Bits

Mnemonic

adaptation_field() {







adaptation_field_length

8

uimsbf

}










2.4.3.5 Semantic definition of fields in adaptation field



adaptation_field_length -- The adaptation_field_length is an 8 bit field specifying the number of bytes in the adaptation_field immediately following the adaptation_field_length. The value 0 is for inserting a single stuffing byte in a Transport Stream packet. When the adaptation_field_control value is '11', the value of the adaptation_field_length shall be in the range 0 to 182. When the adaptation_field_control value is '10', the value of the adaptation_field_length shall be 183. For Transport Stream packets carrying PES packets, stuffing is needed when there is insufficient PES packet data to completely fill the Transport Stream packet payload bytes. Stuffing is accomplished by defining an adaptation field longer than the sum of the lengths of the data elements in it, so that the payload bytes remaining after the adaptation field exactly accommodates the available PES packet data. The extra space in the adaptation field is filled with stuffing bytes.
This is the only method of stuffing allowed for Transport Stream packets carrying PES packets. For Transport Stream packets carrying PSI, an alternative stuffing method is described in 2.4.4 on page 44.
discontinuity_indicator -- This is a 1 bit field which when set to '1' indicates that the discontinuity state is true for the current Transport Stream packet. When the discontinuity_indicator is set to '0' or is not present, the discontinuity state is false. The discontinuity indicator is used to indicate two types of discontinuities, system time-base discontinuities and continuity_counter discontinuities.
A system time-base discontinuity is indicated by the use of the discontinuity_indicator in Transport Stream packets of a PID designated as a PCR_PID (refer to 2.4.4.9 on page 50). When the discontinuity state is true for a Transport Stream packet of a PID designated as a PCR_PID, the next PCR in a Transport Stream packet with that same PID represents a sample of a new system time clock for the associated program. The system time-base discontinuity point is defined to be the instant in time when the first byte of a packet containing a PCR of a new system time-base arrives at the input of the T-STD. The discontinuity_indicator shall be set to '1' in the packet in which the system time-base discontinuity occurs. The discontinuity_indicator bit may also be set to '1' in Transport Stream packets of the same PCR_PID prior to the packet which contains the new system time base PCR. In this case, once the discontinuity_indicator has been set to '1', it shall continue to be set to '1' in all Transport Stream packets of the same PCR_PID up to and including the Transport Stream packet which contains the first PCR of the new system time-base. After the occurrence of a system time-base discontinuity, no fewer than two PCRs for the new system time-base shall be received before another system time-base discontinuity can occur. Further, except when trick mode status is true, data from no more than two system time-bases shall be present in the set of T-STD buffers for one program at any time.
Prior to the occurrence of a system time-base discontinuity, the first byte of a Transport Stream packet which contains a PTS or DTS which refers to the new system time-base shall not arrive at the input of the T-STD. After the occurrence of a system time-base discontinuity, the first byte of a Transport Stream packet which contains a PTS or DTS which refers to the previous system time-base shall not arrive at the input of the T-STD.
A continuity_counter discontinuity is indicated by the use of the discontinuity_indicator in any Transport Stream packet. When the discontinuity state is true in any Transport Stream packet of a PID not designated as a PCR_PID, the continuity_counter in that packet may be discontinuous with respect to the previous Transport Stream packet of the same PID. When the discontinuity state is true in a Transport Stream packet of a PID that is designated as a PCR_PID, the continuity_counter may only be discontinuous in the packet in which a system time-base discontinuity occurs. A continuity counter discontinuity point occurs when the discontinuity state is true in a Transport Stream packet and the continuity_counter in the same packet is discontinuous with respect to the previous Transport Stream packet of the same PID. A continuity counter discontinuity point shall occur at most one time from the initiation of the discontinuity state until the conclusion of the discontinuity state. Furthermore, for all PIDs that are not designated as PCR_PIDs, when the discontinuity_indicator is set to '1' in a packet of a specific PID, the discontinuity_indicator may be set to '1' in the next Transport Stream packet of that same PID, but shall not be set to '1' in three consecutive Transport Stream packet of that same PID.
For the purpose of this clause, an elementary stream access point is defined as follows:


  1. video: the first byte of a video sequence header

  2. audio: the first byte of an audio frame.

After a continuity counter discontinuity in a Transport packet which is designated as containing elementary stream data, the first byte of elementary stream data in a Transport Stream packet of the same PID shall be the first byte of an elementary stream access point or in the case of video, the first byte of an elementary stream access point or a sequence_end_code followed by an access point. Each Transport Stream packet which contains elementary stream data with a PID not designated as a PCR_PID, and in which a continuity counter discontinuity point occurs, and in which a PTS or DTS occurs, shall arrive at the input of the T-STD after the system time-base discontinuity for the associated program occurs.



In the case where the discontinuity state is true, if two consecutive Transport Stream packets of the same PID occur which have the same continuity_counter value and have adaptation_field_control values set to '01' or '11', the second packet may be discarded. A Transport Stream shall not be constructed in such a way that discarding such a packet will cause the loss of PES packet payload data or PSI data.
After the occurrence of a discontinuity_indicator set to '1' in a Transport Stream packet which contains PSI information, a single discontinuity in the version_number of PSI sections may occur. At the occurrence of such a discontinuity, a version of the TS_program_map_sections of the appropriate program shall be sent with section_length == 13 and the current_next_indicator == 1, such that there are no program_descriptors and no elementary streams described. This shall then be followed by a version of the TS_program_map_section for each affected program with the version_number incremented by one and the current_next_indicator == 1, containing a complete program definition. This indicates a version change in PSI data.
random_access_indicator -- The random_access_indicator is a 1 bit field that indicates that the current Transport Stream packet, and possibly subsequent Transport Stream packets with the same PID, contain some information to aid random access at this point. Specifically, when the bit is set to '1', the next PES packet to start in the payload of Transport Stream packets with the current PID shall contain the first byte of a video sequence header if the PES stream type (refer to table 2-29 on page 51) is 1 or 2, or shall contain the first byte of an audio frame if the PES stream type is 3 or 4. In addition, in the case of video, a presentation timestamp shall be present in the PES packet containing the first picture following the sequence header. In the case of audio, the presentation timestamp shall be present in the PES packet containing the first byte of the audio frame. In the PCR_PID the random_access_indicator may only be set to '1' in Transport Stream packet containing the PCR fields.
elementary_stream_priority_indicator -- The elementary_stream_priority_indicator is a one bit field. It indicates, among packets with the same PID, the priority of the elementary stream data carried within the payload of this Transport Stream packet. A '1' indicates that the payload has a higher priority than the payloads of other Transport Stream packets. In case of video this field may be set to '1' only if the payload contains one or more bytes from an intra-coded slice. A value of '0' indicates that the payload has the same priority as all other packets which do not have this bit set to '1'.
PCR_flag -- The PCR_flag is a 1 bit flag. A value of '1' indicates that the adaptation_field contains a PCR field coded in two parts. A value of '0' indicates that the adaptation field does not contain any PCR field.
OPCR_flag -- The OPCR_flag is a 1 bit flag. A value of '1' indicates that the adaptation_field contains an OPCR field coded in 2 parts. A value of '0' indicates that the adaptation field does not contain any OPCR fields.
splicing_point_flag -- The splicing_point_flag is a 1 bit flag. When set to '1', it indicates that a splice_countdown field shall be present in the associated adaptation field, specifying the occurrence of a splicing point. A value of '0' indicates that a splice_countdown field is not present in the adaptation field.
transport_private_data_flag -- The transport_private_data_flag is a 1 bit flag. A value of '1' indicates that the adaptation field contains one or more private_data bytes. A value of '0' indicates the adaptation field does not contain any private_data bytes.
adaptation_field_extension_flag -- The adaptation_field_extension_flag is a 1 bit field which when set to '1' indicates the presence of an adaptation field extension. A value of '0' indicates that an adaptation field extension is not present in the adaptation field.
program_clock_reference_base; program_clock_reference_extension -- The program_clock_reference (PCR) is a 42 bit field coded in two parts. The first part, program_clock_reference_base, is a 33 bit field whose value is given by PCR_base(i), as given in equation 2-2 on page 14 . The second part, program_clock_reference_extension, is a 9 bit field whose value is given by PCR_ext(i), as given in equation 2-3 on page 14 . The PCR indicates the intended time of arrival of the byte containing the last bit of the program_clock_reference_base at the input of the system target decoder.
If a PCR field is present in a Transport Stream packet containing data from an audio or video elementary stream, it shall be valid for the time base of that elementary stream. Refer to 2.7.2 on page 81 for frequency of coding requirements.
original_program_clock_reference_base; original_program_clock_reference_extension -- The optional original program reference (OPCR) is a 42-bit field coded in two parts. These two parts, the base and the extension, are coded identically to the two corresponding parts of the PCR field. The presence of the OPCR is indicated by the OPCR_flag. The OPCR field shall be coded only in Transport Stream packets in which the PCR field is present. OPCRs are permitted in both single program and multiple program Transport Streams.
OPCR assists in the reconstruction of a single program Transport Stream from another Transport Stream. When reconstructing the original single program Transport Stream, the OPCR may be copied to the PCR field. The resulting PCR value is valid only if the original single program Transport Stream is reconstructed exactly in its entirety. This would include at least any PSI and private data packets which were present in the original Transport Stream and would possibly require other private arrangements. It also means that the OPCR must be an identical copy of its associated PCR in the original single program Transport Stream.
The OPCR is expressed as follows:
(2-8)
where

(2-9)



(2-10)

The OPCR field is ignored by the decoder. The OPCR field shall not be modified by any multiplexor or decoder.


splice_countdown -- The splice_countdown is an 8 bit field, representing a value which may be positive or negative. A positive value specifies the remaining number of Transport Stream packets, of the same PID, following the associated Transport Stream packet until a splicing point is reached. Duplicate Transport Stream packets and Transport Stream packets which only contain adaptation fields are excluded. The splicing point is located immediately after the last byte of the Transport Stream packet in which the associated splice_countdown field reaches zero. In the Transport Stream packet where the splice_countdown reaches zero, the last data byte of the Transport Stream packet payload shall be the last byte of a coded audio frame or a coded picture. In the case of video, the corresponding access unit may or may not be terminated by a sequence_end_code. Transport Stream packets with the same PID, which follow, may contain data from a different elementary stream of the same type.
The payload of the next Transport Stream packet of the same PID (duplicate packets and packets without payload being excluded) shall commence with the first byte of a PES packet. In the case of audio, the PES packet payload shall commence with an access point. In the case of video, the PES packet payload shall commence with an access point, or with a sequence_end_code, followed by an access point. Thus, the previous coded audio frame or coded picture aligns with the packet boundary, or is padded to make this so. Subsequent to the splicing point, the countdown field may also be present. When the splice_countdown is a negative number whose value is minus n (-n), it indicates that the associated Transport Stream packet is the nth packet following the splicing point (duplicate packets and packets without payload being excluded).
For the purposes of this clause, an access point is defined as follows:


  1. video: the first byte of a video_sequence_header

  2. audio: the first byte of an audio frame


transport_private_data_length -- The transport_private_data_length is an 8 bit field specifying the number of private_data bytes immediately following the transport private_data_length field. The number of private_data bytes shall not be such that private data extends beyond the adaptation field.
private_data_byte -- The private_data_byte is an 8 bit field that shall not be specified by ITU T†|†ISO/IEC.
adaptation_field_extension_length -- The adaptation_field_extension_length is an 8 bit field. It indicates the number of bytes of the extended adaptation field data immediately following this field, including reserved bytes if present.
ltw_flag (legal time window_flag) -- This is a 1 bit field which when set to '1' indicates the presence of the ltw_offset field.
piecewise_rate_flag -- This is a 1 bit field which when set to '1' indicates the presence of the piecewise_rate field.
seamless_splice_flag -- This is a one bit flag which when set to '1' indicates that the splice_type and DTS_next_AU fields are present. A value of '0' indicates that neither splice_type nor DTS_next_AU fields are present. This field shall not be set to '1' in Transport Stream packets in which the splicing_point_flag is not set to '1'. Once it is set to '1' in a Transport Stream packet in which the splice_countdown is positive, it shall be set to '1' in all the subsequent Transport Stream packets of the same PID that have the splicing_point_flag set to ‘1’, until the packet in which the splice_countdown reaches zero (including this packet). When this flag is set, if the elementary stream carried in this PID is an audio stream, the splice_type field shall be set to 0000. If the elementary stream carried in this PID is a video stream, it shall fulfill the constraints indicated by the splice_type value.
ltw_valid_flag(legal time window_valid_flag) -- This is a 1 bit field which when set '1' indicates that the value of the ltw_offset shall be valid. A value of '0' indicates that the value in the ltw_offset field is undefined.
ltw_offset (legal time window offset) -- This is a 15 bit field, the value of which is defined only if the ltw_valid flag has a value of ë1í. When defined, the legal time window offset is in units of (300/fs) seconds, where fs is the system clock frequency of the program that this PID belongs to, and fulfills:
offset = t1(i) - t(i),
ltw_offset = offset//1
where i is the index of the first byte of this Transport Stream packet, offset is the value encoded in this field, t(i) is the arrival time of byte i in the T-STD, and t1(i) is the upper bound in time of a time interval called the Legal Time Window which is associated with this Transport Stream packet.
The Legal Time Window has the property that if this Transport Stream is delivered to a T STD starting at time t1(i), i.e. at the end of its Legal Time Window, and all other Transport Stream packets of the same program are delivered at the end of their Legal Time Windows, then


  1. for video: the MBn buffer for this PID in the T-STD shall contain less than 184 bytes of elementary stream data at the time the first byte of the payload of this Transport Stream packet enters it, and no buffer violations in the T-STD shall occur.




  1. for audio: the Bn buffer for this PID in the T-STD shall contain less than BSdec + 1 bytes of elementary stream data at the time the first byte of this Transport Stream packet enters it, and no buffer violations in the T-STD shall occur.

Depending on factors including the size of the buffer MBn and the rate of data transfer between MBn and EBn, it is possible to determine another time t0(i), such that if this packet is delivered anywhere in the interval [t0(i), t1(i)], no T-STD buffer violations will occur. This time interval is called the Legal Time Window. The value of t0 is not defined in this Recommendation†|†International Standard.


The information in this field is intended for devices such as remultiplexers which may need this information in order to reconstruct the state of the buffers MBn.
piecewise_rate -- The meaning of this 22 bit field is only defined when both the ltw_flag and the ltw_valid_flag are set to ë1í. When defined, it is a positive integer specifying a hypothetical bitrate R which is used to define the end times of the Legal Time Windows of Transport Stream packets of the same PID that follow this packet but do not include the legal_time_window_offset field.
Assume that the first byte of this Transport Stream packet and the N following Transport Stream packets of the same PID have indices Ai, Ai+1, ..., Ai+N, respectively, and that the N latter packets do not have a value encoded in the field legal_time_window_offset. Then the values t1(Ai+j) shall be determined by
t1(Ai+j) = t1(Ai) + j*188*8 bits/byte /R,
where j goes from 1 to N.
All packets between this packet and the next packet of the same PID to include a legal_time_window_offset field shall be treated as if they had the value
offset = t1(Ai) - t(Ai),
corresponding to the value t1(.) as computed by the formula above encoded in the legal_time_window_offset field. t(j) is the arrival time of byte j in the T-STD.
The meaning of this field is not defined when it is present in a Transport Stream packet with no legal_time_window_offset field.
splice_type -- This is a 4 bit field. From the first occurrence of this field onwards, it shall have the same value in all the subsequent Transport Stream packets of the same PID in which it is present, until the packet in which the splice_countdown reaches zero (including this packet). If the elementary stream carried in that PID is an audio stream, this field shall have the value 0000. If the elementary stream carried in that PID is a video stream, this field indicates the conditions that shall be respected by this elementary stream for splicing purposes. These conditions are defined as a function of profile, level and splice_type in table 2-7 on page 30 through table 2-16 on page 32 below.
In these tables, a value for 'splice_decoding_delay' and 'max_splice_rate' means that the following conditions shall be satisfied by the video elementary stream:
1. The last byte of the coded picture ending in the Transport Stream packet in which the splice_countdown reaches zero shall remain in the VBV buffer of the VBV model for an amount of time equal to (splice_decoding_delay tn+1 - tn), where for the purpose of this clause:


  1. n is the index of the coded picture ending in the Transport Stream packet in which the splice_countdown reaches zero, i.e. the coded picture referred to above.

  2. tn is defined in C.3.1 of Annex C of ITU T Rec. H.262 | ISO/IEC 13818 2

  3. (tn+1 - tn) is defined in C.9 through C.12 of Annex C of ITU T Rec. H.262 | ISO/IEC 13818-2.


Note - tn is the time when coded picture n is removed from the VBV buffer, and (tn+1 - tn) is the duration for which picture n is presented.
2. The VBV buffer of the VBV model shall not overflow if its input is switched at the splicing point to a stream of a constant rate equal to 'max_splice_rate' for an amount of time equal to 'splice_decoding_delay'.


Table 2-7 -- Splice parameters table 1

Simple Profile Main Level, Main Profile Main Level, SNR Profile Main Level (both layers), Spatial Profile High-1440 Level (base layer), High Profile Main Level (middle + base layers)
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 15.0 x 106 bit/s

0001

splice_decoding_delay = 150 ms ; max_splice_rate = 12.0 x 106 bit/s

1100-1111



user-defined





Table 2-8 -- Splice parameters table 2

Main Profile Low Level, SNR Profile Low Level (both layers), High Profile MainLevel (base layer) Video
splice_type

conditions

0000

splice_decoding_delay = 115 ms ; max_splice_rate = 4.0 x 106 bit/s

0001

splice_decoding_delay = 155 ms ; max_splice_rate = 3.0 x 106 bit/s

1100-1111



user-defined





Table 2-9 -- Splice parameters table 3

Main Profile High-1440 Level, Spatial Profile High-1440 Level (all layers), High Profile High-1440 Level (middle + base layers) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 60.0 x 106 bit/s

0001

splice_decoding_delay = 160 ms ; max_splice_rate = 45.0 x 106 bit/s

1100-1111



user-defined





Table 2-10 --Splice parameters table 4

Main Profile High Level, High Profile High-1440 Level (all layers), High Profile High Level (middle + base layers) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 80.0 x 106 bit/s

0001

splice_decoding_delay = 160 ms ; max_splice_rate = 60.0 x 106 bit/s

1100-1111



user-defined





Table 2-11 -- Splice parameters table 5

SNR Profile Low Level (base layer) Video
splice_type

conditions

0000

splice_decoding_delay = 115 ms ; max_splice_rate = 3.0 x 106 bit/s

0001

splice_decoding_delay = 175 ms ; max_splice_rate = 2.0 x 106 bit/s

1100-1111



user-defined





Table 2-12 -- Splice parameters table 6

SNR Profile Main Level (base layer) Video
splice_type

conditions

0000

splice_decoding_delay = 115 ms ; max_splice_rate = 10.0 x 106 bit/s

0001

splice_decoding_delay = 145 ms ; max_splice_rate = 8.0 x 106 bit/s

1100-1111



user-defined





Table 2-13 -- Splice parameters table 7

Spatial Profile High-1440 Level (middle + base layers) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 40.0 x 106 bit/s

0001

splice_decoding_delay = 160 ms ; max_splice_rate = 30.0 x 106 bit/s

1100-1111



user-defined





Table 2-14 -- Splice parameters table 8

High Profile Main Level (all layers), High Profile High-1440 Level (base layer) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 20.0 x 106 bit/s

0001

splice_decoding_delay = 160 ms ; max_splice_rate = 15.0 x 106 bit/s

1100-1111



user-defined





Table 2-15 -- Splice parameters table 9

High Profile High Level (base layer) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 25.0 x 106 bit/s

0001

splice_decoding_delay = 165 ms ; max_splice_rate = 18.0 x 106 bit/s

1100-1111



user-defined





Table 2-16 -- Splice parameters table 10

High Profile High Level (all layers) Video
splice_type

conditions

0000

splice_decoding_delay = 120 ms ; max_splice_rate = 100.0 x 106 bit/s

0001

splice_decoding_delay = 160 ms ; max_splice_rate = 75.0 x 106 bit/s

1100-1111



user-defined


DTS_next_AU (decoding time stamp next access unit) -- This is a 33 bit field, coded in three parts. In the case of continuous and periodic decoding through this splicing point it indicates the decoding time of the first access unit following the splicing point.. This decoding time is expressed in the time base which is valid in the Transport Stream Packet in which the splice_countdown reaches zero. From the first occurrence of this field onwards, it shall have the same value in all the subsequent Transport Stream packets of the same PID in which it is present, until the packet in which the splice_countdown reaches zero (including this packet).
stuffing_byte -- This is a fixed 8-bit value equal to '1111 1111' that can be inserted by the encoder. It is discarded by the decoder.

2.4.3.6 PES packet



Table 2-17 -- PES packet

Syntax

No. of Bits

Mnemonic

PES_packet() {







packet_start_code_prefix

24

bslbf

'10'


2

bslbf

}










2.4.3.7 Semantic definition of fields in PES packet



packet_start_code_prefix -- The packet_start_code_prefix is a 24-bit code. Together with the stream_id that follows it constitutes a packet start code that identifies the beginning of a packet. The packet_start_code_prefix is the bit string '0000 0000 0000 0000 0000 0001' (0x000001).
stream_id -- In Program Streams, the stream_id specifies the type and number of the elementary stream as defined by the stream_id table 2-18. In Transport Streams, the stream_id may be set to any valid value which correctly describes the elementary stream type as defined in table 2-18. In Transport Streams, the elementary stream type is specified in the Program Specific Information as specified in 2.4.4 on page 44.
Table 2-18 -- Stream_id assignments

stream_id

Note

stream coding

1011 1100

1

program_stream_map

1011 1101

2

private_stream_1

1111 1111



4

program_stream_directory

The notation x means that the value '0' or '1' are both permitted and results in the same stream type. The stream number is given by the values taken by the x's.

Note 1: PES packets of type program_stream_directory have unique syntax specified in 2.5.4.1 on page 63.

Note 2: PES packets of type private_stream_1 and ISO/IEC_13552_stream follow the same PES packet syntax as those for ITU T Rec. H.262†|†ISO/IEC 13818-2 video and ISO/IEC 13818-3 audio streams.

Note 3: PES packets of type private_stream_2, ECM_stream and EMM_stream are similar to private_stream_1 except no syntax is specified after PES_packet_length field.

Note 4: PES packets of type program_stream_directory have a unique syntax specified in 2.5.5 on page 64.

Note 5: PES packets of type DSM-CC_stream have a unique syntax specified in ISO/IEC 13818- 6.

Note 6: This stream_id is associated with stream_type 0x09 in table 2-29 on page 51.

Note 7. This stream_id is only used in PES packets which carry data from a Program Stream or an ISO/IEC 11172-1 System Stream in a Transport Stream. Refer to 2.4.3.7 on page 35.




PES_packet_length -- A 16 bit field specifying the number of bytes in the PES packet following the last byte of the field. A value of 0 indicates that the PES packet length is neither specified nor bounded and is allowed only in PES packets whose payload consists of bytes from a video elementary stream contained in Transport Stream packets.
PES_scrambling_control -- The 2 bit PES_scrambling_control field indicates the scrambling mode of the PES packet payload. When scrambling is performed at the PES level, the PES packet header, including the optional fields when present, shall not be scrambled.



Table 2-19 -- PES scrambling control values
Value

Description

00

not scrambled

01

user defined

11


user defined


PES_priority -- This is a 1 bit field indicating the priority of the payload in this PES packet. A '1' indicates a higher priority of the payload of the PES packet payload than a PES packet payload with this field set to '0'. A multiplexor can use the PES_priority bit to prioritize its data within an elementary stream. This field shall not be changed by the transport mechanism.
data_alignment_indicator -- This is a 1 bit flag. When set to a value of '1' it indicates that the PES packet header is immediately followed by the video start code or audio syncword indicated in the data_stream_alignment_descriptor in 2.6.10 on page 72 if this descriptor is present. If set to a value of '1' and the descriptor is not present, alignment as indicated in alignment_type '01' in table 2-47 on page 72 and table 2-48 on page 72 is required. When set to a value of '0' it is not defined whether any such alignment occurs or not.
copyright -- This is a 1 bit field. When set to '1' it indicates that the material of the associated PES packet payload is protected by copyright. When set to '0' it is not defined whether the material is protected by copyright. A copyright descriptor described in 2.6.8 on page 71 is associated with the elementary stream which contains this PES packet and the copyright flag is set to '1' the descriptor applies to the material contained in this PES packet.
original_or_copy -- This is a 1 bit field. When set to '1' the contents of the associated PES packet payload is an original. When set to '0' it indicates that the contents of the associated PES packet payload is a copy.
PTS_DTS_flags -- This is a 2 bit field. When the PTS_DTS_flags field is set to '10', the PTS fields shall be present in the PES packet header. When the PTS_DTS_flags field is set to '11', both the PTS fields and DTS fields shall be present in the PES packet header. When the PTS_DTS_flags field is set to '00' no PTS or DTS fields shall be present in the PES packet header. The value '01' is forbidden.
ESCR_flag -- A 1 bit flag, which when set to '1' indicates that ESCR base and extension fields are present in the PES packet header. When set to '0' it indicates that no ESCR fields are present.
ES_rate_flag -- A 1 bit flag, which when set to '1' indicates that the ES_rate field is present in the PES packet header. When set to '0' it indicates that no ES_rate field is present.
DSM_trick_mode_flag -- A 1 bit flag, which when set to '1' it indicates the presence of an 8 bit trick mode field. When set to '0' it indicates that this field is not present.
additional_copy_info_flag -- A 1 bit flag, which when set to '1' indicates the presence of the additional_copy_info field. When set to '0' it indicates that this field is not present.
PES_CRC_flag -- A 1 bit flag, which when set to '1' indicates that a CRC field is present in the PES packet. When set to '0' it indicates that this field is not present.
PES_extension_flag -- A 1 bit flag, which when set to '1' indicates that an extension field exists in this PES packet header. When set to '0' it indicates that this field is not present.
PES_header_data_length -- An 8 bit field specifying the total number of bytes occupied by the optional fields and any stuffing bytes contained in this PES packet header. The presence of optional fields is indicated in the byte that precedes the PES_header_data_length field.
marker_bit -- A marker_bit is a 1 bit field that has the value '1'.
PTS (presentation time stamp) -- Presentation times shall be related to decoding times as follows:

The PTS is a 33 bit number coded in three separate fields. It indicates the time of presentation, tpn(k), in the system target decoder of a presentation unit k of elementary stream n. The value of PTS is specified in units of the period of the system clock frequency divided by 300 (yielding 90 kHz). The presentation time is derived from the PTS according to equation 2-11 below. Refer to 2.7.4 on page 81 for constraints on the frequency of coding presentation timestamps.


(2-11)

where


tpn(k) is the presentation time of presentation unit Pn(k).
In the case of audio, if a PTS is present in PES packet header it shall refer to the first access unit commencing in the PES packet. An audio access unit commences in a PES packet if the first byte of the audio access unit is present in the PES packet
In the case of video, if a PTS is present in a PES packet header it shall refer to the access unit containing the first picture start code that commences in this PES packet. A picture start code commences in PES packet if the first byte of the picture start code is present in the PES packet.
For audio presentation units (PUs), video PUs in low_delay sequences, and B-pictures, the presentation time tpn(k) shall be equal to the decoding time tdn(k).
For I and P pictures in non-low_delay sequences and in the case when there is no decoding discontinuity between access units (AUs) k and k', the presentation time tpn(k) shall be equal to the decoding time tdn(k') of the next transmitted I or P picture (refer to 2.7.5 on page 82). If there is a decoding discontinuity, or the stream ends, the difference between tpn(k) and tdn(k) shall be the same as if the original stream had continued without a discontinuity and without ending.
Note - A low_delay sequence is a video sequence in which the low_delay flag is set (refer to 6.2.2.3 of ITU T Rec. H.262†|†ISO/IEC 13818-2).
If there is filtering in audio, it is assumed by the system model that filtering introduces no delay, hence the sample referred to by PTS at encoding is the same sample referred to by PTS at decoding. In the case of scalable coding refer to 2.7.6 on page 82.
DTS (decoding time stamp) -- The DTS is a 33 bit number coded in three separate fields. It indicates the decoding time, tdn(j), in the system target decoder of an access unit j of elementary stream n. The value of DTS is specified in units of the period of the system clock frequency divided by 300 (yielding 90 kHz). The decoding time derived from the DTS according to equation 2-12 below.
(2-12)

where


tdn(j) is the decoding time of access unit An(j).
In the case of video, if a DTS is present in a PES packet header it shall refer to the access unit containing the first picture start code that commences in this PES packet. A picture start code commences in PES packet if the first byte of the picture start code is present in the PES packet.
In the case of scalable coding refer to 2.7.6 on page 82.
ESCR_base; ESCR_extension --The elementary stream clock reference is a 42 bit field coded in two parts. The first part, ESCR_base, is a 33 bit field whose value is given by ESCR_base(i), as given in equation 2-14. The second part, ESCR_ext, is a 9 bit field whose value is given by ESCR_ext(i), as given in equation 2-15. The ESCR field indicates the intended time of arrival of the byte containing the last bit of the ESCR_base at the input of the PES-STD for PES streams (refer to 2.5.2.4 on page 57).
Specifically:
(2-13)
where

(2-14)



(2-15)

The ESCR and ES_rate field (refer to semantics immediately following) contain timing information relating to the sequence of PES streams. These fields shall satisfy the constraints defined in 2.7.3 on page 81.


ES_rate (elementary stream rate ) -- The ES_rate field is a 22 bit unsigned integer specifying the rate at which the system target decoder receives bytes of the PES packet in the case of a PES stream. The ES_rate is valid in the PES packet in which it is included and in subsequent PES packets of the same PES stream until a new ES_rate field is encountered. The value of the ES_rate is measured in units of 50 bytes/second. The value 0 is forbidden. The value of the ES_rate is used to define the time of arrival of bytes at the input of a P STD for PES streams defined in clause 2.5.2.4 on page 57 of this Specification. The value encoded in the ES_rate field may vary from PES_packet to PES_packet.
trick_mode_control -- A 3 bit field that indicates which trick mode is applied to the associated video stream. In cases of other types of elementary streams, the meanings of this field and those defined by the following five bits are undefined. For the definition of trick_mode status, refer to the trick mode section of 2.4.2.3 on page 15
When trick_mode status is false, the number of times, N, a picture is output by the decoding process for progressive sequences is specified for each picture by the repeat_first_field and top_field_first fields in the case of ITU T Rec. H.262†|†ISO/IEC 13818-2 Video, and is specified through the sequence header in the case of ISO/IEC 11172-2 Video.
For interlaced sequences, when trick_mode status is false, the number of times, N, a picture is output by the decoding process for is specified for each picture by the repeat_first_field and progressive_frame fields in the case of ITU T Rec. H.262†|†ISO/IEC 13818-2 Video.
When trick mode status is true, the number of times that a picture shall be displayed depends on the value of N.
When the value of this field changes or trick mode operations cease any combination of the following may occur:


  1. discontinuity in the time base

  2. decoding discontinuity

  3. continuity counter discontinuity





Table 2-20 -- Trick mode control values
value

description

'000'

fast forward

'001'

slow motion

'101'-'111'



reserved

In the context of trick mode, the non-normal speed of decoding and presentation may cause the values of certain fields defined in video elementary stream data to be incorrect. Likewise, the semantic constraint on the slice structure may be invalid. The video syntax elements to which this exception applies are:




  1. bit_rate

  2. vbv_delay

  3. repeat_first_field

  4. v_axis_positive

  5. field_sequence

  6. subcarrier

  7. burst_amplitude

  8. subcarrier_phase

A decoder cannot rely on the values encoded in these fields when in trick mode.


Decoders are not normatively required to decode the trick_mode_control field. However, the following normative requirements shall apply to decoders that do decode the trick_mode_control field.
fast forward -- the value '000', in the trick_mode_control field. When this value is present it indicates a fast forward video stream and defines the meaning of the following five bits in the PES packet header. The intra_slice_refresh bit may be set to '1' indicating that there may be missing macroblocks which the decoder may replace with co-sited macroblocks of previously decoded pictures. The field_id field, defined in table 2-21 on page 41, indicates which field or fields should be displayed. The frequency_truncation field indicates that a restricted set of coefficients may be included. The meaning of the values of this field are shown in table 2-22 on page 41.
slow motion -- the value '001', in the trick_mode_control field. When this value is present it indicates a slow motion video stream and defines the meaning of the following five bits in the PES packet header. In the case of progressive sequences, the picture should be displayed N†*†rep_cntrl times, where N is defined above.
In the case of ISO/IEC 11172-2 Video and ITU T Rec. H.262†|†ISO/IEC 13818-2 Video progressive sequences, the picture should be displayed for N†*†rep_cntrl picture duration.

In the case of ITU T Rec. H.262†|†ISO/IEC 13818-2 interlaced sequences, the picture should be displayed for N†*†rep_cntrl field duration. If the picture is a frame picture, the first field to be displayed is the top field if top_field_first is 1, and the bottom field if top_field_first is ë0í (refer to ITU T Rec. H.262†|†ISO/IEC 13818-2). This field is displayed for N†*†rep_cntrl†/†2 field duration. The other field of the picture is then displayed for N - N†*†rep_cntrl†/†2 field duration.


freeze frame -- the value '010', in the trick_mode_control field. When this value is present it indicates a freeze frame video stream and defines the meaning of the following five bits in the PES packet header. The field_id field, defined in table 2-21, identifies which field(s) should be displayed. The field_id field refers to the first video access unit that commences in the PES packet which contains the field_id field, unless the PES packet contains zero payload bytes. In the latter case the field_id field refers to the most recent previous video access unit.
fast reverse -- the value '011', in the trick_mode_control field. When this value is present it indicates a fast reverse video stream and defines the meaning of the following five bits in the PES packet header. The intra_slice_refresh bit may be set to '1' indicating that there may be missing macroblocks which the decoder may replace with co-sited macroblocks of previously decoded pictures. The field_id field, defined in table 2-21 , indicates which field or fields should be displayed. The frequency_truncation field indicates that a restricted set of coefficients may be included. The meaning of the values of this field are shown in table 2-22, "Coefficient selection values".
slow reverse -- the value '100', in the trick_mode_control field. When this value is present it indicates a slow reverse video stream and defines the meaning of the following five bits in the PES packet header. In the case of ISO/IEC 11172-2 Video and ITU T Rec. H.262†|†ISO/IEC 13818-2 Video progressive sequences, the picture should be displayed for N†*†rep_cntrl picture duration, where N is defined above.
In the case of ITU T Rec. H.262†|†ISO/IEC 13818-2 interlaced sequences, the picture should be displayed for N†*†rep_cntrl field duration. If the picture is a frame picture, the first field to be displayed is the bottom field if top_field_first is 1, and the top field if top_field_first is ë0í (refer to ITU T Rec. H.262†|†ISO/IEC 13818-2). This field is displayed for N†*†rep_cntrl†/†2 field duration. The other field of the picture is then displayed for N - N†*†rep_cntrl†/†2 field duration.
field_id -- A 2 bit field that indicates which field(s) should be displayed. It is coded according to table 2-21.



Table 2-21 -- Field_id field control values
value

description

'00'

display from top field only

'01'

display from bottom field only

'11'


reserved


intra_slice_refresh -- A 1 bit flag., which when set to '1', indicates that there may be missing

macroblocks between coded slices of video data in this PES packet. When set to '0' this may not occur. For more information see ITU T Rec. H.262†|†ISO/IEC 13818-2. The decoder may replace missing macroblocks with co-sited macroblocks of previously decoded pictures.


frequency_truncation -- A 2 bit field which indicates that a restricted set of coefficients may have been used in coding the video data in this PES packet. The values are defined in table 2-22.


Table 2-22 -- Coefficient selection values
value

description

'00'

Only DC coefficients are non-zero

'01'

Only the first three coefficients are non-zero

'11'


all coefficients may be non-zero


rep_cntrl -- A 5 bit field that indicates the number of times each field in an interlaced picture should be displayed, or the number of times that a progressive picture should be displayed. It is a function of the trick_mode_control field and the top_field_first bit in the video sequence header whether the top field or the bottom field should be displayed first in the case of interlaced pictures. The value '0' is forbidden.
additional_copy_info -- This 7 bit field contains private data relating to copyright information.
previous_PES_packet_CRC -- The previous_PES_packet_CRC is a 16 bit field that contains the CRC value that yields a zero output of the 16 registers in the decoder similar to the one defined in Annex B, but with the polynomial
x16+x12+x5+1
after processing the data bytes of the previous PES packet, exclusive of the PES packet header.
Note: This CRC is intended for use in network maintenance such as isolating the source of intermittent errors. It is not intended for use by elementary stream decoders. It is calculated only over the data bytes because PES packet header data can be modified during transport.
PES_private_data_flag -- A 1 bit flag which when set to '1' indicates that the PES packet header contains private data. When set to a value of '0' it indicates that private data is not present in the PES header.
pack_header_field_flag -- A 1 bit flag which when set to '1' indicates that an ISO/IEC 11172-1 pack header or a Program Stream pack header is stored in this PES packet header. If this field is in a PES packet that is contained in a Program Stream, then this field shall be set to '0'. In a Transport Stream, when set to the value '0' it indicates that no pack header is present in the PES header.
program_packet_sequence_counter_flag -- A 1 bit flag which when set to '1' indicates that the program_packet_sequence_counter, MPEG1_MPEG2_identifier, and original_stuff_length fields are present in this PES packet. When set to a value of '0' it indicates that these fields are not present in the PES header.
P STD_buffer_flag -- A 1 bit flag which when set to '1' indicates that the P STD_buffer_scale and P STD_buffer_size are present in the PES packet header. When set to a value of '0' it indicates that these fields are not present in the PES header.
PES_extension_flag_2 -- A 1 bit field which when set to '1' indicates the presence of the PES_extension_field_length field and associated fields. When set to a value of '0' this indicates that the PES_extension_field_length field and any associated fields are not present.
PES_private_data -- This is a 16 byte field which contains private data. This data, combined with the fields before and after, shall not emulate the packet_start_code_prefix (0x000001).
pack_field_length -- This is an 8 bit field which indicates the length, in bytes, of the pack_header_field().
program_packet_sequence_counter -- The program_packet_sequence_counter field is an 7 bit field. It is an optional counter that increments with each successive PES packet from a Program Stream or from an ISO/IEC 11172-1 Stream or the PES packets associated with a single program definition in a Transport Stream, providing functionality similar to a continuity counter (refer to 2.4.3.2 on page 21). This allows an application to retrieve the original PES packet sequence of a Program Stream or the original packet sequence of the original ISO/IEC 11172-1 stream. The counter will wrap around to 0 after its maximum value. Repetition of PES packets shall not occur. Consequently, no two consecutive PES packets in the program multiplex shall have identical program_packet_sequence_counter values.
MPEG1_MPEG2_identifier -- A 1 bit flag which when set to '1' indicates that this PES packet carries information from an ISO/IEC 11172-1 stream. When set to '0' it indicates that this PES packet carries information from a Program Stream.
original_stuff_length -- This 6 bit field specifies the number of stuffing bytes used in the original ITU T Rec. H.222.0†|†ISO/IEC 13818-1 PES packet header or in the original ISO/IEC 11172-1 packet header.
P STD_buffer_scale -- The P STD_buffer_scale is a 1 bit field, the meaning of which is only defined if this PES packet is contained in a Program Stream. It indicates the scaling factor used to interpret the subsequent P STD_buffer_size field. If the preceding stream_id indicates an audio stream, P STD_buffer_scale shall have the value '0'. If the preceding stream_id indicates a video stream, P STD_buffer_scale shall have the value '1'. For all other stream types, the value may be either '1' or '0'.
P STD_buffer_size --The P STD_buffer_size is a 13-bit unsigned integer, the meaning of which is only defined if this PES packet is contained in a Program Stream. It defines the size of the input buffer, BSn, in the P STD. If P STD_buffer_scale has the value '0' then the P STD_buffer_size measures the buffer size in units of 128 bytes. If P STD_buffer_scale has the value '1' then the P STD_buffer_size measures the buffer size in units of 1 024 bytes. Thus:
if (P STD_buffer_scale == 0)

; (2-16)

else

; (2-17)


The encoded value of the P STD buffer size takes effect immediately when the P STD_buffer_size field is received by the ITU T Rec. H.222.0†|†ISO/IEC 13818 System Target Decoder. Refer to 2.7.7 on page 83.


PES_extension_field_length -- This is a 7 bit field which specifies the length, in bytes, of the data following this field in the PES extension field up to and including any reserved bytes.
stuffing_byte -- This is a fixed 8-bit value equal to '1111 1111' that can be inserted by the encoder, for example to meet the requirements of the channel. It is discarded by the decoder. No more than 32 stuffing bytes shall be present in one PES packet header.
PES_packet_data_byte -- PES_packet_data_bytes shall be contiguous bytes of data from the elementary stream indicated by the packet's stream_id or PID. When the elementary stream data conforms to ITU T Rec. H.262†|†ISO/IEC 13818-2 or ISO/IEC 13818-3, the PES_packet_data_bytes shall be byte aligned to the bytes of ITU T Rec. H.222.0†|†ISO/IEC 13818-1. The byte-order of the elementary stream shall be preserved. The number of PES_packet_data_bytes, N, is specified by the PES_packet_length field. N shall be equal to the value indicated in the PES_packet_length minus the number of bytes between the last byte of the PES_packet_length field and the first PES_packet_data_byte.
In the case of a private_stream_1, private_stream_2, ECM_stream, or EMM_stream, the contents of the PES_packet_data_byte field is user definable and will not be specified by ITU T†|†ISO/IEC in the future.
padding_byte -- This is a fixed 8 bit value equal to '1111 1111'. It is discarded by the decoder.

2.4.3.8 Carriage of Program Streams and ISO/IEC 11172-1 Systems streams in the Transport Stream

The Transport Stream contains optional fields to support the carriage of Program Streams and ISO/IEC 11172-1 Systems streams, in a way that allows simple reconstruction of the respective stream at the decoder.


When placing a Program Stream into a Transport Stream, Program Stream PES packets with stream_id values of private_stream_1, ITU T Rec. H.262†|†ISO/IEC 13818-2 or ISO/IEC 11172-2 video, and ISO/IEC 13818-3 or ISO/IEC 11172-3 audio, are carried in Transport Stream packets.
For these PES packets, when reconstructing the Program Stream at the Transport Stream decoder, the PES packet data is copied to the Program Stream being reconstructed.
For Program Streams PES packets with stream_id values of program_stream_map, padding_stream, private_stream_2, ECM, EMM, DSM_CC_stream, or program_stream_directory, all the bytes of the Program Stream PES packet, except for the packet_start_code_prefix, are placed into the data_bytes fields of a new PES packet. The stream_id of this new PES packet has the value of ancillary_stream. Refer to table 2-18 on page 36. This new PES packet is then carried in Transport Stream packets.
When reconstructing the Program Stream at the Transport Stream decoder, for PES packets with a stream_id value of ancillary_stream_id, packet_start_code_prefix is written to the Program Stream being reconstructed, followed by the data_byte fields from these Transport Stream PES packets.
ISO/IEC 11172-1 streams are carried within Transport Streams by first replacing ISO/IEC 11172-1 packet headers with ITU T Rec. H.262†|†ISO/IEC 13818-1 PES packet headers. ISO/IEC 11172-1 packet header field values are copied to the equivalent ITU T Rec. H.262†|†ISO/IEC 13818-1 PES packet header fields.
The program_packet_sequence_counter field is included within the header of each PES packet carrying data from a Program Stream, or an ISO/IEC 11172-1 System stream. This allows the order of PES packets in the original Program Stream, or packets in the original ISO/IEC 11172-1 System stream, to be reproduced at the decoder.
The pack_header() field of a Program Stream, or an ISO/IEC 11172-1 System stream, is carried in the Transport Stream in the header of the immediately following PES packet.

1   ...   7   8   9   10   11   12   13   14   ...   23


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©atelim.com 2016
rəhbərliyinə müraciət