ATSC vs NTSC Spectrum ATSC 8VSB Data Framing 22
ATSC 8VSB Data Segment ATSC 8VSB Data Field 23
ATSC 8VSB (AM) Modulated Baseband ATSC 8VSB Pre-Filtered Spectrum 24
ATSC 8VSB Nyquist Filtered Spectrum ATSC 8VSB Nyquist Filter Effects 25
ATSC 8VSB Symbol Pulse Contribution ATSC 8VSB Final RF Waveform 26
8VSB RF Waveform - Voltage 8VSB RF Waveform I/Q vs Time 27
8VSB RF Waveform I/Q vs Time 8VSB Error Vector Magnitude 28
8VSB RF Constellation 3% EVM 8VSB RF Constellation 5% EVM 29
8VSB RF Constellation 10% EVM 8VSB Eye Pattern 3% EVM 30
8VSB Eye Pattern 5% EVM 8VSB Eye Pattern 10% EVM 31
Agenda! ATV Review! DTV Overview! Transport Basics " Television Stuff A & V! Metadata PSI & PSIP! Amateur DTV MPEG-2 Video! 4:2:0 Chroma Subsampling! 16x16 Macroblocks " 4 8x8 Luma Blocks " 2 8x8 Chroma Blocks! Motion Estimation! Discrete Cosine Transform (DCT) " Coefficient Quantization " 1 DC Coefficient (DPCM Coded) " 63 AC Coefficients (Run-Length, Huffman Coded)! Intra-Frame Coding (I, P, B) 32
Video Formats! ATSC supports 18 different MPEG-2 video formats: " HDTV # 1080x1920 pixels; 60i, 30p, 24p; 16:9 aspect # 720x1280 pixels; 60p, 30p, 24p; 16:9 aspect " SDTV # 480x704 pixels; 60p, 60i, 30p, 24p; 16:9, 4:3 aspect # 480x640 pixels; 60p, 60i, 30p, 24p; 4:3 aspect! SCTE supports more video formats " SDTV # 480x528 pixels; 60i, 24p; 4:3 aspect # 480x352 Pixels; 60i, 24p; 4:3 aspect MPEG-2 Video Encoding! Video is sequence of frames.! Each frame is encoded in one of three ways: " I-picture: intra-picture encoding, similar to jpeg encoding (exploiting spatial redundancy). " B-picture: bi-directional encoding, using motion adjusted deltas from a previous and a future frame (exploiting temporal redundancy). " P-picture: predictive encoding, using motion adjusted deltas from a previous reference frame (exploiting temporal redundancy). 33
MPEG-2 Video Encoding (Contd.) Example 1. Panning Camera I-picture B-picture I-picture Example 2. Moving Object I-picture B-picture I-picture MPEG Intra-Frame Coding 34
YPbPr Color Space ITU BT.601 (SDTV) ITU BT.709 (HDTV) YCbCr Color Space 35
Chroma Subsampling 4:2:0 Sample Positions 36
MPEG-2 Video Encoding (Contd.)! Encoder emits sequence of encoded frames.! Sizes of encoded frames vary.! Encoded frames are packed into packetized elementary stream (PES) packets.! PES packets are packed into MPEG-2 transport packets. (All packets for single video stream have same PID value.)! Overall compression ratio is 50:1 or more.! Closed captioning associated with video frame is encoded here ATSC/SCTE Audio Formats! ATSC uses AC-3 audio encoding, with up to 6 audio channels: left, right, center, left surround, right surround, low frequency enhancement.! The full set is often called 5.1 audio.! The sampling rate is always 48 khz.! The encoded bit rate may be up to 384 kbps. 37
AC-3 Audio Encoding! Audio frames, each 32 milliseconds in length, are encoded.! Encoded frame size depends only on bitrate.! Encoded frames are packed into packetized elementary stream (PES) packets.! PES packets are packed into MPEG-2 transport packets. (All packets for single audio stream have same PID value.) Audio-Video Synchronization! Audio, video are encoded independently, must be synchronized during play.! MPEG has to allow for great distances between the Encoder and Decoder, and still allow for Correct Decode of the transport stream 38
How to Assure Audio/Video Sync?! In order for the audio and video Elementary Streams to remain in Sync, the Encoder Clock and the Decoder Clock must remain in sync! The next few slides will demonstrate how this happens and what components to check when it fails Encoder Inserts PCR! When the encoder streams creates packets, it embeds the current value of it s 27 MHz clock into the stream! This time reference is called the PCR: Program Clock Reference! MPEG demands that one PCR packet appear in the stream every 100ms Encoder 27Mhz Clock MPEG Packets MPEG Packet with PCR Stamp 39
Decoder Consumes PCR! When the decoder gets a packet containing a PCR timestamp, it adjusts it s 27Mhz clock accordingly MPEG Packets Decoder 27Mhz Clock Adjusts value of counter based on incoming PCR Packet PCR Timestamp Issue! What could conceptually cause PCR timestamp issues? " Encoder possibly time stamped incorrectly " Decoder possibly failed to consume time stamps " PCR packet was accidentally lost in transmission! When PCR time stamps go awry, we have PCR jitter 40
PCR Jitter Defined PCR Jitter is:! Difference between the Actual Value of the PCR time stamped by encoder and the Expected Value of the PCR as calculated by decoder based on the clock rate and the time at which the PCR value is received.! PCR Jitter spec: 500ns PCR Rate (Frequency) Offset PCR Frequency Offset is:! Difference between the clock frequency calculated at decoder based on actual PCR values received and an ideal 27 MHz clock, which is the clock rate dictated by the MPEG-2 standard! PCR Frequency Offset Spec: +/- 810 Hz 41
PCR Intervals, Jitter and Rate PCR spec summary:! Transmit interval: 100 ms! Jitter: no more than 500 ns! Rate: 27 MHz +/- 810 Hz! Most streams seen in the field are compliant, but every now and then extreme jitter shows up. PCR Timestamp Issue (Contd.)! What in your network facility could cause PCR timestamp issues?! Three of the most common are: "! It can happen any time you MUX streams " It can happen at the source encoding " It can happen on any IP link due to network lag 42
PCR Packet Spacing Before Muxing! Note the Number of Packets between each PCR packet in each Input Stream Video 0x31 Video 0x41 Video 0x51 Transport Stream Multiplexer PID Packet Spacing 0x31 2 Packets 0x41 1 Packet 0x51 0 Packets PCR Packet Spacing After Muxing! Note that the PCR packet spacing has changed! Video 0x31 Video 0x41 Video 0x51 Transport Stream Multiplexer PID Old Spacing New Spacing 0x31 2 Packets 8 Packets 0x41 1 Packet 5 Packets 0x51 0 Packets 2 Packets 43
Muxing Causes PCR Jitter! When we MUX multiple streams together, the spacing between the PCR packets in each stream CHANGES! The physical shift results in a TEMPORAL shift as well, throwing the time stamps off! The TEMPORAL shift in PCR values is referred to as PCR jitter Muxing Causes PCR Jitter (Contd.)! The MUX has to RESTAMP all the PCR values to correct for the change in the packet spacing THIS IS VERY HARD TO DO " The more services on the output, the harder it is to restamp " The fewer null packets at the output, the harder it is to restamp 44
PCR Timestamp Issue (Contd.)! What in your network facility could cause PCR timestamp issues?! Three of the most common are: " It can happen any time you MUX streams "! It can happen at the source encoding " It can happen on any IP link due to network lag PCR Jitter From Incorrect Encoding! If the MPEG encoder s parameters are set up incorrectly, you can introduce jitter at the source! This is relatively rare, however " If a national programmer sent it s stream up to the bird with jitter in it, the result would effect all receive sites! " Re-encoded streams at the headend may also create PCR jitter " Local broadcast streams could create PCR jitter at the encoder 45
PCR Timestamp Issue (Contd.)! What in your network facility could cause PCR timestamp issues?! Three of the most common are: " It can happen any time you MUX streams " It can happen at the source encoding "! It can happen on any IP link due to network lag The Encoder and Decoder Clock! The MPEG encoder and MPEG decoder use a 27Mhz clock to encode/decode incoming audio and video! The clock is actually a counter which advances every 1/27000000 seconds Encoder 27Mhz Clock Decoder 27Mhz Clock 1,2,3,4.. 1,2,3,4.. 46
Presentation Time Stamp -! Each Frame is marked with a Presentation Time Stamp a positive number! The value of the is set to the value of the Encoder Clock when the frame is encoded Encoder 27Mhz Clock MPEG Packets 1,2,3,4.. F1 500 F2 950 Packetizer Packets Assigned to Decode Buffer! As packets flow into the Decoder, a space in memory is set aside for them, one buffer for each PID. MPEG Packets Decoder 27Mhz Clock 1,2,3,4.. Buffer 1 Pid 0x31 Video Buffer 2 Pid 0x34 Audio 47
Reconstruction of Frames From Buffer! Packets form Video and Audio Frames in the buffer MPEG Packets Decoder 27Mhz Clock 1,2,3,4.. Buffer 1 Pid 0x31 Video F1 500 F2 675 F3 950 Buffer 2 Pid 0x34 Audio F1 200 F2 990 The Magic of Decode! When the value of the Decode clock MATCHES the on the frame, that frame is sent to the decode hardware MPEG Packets Decoder 27Mhz Clock = 200 Decode Hardware F1 200 Buffer 1 Pid 0x31 Video F1 500 F2 675 F3 950 Buffer 2 Pid 0x34 Audio F2 990 48
Another Frame Goes to Decode Hardware! Next Frame MPEG Packets Decoder 27Mhz Clock = 500 Decode Hardware F1 500 Buffer 1 Pid 0x31 Video F2 675 F3 950 Buffer 2 Pid 0x34 Audio F2 990 One More Frame Heads to Decode! And the next frame MPEG Packets Decoder 27Mhz Clock = 675 Decode Hardware F2 675 Buffer 1 Pid 0x31 Video F3 950 Buffer 2 Pid 0x34 Audio F2 990 49
Audio and Video Buffers! Receiver must buffer audio and video frame data until presentation time.! If data appears too late in the transport stream, buffer underflow results.! If data appears too early in the transport stream, buffer overflow results.! Either condition results in garbled play or incorrect synchronization.! Different set top boxes may respond differently to the same underlying buffer violations Summary: Audio/Video Sync! PCR values help the Encoder Clock and the Decoder Clock to remain in sync! PCR jitter can cause synchronization problems for elementary streams! Ensure " PCR jitter and frequency offsets are within standard limits " Elementary stream buffers limits are NOT violated! Large PCR jitter values can cause Lip sync error! Buffer over- or underflow problems may cause tiling, pixelization / macroblocking errors 50