KR100529304B1 - Transport stream encoder of MPEG-2 - Google Patents

Transport stream encoder of MPEG-2 Download PDF

Info

Publication number
KR100529304B1
KR100529304B1 KR10-1999-0006441A KR19990006441A KR100529304B1 KR 100529304 B1 KR100529304 B1 KR 100529304B1 KR 19990006441 A KR19990006441 A KR 19990006441A KR 100529304 B1 KR100529304 B1 KR 100529304B1
Authority
KR
South Korea
Prior art keywords
generator
header
packet
flag
pes
Prior art date
Application number
KR10-1999-0006441A
Other languages
Korean (ko)
Other versions
KR20000056795A (en
Inventor
전종구
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR10-1999-0006441A priority Critical patent/KR100529304B1/en
Publication of KR20000056795A publication Critical patent/KR20000056795A/en
Application granted granted Critical
Publication of KR100529304B1 publication Critical patent/KR100529304B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements

Abstract

프레임 단위로 부호화하는 TS 엔코더에 관한 것이다.The present invention relates to a TS encoder encoded in frame units.

본 발명에 따른 TS 인코더는 엘리먼트 스트림의 프레임 단위로 PES 헤더를 발생하는 PES헤더 발생기; 상기 PES헤더의 유효 구간을 나타내는 PES헤더 유효구간 신호를 발생하는 제어신호 발생기; 상기 PES 헤더 발생기에서 발생된 PES헤더 및 엘리먼트 스트림을 기록/독출하는 메모리; 상기 제어 신호 발생기에서 발생된 PES헤더 유효구간 신호에 동기되어 상기 메모리의 기록 동작을 제어하며, TS 헤더가 기록될 구간을 나타내는 TS헤더 구간 신호를 발생하는 메모리 제어기; 상기 메모리 제어기에서 발생된 TS 헤더 구간 신호에 동기되어 상기 메모리의 독출 동작을 제어하며, TS헤더가 기록될 타이밍을 나타내는 TS헤더 플래그를 발생하는 플래그 발생기; 상기 TS헤더 플래그에 동기하여 메모리로부터 독출된 데이터에 TS 헤더를 부가하여 TS 패킷을 출력하는 TS 발생기를 포함한다.The TS encoder according to the present invention includes a PES header generator for generating a PES header on a frame basis of an element stream; A control signal generator for generating a PES header valid section signal indicating a valid section of the PES header; A memory for recording / reading the PES header and the element stream generated in the PES header generator; A memory controller configured to control a write operation of the memory in synchronization with a PES header valid interval signal generated by the control signal generator and to generate a TS header interval signal indicating a section in which a TS header is to be written; A flag generator configured to control a read operation of the memory in synchronization with a TS header period signal generated by the memory controller and to generate a TS header flag indicating a timing at which a TS header is to be written; And a TS generator for adding a TS header to data read from the memory in synchronization with the TS header flag to output a TS packet.

Description

엠펙-2 트랜스포트 스트림 인코더{Transport stream encoder of MPEG-2}MPEG-2 transport stream encoder

본 발명은 MPEG-2 시스템 엔코더에 관한 것으로서 특히, 프레임 단위로 부호화하는 TS 엔코더에 관한 것이다.The present invention relates to an MPEG-2 system encoder, and more particularly, to a TS encoder for encoding on a frame basis.

MPEG-2 시스템은 MPEG 오디오, MPEG 비디오에 대한 스트림의 신택스(syntax)를 규정하고 있다. 이러한 MPEG 시스템은 두 종류의 방식이 있는 데, 하나는 프로그램 스트림(Program Stream; PS)이라 불리는 것으로 하나의 프로그램을 구성하는 것이고, 다른 하나는 트랜스포트 스트림(Transport Stream; TS)으로 복수의 프로그램을 구성할 수 있는 것이다.The MPEG-2 system defines the syntax of streams for MPEG audio and MPEG video. There are two types of such MPEG systems, one called a program stream (PS), which constitutes one program, and the other is a plurality of programs in a transport stream (TS). It can be configured.

MPEG 시스템에서는 패킷에 의한 다중방식을 채택하고 있다. 패킷에 의한 다중화는 비디오/오디오 엘리먼트 스트림(Element Stream; ES)를 패킷이라고 불리는 적당한 길이의 비트열로 분할하고, 헤더등의 부가정보를 붙여서 다중화하는 것이다. 헤더는 비디오 패킷과 오디오 패킷을 구분하기 위한 정보가 들어있다. MPEG에서 각종의 응용에 적합하도록 패킷의 길이를 216(64KB)까지로 하고 있고, 유연성을 갖게하기 위하여 각 패킷마다 고정길이나 가변길이 어느 것이라도 취할 수 있도록 하고 있다. 패킷의 길이 정보는 헤더에 포함된다.The MPEG system employs a packet multiplexing scheme. Packet multiplexing is to divide a video / audio element stream (ES) into a string of bits of an appropriate length called a packet, and multiplex by attaching additional information such as a header. The header contains information for distinguishing video and audio packets. In MPEG, the length of a packet is up to 2 16 (64 KB) to be suitable for various applications. In order to have flexibility, either a fixed length or a variable length can be taken for each packet. The length information of the packet is included in the header.

PS 방식에서는 복수의 패킷(MPEG-2에서는 Packetized Elementary Stream이라 칭함)을 그룹화해서 팩을 구성하는 데 비해 TS방식에서는 하나의 PES를 재분할하여 비교적 짧은 길이를 가지는 복수의 트랜스포트 스트림(Transport Stream; TS) 패킷을 구성한다. TS 패킷의 길이는 188바이트이며, 4개의 ATM셀로 나뉘어 전송될 수 있다.In the PS method, a plurality of packets (hereinafter referred to as Packetized Elementary Stream in MPEG-2) are grouped to form a pack, whereas in the TS method, a plurality of transport streams having a relatively short length are re-divided into one PES. ) Configure the packet. The length of a TS packet is 188 bytes and can be transmitted divided into four ATM cells.

