1 1 Implementing the ATSC PSIP Standard Paul Freeman, SoftProse Inc. (www.softproseinc.com) 2 Tutorial Outline • Introduction • MPEG-2 Transport Stream Demultiplexing • The MPEG-2 PAT and PMT • The ATSC System Time Table • The ATSC Virtual Channel Table and Channel Navigation API • The ATSC Electronic Program Guide Tables • The ATSC Rating Region Table and Parental Control API • General Table Processing Guidelines • ATSC PSIP Work in Progress • Conclusions
34
Embed
Implementing the ATSC PSIP Standard - · PDF fileImplementing the ATSC PSIP Standard Paul Freeman, SoftProse Inc. ( ) 2 Tutorial Outline ... • The MPEG-2 PAT and PMT
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
1
Implementing the ATSC PSIPStandard
Paul Freeman, SoftProse Inc.(www.softproseinc.com)
2
Tutorial Outline
• Introduction• MPEG-2 Transport Stream Demultiplexing• The MPEG-2 PAT and PMT• The ATSC System Time Table• The ATSC Virtual Channel Table and Channel
Navigation API• The ATSC Electronic Program Guide Tables• The ATSC Rating Region Table and Parental
Control API• General Table Processing Guidelines• ATSC PSIP Work in Progress• Conclusions
• Carries audio, video, and data for one or morechannels from a single frequency
• Formatted as a multiplexed sequence of fixedsize (188 byte) packets
• Each packet will contain data from one of thefollowing sources:– A video packetized elementary stream– An audio packetized elementary stream– A table defined by the MPEG-2 standard– A table defined by the ATSC-PSIP standard
6
Transport StreamPacketizer
Transport StreamPacketizer
Transport StreamPacketizer
Audio PES
Video PES
Tables specificto this channel
Transport StreamPacketizer
Transport StreamPacketizer
Transport StreamPacketizer
Audio PES
Video PES
Tables specificto this channel
MUX
Channel xChannel x
Channel yChannel y
Transport StreamPacketizer
Transport StreamPacketizer
Tables specificto this
frequency
4
7
Transport Stream Packets
• Important fields in the packet header:– Sync byte - 8 bit fixed pattern at start of
header– Packet ID (PID) - 13 bits used to identify
type of packet– Payload Unit Start Indicator - 1 bit flag
indicates a new PES packet or table sectionbegins in this transport stream packet
HDRHDR DATADATA
1844
8
Table Packetization
• The MPEG-2 standard defines 3 tables, andthe ATSC-PSIP standard defines 6.
• Each table is transmitted in one or morevariable length “sections”.
• Each section is transmitted in one or moreMPEG-2 transport stream packets.
• The MPEG-2 transport demultiplexor ICdemultiplexes packets based on the packet ID.
• Sections from different tables may share thesame packet ID.
5
9
The Payload Unit Start Indicatorfor Table Sections
Payload Unit Start Indicator Bit in Header = 0
HDR SECTION PAYLOAD
4 184
Payload Unit Start Indicator Bit in Header = 1
HDR
4 183PPTTRR
PREVIOUS SECTIONPAYLOAD
NEW SECTIONPAYLOAD
10
HDRHDR PAYLOADPAYLOAD HDRHDR PAYLOADPAYLOAD
MPEG-2 or...MPEG-2 or...
HDRHDR PPPP PAYLOADPAYLOAD
Payload Unit Start IndicatorExample
Payload
Unit Start
Indicator = 1
Payload
Unit Start
Indicator = 0
Payload
Unit Start
Indicator = 1
Payload
Unit Start
Indicator = 0
MPEG-2 or PSIP Table SectionMPEG-2 or PSIP Table Section
HDRHDR PPPP PAYLOADPAYLOAD
6
11
Table Demultiplexing Pseudo-codelock to transport stream;while (1){ receive next packet; if (PID was requested) { if (payload unit start indicator == 1) found_section_boundary[PID] == TRUE; if (found_section_boundary[[PID]) { add section data to buffer; if (complete buffer received) { if (section matches filter) generate interrupt to CPU; else reclaim buffer; } } }}
12
Common Section Format
TABLE ID
SECTION LENGTHX X X X
TABLE ID EXTENSION
SECTION NUMBERLAST SECTION NUMBER
CRC 32
SECTION DATA
SECTIONSECTIONHEADERHEADER
SECTIONSECTIONDATADATA
SECTIONSECTIONCRCCRC
VERSION NUMBERX X C
7
13
Section Filtering
• Tables are rebroadcast continuously.
• Reparsing the same table is a waste ofresources.
• Upper layers must stay registered for mosttables in order to detect version changes.
• Filtering sections by version number and tableID extension fields can help.
14
Typical MPEG-2 TransportDemultiplexor Driver API Calls
• select_video_PID();
• select_audio_PID();
• stop_video();
• stop_audio();
• establish_section_request();
• update_section_request();
• abort_section_request();
• others, for lip sync, etc.
8
15
Desired Features for an MPEG-2Transport Demultiplexor
• Ability to recognize section boundaries forMPEG-2 PSI and ATSC-PSIP tables
• Filtering capability on section headers
• Ability to specify a unique filter pattern formultiple tables sharing the same PID
• Optional CRC checking on section data
16
The MPEG-2 PAT and PMT
9
17
The Program Association Table
• Each ATSC “channel” corresponds to an MPEG-2 “program”.
• The Program Association Table provides thePID of the Program Map Table for eachprogram in a transport stream.
• The Program Association Table is transmittedas the only table on a well known PID (PIDzero).
18
The Program Map Table
• The Program Map Table defines the PIDs foreach elementary stream associated with aprogram.
• Multiple audio streams may be defined. Thereceiver should check for a languagedescriptor.
• If the viewer changes language preferences,the PMT should be re-parsed to check for amatching audio elementary stream.
10
19
Selecting the Audio and Video PIDS
VCT PAT PMT
CHANNELNUMBER
PROGRAMNUMBER
PMTPID
SERVICELOCATION
DESCRIPTOR
AUDIO ANDVIDEO PIDS
20
Continuous Monitoring of Tables
• Can the PMT PID, or the audio, video, or PCRPID change without changing channels?– Some people say “no”.– MPEG-2 specification does not seem to say.
• Our recommendation:– Once a program is playing, stay registered
for next version of PAT and PMT.– If the PAT changes, see if the PMT PID has
changed. If so, acquire a new PMT.– If the audio, video, or PCR PID change,
reprogram the MPEG-2 demux.
11
21
Typical MPEG-2 TableManager API Calls
• set_program_number();– pass program number as parameter– MPEG-2 Table Manager will acquire and
• Goal: Validate channel map as fast as possiblewhen changing to a new frequency.
• Try to use MGT, since it is broadcast mostfrequently.
• Can’t reliably make decision number basedsolely on VCT version number.
• Possible Solution: Use VCT version number incombination with MGT’s CRC.
46
Supporting FavoriteChannel Lists
• Many digital TV receivers (DBS, etc.) supportfavorite channel lists.
• Requires receiver to save the minor channellist for each frequency.
• One difficulty - some minor channels may notbe permanent. Once they are in a favoritechannel list, it is hard to know when to deletethem.
• One possible solution - aging.
24
47
“Early” Channel Changes
• Scenario:– At 6:00 PM, a program is to start on
channel 6-4.– At 5:58 PM, a viewer turns on the TV and
presses 6-4 on the remote control.– At 5:58 PM, only minor channel numbers 1,
2, and 3 are active for major channelnumber 6.
• What should the receiver do?
48
“Early” Channel ChangesOur Recommendations:
• Change to proper frequency.
• Collect VCT, determine 6-4 is inactive, reporterror to application.
• ATSC Channel Management process shouldremember “6-3” as the current channel.
• Either automatically start playing 6-3 when itbecomes active, or provide APIs to allowapplication to detect changes in channel map.
25
49
The ATSC ElectronicProgram Guide Tables
“What timedoes
Baywatchstart?”
50
The Event Information Tables
• Each table contains EPG data for a 3-hourperiod.
• PIDs can be determined from the MasterGuide Table.
• Contains EPG event data.• 4 tables mandatory, 128 allowed.• Correlated to VCT with “source ID” field.• Table ID Extension field is source ID.• Uses Huffman compression for text.
26
51
The Extended Text Table
• Two types:– One for channels– One for events
• Channel ETT is correlated to channels viasource ID field.
• Event ETT is correlated to events via source IDand event ID fields.
• Uses Huffman compression for text.
52
EPG API Issues
• Background caching of EPG information isdifficult and not that useful.– Memory management issues make it hard– Information may become stale while it is
cached
• Retrieving information event-by-event is verytime consuming and cumbersome
• Our solution: Use an EPG “grid” cache.
27
53
EPG API Issues (Continued)
• For grid based EPGs, scrolling through the EPGgrid screen should be easy to do with a singleAPI call.
• May wish to allow easy interface to Java TVAPI or DASE API for EPG retrieval.
• Determining valid minor channel numbers isnot always easy.
• May wish to allow two modes of operation:– Show all channels– Show only active channels
54
The ATSC Rating Region Tableand Parental Control API
You’rewatching“Barney.”
We want towatch
“Wrestling.”
28
55
The Rating Region Table
• Defines one or more “parental control” ratingscales (“rating dimensions”) for a ratingregion.
• Some rating dimensions may follow agraduated scale. Others may not.
• Content Advisory Descriptors in EIT or PMTwill give an event’s actual rating value for oneor more rating regions and rating dimensions.
56
Parental Control API Goals
• Possible ways of restricting viewing of content– by rating value(s)– by channel– by day of week / time of day
• Same methods can be used to enable viewingof content
• Access to parental control settings should bepassword protected