TS패킷 내에는 4바이트의 헤더가 있으며, 이 헤더속에는 어떤 패킷인지를 나타내는 PID(Packet ID)가 있으며, 이 PID는 프로그램 사양 정보(Program Specific Information;PSI)의 PMT(Program Management Table)에 기재되어 있다. PID가 "0"인 TS 패킷은 PSI를 전송하기 위해 사용된다.There is a 4-byte header in the TS packet, and there is a PID (Packet ID) indicating which packet is contained in the header. The PID is described in a Program Management Table (PMT) of Program Specific Information (PSI). have. TS packets with a PID of "0" are used to transmit PSI.

트랜스포트 스트림은 복수의 프로그램을 전송하고 있기 때문에 각 TS패킷이 어느 프로그램에 속한 것인지에 관한 정보가 필요하게 된다. 이 정보를 총칭하여 PSI라고 부르며 지정된 ID를 가진 TS패킷이나 일차적인 PSI에서 가리키는 패킷등에 의해 전송된다. 이 PSI 패킷은 PAT, PMT, NIT, CAT 등으로 구성되어 있다. PSI 정보는 최소한 0.7초 이내에 한번은 전송하도록 되어 있다.Since the transport stream transmits a plurality of programs, information about which program each TS packet belongs to is required. This information is collectively called PSI and is transmitted by TS packet with designated ID or packet indicated by primary PSI. This PSI packet is composed of PAT, PMT, NIT, CAT and the like. PSI information is to be transmitted once within at least 0.7 seconds.

PAT는 프로그램의 정보를 수록하고, PMT를 포함한 패킷의 PID를 포함하고 있다.The PAT contains program information and contains the PID of the packet including the PMT.

헤더에는 같은 PID를 가지는 패킷의 연속성을 검사하기 위한 순회 카운터도 들어있다The header also contains a traversal counter for checking the continuity of packets with the same PID.

TS 인코더는 PES 패킷(Packetized Elementary Stream)를 재분할하여 TS 패킷으로 구성하는 역할을 수행한다. PES의 길이는 고정되지 않으며 단지 PES 헤더 내에 PES패킷의 길이를 나타낼 수 있도록 16비트의 헤더 정보를 가지고 있다. 만일 패킷 길이 정보의 값이 "0"일 경우에는 한 프레임 단위로 하나의 PES 패킷이 구성됨을 나타낸다.The TS encoder plays a role of reconfiguring a PES packet (Packetized Elementary Stream) into TS packets. The length of the PES is not fixed and only has 16 bits of header information to indicate the length of the PES packet in the PES header. If the value of the packet length information is "0", it indicates that one PES packet is configured in one frame unit.

존래의 기술은 TS 패킷의 구성시 여러 개의 PS 스트림을 멀티플렉싱할 수 있도록 되어 있으며, 이에 따라 한 개의 PS 스트림을 멀티플렉싱할 때는 H/W가 복잡하게 구성된다. 또한, TS 패킷을 1프레임 단위로 구성할 경우에는 TS 패킷의 편집이나 재구성시 원하는 편집을 할 수도 없게 되어 있다. 그 이유는 PSI 정보가 0.7초마다 한번씩 존재하게 됨에 따라 원하는 프레임의 정보를 재구성하기 어렵기 때문이다.Existing technology allows multiple PS streams to be multiplexed in the construction of TS packets. Thus, H / W is complicated when multiplexing one PS stream. In addition, when the TS packet is configured in units of one frame, desired editing cannot be performed when the TS packet is edited or reconstructed. The reason is that since the PSI information exists once every 0.7 seconds, it is difficult to reconstruct information of a desired frame.

본 발명은 상기의 문제점을 해결하기 위하여 안출된 것으로서 한 개의 PES 패킷을 하나의 프레임으로 구성하여 TS 패킷을 발생하는 시스템 인코더를 제공하는 것을 그 목적으로 한다.An object of the present invention is to provide a system encoder for generating a TS packet by configuring one PES packet into one frame.

상기의 목적을 달성하는 본 발명에 따른 TS 인코더는 엠펙 엘리먼트 스트림(MPEG Elementary Stream)을 입력하여 트랜스포트 스트림(Transport Stream)을 출력하는 TS 엔코더에 있어서, 엘리먼트 스트림의 프레임 단위로 PES 헤더를 발생하는 PES헤더 발생기; 상기 PES헤더의 유효 구간을 나타내는 PES헤더 유효구간 신호를 발생하는 제어신호 발생기; 상기 PES 헤더 발생기에서 발생된 PES헤더 및 엘리먼트 스트림을 기록/독출하는 메모리; 상기 제어 신호 발생기에서 발생된 PES헤더 유효구간 신호에 동기되어 상기 메모리의 기록 동작을 제어하며, TS 헤더가 기록될 구간을 나타내는 TS헤더 구간 신호를 발생하는 메모리 제어기; 상기 메모리 제어기에서 발생된 TS 헤더 구간 신호에 동기되어 상기 메모리의 독출 동작을 제어하며, TS헤더가 기록될 타이밍을 나타내는 TS헤더 플래그를 발생하는 플래그 발생기; 상기 TS헤더 플래그에 동기하여 메모리로부터 독출된 데이터에 TS 헤더를 부가하여 TS 패킷을 출력하는 TS 발생기를 포함하는 것을 특징으로 한다. 이하 첨부된 도면을 참조하여 본 발명의 구성 및 동작을 상세히 설명한다.A TS encoder according to the present invention for achieving the above object is a TS encoder for outputting a transport stream by inputting an MPEG elementary stream to generate a PES header in units of frames of the element stream. PES header generator; A control signal generator for generating a PES header valid section signal indicating a valid section of the PES header; A memory for recording / reading the PES header and the element stream generated in the PES header generator; A memory controller configured to control a write operation of the memory in synchronization with a PES header valid interval signal generated by the control signal generator and to generate a TS header interval signal indicating a section in which a TS header is to be written; A flag generator configured to control a read operation of the memory in synchronization with a TS header period signal generated by the memory controller and to generate a TS header flag indicating a timing at which a TS header is to be written; And a TS generator for adding a TS header to data read from the memory in synchronization with the TS header flag to output a TS packet. Hereinafter, the configuration and operation of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 MPEG-2의 PES패킷과 TS 패킷의 구성을 보이기 위하여 도시된 것이다. 도 1에 있어서 (a)는 PS 패킷의 구성을 보이는 것이고, (b)는 TS 패킷의 구성을 보이는 것이다. 도 1에 도시된 PES 패킷 및 TS 패킷은 MPEG2의 시스템에 관련된 스펙인 ISO/IEC 13818-1에 명기되어 있다.1 is a diagram illustrating the configuration of a PES packet and a TS packet of MPEG-2. In FIG. 1, (a) shows the structure of a PS packet, and (b) shows the structure of a TS packet. The PES packet and TS packet shown in FIG. 1 are specified in ISO / IEC 13818-1, a specification related to the MPEG2 system.

PES패킷은 헤더와 페이로드(payload)로 구성되며, 그 길이는 가변이다. PES 패킷의 길이 정보는 헤더에 포함된다.PES packets consist of a header and a payload, the length of which is variable. The length information of the PES packet is included in the header.

TS 패킷은 4바이트의 헤더와 n바이트의 어댑태이션 피일드(adaptation field), 그리고 184-n의 페이로드로 구성되며, 그 길이는 188바이트이다.The TS packet consists of a header of 4 bytes, an adaptation field of n bytes, and a payload of 184-n, which is 188 bytes in length.

도 2는 도 1에 도시된 PES패킷의 상세한 구성을 보이는 것이다. FIG. 2 shows a detailed configuration of the PES packet shown in FIG. 1.

도 2에 도시된 PES 패킷에 있어서 각 항목은 다음과 같다.In the PES packet shown in FIG. 2, each item is as follows.

pes start prefix : 선두 개시 코드pes start prefix: Start start code

stream_id ; 스트림 IDstream_id; Stream id

pes_packet_length : 패킷 길이pes_packet_length: Packet length

pes_scrambling_control : 스크램블 제어pes_scrambling_control: Scramble control

pes_priority : PES 우선 순위pes_priority: PES priority

data_alignment_indicator : 데이터 정렬 표시data_alignment_indicator: data alignment indicator

copy_right : 저작권 copy_right: copyright

PTS_DTS_flag : 원본/복사본PTS_DTS_flag: Original / Copy

ESCR_FLAG : ESCR(Elenentary Stream Clock Reference) 플래그ESCR_FLAG: Erenentary Stream Clock Reference (ESCR) flag

ES_rate_flay : ES 속도 플래그ES_rate_flay: ES rate flag

DSM_trick_mode_flay : DSM(Digital Storage Midea) 트릭모드 플래그DSM_trick_mode_flay: Digital Storage Midea trick mode flag

additional_copy_info_flag : 부기 복사본 정보 플래그additional_copy_info_flag: bookkeeping copy information flag

PES_CRC_frag : PES CRC 플래그PES_CRC_frag: PES CRC Flag

RES_extension_flag : PES 확장 플래그RES_extension_flag: PES extension flag

PES_header_data_length :PES_header_data_length:

PTS : Program Time StampPTS: Program Time Stamp

도 3은 도 1에 도시된 TS패킷의 상세한 구성을 보이는 것이다. FIG. 3 shows a detailed configuration of the TS packet shown in FIG. 1.

도 3에 도시된 TS 패킷에 있어서 각 항목은 다음과 같다.Each item in the TS packet shown in FIG. 3 is as follows.

syncbyte : 동기 바이트 "0x47"syncbyte: sync byte "0x47"

transport_error_iondicator : 오류 표시transport_error_iondicator: error indication

payload_unit_start_indicator : 단위 개시 표시payload_unit_start_indicator: Unit start indication

transport_priority : 트랜스포트 패킷 우선 순위transport_priority: transport packet priority

PID : 패킷 IDPID: Packet ID

transport_scrambling_control : 스크램블 제어transport_scrambling_control: Scramble control

adaptation_field_control : 어댑태이션 피일드adaptation_field_control: adaptation

contnuity_counter : 순회카운터contnuity_counter: Traversal counter

도 4는 PAT 패킷의 상세한 구성을 보이는 것이다. 도 4에 도시된 각 항목은 다음과 같다. PAT 패킷은 PID="0"에 으해 전송되는 특수 정보이다. 각 프로그램번호(16비트)마다 그 프로그램의 구성요소를 기술하는 테이블(Program Map Table)을 전송하는 트랜스포트 패킷이다.4 shows a detailed configuration of a PAT packet. Each item shown in FIG. 4 is as follows. The PAT packet is special information transmitted by PID = "0". Each program number (16 bits) is a transport packet that transmits a table (Program Map Table) describing the components of the program.

table_id : 테이블 IDtable_id: Table ID

section syntax_indicator :section syntax_indicator:

"1";"One";

reserved :reserved:

section_length : 섹션 길이section_length: Section length

transport_stream_id : TS패킷의 IDtransport_stream_id: ID of TS packet

reserved :reserved:

version_number : 버전 번호version_number: version number

current_next_indicator :다음 섹션의 유무current_next_indicator: presence of next section

section_number : 섹션번호section_number: Section number

program_number : 사용자가 지정하는 프로그램 번호program_number: The program number that you specify

reserved :reserved:

program_map_PID : 외부입력 PMT_PIDprogram_map_PID: External input PMT_PID

도 5는 PMT 패킷의 상세한 구성을 보이는 것이다. PMT는 프로그램 식별 번호와 프로그램을 구성하는 비디오, 오디오 등의 개별 비트열이 전송되고 있는 트랜스포트 패킷의 PID 리스트와 부속 정보를 기술하고 있다.5 shows a detailed configuration of a PMT packet. The PMT describes the program identification number and the PID list of the transport packet in which the individual bit strings such as video and audio constituting the program are transmitted and the attached information.

도 5에 도시된 각 구성 요소는 다음고 같다.Each component shown in FIG. 5 is as follows.

table_id : 테이블 IDtable_id: Table ID

section_syntax_indicator :section_syntax_indicator:

"0""0"

reserved :reserved:

section_length : 섹션 길이section_length: Section length

program_number : 프로그램 번호, 사용자에 의해 다시 정의될 수 있다.program_number: Program number, can be redefined by the user.

transport_stream_id : TS 패킷의 IDtransport_stream_id: ID of TS packet

reserved :reserved:

version_number : 버전 번호version_number: version number

current_next_indicator : 다음 섹션의 유무current_next_indicator: presence or absence of the next section

section_number : 섹션 번호section_number: section number

last_section_number :최종 섹션 번호last_section_number: final section number

reserved :reserved:

PCR_PID :PCR_PID:

reserved :reserved:

program_info_length :program_info_length:

stream_type : MPEG 테이블 2-36에 따라 스트림 타이프 지정stream_type: Specify stream type according to MPEG table 2-36

reserved :reserved:

elementary_PID : 외부 입력 VTS_PIDelementary_PID: External input VTS_PID

reserved :reserved:

도 6은 널(NULL) 패킷의 구성을 보이는 것이다. TS엔코더는 기본적으로 복수의 프로그램을 멀티플렉싱할 수 있다. 통상 비디오가 9Mbps이고, 오디오가 384Kbps이므로 에를 들어, TS엔코더의 전송속도가 60Mbps라면 비디오 및 오디오를 전송하지 않는 동안은 널 패킷을 전송한다.6 shows the configuration of a null packet. The TS encoder can basically multiplex a plurality of programs. Normally, the video is 9Mbps and the audio is 384Kbps. For example, if the TS encoder's transmission rate is 60Mbps, a null packet is transmitted while not transmitting video and audio.

도 7은 본 발명에 따른 TS 엔코더의 상세한 구성을 보이는 블록도이다. 도 7에 도시된 장치는 PES 패킷 발생기(10), 제어 신호 발생기(12), 메모리 제어기(14), 비디오 메모리(16), 오디오 메모리(18), PCR 발생기(20), 플래그 발생기(22), PSI 발생기(24), CRC 발생기(26), 그리고 TS 패킷 발생기(28)를 구비한다.7 is a block diagram showing a detailed configuration of a TS encoder according to the present invention. The apparatus shown in FIG. 7 includes a PES packet generator 10, a control signal generator 12, a memory controller 14, a video memory 16, an audio memory 18, a PCR generator 20, a flag generator 22. , A PSI generator 24, a CRC generator 26, and a TS packet generator 28.

PES 패킷 발생기(10)는 프레임 단위로 PES 발생하는 블록이다. PES 패킷 더 발생기(10)는 프레임 리세트 신호(frame_rst)에 의해 Elementary Stream에서 프레임의 시작임을 알 수 있으며 프레임 리세트 신호로부터 N 클록이후에 매 프레임에 대하여 도 2에 도시된 바와 같은 PES 헤더를 발생한다. PES 헤더는 비디오와 오디오에 대하여 따로 발생시킨다. The PES packet generator 10 is a block for generating PES on a frame basis. The PES packet generator generator 10 may know that the start of a frame in the elementary stream is performed by the frame reset signal (frame_rst) and the PES header as shown in FIG. 2 for each frame after N clocks from the frame reset signal. Occurs. PES headers are generated separately for video and audio.

PES 패킷 발생기(10)는 PES 헤더에 Elementary Stream을 삽입하여 PES 패킷을 발생한다.The PES packet generator 10 inserts an elementary stream into the PES header to generate a PES packet.

제어 신호 발생기(12)는 PES 패킷 발생기(10)에서 발생된 PES 헤더의 유효 구간을 나타내는 유효 구간 신호(vpes_vld, apes_vld)를 발생한다. 프레임 리세트 신호(frame_rst)로부터 N 클록이후에 PES 헤더가 발생하므로 각각의 프레임에 대하여 오디오와 비디오의 유효한 구간을 표현한다. 또한, 매 프레임마다 PSI 패킷을 삽입하게 되므로 PSI 정보를 삽입하기 위한 구간을 표시하는 PSI_st신호를 발생한다.The control signal generator 12 generates valid period signals vpes_vld and apes_vld indicating the valid period of the PES header generated by the PES packet generator 10. Since the PES header is generated after N clocks from the frame reset signal frame_rst, a valid section of audio and video is represented for each frame. In addition, since a PSI packet is inserted every frame, a PSI_st signal indicating a section for inserting PSI information is generated.

메모리 제어기(14)는 오디오 및 비디오 메모리(16, 18)에 데이터를 쓰기 위한 제어 신호와 TS 패킷을 발생시키기 위한 제어 신호를 생성한다. 우선 audio, video 데이터를 각각의 메모리(16, 18)에 기록하기 위하여 address(vwr_address, awr_address)와 enable(vwr_ena, awr_ena) 신호를 생성한다. The memory controller 14 generates control signals for writing data to the audio and video memories 16 and 18 and control signals for generating TS packets. First, the address (vwr_address, awr_address) and enable (vwr_ena, awr_ena) signals are generated to record audio and video data in the respective memories 16 and 18.

오디오와 비디오는 각각의 PID가 존재하기 때문에 다른 TS 패킷으로 생성되어야 한다.Audio and video must be generated in different TS packets because each PID is present.

각 프레임의 처음 시작되는 패킷은 PCR을 첨가하게 된다. 이 PCR을 삽입하기 위하여 adaption field가 존재하고, 메모리 제어기(14)는 PCR을 삽입하기 위한 vts_st와 ats_st를 발생한다.The first packet of each frame adds PCR. An adaptation field exists to insert the PCR, and the memory controller 14 generates vts_st and ats_st for inserting the PCR.

seq_end 신호는 프레임의 마지막 패킷을 나타내기 위하여 사용된다.The seq_end signal is used to indicate the last packet of a frame.

메모리(16, 18)에 기록할 때 seq_end 를 검출하여 그때 데이터의 갯수를 계수하여 플래그 발생기의 입력(datanum)으로 첨가하게 된다. 이때 실제로 기록되는 유효한 어드레스(val_addr)까지 전송하게 된다.When writing to the memories 16 and 18, seq_end is detected and the number of data is counted at that time and added to the data generator input. At this time, a valid address (val_addr) actually recorded is transmitted.

이때도 어댑태이션 피일드에 스터핑 데이터가 존재하기 때문에 어댑태이션이 존재하는 TS 패킷을 생성하여야 한다.In this case, since stuffing data exists in the adaptation feed, it is necessary to generate a TS packet in which the adaptation exists.

PCR 발생기(20)는 프레임 리세트 신호(frame_rst)에 의해 PCR을 생성하기 위한 신호(pcr_st)를 생성한다. PCR은 부호화기와 복호화기에서 같은 시간 조건을 유지시키기 위한 신호로서 27MHz 클록으로 생성하게 된다.The PCR generator 20 generates a signal pcr_st for generating PCR by the frame reset signal frame_rst. PCR generates a 27MHz clock as a signal for maintaining the same time condition in the encoder and the decoder.

플래그 발생기(22)는 메모리(16, 18)를 독출하는 신호를 발생한다. 이때 독출하는 어드레스는 vts_st, ats_st, pcr_st, seq_end, datnum, valid_addr를 참조하여 생성한다. 그러나 내부에서 1-188의 카운터를 이용하여 비디오 패킷이 생성될 동안은 오디오 패킷이 생성되지 않고, 반대로 오디오 패킷이 생성될 동안은 비디오 패킷이 생성되지 않도록 조정하게 된다. 이때 PSI 데이터를 생성할 수 있는 타이밍을 확보하여 pat_flay, pmt_flag을 생성하게 된다. 이 신호들은 PSI 발생기(24)에 입력되어 실제의 PSI 데이터를 발생하게 한다.The flag generator 22 generates a signal for reading the memories 16 and 18. The read address is generated by referring to vts_st, ats_st, pcr_st, seq_end, datnum, and valid_addr. However, using the counter 1-188 internally, the audio packet is not generated while the video packet is generated, and conversely, the video packet is not generated while the audio packet is generated. At this time, the timing for generating PSI data is secured to generate pat_flay and pmt_flag. These signals are input to the PSI generator 24 to generate actual PSI data.

플래그 발생기(22)에서 발생되는 8개의 플래그와 5개의 런(run), 그리고 ts_cnt는 TS 발생기(28)에 입력된다.Eight flags, five runs, and ts_cnt generated by the flag generator 22 are input to the TS generator 28.

PSI 발생기(24)는 PSI 패킷을 생성한다. 이때 PSI 패킷은 PAT 패킷과 PMT 패킷으로 구성되며, 이들은 program number와 PCR_PID, PMT_PID, VTS_PID, ATS_PID의 신호를 입력받아 생성한다. program_number와 PMT_PID는 PAT 패킷에서 사용된다.PSI generator 24 generates a PSI packet. At this time, the PSI packet is composed of a PAT packet and a PMT packet. These PSI packets are generated by receiving a program number and signals of PCR_PID, PMT_PID, VTS_PID, and ATS_PID. program_number and PMT_PID are used in the PAT packet.

CRC 발생기(26)는 PSI 발생기(24)에서 발생된 PSI 패킷에 대하여 32비트의 CRC를 첨가한다. 여기서 사용되는 다항식은 (X32 + X26 + X23 + X22 + X16 + X12 + X11 + X10 + X8 + X7 + X5 + X4 + X2 + X + 1)이다.The CRC generator 26 adds a 32 bit CRC to the PSI packets generated by the PSI generator 24. The polynomial used here is (X 32 + X 26 + X 23 + X 22 + X 16 + X 12 + X 11 + X 10 + X 8 + X 7 + X 5 + X 4 + X 2 + X + 1) .

CRC 발생기(26)는 PSI 발생기(24)에서 발생된 PSI 패킷에 대하여 32비트의 CRC를 첨가하여 p-data로서 출력한다.The CRC generator 26 adds a 32-bit CRC to the PSI packet generated by the PSI generator 24 and outputs it as p-data.

TS 발생기(28)는 실제의 TS 패킷을 발생한다. TS 발생기(28)는 8개의 플래그를 입력받아서 생성하게 되며 각각의 플래그는 TS 를 생성하는 데 중요한 신호가 된다. 각각의 플래그는 다음과 같다.The TS generator 28 generates an actual TS packet. The TS generator 28 receives 8 flags and generates them, and each flag is an important signal for generating a TS. Each flag is as follows.

pcr_flag : TS 패킷을 생성할 때 pcr을 삽입해야할 타이밍를 나타내는 신호이다. 이 신호가 존재할 때 TS 패킷은 어댑태이션 피일드를 가지게 된다.pcr_flag: A signal indicating the timing at which pcr should be inserted when generating a TS packet. When this signal is present, the TS packet will have an adaptation feed.

pts_flag : PES 패킷내에 실제 디스플레이되어야할 시간을 나타내는 값 즉, PTS를 삽입할 때는 TS 패킷이 생성되는 시간에 PCR값 + N만큼을 더하게 된다. pte_flag는 이때의 타이밍을 나타내는 플래그이다.pts_flag: A value indicating the time to be actually displayed in the PES packet, that is, when the PTS is inserted, the PCR value + N is added to the time when the TS packet is generated. pte_flag is a flag indicating timing at this time.

vpes_flag : vedeo TS 패킷의 payload_unit_start_indicator는 매 PES 패킷이 시작되는 TS 패킷에 대하여 "1"로 세팅되어야 하므로 그때의 타이밍을 나타내는 신호이다.vpes_flag: The payload_unit_start_indicator of the vedeo TS packet is a signal indicating the timing at that time since it should be set to "1" for the TS packet at which every PES packet starts.

apes_flag : audio TS 패킷의 payload_unit_start_indicator는 매 PES 패킷이 시작되는 TS 패킷에 대하여 "1"로 세팅되어야 하므로 그때의 타이밍을 나타내는 신호이다.apes_flag: The payload_unit_start_indicator of the audio TS packet is a signal indicating the timing at that time since it should be set to "1" for the TS packet at which every PES packet starts.

pat_flag : 도 4에 도시된 바와 같은 PAT 패킷을 생성할 타이밍을 나타내는 플래그이다. 이 PMT 패킷의 payload_unit_start_indicator는 "1"로 세팅되어야 한다.pat_flag: A flag indicating timing of generating a PAT packet as shown in FIG. 4. The payload_unit_start_indicator of this PMT packet should be set to "1".

pmt_flag : 도 5에 도시된 바와 같은 PMT 패킷을 생성할 타이밍을 나타내는 플래그이다. 이 PMT 패킷의 payload_unit_start_indicator는 "1"로 세팅되어야 한다.pmt_flag: A flag indicating timing of generating a PMT packet as shown in FIG. The payload_unit_start_indicator of this PMT packet should be set to "1".

ats_flag : audio 패킷을 생성할 타이밍을 나타내는 플래그이다. ats_flag: A flag that indicates the timing at which the audio packet is generated.

vts_flag : vidio 패킷을 생성할 타이밍을 나타내는 플래그이다. vts_flag: A flag indicating the timing at which the vidio packet is generated.

5개의 run은 각각으 패킷 즉, PAT, PMT, video, audio 패킷들이 동시에 만들어지지 않도록 제어하는 데 쓰여진다. 실제 vts_st, ats_st, psi_st에 의하여 TS 패킷이 만들어지는 구간 이외에는 도 6에 도시된 바와 같은 NULL 패킷이 생성된다. Five runs are used to control each packet, ie PAT, PMT, video and audio packets, to not be created at the same time. A NULL packet as shown in FIG. 6 is generated except for a section in which TS packets are generated by vts_st, ats_st, and psi_st.

상술한 바와 같이 본 발명에 따른 TS 인코더는 1 PES 패킷이 1프레임으로 구성되는 TS 패킷을 생성한다. 이에 따라 1개의 PES 패킷의 단위가 일정하지 않고, PES 패킷의 길이가 16비트로 표현할 수 없는 크기의 비트스트림에 대하여 훨씬 작은 H/W로 구성할 수 있다는 효과가 있다.As described above, the TS encoder according to the present invention generates a TS packet in which one PES packet consists of one frame. Accordingly, there is an effect that the unit of one PES packet is not constant, and a much smaller H / W can be configured for a bitstream having a size in which the length of the PES packet cannot be represented by 16 bits.

또한, 1프레임 단위로 PCR을 삽입하므로 프레임 리세트신호로서 타이밍를 해결할 수 있다.In addition, since PCR is inserted in units of one frame, timing can be solved as a frame reset signal.

1 프레임 단위로 PES 패킷이 구성될 경우 TS 패킷의 PUSI(Payload Unit Start Indicator)에 의하여 1 프레임 단위로 TS 패킷을 편집하여 멀티플렉싱할 수 있다.When the PES packet is configured in one frame unit, the TS packet may be edited and multiplexed in one frame unit by a Payload Unit Start Indicator (PUSI) of the TS packet.

1프레임의 마지막 데이터가 1TS 패킷의 구성이 이루어지지 않을 경우 스터핑 데이터를 어댑태이션 피일드에 삽입하여야 하는 데 이때 squence end code를 검출하여 이용할 경우 1프레임의 메모리를 사용하지 않고도 예를 들면 512바이트의 메모리로서 어댑태이션 피일드의 삽입을 용이하게 해결할 수 있는 이점이 있다.If the last data of one frame is not composed of 1TS packet, stuffing data should be inserted into the adaptation feed. If the squence end code is detected and used, for example, 512 bytes without using one frame of memory There is an advantage that the insertion of the adaptation feed can be easily solved as a memory of the memory.

도 1은 MPEG-2의 PES패킷과 TS 패킷의 구성을 보이기 위하여 도시된 것이다.1 is a diagram illustrating the configuration of a PES packet and a TS packet of MPEG-2.

도 2는 도 1에 도시된 PES패킷의 상세한 구성을 보이는 것이다. FIG. 2 shows a detailed configuration of the PES packet shown in FIG. 1.

도 3은 도 1에 도시된 TS패킷의 상세한 구성을 보이는 것이다. FIG. 3 shows a detailed configuration of the TS packet shown in FIG. 1.

도 4는 PAT 패킷의 상세한 구성을 보이는 것이다. 4 shows a detailed configuration of a PAT packet.

도 5는 PMT 패킷의 상세한 구성을 보이는 것이다.5 shows a detailed configuration of a PMT packet.

도 6은 널(NULL) 패킷의 구성을 보이는 것이다. 6 shows the configuration of a null packet.

도 7은 본 발명에 따른 TS 엔코더의 상세한 구성을 보이는 블록도이다.7 is a block diagram showing a detailed configuration of a TS encoder according to the present invention.

Claims (7)

엠펙 엘리먼트 스트림(MPEG Elementary Stream)을 입력하여 트랜스포트 스트림(Transport Stream)을 출력하는 TS 엔코더에 있어서,A TS encoder for outputting a transport stream by inputting an MPEG elementary stream, 엘리먼트 스트림의 프레임 단위로 PES 헤더를 발생하는 PES헤더 발생기;A PES header generator generating a PES header on a frame basis of an element stream; 상기 PES헤더의 유효 구간을 나타내는 PES헤더 유효구간 신호를 발생하는 제어신호 발생기;A control signal generator for generating a PES header valid section signal indicating a valid section of the PES header; 상기 PES 헤더 발생기에서 발생된 PES헤더 및 엘리먼트 스트림을 기록/독출하는 메모리;A memory for recording / reading the PES header and the element stream generated in the PES header generator; 상기 제어 신호 발생기에서 발생된 PES헤더 유효구간 신호에 동기되어 상기 메모리의 기록 동작을 제어하며, TS 헤더가 기록될 구간을 나타내는 TS헤더 구간 신호를 발생하는 메모리 제어기;A memory controller configured to control a write operation of the memory in synchronization with a PES header valid interval signal generated by the control signal generator and to generate a TS header interval signal indicating a section in which a TS header is to be written; 상기 메모리 제어기에서 발생된 TS 헤더 구간 신호에 동기되어 상기 메모리의 독출 동작을 제어하며, TS헤더가 기록될 타이밍을 나타내는 TS헤더 플래그를 발생하는 플래그 발생기;A flag generator configured to control a read operation of the memory in synchronization with a TS header period signal generated by the memory controller and to generate a TS header flag indicating a timing at which a TS header is to be written; 상기 TS헤더 플래그에 동기하여 메모리로부터 독출된 데이터에 TS 헤더를 부가하여 TS 패킷을 출력하는 TS 발생기를 포함하는 TS 엔코더.And a TS generator for adding a TS header to data read from a memory in synchronization with the TS header flag to output a TS packet. 제1항에 있어서, 상기 PES헤더 발생기와 상기 제어신호 발생기는 프레임의 선두를 나타내는 프레임 리세트 신호에 동기되어 동작하는 것을 특징으로 하는 TS 엔코더.The TS encoder according to claim 1, wherein the PES header generator and the control signal generator operate in synchronization with a frame reset signal indicating a head of a frame. 제1항에 있어서, The method of claim 1, 상기 제어 신호 발생기는 프레임 단위의 엘리먼트 스트림에 있어서 마지막 데이터의 여부를 나타내는 시퀀스 종료 신호, 마지막 데이터의 갯수 데이터를 발생하고,The control signal generator generates a sequence end signal indicating whether or not the last data in the element stream of the frame unit, the number of data of the last data, 상기 플래그 발생기는 시퀀스 종료 신호, 마지막 데이터의 갯수 데이터를 참조하여 메모리를 제어하는 것을 특징으로 하는 TS엔코더.And the flag generator controls the memory with reference to the sequence end signal and the number of last data. 제3항에 있어서, The method of claim 3, 상기 제어 신호 발생기는 프레임 단위의 엘리먼트 스트림에 있어서 마지막 데이터의 어드레스를 나타내는 최종 어드레스 신호를 발생하고,The control signal generator generates a final address signal indicating the address of the last data in the element stream on a frame basis, 상기 플래그 발생기는 최종 어드레스 신호를 참조하여 메모리를 제어하는 것을 특징으로 하는 TS엔코더.And the flag generator controls the memory with reference to the last address signal. 제1항에 있어서, 상기 TS 발생기는 TS패킷이 만들어지지 않는 구간에서는 널(NULL) 패킷을 발생하는 것을 특징으로 하는 TS엔코더.The TS encoder of claim 1, wherein the TS generator generates a null packet in a section in which a TS packet is not made. 제1항에 있어서, 엘리먼트 스트림의 프레임 단위로 PCR(Program Clock Reference) 데이터 및 PCR이 기록될 구간을 나타내는 PCR 구간 신호를 발생하는 PCR 발생기를 더 구비하고,The apparatus of claim 1, further comprising: a PCR generator configured to generate PCR (Program Clock Reference) data and a PCR interval signal indicating a section in which PCR is to be recorded in units of frames of an element stream, 상기 플래그 발생기는 PCR구간 신호에 동기되어 PCR이 기록될 타이밍을 나타내는 PCR 플래그를 발생하며,The flag generator generates a PCR flag indicating a timing at which PCR is to be recorded in synchronization with a PCR section signal, 상기 TS발생기는 PCR 플래그에 따라 상기 PCR 발생부에서 제공되는 PCR 데이터를 삽입하는 것을 특징으로 하는 TS엔코더.The TS generator TS encoder, characterized in that for inserting the PCR data provided from the PCR generator according to the PCR flag. 제6항에 있어서, 엘리먼트 스트림의 프레임 단위로 PSI(Program Specification Information) 데이터를 발생하는 PSI 발생기;The apparatus of claim 6, further comprising: a PSI generator for generating PSI (Program Specification Information) data in units of frames of an element stream; 상기 PSI발생부에서 제공되는 PSI 데이터에 오류 정정 코드를 부가시키는 CRC 발생기를 더 구비하고,Further comprising a CRC generator for adding an error correction code to the PSI data provided by the PSI generation unit, 상기 플래그 발생기는 PSI 데이터가 기록될 타이밍을 나타내는 PSI 플래그를 발생하며,The flag generator generates a PSI flag indicating a timing at which PSI data is to be written, 상기 TS발생기는 PSI 플래그에 따라 상기 CRC 발생부에서 제공되는 오류 정정코드가 부가된 PSI 패킷을 발생하는 것을 특징으로 하는 TS엔코더.And the TS generator generates a PSI packet to which an error correction code provided from the CRC generator is added according to a PSI flag.
KR10-1999-0006441A 1999-02-26 1999-02-26 Transport stream encoder of MPEG-2 KR100529304B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-1999-0006441A KR100529304B1 (en) 1999-02-26 1999-02-26 Transport stream encoder of MPEG-2

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-1999-0006441A KR100529304B1 (en) 1999-02-26 1999-02-26 Transport stream encoder of MPEG-2

Publications (2)

Publication Number Publication Date
KR20000056795A KR20000056795A (en) 2000-09-15
KR100529304B1 true KR100529304B1 (en) 2005-11-17

Family

ID=19575139

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-1999-0006441A KR100529304B1 (en) 1999-02-26 1999-02-26 Transport stream encoder of MPEG-2

Country Status (1)

Country Link
KR (1) KR100529304B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100788685B1 (en) 2006-03-10 2007-12-26 삼성전자주식회사 Method and apparatus for converting data stream format, and method and apparatus for recording data stream using the same
WO2012093846A3 (en) * 2011-01-04 2012-12-06 Samsung Electronics Co., Ltd. Apparatus and method for supporting variable length of transport packet in video and audio communication system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100644568B1 (en) * 1999-10-01 2006-11-13 삼성전자주식회사 Transport stream encoder of MPEG and method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5521927A (en) * 1994-12-13 1996-05-28 Electronics And Telecommunications Research Institute Elementary stream packetizing unit for MPEG-2 system
JPH09261237A (en) * 1996-03-22 1997-10-03 Sony Corp Encoder device, decoder device and signal transmission method
KR0181082B1 (en) * 1996-06-28 1999-04-01 배순훈 Pts coder of mpeg system
KR20000025323A (en) * 1998-10-10 2000-05-06 김영환 Apparatus for generating transport stream for use in mpeg-2 system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5521927A (en) * 1994-12-13 1996-05-28 Electronics And Telecommunications Research Institute Elementary stream packetizing unit for MPEG-2 system
JPH09261237A (en) * 1996-03-22 1997-10-03 Sony Corp Encoder device, decoder device and signal transmission method
KR0181082B1 (en) * 1996-06-28 1999-04-01 배순훈 Pts coder of mpeg system
KR20000025323A (en) * 1998-10-10 2000-05-06 김영환 Apparatus for generating transport stream for use in mpeg-2 system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100788685B1 (en) 2006-03-10 2007-12-26 삼성전자주식회사 Method and apparatus for converting data stream format, and method and apparatus for recording data stream using the same
WO2012093846A3 (en) * 2011-01-04 2012-12-06 Samsung Electronics Co., Ltd. Apparatus and method for supporting variable length of transport packet in video and audio communication system
US9100671B2 (en) 2011-01-04 2015-08-04 Samsung Electronics Co., Ltd Apparatus and method for supporting variable length of transport packet in video and audio communication system

Also Published As

Publication number Publication date
KR20000056795A (en) 2000-09-15

Similar Documents

Publication Publication Date Title
KR100644568B1 (en) Transport stream encoder of MPEG and method thereof
US5801781A (en) Apparatus for converting moving picture stream of MPEG1 to transport stream of MPEG2
RU2273111C2 (en) Method for transformation of packet stream of information signals to stream of information signals with time stamps and vice versa
US5619337A (en) MPEG transport encoding/decoding system for recording transport streams
US6956869B1 (en) Data recording and/or reproducing apparatus, method, and system and recording medium
US6404711B1 (en) System including comparing a separated time stamp to a generated timing signal and controlling a timing signal on the basis of continuity of time stamps
US6493362B1 (en) Data recording method and data recording system
KR19990088396A (en) Information processing apparatus, information processing method and presentation medium
JPH08340541A (en) Transmission method, transmitter, recording method, recorder, reproduction method, reproduction device, recording reproduction method and recording/ reproduction device for digital data
JP4294660B2 (en) REPRODUCTION DEVICE, REPRODUCTION METHOD, AND RECORDING MEDIUM THEREOF
US6731658B1 (en) Data recording method and data recording apparatus
KR100529304B1 (en) Transport stream encoder of MPEG-2
US20030023986A1 (en) Recording system for digital broadcasting
JP4730680B2 (en) Content package generation apparatus and content package generation method
KR0181082B1 (en) Pts coder of mpeg system
JP2008176918A (en) Reproducing apparatus and method, and recording medium
JP2005347787A (en) Information recorder and recording method
JP2001339688A (en) Playback equipment of transport stream
KR100376578B1 (en) Method for recoding digital data stream and providing presentation control information therefor
US7190697B2 (en) Multiplexing of selection from among streams and parsed-out time synchronization information
KR0181083B1 (en) Pcr coding apparatus of mpeg
KR0181081B1 (en) Escr generator for system decoder
KR0181080B1 (en) Apparatus coding escr information in mpeg
Sarginson Research and Development Report
KR19990043122A (en) Packetized basic bit sequence reconstruction device for the interface of encoder and multiplexing period

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121030

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20131030

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee