KR102034373B1 - The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data - Google Patents

The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data Download PDF

Info

Publication number
KR102034373B1
KR102034373B1 KR1020180021142A KR20180021142A KR102034373B1 KR 102034373 B1 KR102034373 B1 KR 102034373B1 KR 1020180021142 A KR1020180021142 A KR 1020180021142A KR 20180021142 A KR20180021142 A KR 20180021142A KR 102034373 B1 KR102034373 B1 KR 102034373B1
Authority
KR
South Korea
Prior art keywords
output
output packet
time
stream
packet
Prior art date
Application number
KR1020180021142A
Other languages
Korean (ko)
Other versions
KR20190101145A (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 KR1020180021142A priority Critical patent/KR102034373B1/en
Priority to PCT/KR2018/003059 priority patent/WO2019132119A1/en
Priority to US16/032,983 priority patent/US10700799B2/en
Priority to EP18186170.9A priority patent/EP3506642A1/en
Publication of KR20190101145A publication Critical patent/KR20190101145A/en
Application granted granted Critical
Publication of KR102034373B1 publication Critical patent/KR102034373B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/2365Multiplexing of several video streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04HBROADCAST COMMUNICATION
    • H04H20/00Arrangements for broadcast or for distribution combined with broadcast
    • H04H20/20Arrangements for broadcast or distribution of identical information via plural systems
    • H04H20/24Arrangements for distribution of identical information via broadcast system and non-broadcast system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/23605Creation or processing of packetized elementary streams [PES]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2385Channel allocation; Bandwidth allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

복호화를 수행하는 장치에서의 오류를 방지하기 위한 방송 송신용 데이터를 다중화하는 방법 및 그 장치가 개시된다. 일 실시예에 따른 출력 패킷들을 포함하는 출력 스트림을 복호화 장치에 제공하는 스트림 생성장치의 상기 출력 패킷 제공시점 조정 방법은 제1 출력 패킷 및 제2 출력 패킷을 획득하는 단계; 상기 제1 출력 패킷에 제1 다중화 시각을 부여하고, 상기 제2 출력 패킷에 상기 제1 다중화 시각과 다른 제2 다중화 시각을 부여하는 단계; 및 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 기초로 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 다중화하여, 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하는 단계를 포함하되, 상기 복호화 장치에서 상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류가 발생되지 않도록, 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점을 조정하는 것을 특징으로 할 수 있다.Disclosed are a method and apparatus for multiplexing broadcast transmission data for preventing an error in an apparatus for decoding. According to one or more exemplary embodiments, a method for adjusting an output packet providing time of a stream generating apparatus for providing an output stream including output packets to a decoding apparatus includes: obtaining a first output packet and a second output packet; Assigning a first multiplexed time to the first output packet and giving a second multiplexed time different from the first multiplexed time to the second output packet; And multiplexing the first output packet and the second output packet based on the first multiplexed time and the second multiplexed time, and outputting the first output packet and the second output packet as the output stream to the decoding apparatus. And providing the first output packet and the second output packet to the decoding apparatus such that an error associated with the first output packet and the second output packet does not occur in the decoding apparatus. It may be characterized by adjusting.

Description

복호화를 수행하는 장치에서의 오류를 방지하기 위한 방송 송신용 데이터를 다중화하는 방법 및 그 장치{THE METHOD AND APPARATUS FOR MULTIPLEXING DATA FOR BROADCAST TRANSMISSION FOR PREVENTING ERROR IN A DEVICE THAT PERFORMS DECODING THE DATA}Method for multiplexing broadcast transmission data to prevent errors in a device performing decoding, and a device thereof

아래의 실시예들은 복호화를 수행하는 장치에서의 오류를 방지하기 위한 방송 송신용 데이터를 다중화하는 방법 및 그 장치에 관한 것이다.The following embodiments are related to a method and an apparatus for multiplexing broadcast transmission data for preventing an error in an apparatus for decoding.

세계적으로 아날로그 방송에서 디지털 방송으로의 전환이 거의 마무리되어감에 따라, Post-HD 시대에 UHDTV(Ultra High Definition TV) 등 실감의 대용량 방송 및 방송 통신 융합 환경에 대비한 새로운 차기 방송 표준에 관한 연구의 필요성이 날로 높아져 가고 있다. 이러한 가운데 ATSC (Advanced Television Systems Committee), DVB(Digital Video Broadcasting), EBU (European Broadcasting Union), NHK, ETRI (Electronics and Telecommunications Research Institute) 등 14개 기관이 2011년 11월 FoBTV (Future of Broadcast TV)를 결성하여, 브로드밴드 에코시스템 기반 방송의 역할, 차세대 공중파 방송 시스템의 특성, 스펙트럼 스퀴즈 등 미래 방송 시스템에 대한 논의를 시작한 상태이다. 또한 고도화 추세에 있는 이동통신 기술과 더불어 방송의 디지털 전환이 완료되고 있는 시점에서, 고도화된 차세대 방송 기술에 대한 기술 선점을 위해 유럽에서 DVB 2.0 시스템을, 미국에서는 ATSC 3.0 시스템을, 일본에선 ISDB(Integrated Services Digital Broadcasting)- Tmm (Terrestrial mobile multi-media)시스템에 관한 기술개발을 이미 추진하고있는 실정이며, 이에 국내에서도 관련 미래 방송 기술에 대한 원천 기술 및 신규 서비스를 위한 장비 개발에 대한 연구개발이 필요한 상황이다.As the transition from analog broadcasting to digital broadcasting is nearing the end of the world, a study on the next broadcasting standard for the high-volume broadcasting and broadcasting communication convergence environment such as Ultra High Definition TV (UHDTV) in the post-HD era The need for it is increasing day by day. Among these, 14 organizations, including Advanced Television Systems Committee (ATSC), Digital Video Broadcasting (DVB), European Broadcasting Union (EBU), NHK, and the Electronics and Telecommunications Research Institute (ETRI), announced in November 2011 the Future of Broadcast TV (FBTV). In the future, we have begun to discuss the role of broadband ecosystem-based broadcasting, the characteristics of next-generation airwave broadcasting systems, and future broadcasting systems such as spectrum squeeze. In addition, with the advancement of digital broadcasting in addition to mobile communication technology, which is becoming more advanced, DVB 2.0 system in Europe, ATSC 3.0 system in USA, and ISDB in Japan Integrated Services Digital Broadcasting (Terrestrial mobile multi-media) is already in the process of developing technology for TMS (Terrestrial mobile multi-media) system, and in Korea, it is necessary to research and develop the source technology for related future broadcasting technology and equipment development for new service. Situation.

본 발명의 일 과제는 방송 시스템에서 오류가 발생되지 않도록 스트림 제공장치가 출력 패킷을 다중화하는 방법을 제공하는 것이다.An object of the present invention is to provide a method for multiplexing output packets by a stream providing apparatus so that no error occurs in a broadcast system.

본 발명의 다른 일 과제는 ATSC 3.0 방송시스템에 사용가능한 출력 스트림을 생성하는 방법을 제공하는 것이다.Another object of the present invention is to provide a method for generating an output stream usable in an ATSC 3.0 broadcasting system.

본 발명의 또 다른 일 과제는 UHD 방송 시스템에 사용가능한 출력 스트림을 생성하는 방법을 제공하는 것이다.Another object of the present invention is to provide a method for generating an output stream usable in a UHD broadcasting system.

본 발명의 또 다른 일 과제는 복호화를 수행하는 장치에서 오류가 발생되지 않도록 스트림 제공장치가 출력 패킷을 다중화하는 방법을 제공하는 것이다.Another object of the present invention is to provide a method for multiplexing output packets by a stream providing apparatus so that no error occurs in an apparatus for decoding.

본 발명이 해결하고자 하는 과제가 상술한 과제로 제한되는 것은 아니며, 언급되지 아니한 과제들은 본 명세서 및 첨부된 도면으로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The problem to be solved by the present invention is not limited to the above-described problem, the objects that are not mentioned will be clearly understood by those skilled in the art from the present specification and the accompanying drawings. .

본 발명의 일 실시예에 따른 출력 패킷들을 포함하는 출력 스트림을 복호화 장치에 제공하는 스트림 생성장치의 상기 출력 패킷 제공시점 조정 방법은 제1 출력 패킷 및 제2 출력 패킷을 획득하는 단계; 상기 제1 출력 패킷에 제1 다중화 시각을 부여하고, 상기 제2 출력 패킷에 상기 제1 다중화 시각과 다른 제2 다중화 시각을 부여하는 단계; 및 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 기초로 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 다중화하여, 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하는 단계를 포함하되, 상기 복호화 장치에서 상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류가 발생되지 않도록, 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점을 조정하는 것을 특징으로 할 수 있다.According to an embodiment of the present invention, a method for adjusting an output packet providing time of a stream generating apparatus for providing an output stream including output packets to a decoding apparatus includes: obtaining a first output packet and a second output packet; Assigning a first multiplexed time to the first output packet and giving a second multiplexed time different from the first multiplexed time to the second output packet; And multiplexing the first output packet and the second output packet based on the first multiplexed time and the second multiplexed time, and outputting the first output packet and the second output packet as the output stream to the decoding apparatus. And providing the first output packet and the second output packet to the decoding apparatus such that an error associated with the first output packet and the second output packet does not occur in the decoding apparatus. It may be characterized by adjusting.

본 발명의 과제의 해결 수단이 상술한 해결 수단들로 제한되는 것은 아니며, 언급되지 아니한 해결 수단들은 본 명세서 및 첨부된 도면으로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Means for solving the problems of the present invention are not limited to the above-described solutions, and the solutions not mentioned will be clearly understood by those skilled in the art from the present specification and the accompanying drawings. Could be.

본 발명에 의하면, 방송 시스템에서 오류가 발생되지 않도록 출력 패킷을 다중화하여 출력 스트림을 제공할 수 있다.According to the present invention, an output stream can be provided by multiplexing output packets so that an error does not occur in a broadcast system.

또한, 본 발명에 의하면, ATSC 3.0 방송시스템에 사용가능한 출력 스트림을 제공할 수 있다.In addition, the present invention can provide an output stream usable in an ATSC 3.0 broadcasting system.

또한, 본 발명에 의하면, UHD 방송 시스템에 사용가능한 출력 스트림을 제공할 수 있다.Moreover, according to this invention, the output stream which can be used for a UHD broadcasting system can be provided.

또한, 본 발명에 의하면, 복호화를 수행하는 장치에서 오류가 발생되지 않도록 스트림 제공장치가 출력 패킷을 다중화하는 방법을 제공할 수 있다.In addition, according to the present invention, a stream providing apparatus may provide a method for multiplexing output packets so that no error occurs in an apparatus for decoding.

본 발명의 효과가 상술한 효과들로 제한되는 것은 아니며, 언급되지 아니한 효과들은 본 명세서 및 첨부된 도면으로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확히 이해될 수 있을 것이다.The effects of the present invention are not limited to the above-described effects, and effects that are not mentioned will be clearly understood by those skilled in the art from the present specification and the accompanying drawings.

도 1은 일 실시예에 따른 방송 시스템을 나타낸 블록도이다.
도 2는 본 발명의 실시예에 따른 송신 시스템을 나타낸 블록도이다.
도 3은 본 발명의 실시예에 따른 스트림 제공부를 나타낸 블록도이다.
도 4는 본 발명의 다른 실시예에 따른 스트림 제공장치를 나타낸 블록도이다.
도 5는 본 발명의 실시예에 따른 스트림 생성부를 나타낸 블록도이다.
도 6은 본 발명의 실시예에 따른 제1 스트림 생성부를 나타낸 블록도이다.
도 7은 본 발명의 실시예에 따른 PES 패킷 및 TS 패킷을 설명하기 위한 도면이다.
도 8은 본 발명의 실시예에 따른 제2 스트림 생성부를 나타낸 블록도이다.
도 9는 본 발명의 실시예에 따른 제2a 스트림 생성부를 나타낸 블록도이다.
도 10은 본 발명의 실시예에 따른 제2b 스트림 생성부를 나타낸 블록도이다.
도 11은 본 발명의 다른 실시예에 따른 스트림 생성부를 나타낸 블록도이다.
도 12는 출력 스트림에 포함된 출력 패킷의 비트수를 설명하기 위한 도면이다.
도 13은 본 발명의 실시예에 따른 출력 패킷의 다중화 방법을 나타낸 동작 흐름도이다.
도 14는 본 발명의 실시예에 따른 다중화 시각의 삽입을 설명하기 위한 도면이다.
도 15는 본 발명의 실시예에 따른 다중화를 설명하기 위한 도면이다.
도 16은 본 발명의 다른 실시예에 따른 다중화를 설명하기 위한 도면이다.
도 17은 본 발명의 실시예에 따른 복수의 출력 패킷의 다중화 방법을 나타낸 동작 흐름도이다.
도 18은 본 발명의 실시예에 따른 복수의 출력 패킷의 다중화를 설명하기 위한 도면이다.
도 19는 본 발명의 실시예에 따른 TS 패킷의 다중화 방법을 나타낸 동작 흐름도이다.
도 20은 본 발명의 실시예에 따른 A3 패킷의 다중화 방법을 나타낸 동작 흐름도이다.
도 21은 본 발명의 실시예에 따른 다중화 시각의 설정을 설명하기 위한 도면이다.
도 22는 본 발명의 다른 실시예에 따른 다중화 시각의 설정을 설명하기 위한 도면이다.
도 23은 본 발명의 실시예에 따른 우선 순위를 고려한 다중화 방법을 나타낸 동작 흐름도이다.
도 24는 본 발명의 또 다른 실시예에 따른 다중화를 설명하기 위한 도면이다.
도 25는 비디오 부호화부(1200)의 실제 ES 비트레이트가 미리 설정된 ES 비트레이트 보다 작을 때, 다중화 시각을 조정하지 않을 경우의 출력 스트림을 설명하기 위한 도면이다.
도 26은 비디오 부호화부(1200)의 실제 ES 비트레이트가 미리 설정된 ES 비트레이트 보다 클때, 다중화 시각을 조정하지 않을 경우의 출력 스트림을 설명하기 위한 도면이다.
도 27은 본 발명의 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.
도 28은 본 발명의 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.
도 29는 본 발명의 다른 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.
도 30은 본 발명의 또 다른 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.
도 31은 본 발명의 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.
도 32는 본 발명의 또 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.
도 33은 본 발명의 또 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.
1 is a block diagram illustrating a broadcasting system according to an exemplary embodiment.
2 is a block diagram illustrating a transmission system according to an exemplary embodiment of the present invention.
3 is a block diagram illustrating a stream provider according to an exemplary embodiment of the present invention.
4 is a block diagram showing a stream providing apparatus according to another embodiment of the present invention.
5 is a block diagram illustrating a stream generator according to an exemplary embodiment of the present invention.
6 is a block diagram illustrating a first stream generator according to an embodiment of the present invention.
7 is a diagram for explaining a PES packet and a TS packet according to an embodiment of the present invention.
8 is a block diagram illustrating a second stream generator according to an embodiment of the present invention.
9 is a block diagram illustrating a 2a stream generator according to an embodiment of the present invention.
10 is a block diagram illustrating a second bb stream generator according to an embodiment of the present invention.
11 is a block diagram illustrating a stream generator according to another embodiment of the present invention.
12 is a diagram for describing the number of bits of an output packet included in an output stream.
13 is a flowchart illustrating a method of multiplexing output packets according to an embodiment of the present invention.
14 is a view for explaining the insertion of multiplexed time according to an embodiment of the present invention.
15 is a diagram for explaining multiplexing according to an embodiment of the present invention.
16 is a diagram for describing multiplexing according to another embodiment of the present invention.
17 is a flowchart illustrating a method of multiplexing a plurality of output packets according to an embodiment of the present invention.
18 illustrates multiplexing of a plurality of output packets according to an embodiment of the present invention.
19 is a flowchart illustrating a method of multiplexing TS packets according to an embodiment of the present invention.
20 is a flowchart illustrating an A3 packet multiplexing method according to an embodiment of the present invention.
21 is a diagram for explaining setting of multiplexing time according to an embodiment of the present invention.
22 is a diagram for explaining setting of multiplexing time according to another embodiment of the present invention.
23 is a flowchart illustrating a multiplexing method considering priority according to an embodiment of the present invention.
24 is a diagram for explaining multiplexing according to another embodiment of the present invention.
FIG. 25 is a diagram for describing an output stream when the multiplexing time is not adjusted when the actual ES bit rate of the video encoder 1200 is smaller than the preset ES bit rate.
FIG. 26 is a diagram for describing an output stream when the multiplexing time is not adjusted when the actual ES bit rate of the video encoder 1200 is larger than a preset ES bit rate.
27 is a flowchart illustrating an output time adjustment method of an output packet according to an embodiment of the present invention.
28 is a diagram for explaining adjustment of multiplexing time according to an embodiment of the present invention.
29 is a diagram for explaining adjustment of multiplexing time according to another embodiment of the present invention.
30 is a diagram for explaining adjustment of multiplexing time according to another embodiment of the present invention.
31 is a flowchart illustrating a method of adjusting an output time point of an output packet according to another embodiment of the present invention.
32 is a flowchart illustrating a method of adjusting an output time point of an output packet according to another embodiment of the present invention.
33 is a flowchart illustrating a method of adjusting an output time point of an output packet according to another embodiment of the present invention.

이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 그러나, 본 발명이 일 실시예들에 의해 제한되거나 한정되는 것은 아니다. 또한, 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. However, the present invention is not limited or limited by the embodiments. Also, like reference numerals in the drawings denote like elements.

본 발명은 방송 신호 송신을 위한 다중화 방법 및 그 장치를 제공한다. 본 발명의 일 실시예에 따른 방송 신호는 방송 서비스를 위해 제공되며, 방송 서비스는 지상파 방송 서비스, IPTV 방송 서비스, 위성 방송 서비스, 모바일 방송 서비스, HD(High Definition) TV 서비스, FHD(Full High Definition) TV 서비스, UHD(Ultra High Definition) TV 서비스 등을 포함할 수 있다. 또한, 본 발명의 일 실시예에 따른 방송 서비스에 이에 한정되는 것은 아니며, 본 발명의 방송 신호에 의해 제공될 수 있는 모든 방송 서비스는 본 발명의 방송 서비스에 적용될 수 있다. 예를 들어, 본 발명의 방송 서비스는 VR 방송 서비스, 360도 VR 방송 서비스 및 3D 방송 서비스를 포함할 수도 있다.The present invention provides a multiplexing method and apparatus for broadcast signal transmission. The broadcast signal according to an embodiment of the present invention is provided for a broadcast service, and the broadcast service is a terrestrial broadcast service, an IPTV broadcast service, a satellite broadcast service, a mobile broadcast service, a high definition (HD) TV service, and a full high definition (FHD). ) TV service, Ultra High Definition (UHD) TV service, and the like. In addition, the broadcast service according to an embodiment of the present invention is not limited thereto, and all broadcast services that may be provided by the broadcast signal of the present invention may be applied to the broadcast service of the present invention. For example, the broadcast service of the present invention may include a VR broadcast service, a 360 degree VR broadcast service, and a 3D broadcast service.

또한, 본 발명의 실시예에서 방송 신호를 제공하기 위한 스트림은 MPEG-2(moving pictures exports group-2) TS(transport stream) 또는 ROUTE(Real-time Object delivery over Unidirectional Transport) 또는 MMTP(MPEG Media Transport Protocol)가 될 수 있다. ROUTE 및 MMTP는 현재 ATSC 3.0에서 표준화 진행 중인 방송망 전송 스트림 다중화 규격을 나타낸다. 또한, 인터넷 망으로 전송되는 전송 스트림은 MPEG-DASH(Dynamic Adaptive Streaming over HTTP) 규격을 따른다. 그러나 본 발명은 반드시 이에 한정되는 것은 아니다.In addition, according to an embodiment of the present invention, a stream for providing a broadcast signal may be a moving pictures exports group-2 (MPEG-2) transport stream (TS) or a real-time object delivery over Unidirectional Transport (ROUTE) or MPEG Media Transport (MMTP). Protocol). ROUTE and MMTP represent broadcast network transport stream multiplexing standards currently under standardization in ATSC 3.0. In addition, the transport stream transmitted to the Internet network follows the MPEG-DASH (Dynamic Adaptive Streaming over HTTP) standard. However, the present invention is not necessarily limited thereto.

도 1은 일 실시예에 따른 방송 시스템을 나타낸 블록도이다.1 is a block diagram illustrating a broadcasting system according to an exemplary embodiment.

도 1을 참조하면, 방송 시스템(100)은 송신 시스템(110) 및 수신 시스템(120)를 포함할 수 있다.Referring to FIG. 1, the broadcast system 100 may include a transmission system 110 and a reception system 120.

송신 시스템(110)는 예를 들어, 텔레비전 프로그램 등의 서비스의 송신(디지털 방송이나 데이터 전송)을 행한다. 즉, 송신 시스템(110)은 예를 들어 텔레비전 프로그램 등의 서비스를 구성하는 컴포넌트로서의 영상이나 음성의 데이터 등의 송신의 대상인 대상 데이터의 스트림을, 방송 신호로서, 전송로를 통하여 송신(전송)한다. 여기서, 전송로는 RF(Radio Frequency) 방식, 네트워크 방식 등 방송 신호가 전달될 수 있는 다양한 방식으로 구성될 수 있다.The transmission system 110 performs transmission (digital broadcasting or data transmission) of services, such as a television program, for example. In other words, the transmission system 110 transmits (transmits) a stream of target data, which is a target of transmission such as video or audio data, as a component constituting a service such as a television program, through a transmission path as a broadcast signal. . Here, the transmission path may be configured in various ways in which a broadcast signal may be transmitted, such as a radio frequency (RF) method and a network method.

또한, 일 실시예에서, 송신 시스템(110)는 방송국에서의 방송신호 생성 및 전송에 이용될 수 있으며, 이 경우, 방송 신호는 방송 시스템의 운용 규칙(operational regulations)에 의해 정의된 주파수 대역 내의 주파수와, 방송 시스템이 운용되는 영역/나라의 법규 등을 이용하여 송신될 수 있다.In addition, in one embodiment, the transmission system 110 may be used for generating and transmitting broadcast signals at broadcast stations, in which case the broadcast signals are frequencies within a frequency band defined by operational regulations of the broadcast system. And the law of the region / country in which the broadcasting system is operated.

또한, 본 발명의 실시예에서 수신 시스템(120)는 송신 시스템(110)로부터 전송로를 통하여 송신되어 오는 방송 신호를 수신하고, 수신된 방송신호를 복호화하여 원래의 스트림으로 복원하여 출력할 수 있다. 예를 들어, 수신 시스템(120)는 복호화 장치 및 영상 출력 장치를 포함할 수 있고, 영상 출력 장치는 복호화 장치로부터 출력 신호를 수신하고, 출력 신호에 따라 텔레비전 프로그램 등의 서비스를 구성하는 영상이나 음성의 데이터를 출력할 수 있다.In addition, in the embodiment of the present invention, the reception system 120 may receive a broadcast signal transmitted from the transmission system 110 through a transmission path, decode the received broadcast signal, and restore the original stream and output the same. . For example, the reception system 120 may include a decoding device and an image output device, and the image output device receives an output signal from the decoding device, and configures a video or audio constituting a service such as a television program according to the output signal. The data of can be output.

본 발명의 일 실시예에서, 수신 시스템(120)은 브로드캐스트(broadcast) 또는 브로드밴드(broadband)의 방식으로 송신 시스템(110)으로부터 방송신호를 수신할 수 있다. 여기서, 브로드밴드는 양방향 IP 접속을 활용한 A/V 컨텐츠의 스트리밍(streaming) 또는 다운로딩(downloading)을 위한 주파수 대역으로 사용하는 방식이며, 브로드캐스트는 DVB-T(Digital Video Broadcasting-Terrestrial), DVB-S(Satellite), DVB-C(Cable) 등과 같은 클래시컬한 일방향 전송 방식을 의미할 수 있다.In an embodiment of the present invention, the reception system 120 may receive a broadcast signal from the transmission system 110 in a broadcast or broadband manner. In this case, broadband is used as a frequency band for streaming or downloading A / V content using two-way IP connection, and broadcast is DVB-T (Digital Video Broadcasting-Terrestrial) or DVB. It may mean a classical one-way transmission scheme such as -S (Satellite), DVB-C (Cable) and the like.

일 실시예에서, 수신 시스템(120)은 브로드캐스트 네트워크를 통해 방송신호를 획득할 수 있고, 상기 방송신호는 선형 A/V 컨텐츠, 비실시간 A/V 컨텐츠, 어플리케이션 데이터 및 어플리케이션 시그널링(signalling) 정보 등을 포함할 수 있다. In one embodiment, the reception system 120 may obtain a broadcast signal through a broadcast network, the broadcast signal may be linear A / V content, non-real-time A / V content, application data, and application signaling information. And the like.

또한, 수신 시스템(120)은 브로드밴드 네트워크를 통해 방송신호를 획득할 수 있고, 상기 방송신호는 어플리케이션 데이터, 비선형 A/V 컨텐츠등을 포함할 수 있다. 여기서, 비선형 A/V 컨텐츠는 Streaming on Demand와 같은 사용자가 자유롭게 컨텐츠의 시청 시간 또는 컨텐츠 내 재생 시점을 지정할 수 있는 컨텐츠며, 선형 A/V 컨텐츠는 제공자가 제공하는 특정 시간에만 시청이 가능한 푸시(push) 형태의 컨텐츠를 의미할 수 있다.In addition, the reception system 120 may obtain a broadcast signal through a broadband network, and the broadcast signal may include application data and non-linear A / V content. Here, non-linear A / V content is content that a user, such as Streaming on Demand, can freely designate the viewing time or playback time of the content, and linear A / V content is a push that can be viewed only at a specific time provided by a provider ( push) content.

또한, 본 발명의 실시예에 따른 방송 시스템(1000)은 ATSC(Advanced Television Systems Committee standards) 규격에 준거한 데이터 전송 이외에, DVB(Digital Video Broadcasting) 규격이나 ISDB(Integrated Services Digital Broadcasting) 규격 등에 준거한 데이터 전송, 기타의 데이터 전송에 적용할 수 있다. 이하에서는, 설명의 편의를 위하여, ATSC 3.0 기반 방송 시스템을 일 예로서 설명하기로 한다. 그러나, 본 발명은 ATSC 3.0에 한정되는 것은 아니며 다른 시스템들에도 적용 가능하다.In addition, the broadcast system 1000 according to an exemplary embodiment of the present invention complies with the DVB (Digital Video Broadcasting) standard, the Integrated Services Digital Broadcasting (ISDB) standard, or the like, in addition to data transmission based on the Advanced Television Systems Committee standards (ATSC) standard. It can be applied to data transmission and other data transmission. Hereinafter, for convenience of description, an ATSC 3.0 based broadcasting system will be described as an example. However, the present invention is not limited to ATSC 3.0 and is applicable to other systems.

도 2는 본 발명의 실시예에 따른 송신 시스템을 나타낸 블록도이다.2 is a block diagram illustrating a transmission system according to an exemplary embodiment of the present invention.

도 2를 참조하면, 송신 시스템(110)은 스트림 제공장치(1000), 게이트웨이(2000) 및 송신기(3000)를 포함할 수 있다. 도 2에서 표현되지는 않았지만, 송신 시스템(110)은 스튜디오(연주소) 및 송신소로 구성될 수 있고, 이 경우, 스튜디오(연주소)에는 스트림 제공장치(1000) 및 게이트웨이(2000)가 포함되고, 송신소에는 송신기(3000)가 포함될 수 있다.Referring to FIG. 2, the transmission system 110 may include a stream providing apparatus 1000, a gateway 2000, and a transmitter 3000. Although not represented in FIG. 2, the transmission system 110 may be composed of a studio (year address) and a transmission station. In this case, the studio (year address) includes a stream providing apparatus 1000 and a gateway 2000. The transmitter may include a transmitter 3000.

본 발명의 일 실시예에서, 스트림 제공장치(1000)는 방송신호를 외부로부터 소스 방송 신호를 입력받고, 소스 방송 신호를 소정의 규칙에 따라 변환하여 변환된 데이터를 스트림 형태로 게이트웨이(2000)에 제공하는 장치를 의미할 수 있다. 일 실시예에서, 스트림 제공장치(1000)는 인코더로 표현될 수 있다. 스트림 제공장치(1000)가 외부로부터 입력받는 소스 방송 신호는 소스 비디오 신호 및 소스 오디오 신호를 포함할 수 있다. 여기서, 소스 비디오/오디오 신호는 아날로그 또는 디지털 데이터를 포함할 수 있다. 또한, 소스 비디오 신호는 SD(Standard Definition, 720*480 해상도), HD(High Definition, 1280*720 해상도), FHD(Full HD, 1920*1080 해상도), QHD(Quad HD, 2560*1440 해상도) 및 UHD(Ultra HD, 3840*2160 해상도) 방송 신호일 수 있다. 여기서, UHD 방송 신호는 차세대 방송영상으로 불리는 기술로, UHD 영상은 일반적으로 가로와 세로 픽셀 수가 4000(4k·3840x2160)∼8000급(8k·7680x4320)에 육박할 수 있다. 화면 해상도는 픽셀로 불리는 화소 수가 좌우한다고 볼 때 UHD 영상은 4k 기준으로 HD(2k·1920x1080)와 비교해 4배나 더 선명할 수 있다. 8k에 비교하면 선명도 면에서 16배까지 차이가 날 수 있다. 화면 주사율, 즉 초당 프레임 수에서도 HD가 30㎐인데 반해 60㎐로 1초당 화면 60장을 전송해 훨씬 자연스러우면서 역동적인 화면을 즐길 수 있다.In one embodiment of the present invention, the stream providing apparatus 1000 receives a source broadcast signal from a broadcast signal from an external source, converts the source broadcast signal according to a predetermined rule, and converts the converted data into a stream 2000 to the gateway 2000. It may mean a device that provides. In one embodiment, the stream providing apparatus 1000 may be represented by an encoder. The source broadcast signal received by the stream providing apparatus 1000 from the outside may include a source video signal and a source audio signal. Here, the source video / audio signal may include analog or digital data. In addition, the source video signal can be SD (Standard Definition, 720 * 480 resolution), HD (High Definition, 1280 * 720 resolution), FHD (Full HD, 1920 * 1080 resolution), QHD (Quad HD, 2560 * 1440 resolution) and It may be a UHD (Ultra HD, 3840 * 2160 resolution) broadcast signal. Here, the UHD broadcast signal is a technology called a next generation broadcast video, and the UHD video can generally reach 4000 (4k · 3840x2160) to 8000 (8k · 7680x4320) in the horizontal and vertical pixels. Considering that the resolution of the screen is determined by the number of pixels called pixels, UHD video can be four times clearer than HD (2k · 1920x1080) on a 4k scale. Compared to 8k, the difference can be up to 16 times in sharpness. Even at the refresh rate, or frames per second, HD is 30 HD, while 60㎐ is 60 screens per second, so you can enjoy a much more natural and dynamic picture.

또한, 소스 비디오 신호 및 소스 오디오 신호는 하나의 신호 형태로 결합되어 스트림 제공장치(1000)에 입력될 수도 있고, 서로 별개의 신호로 입력될 수도 있다.In addition, the source video signal and the source audio signal may be combined into one signal form and input to the stream providing apparatus 1000 or may be input as separate signals.

또한, 스트림 제공장치(1000)는 소스 방송 신호를 카메라로부터 획득할 수 있고 미리 저장된 저장소로부터 획득할 수도 있다. 또한, 스트림 제공장치(1000)는 해상도를 업 스케일링(upscaling) 또는 다운 스케일링(down scaling)하는 컨버터(예를 들어, HD-UHD 업컨버터)로부터 해상도가 변환된 소스 비디오 신호를 획득할 수도 있다.In addition, the stream providing apparatus 1000 may obtain the source broadcast signal from the camera or may obtain the source broadcast signal from a prestored storage. In addition, the stream providing apparatus 1000 may obtain a source video signal whose resolution is converted from a converter (eg, HD-UHD upconverter) that upscals or downscales the resolution.

또한, 스트림 제공장치(1000)는 소스 방송신호를 인코딩하여 기본 스트림을 생성하고, 기본 스트림에 각종 부가 데이터를 다중화하고, 동기화하여 출력 스트림을 생성하고, 출력 스트림을 게이트웨이(2000)에 제공할 수 있다. 스트림 제공장치(1000)에 대해서는 도 3 및 도 4에서 보다 자세하게 설명한다.In addition, the stream providing apparatus 1000 may generate an elementary stream by encoding a source broadcast signal, multiplex various kinds of additional data to the elementary stream, synchronize to generate an output stream, and provide an output stream to the gateway 2000. have. The stream providing apparatus 1000 will be described in more detail with reference to FIGS. 3 and 4.

또한, 도 2에 표현되지는 않았지만, 송신 시스템(110)에서 스트림 제공장치(1000)는 복수개로 구성될 수 있다. 이 경우, 송신 시스템(110)은 재다중화기(Re-Multiplexer)를 포함할 수 있다. 재다중화기는 복수의 스트림 제공장치(1000)로부터 전달받은 출력 스트림을 다중화하고, 다중화된 스트림을 게이트웨이(2000)에 제공할 수 있다.In addition, although not represented in FIG. 2, the stream providing apparatus 1000 may be configured in plural in the transmission system 110. In this case, the transmission system 110 may include a re-multiplexer. The remultiplexer may multiplex output streams received from the plurality of stream providing apparatuses 1000 and provide the multiplexed streams to the gateway 2000.

게이트웨이(2000)는 스트림 제공장치(1000)로부터 획득한 출력 스트림을 출력 신호로 변환하고, 출력 신호를 송신기(3000)에 제공할 수 있다. 이 때, 게이트웨이(2000)는 출력 신호를 마이크로웨이브망이나 유선 IP망을 통해서 송신기(3000)에 전달할 수 있다. 또한, 일 실시예에서, 출력 신호는 IP 패킷으로 구성될 수 있다. 또한, 도 2에서 표현되지는 않았지만, 송신 시스템(110)은 시그널링 서버를 포함할 수 있고, 게이트웨이(2000)는 시그널링 서버로부터 시그널링 정보를 획득하고, 출력 신호에 시그널링 정보를 포함할 수 있다.The gateway 2000 may convert the output stream obtained from the stream providing apparatus 1000 into an output signal and provide the output signal to the transmitter 3000. In this case, the gateway 2000 may transmit the output signal to the transmitter 3000 through a microwave network or a wired IP network. Also, in one embodiment, the output signal may consist of IP packets. In addition, although not represented in FIG. 2, the transmission system 110 may include a signaling server, and the gateway 2000 may obtain signaling information from the signaling server and include signaling information in the output signal.

송신기(3000)는 게이트웨이(2000)로부터 획득한 출력 신호를 RF 변환하여 증폭하고 증폭된 RF 신호를 소정의 대역으로 할당된 채널을 통해 전송할 수 있다. 일 실시예에서, 송신기(3000)는 익사이터(Exciter), HPA(High Power Amplifier), 마스크 필터 및 안테나를 포함할 수 있다. 익사이터는 게이트웨이(2000)로부터 획득한 출력 신호를 RF 송신신호로 변환하고, HPA는 RF 송신 신호의 파워를 증폭하고, 마스크 필터는 RF 송신신호의 인접대역 간섭을 방지할 수 있으며, 안테나는 RF 송신신호를 수신 시스템(120)에 전송할 수 있다.The transmitter 3000 may convert and amplify the output signal obtained from the gateway 2000 and transmit the amplified RF signal through a channel allocated to a predetermined band. In one embodiment, the transmitter 3000 may include an exciter, a high power amplifier (HPA), a mask filter, and an antenna. The exciter converts the output signal obtained from the gateway 2000 into an RF transmission signal, the HPA amplifies the power of the RF transmission signal, the mask filter can prevent adjacent band interference of the RF transmission signal, and the antenna is an RF The transmission signal may be transmitted to the reception system 120.

본 발명의 실시예에서, 수신 시스템(120)의 복호화 장치는 스트림 제공 장치(1000)의 출력 스트림을 복호화하여 영상 출력 장치에서 이해할 수 있는 포맷으로 변환할 수 있다.In the embodiment of the present invention, the decoding apparatus of the reception system 120 may decode the output stream of the stream providing apparatus 1000 and convert the output stream into a format that can be understood by the image output apparatus.

이하에서는, 설명의 편의를 위하여 스트림 제공 장치(1000)와 복호화 장치 사이에 존재하는 구성들을 생략하고, 송신 시스템(110)과 수신 시스템(120) 사이의 방송 신호 송수신 동작을, 스트림 제공 장치(1000)에서 출력 스트림을 전송하고 복호화 장치에서 출력 스트림을 수신하는 것으로 표현한다. 그러나, 설명의 편의를 위한 것일 뿐, 전술한 바와 같이 스트림 제공 장치(1000)와 복호화 장치 사이에는 복수의 장치가 존재하고, 상기 출력 스트림은 스트림 제공 장치(1000)로부터 상기 복수의 장치를 거쳐 복호화 장치에 도달하는 것은 자명한 사실이다.Hereinafter, for convenience of description, components existing between the stream providing apparatus 1000 and the decoding apparatus are omitted, and the broadcast signal transmitting / receiving operation between the transmitting system 110 and the receiving system 120 is performed. In this case, the output stream is transmitted and the output stream is received by the decoding apparatus. However, for convenience of explanation, as described above, a plurality of devices exist between the stream providing apparatus 1000 and the decoding apparatus, and the output stream is decoded from the stream providing apparatus 1000 via the plurality of apparatuses. Reaching the device is self-evident.

도 3은 본 발명의 실시예에 따른 스트림 제공부를 나타낸 블록도이다.3 is a block diagram illustrating a stream provider according to an exemplary embodiment of the present invention.

도 3을 참조하면, 스트림 제공장치(1000)는 입력부(1100), 비디오 부호화부(1200), 오디오 부호화부(1300), 스트림 생성부(1400), 출력부(1500) 및 제어부(1600)를 포함할 수 있다.Referring to FIG. 3, the stream providing apparatus 1000 may include an input unit 1100, a video encoder 1200, an audio encoder 1300, a stream generator 1400, an output unit 1500, and a controller 1600. It may include.

입력부(1100)는 외부로부터 소스 방송 신호를 획득할 수 있다. 전술한 바와 같이, 입력부(1100)에 입력받는 소스 비디오 신호는 SD, HD, FHD, QHD 및 UHD 해상도를 갖는 방송신호일 수 있다. 또한, 소스 비디오 신호 및 소스 오디오 신호는 하나의 신호 형태로 결합되어 스트림 제공장치(1000)에 입력될 수도 있고, 서로 별개의 신호로 입력될 수도 있다.The input unit 1100 may obtain a source broadcast signal from the outside. As described above, the source video signal input to the input unit 1100 may be a broadcast signal having SD, HD, FHD, QHD, and UHD resolutions. In addition, the source video signal and the source audio signal may be combined into one signal form and input to the stream providing apparatus 1000 or may be input as separate signals.

또한, 본 발명의 실시예에서, 입력부(1100)는 프로세서 형태로 구현될 수 있다.In addition, in the embodiment of the present invention, the input unit 1100 may be implemented in the form of a processor.

비디오 부호화부(1200)는 소스 비디오 신호를 부호화(인코딩)하여 유효한 비트 스트림을 생성할 수 있다. 일 실시예에서, 비디오 부호화부(1200)에서 출력되는 비트 스트림은 기본 스트림(Elementary Stream, ES)으로 표현될 수 있다. 일 실시예에서, 기본 스트림은 오디오, 비디오, 메타 테이터 등 한 종류의 데이터로만 구성될 수 있으며, 그 포맷은 부호화에 사용된 압축 기술에 따라 달라질 수 있다.The video encoder 1200 may generate a valid bit stream by encoding (encoding) the source video signal. In an embodiment, the bit stream output from the video encoder 1200 may be expressed as an elementary stream (ES). In one embodiment, the elementary stream may consist of only one type of data, such as audio, video, metadata, and the format may vary depending on the compression technique used for encoding.

본 발명의 실시예에서, 비디오 부호화부(1200)는 미리 정해진 동영상 압축 기술(코덱)에 따라 소스 비디오 신호를 부호화할 수 있다. 예를 들어, 비디오 부호화부(1200)는 H.261, MPEG-1, H.262/MPEG-2, H.263/MPEG-3, MPEG-4, H.264/AVC, H.265/HEVC 등 다양한 압축 기술에 따라 소스 비디오 신호를 부호화할 수 있다. 물론, 전술한 동영상 압축기술 외에도 소스 비디오 신호를 부호화할 수 있는 동영상 압축기술 역시 본 발명에 적용될 수 있다.In an embodiment of the present invention, the video encoder 1200 may encode the source video signal according to a predetermined video compression technique (codec). For example, the video encoder 1200 may include H.261, MPEG-1, H.262 / MPEG-2, H.263 / MPEG-3, MPEG-4, H.264 / AVC, and H.265 / HEVC. The source video signal may be encoded according to various compression techniques. Of course, in addition to the above-described video compression technology, a video compression technology capable of encoding a source video signal may also be applied to the present invention.

본 발명의 실시예에서, 비디오 부호화부(1200)는 억세스 유닛(Access Unit, AU)을 기본 단위로 부호화를 수행할 수 있다. 여기서, 억세스 유닛은 재생하고자 하는 단위의 부호화의 형태(coded representation)을 나타내는 것으로, 비디오의 경우 억세스 단위는 한 픽쳐(picture)의 모든 코딩된 데이터와 스터핑(stuffing) 부분을 나타낼 수 있다.In an embodiment of the present invention, the video encoder 1200 may perform encoding on an access unit (AU) in basic units. Herein, the access unit represents a coded representation of a unit to be reproduced. In the case of video, the access unit may represent all coded data and stuffing part of a picture.

물론, 본 발명의 실시예가 이에 한정되는 것은 아니며, 비디오 부호화부(1200)는 하나의 억세스 유닛이 아닌 복수의 억세스 유닛을 기본단위로 부호화를 수행할 수도 있다.Of course, the embodiment of the present invention is not limited thereto, and the video encoder 1200 may perform encoding on the basis of a plurality of access units instead of one access unit.

일 실시예에서, 비디오 부호화부(1200)는 소스 비디오 신호를 억세스 유닛에 따라 부호화를 수행한 후 기본 스트림을 생성할 수 있다.In an embodiment, the video encoder 1200 may generate the elementary stream after encoding the source video signal according to the access unit.

또한, 보다 구체적인 실시예로써, 비디오 부호화부(1200)가 H.264/AVC 또는 H.265/HEVC의 압축 기술로 소스 비디오 신호를 부호화하는 경우, 비디오 부호화부(1200)는 입력부(1100)로부터 획득한 픽쳐를 부호화하여 NAL(Network Abstraction Layer) 유닛을 생성하고, NAL 유닛을 결합하여 기본 스트림을 생성할 수 있다. 여기서, NAL 유닛은 부호화된 비트스트림을 네트워크 친화적인 형식으로 작성된 구문 구조(syntax structure)로써, 하나의 픽쳐당 하나의 NAL 유닛 또는 복수의 NAL 유닛으로 구성될 수 있다.Also, as a more specific embodiment, when the video encoder 1200 encodes the source video signal using a compression technique of H.264 / AVC or H.265 / HEVC, the video encoder 1200 may determine from the input unit 1100. The obtained picture may be encoded to generate a network abstraction layer (NAL) unit, and the NAL unit may be combined to generate an elementary stream. Here, the NAL unit is a syntax structure in which the encoded bitstream is created in a network friendly format, and may be composed of one NAL unit or a plurality of NAL units per picture.

본 발명의 몇몇 실시예에서, 비디오 부호화부(1200)는 소정의 비트레이트(bitrate)에 따라 기본 스트림을 생성할 수 있다. 예를 들어, 비트레이트가 10Mbps인 경우, 비디오 부호화부(1200)는 초당 10*10^6 비트의 기본 스트림을 생성할 수 있다. 일 실시예에서, 제어부(1600)는 비디오 부호화부(1200)의 비트스트림을 설정할 수 있다. 일 예로, 제어부(1600)는 스트림 제공장치(1600)에서 제공되는 출력 스트림의 비트량이 소정 기준보다 많을 경우(예를 들어, 복호화 장치의 버퍼에 소정 기준보다 많은 비트량이 비트스트림이 누적되는 경우), 복호화 장치의 버퍼에 오버플로(overflow)가 발생되지 않도록 비디오 부호화부(1200)의 비트 스트림을 조정할 수 있다. 다른 일 예로, 제어부(1600)는 스트림 제공장치(1600)에서 제공되는 출력 스트림의 비트량이 소정 기준보다 적을 경우(예를 들어, 복호화 장치의 버퍼에 소정 기준보다 적은 비트량이 비트스트림이 누적되는 경우), 복호화 장치의 버퍼에 언더플로(underflow)가 발생되지 않도록 비디오 부호화부(1200)의 비트 스트림을 조정할 수 있다.In some embodiments of the present invention, the video encoder 1200 may generate an elementary stream according to a predetermined bitrate. For example, when the bit rate is 10 Mbps, the video encoder 1200 may generate an elementary stream of 10 * 10 ^ 6 bits per second. According to an embodiment, the controller 1600 may set a bitstream of the video encoder 1200. For example, when the bit amount of the output stream provided by the stream providing apparatus 1600 is greater than a predetermined criterion (for example, when the bit stream accumulates more than the predetermined criterion in the buffer of the decoding apparatus) The bit stream of the video encoder 1200 may be adjusted so that no overflow occurs in the buffer of the decoding apparatus. As another example, when the bit amount of the output stream provided by the stream providing apparatus 1600 is less than a predetermined criterion (for example, when the bitstream of the bit amount less than the predetermined criterion is accumulated in the buffer of the decoding apparatus). ), The bit stream of the video encoder 1200 may be adjusted so that underflow does not occur in the buffer of the decoding apparatus.

이와 같이, 제어부(1600)는 복호화 장치에서의 버퍼의 크기 및 버퍼 사용량을 고려하여 비트레이트를 조정할 수 있고, 이러한 비트레이트의 조정을 위하여, 스트림 제공 장치(1000)는 복호화 장치에서의 버퍼에 대응하는 가상의 버퍼를 더 포함할 수 있다. 제어부(1600)는 가상의 버퍼를 참조하여 복호화 장치의 버퍼에서 오버플로/언더플로가 발생하는지 여부를 판단할 수 있다. As described above, the controller 1600 may adjust the bit rate in consideration of the size of the buffer and the buffer usage amount of the decoding apparatus. In order to adjust the bit rate, the stream providing apparatus 1000 corresponds to the buffer in the decoding apparatus. It may further include a virtual buffer. The controller 1600 may determine whether an overflow / underflow occurs in the buffer of the decoding apparatus with reference to the virtual buffer.

오디오 부호화부(1300)는 소스 오디오 신호를 부호화(인코딩)하여 유효한 비트 스트림을 생성할 수 있다. 일 실시예에서, 비디오 부호화부(1200)와 마찬가지로, 오디오 부호화부(1200)에서 출력되는 비트 스트림 역시 기본 스트림(Elementary Stream, ES)로 표현될 수 있다. 또한, 실시예에서, 기본 스트림의 포맷은 부호화에 사용된 압축 기술에 따라 달라질 수 있다.The audio encoder 1300 may generate a valid bit stream by encoding (encoding) the source audio signal. In one embodiment, like the video encoder 1200, the bit stream output from the audio encoder 1200 may also be represented as an elementary stream (ES). In addition, in an embodiment, the format of the elementary stream may vary depending on the compression technique used for encoding.

본 발명의 실시예에서, 오디오 부호화부(1300)는 미리 정해진 오디오 압축 기술(코덱)에 따라 소스 오디오 신호를 부호화할 수 있다. 예를 들어, 오디오 부호화부(1300)는 Dolby AC-4, AC-3, MPEG-H, AAC, OGG, MP3, WMA, AMR-WB, OPUS, FLAC 등 다양한 압축 기술에 따라 소스 오디오 신호를 부호화할 수 있다. 물론, 전술한 오디오 압축기술 외에도 소스 오디오 신호를 부호화할 수 있는 오디오 압축기술 역시 본 발명에 적용될 수 있다.In an embodiment of the present invention, the audio encoder 1300 may encode the source audio signal according to a predetermined audio compression technique (codec). For example, the audio encoder 1300 encodes the source audio signal according to various compression techniques such as Dolby AC-4, AC-3, MPEG-H, AAC, OGG, MP3, WMA, AMR-WB, OPUS, FLAC, etc. can do. Of course, in addition to the above-described audio compression technology, an audio compression technology capable of encoding a source audio signal may also be applied to the present invention.

본 발명의 실시예에서, 오디오 부호화부(1300)는 억세스 유닛(Access Unut, AU)을 기본 단위로 부호화를 수행할 수 있다. 소스 방송 신호가 오디오 신호인 경우, 억세스 유닛은 한 오디오 프레임(frame)의 모든 코딩된 데이터를 나타낼 수 있다. 물론, 본 발명의 실시예가 이에 한정되는 것은 아니며, 오디오 부호화부(1300)는 하나의 억세스 유닛이 아닌 복수의 억세스 유닛을 기본단위로 부호화를 수행할 수도 있다.In an embodiment of the present invention, the audio encoder 1300 may perform encoding on an access unit (Access Unut, AU) in basic units. When the source broadcast signal is an audio signal, the access unit may represent all coded data of one audio frame. Of course, embodiments of the present invention are not limited thereto, and the audio encoder 1300 may encode a plurality of access units instead of one access unit in a basic unit.

본 발명의 몇몇 실시에에서, 오디오 부호화부(1300)는 소정의 비트레이트(bitrate)에 따라 기본 스트림을 생성할 수 있다. 예를 들어, 비트레이트가 128 kbps인 경우, 오디오 부호화부(1300)는 초당 128*10^3 비트의 기본 스트림을 생성할 수 있다. 또한, 비디오 부호화부(1200)에서와 마찬가지로, 제어부(1600)는 오디오 부호화부(1300)의 비트스트림을 설정할 수 있다. 오디오 부호화부(1300)의 비트스트림 설정에 대해서는 비디오 부호화부(1200)에서 설명된 내용이 적용 가능하므로, 상세한 설명은 생략한다.In some embodiments of the present invention, the audio encoder 1300 may generate an elementary stream according to a predetermined bitrate. For example, when the bit rate is 128 kbps, the audio encoder 1300 may generate an elementary stream of 128 * 10 ^ 3 bits per second. In addition, as in the video encoder 1200, the controller 1600 may set a bitstream of the audio encoder 1300. Since the content described by the video encoder 1200 is applicable to the bitstream setting of the audio encoder 1300, a detailed description thereof will be omitted.

또한, 도 3에서 표현되지는 않았지만, 스트림 제공 장치(1000)는 데이터 부호화부를 포함할 수 있다. 데이터 부호화부는 메타 데이터를 부호화하는데, 여기서, 메타 데이터는 복호화 장치에서 비디오 정보 및 오디오 정보를 성공적으로 재현하기 위해 필요한 정보를 나타낼 수 있다. 예를 들어, 메타 데이터는 기본 스트림이 복호화되는 시간에 대한 정보 및/또는 기본 스트림이 재생되는 시간에 대한 정보를 포함할 수 있다.In addition, although not represented in FIG. 3, the stream providing apparatus 1000 may include a data encoder. The data encoder encodes the metadata, wherein the metadata may represent information necessary for successfully reproducing the video information and the audio information in the decoding apparatus. For example, the metadata may include information about the time when the elementary stream is decoded and / or information about the time when the elementary stream is played.

데이터 부호화부는 메타 데이터를 기본 스트림으로 생성할 수 있고, 이는 메타 데이터 기본 스트림으로 표현될 수 있다.The data encoder may generate meta data as an elementary stream, which may be represented as a meta data elementary stream.

스트림 생성부(1400)는 비디오 부호화부(1200)에서 생성된 기본 스트림(이하, 비디오 기본 스트림이라고 표현함) 및 오디오 부호화부(1300)에서 생성된 기본 스트림(이하, 오디오 기본 스트림이라고 표현함)을 출력 패킷으로 패킷화화고, 출력 패킷들을 다중화하여 출력 스트림을 생성할 수 있다. 즉, 스트림 생성부(1400)는 비디오 기본 스트림 및 오디오 기본 스트림을 하나의 스트림으로 구성할 수 있다. 여기서, 하나의 스트림으로 생성되는 비디오 기본 스트림 및 오디오 기본 스트림은 하나의 프로그램을 구성하는 비디오 정보 및 오디오 정보일 수 있다. 이에 따라, 스트림 생성부(1400)는 복호화 장치에서 재생되는 비디오와 오디오가 어긋나지 않도록 비디오 기본 스트림 및 오디오 기본 스트림의 동기를 맞춰서 다중화를 수행할 수 있다. The stream generator 1400 outputs an elementary stream generated by the video encoder 1200 (hereinafter referred to as a video elementary stream) and an elementary stream generated by the audio encoder 1300 (hereinafter referred to as an audio elementary stream). Packetize into packets and multiplex output packets to produce an output stream. That is, the stream generator 1400 may configure the video elementary stream and the audio elementary stream into one stream. Here, the video elementary stream and the audio elementary stream generated as one stream may be video information and audio information constituting one program. Accordingly, the stream generator 1400 may perform multiplexing by synchronizing the video elementary stream and the audio elementary stream so that video and audio played back by the decoding apparatus are not misaligned.

또한, 스트림 생성부(1400)는 전술한 데이터 부호화부에서 생성되는 메타 데이터 기본 스트림을 비디오 기본 스트림 및 오디오 기본 스트림과 함께 출력 패킷화 한 후 다중화하여 출력 스트림을 생성할 수 있다.The stream generator 1400 may generate an output stream by multiplexing the meta data elementary stream generated by the data encoder together with the video elementary stream and the audio elementary stream.

일 실시예에서, 스트림 생성부(1400)는 기본 스트림을 미리 정해진 패킷으로 패키타이징(packetizing)하고, 생성된 패킷들을 소정의 규칙에 따라 조합하여 출력 스트림을 생성할 수 있다. 스트림 생성부(1400)의 동작에 대해서는 도 5 내지 도 11에서 보다 상세하게 설명한다.In an embodiment, the stream generator 1400 may package the elementary stream into a predetermined packet, and generate the output stream by combining the generated packets according to a predetermined rule. An operation of the stream generator 1400 will be described in more detail with reference to FIGS. 5 through 11.

출력부(1500)는 스트림 생성부(1400)에서 생성된 출력 스트림을 외부로 출력할 수 있다. 일 실시예에서, 출력부(1500)는 ASI(비동기 직렬 인터페이스, Asynchronous Serial Interface) 방식을 통해 출력 스트림을 출력할 수도 있고, IP 방식을 통해 출력 스트림을 출력할 수 있다. 이 외에도, 출력부(1500)는 다양한 인터페이스를 통해 출력 스트림을 출력할 수 있다.The output unit 1500 may output the output stream generated by the stream generator 1400 to the outside. In one embodiment, the output unit 1500 may output the output stream through the ASI (Asynchronous Serial Interface) method, or may output the output stream through the IP method. In addition, the output unit 1500 may output an output stream through various interfaces.

제어부(1600)는 스트림 제공장치(1000)의 전반적인 동작을 총괄할 수 있다. 이에 따라, 제어부(1600)는 스트림 제공장치(1000)에 포함된 구성들(1100, 1200, 1300, 1400, 1500)를 제어할 수 있다. 특히, 제어부(1600)는, 스트림 제공장치(1000)에 설치되어 있는 운영체제, 다양한 프로그램들에 따라서 스트림 제공장치(1000)의 동작을 제어할 수도 있다.The controller 1600 may manage the overall operation of the stream providing apparatus 1000. Accordingly, the controller 1600 may control the components 1100, 1200, 1300, 1400, and 1500 included in the stream providing apparatus 1000. In particular, the controller 1600 may control an operation of the stream providing apparatus 1000 according to an operating system installed in the stream providing apparatus 1000 and various programs.

이하에서, 운영체제(OS)는, 스트림 제공장치(1000) 전체의 동작 상태를 감시, 감독하고 자원들을 관리하며 각종 입출력 장치(예를 들어, 사용자 입력부(1100) 및 출력부(1500) 등)를 제어하며, 중앙처리장치(예를 들어, 제어부(150))의 스케줄링과 작업관리, 기억장치(예를 들어, 메모리)의 관리 등의 기능을 수행할 수 있다. 즉, 운영체제는, 상기 스트림 제공장치(1000)의 전반적인 동작을 제어하기 위한 다양한 기능들을 제공하며, 한편, 다양한 어플리케이션들이 상기 스트림 제공장치(1000)에 설치되어 동작할 수 있도록 하기 위한 기본적인 플랫폼을 제공할 수 있다.Hereinafter, the operating system (OS) monitors and monitors the operation state of the entire stream providing apparatus 1000, manages resources, and manages various input / output devices (for example, the user input unit 1100 and the output unit 1500). The controller may perform functions such as scheduling and task management of the central processing unit (eg, the controller 150) and managing memory (eg, the memory). That is, the operating system provides various functions for controlling the overall operation of the stream providing apparatus 1000, and provides a basic platform for allowing various applications to be installed and operated in the stream providing apparatus 1000. can do.

또한, 상기 프로그램은 상기 스트림 제공장치(1000)에 특정한 기능을 수행하기 위한 프로그램 코드들을 포함할 수 있다. In addition, the program may include program codes for performing a specific function in the stream providing apparatus 1000.

전술한 운영체제 및 프로그램은 소프트웨어의 형태로 구현될 수 있고, 소프트웨어 형태로 구현된 운영체제 및/또는 어플리케이션은 메모리부에 저장되어 있다가, 필요에 따라, 제어부(1600)를 통해, 필요한 기능들을 스트림 제공장치(1000)에 제공할 수 있다.The above-described operating system and program may be implemented in the form of software, and the operating system and / or the application implemented in software may be stored in a memory unit, and, if necessary, may provide a stream of necessary functions through the controller 1600. It may be provided to the device 1000.

도 4는 본 발명의 다른 실시예에 따른 스트림 제공장치를 나타낸 블록도이다.4 is a block diagram showing a stream providing apparatus according to another embodiment of the present invention.

도 4의 스트림 제공부는 도 3에 설명된 스트림 제공장치(1000)를 하드웨어적으로 구분하여 구성한 실시예이다.The stream providing unit of FIG. 4 is an embodiment in which the stream providing apparatus 1000 described in FIG. 3 is divided into hardware.

도 4를 참조하면, 스트림 제공부(1000)는 입력부(1100), 비디오 부호화부(1200), 오디오 부호화부(1300), 스트림 생성부(1400)를 포함할 수 있다.Referring to FIG. 4, the stream provider 1000 may include an input unit 1100, a video encoder 1200, an audio encoder 1300, and a stream generator 1400.

일 실시예에서, 입력부(1100) 및 비디오 부호화부(1200)는 하나의 SoC로 구성될 수 있으며, 오디오 부호화부(1300) 및 스트림 생성부(1400)는 하나의 프로세서(1020)로 구성될 수 있다. 물론, 실시예에 따라, 입력부(1100) 및 비디오 부호화부(1200)가 하나의 SoC로 구성되지 않고, 오디오 부호화부(1300) 및 스트림 생성부(1400)가 하나의 프로세서(1020)로 구성되지 않을 수 있다.입력부(1100)는 다양한 해상도를 갖는 소스 방송 신호를 획득할 수 있다. 예를 들어, 입력부는 12G/3G-SDI 리시버(1110) 및 3G-SDI 리시버(1120, 1130, 1140)를 포함할 수 있다. 이 때, 소스 방송 신호가 UHD 영상인 경우, 입력부는 소스 방송 신호를 12G SDI 리시버(1110)를 통해 획득할 수도 있고, 4개의 3G-SDI 리시버(1110, 1120, 1130, 1140)를 통해 획득할 수도 있다.In an embodiment, the input unit 1100 and the video encoder 1200 may be configured as one SoC, and the audio encoder 1300 and the stream generator 1400 may be configured as one processor 1020. have. Of course, in some embodiments, the input unit 1100 and the video encoder 1200 are not configured as one SoC, and the audio encoder 1300 and the stream generator 1400 are configured as one processor 1020. The input unit 1100 may obtain a source broadcast signal having various resolutions. For example, the input unit may include a 12G / 3G-SDI receiver 1110 and a 3G-SDI receiver 1120, 1130, and 1140. In this case, when the source broadcast signal is a UHD image, the input unit may acquire the source broadcast signal through the 12G SDI receiver 1110 or through four 3G-SDI receivers 1110, 1120, 1130, and 1140. It may be.

또한, 스트림 제공부(1000)는 오디오 캡쳐부(1310)를 더 포함할 수 있다. 일 실시예에서, 오디오 캡쳐부(1310)는 입력부를 통해 획득한 소스 방송 신호로부터 소스 오디오 신호를 캡쳐하여 오디오 부호화부(1300)에 제공할 수 있다.In addition, the stream providing unit 1000 may further include an audio capture unit 1310. In an embodiment, the audio capture unit 1310 may capture the source audio signal from the source broadcast signal acquired through the input unit and provide the source audio signal to the audio encoder 1300.

또한, 비디오 부호화부(1200)는 입력부(1100)로부터 소스 비디오 신호를 획득하여 소스 비디오 신호에 대해 비디오 기본 스트림을 생성할 수 있으며, 오디오 부호화부(1300)는 비디오 캡쳐부(1310)로부터 획득한 소스 오디오 신호를 부호화하여 오디오 기본 스트림을 생성할 수 있다.In addition, the video encoder 1200 may obtain a source video signal from the input unit 1100 to generate a video elementary stream for the source video signal, and the audio encoder 1300 may acquire the video stream from the video capture unit 1310. An audio elementary stream may be generated by encoding the source audio signal.

스트림 생성부(1400)는 비디오 부호화부(1200)로부터 비디오 기본 스트림을 획득하고, 오디오 부호화부(1300)로부터 오디오 기본 스트림을 획득하고, 획득한 비디오 기본 스트림 및 오디오 기본 스트림을 패킷화 및 다중화하여 출력 스트림을 생성할 수 있다. 일 예로, 스트림 생성부(1400)는 PCIe(PCI 익스프레스)를 통해 비디오 부호화부(1200)로부터 비디오 기본 스트림을 획득할 수 있다.The stream generator 1400 obtains a video elementary stream from the video encoder 1200, obtains an audio elementary stream from the audio encoder 1300, packetizes and multiplexes the obtained video elementary stream and audio elementary stream. You can create an output stream. For example, the stream generator 1400 may obtain a video elementary stream from the video encoder 1200 through PCIe (PCI Express).

스트림 생성부(1400)는 출력 스트림을 출력부(1500)에 제공할 수 있고, 출력부(1500)는 출력 스트림을 외부로 출력할 수 있다.The stream generator 1400 may provide an output stream to the output unit 1500, and the output unit 1500 may output the output stream to the outside.

도 5는 본 발명의 실시예에 따른 스트림 생성부를 나타낸 블록도이다.5 is a block diagram illustrating a stream generator according to an exemplary embodiment of the present invention.

도 5를 참조하면, 스트림 생성부(1400)는 제1 스트림 생성부(1410) 및 제2 스트림 생성부(1420)를 포함할 수 있다. 또한, 제2 스트림 생성부(1420)는 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440)를 포함할 수 있다. 도 5에서는 스트림 생성부(1400)이 제1 스트림 생성부(1410) 및 제2 스트림 생성부(1420)를 포함하는 것으로 표현되었지만, 본 발명이 이에 한정되는 것은 아니며, 스트림 생성부(1400) 및 제1 스트림 생성부(1410)만을 포함하거나, 제2 스트림 생성부(1420) 만을 포함할 수도 있다. 또한, 도5 에서는 제2 스트림 생성부(1420)가 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440)를 포함하는 것으로 표현되었지만, 본 발명이 이에 한정되는 것은 아니고, 제2 스트림 생성부(1420)는 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440) 중 하나만을 포함하거나 여러 개의 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440)를 포함할 수도 있다.Referring to FIG. 5, the stream generator 1400 may include a first stream generator 1410 and a second stream generator 1420. In addition, the second stream generator 1420 may include a second a stream generator 1430 and a second b stream generator 1440. In FIG. 5, although the stream generator 1400 is represented as including a first stream generator 1410 and a second stream generator 1420, the present invention is not limited thereto, and the stream generator 1400 and Only the first stream generator 1410 may be included, or only the second stream generator 1420 may be included. In addition, in FIG. 5, although the second stream generator 1420 is represented as including the second a stream generator 1430 and the second b stream generator 1440, the present invention is not limited thereto. The generator 1420 may include only one of the second a stream generator 1430 and the second b stream generator 1440 or include a plurality of second a stream generators 1430 and a second b stream generator 1440. It may be.

스트림 생성부(1400)는 비디오 부호화부(1200) 및 오디오 부호화부(1300)로부터 획득한 기본 스트림들을 패킷화하여 출력 패킷을 생성하고, 생성된 출력 패킷들을 다중화하여 출력 스트림을 생성할 수 있다. 이 때, 스트림 생성부(1400)는 전송 프로토콜에 따라 서로 다른 종류의 출력 스트림을 생성할 수 있다.The stream generator 1400 may generate an output packet by packetizing the elementary streams obtained from the video encoder 1200 and the audio encoder 1300, and may generate an output stream by multiplexing the generated output packets. In this case, the stream generator 1400 may generate different types of output streams according to a transport protocol.

본 발명의 실시예에서, 제1 스트림 생성부(1410)는 MPEG-2 프로토콜에 따른 전송 스트림(Transport Stream, TS)을 생성할 수 있다. 또한, 제2 스트림 생성부(1420)는 ATSC 3.0 방송 시스템에서 사용될 수 있는 ATSC 3.0용 전송 스트림(이하, A3 스트림으로 표현함)을 생성할 수 있다. 구체적으로, 제2a 스트림 생성부(1430)는 ROUTE 패킷들로 구성된 ROUTE 스트림을 생성하고, 제2b 스트림 생성부(1430)는 MMTP 패킷들로 구성된 MMTP 스트림을 생성할 수 있다. 이하에서는, 설명의 편의상 ROUTE 패킷 및 MMTP 패킷을 통칭하여 A3 패킷(ATSC 3.0용 전용 패킷을 나타냄)으로 표현하고, ROUTE 스트림 및 MMTP 스트림을 통칭하여 A3 스트림으로 표현한다. 그러나, 이는 설명의 편의를 위한 것일 뿐, ROUTE 패킷과 MMTP 패킷은 구분되어야 하고, ROUTE 스트림과 MMTP 스트림은 구분되어야 할 것이다.In an embodiment of the present invention, the first stream generator 1410 may generate a transport stream (TS) according to the MPEG-2 protocol. In addition, the second stream generator 1420 may generate a transport stream for ATSC 3.0 (hereinafter, referred to as an A3 stream) that may be used in an ATSC 3.0 broadcasting system. In detail, the second a stream generator 1430 may generate a ROUTE stream composed of ROUTE packets, and the second b stream generator 1430 may generate an MMTP stream composed of MMTP packets. In the following description, ROUTE packet and MMTP packet are collectively referred to as A3 packets (representing a dedicated packet for ATSC 3.0) and ROUTE stream and MMTP stream are collectively referred to as A3 streams. However, this is only for convenience of description, and the ROUTE packet and the MMTP packet should be distinguished, and the ROUTE stream and the MMTP stream should be distinguished.

도 6은 본 발명의 실시예에 따른 제1 스트림 생성부를 나타낸 블록도이다.6 is a block diagram illustrating a first stream generator according to an embodiment of the present invention.

도 6을 참조하면, 제1 스트림 생성부(1410)는 PES/TS 패킷화부(1411) 및 제1 다중화부(1414)를 포함할 수 있다. Referring to FIG. 6, the first stream generator 1410 may include a PES / TS packetizer 1411 and a first multiplexer 1414.

PES/TS 패킷화부(1411)는 비디오 부호화부(1200)로부터 획득한 비디오 기본 스트림 및 오디오 부호화부(1300)로부터 획득한 오디오 기본 스트림을 PES 패킷으로 패킷화한 후, PES 패킷을 TS 패킷으로 패킷화할 수 있다. 도 6의 예에서, 전술한 출력 패킷은 상기 TS 패킷이 될 수 있다.The PES / TS packetizer 1411 packets the video elementary stream obtained from the video encoder 1200 and the audio elementary stream obtained from the audio encoder 1300 into PES packets, and then converts the PES packets into TS packets. Can be mad. In the example of FIG. 6, the above-described output packet may be the TS packet.

또한, 제1 다중화부(1410)는 PES/TS 패킷화부(1411)에서 생성된 TS 패킷을 다중화하여 출력 스트림을 생성할 수 있다. 이하에서, 상기 출력 스트림은 전송 스트림으로 표현될 수 있다.In addition, the first multiplexer 1410 may generate an output stream by multiplexing the TS packets generated by the PES / TS packetizer 1411. In the following, the output stream may be represented as a transport stream.

구체적으로, PES/TS 패킷화부(1411)는 제1 PES/TS 패킷화부(1412) 및 제2 PES/TS 패킷화부(1413)를 포함할 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니고, 구성예에 따라, 제1 PES/TS 패킷화부(1412) 및 제2 PES/TS 패킷화부(1413)는 구분되지 않고 하나의 PES/TS 패킷화부로 구성될 수도 있다.In detail, the PES / TS packetizer 1411 may include a first PES / TS packetizer 1412 and a second PES / TS packetizer 1413. However, the present invention is not limited thereto, and according to a configuration example, the first PES / TS packetizer 1412 and the second PES / TS packetizer 1413 are not distinguished and constitute one PES / TS packetizer. May be

본 발명의 실시예에서, PES/TS 패킷화부(1411)는 기본 스트림을 PES 패킷으로 패킷화할 수 있다. PES 패킷은 기본 스트림의 데이터들을 운반하기 위해 사용되어지는 데이터 구조를 나타낼 수 있다. 실시예에 따라, 기본 스트림의 하나의 억세스 유닛은 하나의 PES 패킷에 포함될 수도 있고, 복수의 PES 패킷에 포함될 수도 있다. 일 예로, 하나의 억세스 유닛이 복수의 PES 패킷에 포함될 경우, 상기 복수의 PES 패킷은 PES 스트림으로 표현될 수 있다. 물론, 실시예에 따라, 기본 스트림의 복수의 억세스 유닛이 하나의 PES 패킷에 포함될 수도 있다.In an embodiment of the present invention, the PES / TS packetizer 1411 may packetize an elementary stream into a PES packet. The PES packet may indicate the data structure used to carry the data of the elementary stream. According to an embodiment, one access unit of an elementary stream may be included in one PES packet or may be included in a plurality of PES packets. For example, when one access unit is included in a plurality of PES packets, the plurality of PES packets may be represented by a PES stream. Of course, in some embodiments, a plurality of access units of the elementary stream may be included in one PES packet.

PES 패킷은 PES 패킷 헤더 및 페이로드로 구성될 수 있다. 페이로드에는 기본 스트림이 수납될 수 있고, PES 패킷 헤더에는 해당 PES 패킷을 식별하는 식별정보 및 페이로드에 저장된 기본 스트림과 관련있는 정보들이 포함될 수 있다. 예를 들어, PES 패킷 헤더에는 디코딩 타임 스탬프(Decoding Time Stamp, DTS) 및 프리젠테이션 타임 스탬프(Presentation Time Stamp, PTS)가 포함될 수 있다. 디코딩 타임 스탬프는 PES 패킷의 페이로드에 포함된 억세스 유닛이 복호화 장치에서 복호화되는 시간 정보를 나타내며, 프리젠테이션 타임 스탬프는 PES 패킷의 페이로드에 포함된 억세스 유닛이 복호화 장치에서 재생되는 시간 정보를 나타낼 수 있다. 또한, PES 패킷의 길이는 미리 정해질 수도 있고, 기본 스트림의 길이에 따라 가변적일 수도 있다.The PES packet may consist of a PES packet header and a payload. The payload may contain an elementary stream, and the PES packet header may include identification information for identifying the corresponding PES packet and information related to the elementary stream stored in the payload. For example, the PES packet header may include a decoding time stamp (DTS) and a presentation time stamp (PTS). The decoding time stamp indicates time information when the access unit included in the payload of the PES packet is decoded by the decoding apparatus, and the presentation time stamp indicates time information when the access unit included in the payload of the PES packet is reproduced by the decoding apparatus. Can be. In addition, the length of the PES packet may be predetermined or may vary depending on the length of the elementary stream.

또한, 본 발명의 실시예에서, PES/TS 패킷화부(1411)는 생성된 PES 패킷을 TS 패킷으로 패킷화할 수 있다. 여기서, TS 패킷은 기본 스트림을 전송 에러가 존재하는 채널로 전송하기 위하여 정해진 일정한 형식의 패킷을 의미하는 것으로, TS 패킷의 길이는 188바이트로 고정될 수 있다. 이에 따라, PES 패킷은 하나 또는 복수의 TS 패킷에 분산되어 포함될 수 있다. 또한, 본 발명의 실시예에서, 하나의 TS 패킷은 하나의 PES 패킷의 적어도 일부를 삽입할 수 있고, 하나의 TS 패킷에는 복수의 PES 패킷이 삽입되지 않을 수 있다. 이에 따라. 하나의 TS 패킷에는 하나의 억세스 유닛에 대한 정보가 포함될 뿐 복수의 억세스 유닛에 대한 정보가 포함되지 않을 수 있다In addition, in an embodiment of the present invention, the PES / TS packetizer 1411 may packetize the generated PES packet into a TS packet. Here, the TS packet refers to a packet having a predetermined format determined for transmitting an elementary stream to a channel in which a transmission error exists, and the length of the TS packet can be fixed to 188 bytes. Accordingly, the PES packet may be distributed and included in one or a plurality of TS packets. In addition, in an embodiment of the present invention, one TS packet may insert at least a portion of one PES packet, and a plurality of PES packets may not be inserted into one TS packet. Accordingly. One TS packet includes information about one access unit but may not include information about a plurality of access units.

TS 패킷은 TS 패킷 헤더, TS 패킷 적응 필드 및 페이로드로 구성될 수 있다. 일 실시예에서, TS 패킷 헤더 및 TS 패킷 적응 필드는 TS 패킷 헤더부로 표현될 수도 있다.The TS packet may consist of a TS packet header, a TS packet adaptation field, and a payload. In one embodiment, the TS packet header and TS packet adaptation field may be represented by a TS packet header portion.

페이로드에는 PES 패킷이 수납될 수 있고, TS 패킷 헤더에는 해당 TS 패킷을 나타내는 정보 및 페이로드에 저장된 PES 패킷과 관련있는 정보들이 포함될 수 있다. 예를 들어, TS 패킷 헤더에는 해당 TS 패킷을 식별하는 식별정보(Packet ID, PID). 해당 TS 패킷의 시작을 나타내는 싱크 정보(Sync byte), 해당 패킷에 에러가 발생되었는지 여부를 나타내는 정보(Transport error indicator), 페이로드에 포함된 데이터가 전체 데이터에서 어느 부분을 포함하는지 나타내는 정보(Payload unit start indicator), 해당 TS 패킷의 우선순위를 나타내는 정보(Transport priority indicator)를 포함할 수 있다. 그리고, TS 패킷 헤더의 길이는 4바이트가 될 수 있다.The payload may contain a PES packet, and the TS packet header may include information indicating the TS packet and information related to the PES packet stored in the payload. For example, the TS packet header includes identification information (Packet ID, PID) for identifying the TS packet. Sync information indicating the start of the TS packet, information indicating whether an error has occurred in the packet (Transport error indicator), information indicating which part of the data includes the payload (Payload unit start indicator) and information indicating the priority of the corresponding TS packet. The length of the TS packet header may be 4 bytes.

또한, TS 패킷 적응 필드는 시간 정보와 같은 부가정보를 포함할 수 있다. 예를 들어, TS 패킷 적응 필드는 스트림 제공 장치(1000)와 복호화 장치의 시간을 맞추기 위한 시간 기준값을 나타내는 PCR(Program Clock Reference) 정보를 포함할 수 있다.In addition, the TS packet adaptation field may include additional information such as time information. For example, the TS packet adaptation field may include PCR (Program Clock Reference) information indicating a time reference value for matching the time between the stream providing apparatus 1000 and the decoding apparatus.

또한, TS 패킷 적응 필드는 모든 TS 패킷마다 반드시 제공될 필요는 없으며, 일부 TS 패킷은 TS 패킷 적응 필드를 포함하지 않을 수 있다. 이에 따라, PCR 정보 역시 모든 TS 패킷에 포함되는 것이 아니라, 소정의 주기에 따라 일부 TS 패킷에 포함될 수 있다.In addition, the TS packet adaptation field is not necessarily provided for every TS packet, and some TS packets may not include the TS packet adaptation field. Accordingly, PCR information may not be included in all TS packets, but may be included in some TS packets according to a predetermined period.

TS 패킷 적응 필드 및 페이로드를 합친 길이는 184 바이트가 될 수 있다. 즉, TS 패킷은 4바이트의 TS 패킷 헤더 및 184 바이트의 TS 패킷 적응 필드 및/또는 페이로드로 구성될 수 있다.The combined length of the TS packet adaptation field and payload may be 184 bytes. That is, the TS packet may be composed of a TS packet header of 4 bytes and a TS packet adaptation field and / or payload of 184 bytes.

페이로드는 PES 패킷을 수용할 수 있으나 수용되는 PES 패킷의 길이가 페이로드의 길이보다 짧을 수도 있다. 이 경우, TS 패킷의 길이는 188바이트로 고정되어 있으므로, PES 패킷을 페이로드에 수용하고 남는 부분에 대해서는 Null data를 삽입할 수 있다. 이와 같이, 페이로드의 남는 부분에 Null data를 삽입하는 것을 스터핑(stuffing)이라고 표현할 수 있다.The payload may accommodate PES packets, but the length of the PES packets accommodated may be shorter than the length of the payload. In this case, since the length of the TS packet is fixed to 188 bytes, it is possible to accommodate the PES packet in the payload and insert null data into the remaining portion. As such, inserting null data into the remaining portion of the payload may be referred to as stuffing.

도 7의 예에서, 제1 기본 스트림(710)은 제1 억세스 유닛을 포함하고, 제2 기본 스트림(750)은 제2 억세스 유닛을 포함할 수 있다. PES/TS 패킷화부(1411)는 제1 기본 스트림(710)을 패키타이징하여 제1 PES 패킷(720)을 생성하고, 제2 기본 스트림(750)을 패키타이징하여 제2 PES 패킷(760)을 생성할 수 있다. 이 때, 제1 기본 스트림(710)이 제2 기본 스트림(720)보다 크기가 큼에 따라, 제1 PES 패킷(720) 역시 제2 PES 패킷(760)의 크기보다 클 수 있다. 도 7의 실시예에서, 제1 PES 패킷(720)은 PES 패킷 헤더의 길이가 6바이트이고, 페이로드의 크기가 522 바이트일 수 있으며, 제2 PES 패킷(760)은 PES 패킷 헤더의 길이가 6바이트이고, 페이로드의 크기가 156 바이트일 수 있다.In the example of FIG. 7, the first elementary stream 710 may include a first access unit and the second elementary stream 750 may include a second access unit. The PES / TS packetizer 1411 packages the first elementary stream 710 to generate a first PES packet 720, and packages the second elementary stream 750 to a second PES packet 760. ) Can be created. At this time, as the first elementary stream 710 is larger than the second elementary stream 720, the first PES packet 720 may also be larger than the size of the second PES packet 760. In the embodiment of FIG. 7, the first PES packet 720 may have a length of 6 bytes for the PES packet header, the payload may have a size of 522 bytes, and the second PES packet 760 may have a length of the PES packet header. 6 bytes and the payload size may be 156 bytes.

또한, PES/TS 패킷화부(1411)는 제1 PES 패킷(720)을 패킷타이징하여 제1 TS 패킷(731) 내지 제3 TS 패킷(733)을 생성할 수 있고, 제2 PES 패킷(760)을 패킷타이징하여 제4 TS 패킷(771) 을 생성할 수 있다. 그리고, 제1 TS 패킷(731) 내지 제4 TS 패킷(771) 중 적어도 하나의 패킷에는 TS 패킷 적응필드가 포함될 수 있으나, 도 7의 실시예에서는 설명의 편의를 위해 생략한다.In addition, the PES / TS packetizer 1411 may packetize the first PES packet 720 to generate the first TS packet 731 to the third TS packet 733, and the second PES packet 760. Packetize) to generate a fourth TS packet 771. At least one packet of the first TS packet 731 to the fourth TS packet 771 may include a TS packet adaptation field, but the embodiment of FIG. 7 will be omitted for convenience of description.

제1 PES 패킷(720)이 제1 억세스 유닛에 대한 데이터를 포함하고 있으므로, TS 패킷(731) 내지 제3 TS 패킷(733)의 페이로드에는 제1 억세스 유닛에 대한 데이터가 포함되고, 제4 TS 패킷(771)에는 제2 억세스 유닛에 대한 데이터가 포함될 수 있다. 또한, 제1 PES 패킷(720)의 페이로드의 길이가 522바이트이므로, 제1 TS 패킷(731) 및 제2 TS 패킷(732)의 페이로드의 크기는 184 바이트가 되지만, 제3 TS 패킷(733)의 페이로드 중 제1 PES 패킷(720)에 대한 데이터의 크기는 160 바이트가 될 수 있다. 이 경우, 페이로드의 나머지 24바이트는 Null data가 될 수 있다.Since the first PES packet 720 includes data for the first access unit, the payloads of the TS packets 731 to the third TS packet 733 include data for the first access unit, and the fourth The TS packet 771 may include data for the second access unit. In addition, since the payload length of the first PES packet 720 is 522 bytes, the payload size of the first TS packet 731 and the second TS packet 732 is 184 bytes, but the third TS packet ( The size of data for the first PES packet 720 in the payload of 733 may be 160 bytes. In this case, the remaining 24 bytes of the payload may be null data.

또한, 제2 PES패킷(760)의 페이로드의 크기가 156 바이트이므로, 제4 TS 패킷(771)의 페이로드 중 제2 PES 패킷(760)에 대한 데이터의 크기는 150 바이트가 될 수 있다. 이 경우, 페이로드의 나머지 28바이트는 Null data가 될 수 있다.In addition, since the payload size of the second PES packet 760 is 156 bytes, the data size of the second PES packet 760 in the payload of the fourth TS packet 771 may be 150 bytes. In this case, the remaining 28 bytes of the payload may be null data.

본 발명의 몇몇 실시예에서, 제1 PES/TS 패킷화부(1412)는 비디오 부호화부(1200)로부터 비디오 기본 스트림을 획득하고, 비디오 기본 스트림을 PES 패킷으로 패킷화하고, PES 패킷을 TS 패킷으로 패킷화할 수 있다. 여기서, 비디오 기본 스트림에 대한 TS 패킷을 비디오 TS 패킷으로 표현할 수 있다.In some embodiments of the present invention, the first PES / TS packetizer 1412 obtains a video elementary stream from the video encoder 1200, packetizes the video elementary stream into a PES packet, and converts the PES packet into a TS packet. It can be packetized. Here, the TS packet for the video elementary stream may be expressed as a video TS packet.

또한, 제2 PES/TS 패킷화부(1413)는 오디오 부호화부(1300)로부터 오디오 기본 스트림을 획득하고, 오디오 기본 스트림을 PES 패킷으로 패킷화하고, PES 패킷을 TS 패킷으로 패킷화할 수 있다. 여기서, 오디오 기본 스트림에 대한 TS 패킷을 오디오 TS 패킷으로 표현할 수 있다.The second PES / TS packetizer 1413 may obtain an audio elementary stream from the audio encoder 1300, packetize the audio elementary stream into PES packets, and packetize the PES packet into TS packets. Here, the TS packet for the audio elementary stream may be expressed as an audio TS packet.

또한, 도 6에는 표현하지 않았지만, PES/TS 패킷화부(1411)는 제3 PES/TS 패킷화부를 포함할 수 있고, 제3 PES/TS 패킷화부는 전술한 메타 데이터 기본 스트림을 PES 패킷으로 패킷화하고, PES 패킷을 TS 패킷으로 패킷화할 수 있다. 여기서, 메타 데이터 기본 스트림에 대한 TS 패킷을 메타 데이터 TS 패킷으로 표현할 수 있다.In addition, although not shown in FIG. 6, the PES / TS packetizer 1411 may include a third PES / TS packetizer, and the third PES / TS packetizer may packet the aforementioned meta data elementary stream into a PES packet. The PES packet can be packetized into a TS packet. Here, the TS packet for the metadata elementary stream may be expressed as a metadata TS packet.

또한, 제1 다중화부(1414)는 제1 스트림 생성부(1411)에서 생성된 TS패킷을 다중화하여 출력 스트림을 생성할 수 있다. 예를 들어, 제1 다중화부(1414)는 제1 PES/TS 패킷화부(1412)로부터의 비디오 TS 패킷 및 제2 PES/TS 패킷화부(1413)로부터의 오디오 TS 패킷을 다중화하여 출력 스트림을 생성할 수 있다. 또한, 제1 다중화부(1414)는 비디오 TS 패킷 및 오디오 TS 패킷 뿐만 아니라 메타 데이터 TS 패킷을 함께 다중화하여 출력 스트림을 생성할 수 있다.The first multiplexer 1414 may generate an output stream by multiplexing the TS packets generated by the first stream generator 1411. For example, the first multiplexer 1414 multiplexes the video TS packets from the first PES / TS packetizer 1412 and the audio TS packets from the second PES / TS packetizer 1413 to generate an output stream. can do. In addition, the first multiplexer 1414 may generate an output stream by multiplexing not only the video TS packet and the audio TS packet but also the metadata TS packet.

제1 다중화부(1414)는 생성된 출력 스트림을 출력부(1500)에 제공할 수 있다.The first multiplexer 1414 may provide the generated output stream to the output unit 1500.

또한, 제1 다중화부(1414)는 소정의 비트레이트에 따라 TS 패킷들을 다중화할 수 있다. 예를 들어, 비트레이트가 11Mbps인 경우, 제1 다중화부(1414)는 초당 11*10^6 비트의 출력 스트림을 생성할 수 있다. 일 실시예에서, 제어부(1600)는 제1 다중화부(1414)의 출력 스트림을 설정할 수 있다. 일 예로, 제어부(1600)는 스트림 제공장치(1600)에서 제공되는 출력 스트림의 비트량이 소정 기준보다 많거나 적을 경우, 복호화 장치의 버퍼에 오버플로 또는 언더플로가 발생되지 않도록 제1 다중화부(1414)의 비트레이트, 즉, 출력 스트림의 비트레이트를 조정할 수 있다. 또한, 제어부(1600)는 도 3에서 전술한 가상의 버퍼를 이용하여 출력 스트림의 비트레이트를 제어할 수 있다.In addition, the first multiplexer 1414 may multiplex TS packets according to a predetermined bit rate. For example, when the bit rate is 11 Mbps, the first multiplexer 1414 may generate an output stream of 11 * 10 ^ 6 bits per second. In an embodiment, the controller 1600 may set an output stream of the first multiplexer 1414. For example, when the bit amount of the output stream provided by the stream providing apparatus 1600 is greater or less than a predetermined reference, the controller 1600 may not cause an overflow or underflow to occur in the buffer of the decoding apparatus. Bitrate, i.e., the bitrate of the output stream. In addition, the controller 1600 may control the bit rate of the output stream using the virtual buffer described above with reference to FIG. 3.

도 8은 본 발명의 실시예에 따른 제2 스트림 생성부를 나타낸 블록도이다.8 is a block diagram illustrating a second stream generator according to an embodiment of the present invention.

도 8을 참조하면, 제2 스트림 생성부(1420)는 전처리부(1450), 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440)를 포함할 수 있다.Referring to FIG. 8, the second stream generator 1420 may include a preprocessor 1450, a second a stream generator 1430, and a second b stream generator 1440.

전처리부(1450)는 제2a 스트림 생성부(1430) 및 제2b 스트림 생성부(1440)에서 출력 스트림을 생성하기 위해 필요한 데이터를 제공할 수 있다.The preprocessor 1450 may provide data necessary for generating an output stream from the second a stream generator 1430 and the second b stream generator 1440.

보다 구체적으로, ATSC 3.0에서는 방송 서비스를 위한 전송 프로토콜로서, 방송망 전송을 위해서는 UDP/IP 기반의 ROUTE(Real-Time Object Delivery over Unidirectional Transport)와 MMTP(MPEG Media Transport Protocol)에 대해 정의하고 있고, 통신망 전송을 위해서는 TCP/IP 기반의 HTTP 프로토콜을 이용하도록 하고 있다. More specifically, in ATSC 3.0, as a transport protocol for a broadcast service, for transmission of a broadcast network, UDP / IP based ROUTE (Real-Time Object Delivery over Unidirectional Transport) and MMTP (MPTP Media Transport Protocol) are defined. For transmission, TCP / IP based HTTP protocol is used.

본 발명의 스트림 제공장치(1000)는 이러한 ATSC 3.0의 방송 서비스를 제공하기 위하여 A3 스트림을 제공하고, 보다 자세하게는, 제2a 스트림 생성부(1430)에서 ROUTE 스트림을 제공하고, 제2b 스트림 생성부(1440)에서 MMTP 스트림을 제공할 수 있다.The stream providing apparatus 1000 of the present invention provides an A3 stream in order to provide such a broadcast service of ATSC 3.0, and more specifically, a second stream generator 1430 provides a ROUTE stream and a second b stream generator. The MMTP stream may be provided at 1440.

또한, 제2a 스트림 생성부(1430)에서는 DASH(Dynamic Adaptive Streaming over HTTP) 세그먼트를 이용하여 ROUTE 스트림을 생성하고, 제2b 스트림 생성부(1440)에서는 MPU(Media Processing Unit)를 이용하여 MMTP 스트림을 생성할 수 있다. 이와 같이, 제2 스트림 생성부(1420)에서 A3 스트림을 원활하게 생성하도록 전처리부(1450)에서는 DASH 세그먼트 및/또는 MPU를 제공할 수 있다.In addition, the 2a stream generator 1430 generates a ROUTE stream using a DASH (Dynamic Adaptive Streaming over HTTP) segment, and the 2b stream generator 1440 generates an MMTP stream using a MPU (Media Processing Unit). Can be generated. As such, the preprocessor 1450 may provide the DASH segment and / or the MPU so that the second stream generator 1420 smoothly generates the A3 stream.

본 발명의 실시예에서, DASH 세그먼트 및 MPU는 ISO 기반 미디어 파일 포맷(ISO based media file format;ISOBMFF)(이하, ISOBMFF 파일)을 기초로 생성될 수 있다. 여기서, ISO 기반 미디어 파일 포맷은 비디오나 오디오와 같은 시간 기반 멀티미디어 파일(time-based multimediafiles)을 위한 데이터 구조를 정의하는 포맷을 나타낼 수 있다. 본 발명의 실시예에서, 전처리부(1450)는 비디오 복호화부(1200)로부터의 비디오 기본 스트림, 오디오 복호화부(1300)로부터의 오디오 기본 스트림 및/또는 메타 데이터 복호화부로부터의 메타 데이터 기본 스트림을 ISOBMFF 파일로 생성할 수 있다. 일 예로, ISOBMFF 파일을 기반으로 MP4 파일이 생성될 수 있다.In an embodiment of the present invention, the DASH segment and the MPU may be generated based on an ISO based media file format (ISOBMFF) (hereinafter referred to as an ISOBMFF file). Here, the ISO-based media file format may represent a format that defines a data structure for time-based multimedia files such as video or audio. In an embodiment of the present invention, the preprocessor 1450 may include a video elementary stream from the video decoder 1200, an audio elementary stream from the audio decoder 1300, and / or a metadata elementary stream from the metadata decoder. Can be created as an ISOBMFF file. For example, an MP4 file may be generated based on the ISOBMFF file.

본 발명의 실시예에서, ISOBMFF 파일은 파일 타입(file type: 'ftyp') 박스, 무비(movie: 'moov') 박스, 무비 프래그먼트(movie fragment: 'moof') 박스 및 미디어 데이터(mdat) 박스를 포함할 수 있다. 파일 타입(ftyp) 박스는 파일 타입, 파일 버전, 및 호환성 정보를 포함할 수 있으며, 무비(moov) 박스는 미디어 데이터를 설명하는 메타데이터를 포함할 수 있고, 미디어 데이터(mdat) 박스는 실제의 미디어 데이터(비디오 기본 스트림, 오디오 기본 스트림)를 포함하며, 무비 프래그먼트(moof) 박스는 대응하는 미디어 데이터(mdat) 정보에 대한 메타데이터를 포함할 수 있다. 일 예로, 무비 프래그먼트(moof) 박스는 대응하는 미디어 데이터의 복호화 시간에 대한 정보(BMDT, BaseMediaDecodeTime)를 포함할 수 있다. 또한, 무비 프래그먼트(moof) 박스는 대응하는 미디어 데이터의 길이에 대한 정보를 나타내는 CTO(Composition Time Offset)를 포함할 수 있다. 또한, 무비 프래그먼트(moof) 박스는 대응하는 미디어 데이터의 재생 시간에 대한 정보를 포함할 수도 있다.In an embodiment of the present invention, the ISOBMFF file includes a file type ('ftyp') box, a movie ('moov') box, a movie fragment ('moof') box, and a media data (mdat) box. It may include. The file type (ftyp) box may contain file type, file version, and compatibility information, the moov box may contain metadata describing the media data, and the media data (mdat) box may contain Media data (video elementary stream, audio elementary stream), and the movie fragment box may include metadata for corresponding media data (mdat) information. For example, the movie fragment box may include information (BMDT, BaseMediaDecodeTime) about the decoding time of the corresponding media data. In addition, the movie fragment box may include a composition time offset (CTO) indicating information about the length of the corresponding media data. In addition, the movie fragment box may include information on the reproduction time of the corresponding media data.

본 발명의 몇몇 실시예에서, 전처리부(1450)는 제2a 스트림 생성부(1430)에 제공하기 위한 DASH 세그먼트를 생성할 수 있다.In some embodiments of the present invention, the preprocessor 1450 may generate a DASH segment for providing to the second a stream generator 1430.

일 실시예에서, 전처리부(1450)는 하나 혹은 그 이상의 억세스 유닛들에 대한 부호화된 미디어 데이터를 포함하는 미디어 세그먼트들을 DASH 세그먼트로 생성할 있다. 구체적으로, 일 실시예에서, DASH 세그먼트들은 초기화 세그먼트(Initialization Segment) 와 하나 혹은 그 이상의 미디어 세그먼트들로 구성될 수 있다. 초기화 세그먼트는 미디어 세그먼트들에 포함된 미디어 데이터를 재생하기 위하여 필요한 정보로서, 파일 타입(ftyp) 박스와 무비(moov) 박스를 포함할 수 있다.In one embodiment, the preprocessor 1450 may generate media segments including encoded media data for one or more access units as DASH segments. Specifically, in one embodiment, the DASH segments may consist of an Initialization Segment and one or more Media Segments. The initialization segment is information necessary for playing media data included in the media segments and may include a file type box and a movie box.

미디어 세그먼트들은 실제 미디어 데이터를 담은 미디어 데이터(mdat) 박스를 포함하고 있으며, 미디어 데이터(mdat) 박스에 관련되는 하나 이상의 완전한 (whole self-contained) 무비 프래그먼트(moof) 박스를 포함할 수 있다. 또한 미디어 세그먼트는 세그먼트 타입(segment type: 'styp') 박스를 포함할 수 있다. The media segments include a media data (mdat) box containing actual media data, and may include one or more whole self-contained movie fragment boxes associated with the media data (mdat) box. In addition, the media segment may include a segment type ('styp') box.

본 발명의 몇몇 실시예에서, 전처리부(1450)는 제2b 스트림 생성부(1440)에 제공하기 위한 MPU를 생성할 수 있다. 여기서, MPU는 ISOBMFF을 따르는 물리적 파일로, 독립적인 재생이 가능할 수 있다. 이에 따라, MPU에는 복호화에 필요한 초기화 정보 및 메타데이터를 포함할 수 있다. In some embodiments of the present invention, the preprocessor 1450 may generate an MPU for providing to the second b stream generator 1440. Here, the MPU is a physical file that conforms to ISOBMFF, and may be independently reproduced. Accordingly, the MPU may include initialization information and metadata necessary for decryption.

일 실시예에서, MPU는 ISOBMFF에 따라, 파일 타입(ftyp) 박스, 무비(moov) 박스, 미디어 데이터(mdat) 박스 및 미디어 데이터(mdat) 박스와 관련된 무비 프래그먼트(moof) 박스를 포함할 수 있다.In one embodiment, the MPU may comprise a movie fragment box associated with a file type box, a movie box, a media data box, a media data box, and a media data box according to ISOBMFF. .

또한, 제2a 스트림 생성부(1430)는 전처리부(1450)로부터 획득한 DASH 세그먼트를 이용하여 ROUTE 패킷을 생성하고, ROUTE 패킷을 기초로 ROUTE 스트림을 생성할 수 있다. 제2b 생성부(1440)는 전처리부(1450)로부터 획득한 MPU를 이용하여 MMTP 패킷을 생성하고, MMTP 패킷을 기초로 MMTP 스트림을 생성할 수 있다.Also, the second a stream generator 1430 may generate a ROUTE packet by using the DASH segment obtained from the preprocessor 1450, and may generate a ROUTE stream based on the ROUTE packet. The second b generator 1440 may generate an MMTP packet by using the MPU obtained from the preprocessor 1450, and may generate an MMTP stream based on the MMTP packet.

도 9는 본 발명의 실시예에 따른 제2a 스트림 생성부를 나타낸 블록도이다.9 is a block diagram illustrating a 2a stream generator according to an embodiment of the present invention.

도 9를 참조하면, 제2a 스트림 생성부(1430)는 ROUTE 패킷화부(1431) 및 제2a 다중화부(1434)를 포함할 수 있다. Referring to FIG. 9, the second a stream generator 1430 may include a ROUTE packetizer 1431 and a second a multiplexer 1434.

ROUTE 패킷화부(1431)는 전처리부(1450)로부터 획득한 비디오 기본 스트림 기반의 DASH 세그먼트 및 오디오 기본 스트림 기반의 DASH 세그먼트를 ROUTE 패킷으로 패킷화할 수 있다.The ROUTE packetizer 1431 may packetize the DASH segment based on the video elementary stream and the DASH segment based on the audio elementary stream obtained from the preprocessor 1450 into a ROUTE packet.

또한, 제2a 다중화부(1434)는 ROUTE 패킷화부(1431)에서 생성된 ROUTE 패킷을 다중화하여 출력 스트림을 생성할 수 있다. 여기서, 출력 패킷은 ROUTE 패킷을 의미할 수 있고, 출력 스트림은 ROUTE 스트림을 의미할 수 있다. Also, the seconda multiplexer 1434 may generate an output stream by multiplexing the ROUTE packet generated by the ROUTE packetizer 1431. Here, the output packet may mean a ROUTE packet, and the output stream may mean a ROUTE stream.

구체적으로, ROUTE 패킷화부(1431)는 제1 ROUTE 패킷화부(1432) 및 제2 ROUTE 패킷화부(1433)를 포함할 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니고, 구성예에 따라, 제1 ROUTE 패킷화부(1432) 및 제2 ROUTE 패킷화부(1433)는 구분되지 않고 하나의 ROUTE 패킷화부로 구성될 수도 있다.In detail, the ROUTE packetizer 1431 may include a first ROUTE packetizer 1432 and a second ROUTE packetizer 1433. However, the present invention is not limited thereto, and according to a configuration example, the first ROUTE packetizer 1432 and the second ROUTE packetizer 1433 may be configured as one ROUTE packetizer without being distinguished.

일 실시예에서, ROUTE 패킷은 LCT(Layered Coding Transport)로 표현될 수 있다. ROUTE 패킷은 ROUTE 패킷 헤더 및 페이로드로 구성될 수 있다. 페이로드에는 기본 스트림이 수납될 수 있고, ROUTE 패킷 헤더에는 해당 ROUTE 패킷을 식별하는 식별정보 및 페이로드에 포함된 데이터와 관련된 정보들이 포함될 수 있다.In one embodiment, the ROUTE packet may be represented by a layered coding transport (LCT). The ROUTE packet may consist of a ROUTE packet header and a payload. The payload may store an elementary stream, and the ROUTE packet header may include identification information for identifying a corresponding ROUTE packet and information related to data included in the payload.

일 예로, ROUTE 패킷 헤더에는 페이로드에 포함된 억세스 유닛이 복호화 장치에서 복호화되는 시간에 대한 정보 및 페이로드에 포함된 억세스 유닛이 복호화 장치에서 재생되는 시간에 대한 정보를 포함할 수 있다.For example, the ROUTE packet header may include information about the time when the access unit included in the payload is decoded by the decoding apparatus and information about the time when the access unit included in the payload is reproduced by the decoding apparatus.

또한, 경우에 따라, 페이로드에는 기본 스트림에 대응되는 정보가 포함될 수도 있고, 기본 스트림에 대응되는 정보 외의 다른 정보가 포함될 수도 있고, 상기 다른 정보만이 포함될 수도 있다. 예를 들어, 제1 ROUTE 패킷의 페이로드에는 ISOBMFF의 파일 타입(ftyp) 박스 및 무비(moov) 박스에 대한 데이터가 포함될 수 있고, 제2 ROUTE 패킷의 페이로드에는 무비 프래그먼트(moof) 박스 및 미디어 데이터(mdat) 박스에 대한 데이터가 포함될 수 있고, 제3 ROUTE 패킷의 페이로드에는 미디어 데이터(mdat) 박스에 대한 데이터가 포함될 수 있다. 또한, ROUTE 패킷의 길이는 미리 정해질 수도 있고, 가변적일 수도 있다. In some cases, the payload may include information corresponding to the elementary stream, other information other than the information corresponding to the elementary stream, or only the other information. For example, the payload of the first ROUTE packet may include data for the file type (ftyp) box and the movie box of the ISOBMFF, and the payload of the second ROUTE packet may include the movie fragment box and the media. Data for the data (mdat) box may be included, and the payload of the third ROUTE packet may include data for the media data (mdat) box. In addition, the length of the ROUTE packet may be predetermined or may be variable.

본 발명의 몇몇 실시예에서, 제1 ROUTE 패킷화부(1432)는 전처리부(1450)로부터 비디오 기본 스트림에 대한 DASH 세그먼트를 획득하고, 상기 DASH 세그먼트를 기초로 ROUTE 패킷을 생성할 수 있다.In some embodiments of the present disclosure, the first ROUTE packetizer 1432 may obtain a DASH segment for the video elementary stream from the preprocessor 1450 and generate a ROUTE packet based on the DASH segment.

또한, 제2 ROUTE 패킷화부(1433)는 전처리부(1450)로부터 오디오 기본 스트림에 대한 DASH 세그먼트를 획득하고, 상기 DASH 세그먼트를 기초로 ROUTE 패킷을 생성할 수 있다.Also, the second ROUTE packetizer 1433 may obtain a DASH segment for the audio elementary stream from the preprocessor 1450 and generate a ROUTE packet based on the DASH segment.

또한, 제2a 다중화부(1434)는 제1 ROUTE 패킷화부(1432) 및 제2 ROUTE 패킷화부(1443)에서 생성된 ROUTE 패킷들을 다중화하여 출력 스트림을 생성하고, 생성된 출력 스트림을 출력부(1500)에 제공할 수 있다.Also, the second multiplexer 1434 generates an output stream by multiplexing the ROUTE packets generated by the first ROUTE packetizer 1432 and the second ROUTE packetizer 1434, and outputs the generated output stream to the output unit 1500. ) Can be provided.

또한, 제2a 다중화부(1434)는 소정의 비트레이트에 따라 ROUTE 패킷들을 다중화할 수 있다.Also, the seconda multiplexer 1434 may multiplex ROUTE packets according to a predetermined bit rate.

또한, 제어부(1600)는 스트림 제공장치(1600)에서 제공되는 출력 스트림의 비트량이 소정 기준보다 많거나 적을 경우, 복호화 장치의 버퍼에 오버플로 또는 언더플로가 발생되지 않도록 제2a 다중화부(1434)의 비트레이트, 즉, 출력 스트림의 비트레이트를 조정할 수 있다.In addition, when the bit amount of the output stream provided by the stream providing apparatus 1600 is greater or smaller than a predetermined reference, the controller 1600 may prevent the overflow or underflow from occurring in the buffer of the decoding apparatus. You can adjust the bit rate of, i.e., the bit rate of the output stream.

도 10은 본 발명의 실시예에 따른 제2b 스트림 생성부를 나타낸 블록도이다.10 is a block diagram illustrating a second bb stream generator according to an embodiment of the present invention.

도 10을 참조하면, 제2b 스트림 생성부(1440)는 MMTP 패킷화부(1441) 및 제2b 다중화부(1444)를 포함할 수 있다. Referring to FIG. 10, the second b stream generator 1440 may include an MMTP packetizer 1442 and a second b multiplexer 1444.

MMTP 패킷화부(1441)는 전처리부(1450)로부터 획득한 비디오 기본 스트림 기반의 MPU 및 오디오 기본 스트림 기반의 MPU를 MMTP 패킷으로 패킷화할 수 있다.The MMTP packetizer 1442 may packetize the video elementary stream based MPU and the audio elementary stream based MPU obtained from the preprocessor 1450 into MMTP packets.

또한, 제2b 다중화부(1444)는 MMTP 패킷화부(1441)에서 생성된 MMTP 패킷을 다중화하여 출력 스트림을 생성할 수 있다. 여기서, 출력 패킷은 MMTP 패킷을 의미할 수 있고, 출력 스트림은 MMTP 스트림을 의미할 수 있다. Also, the second b multiplexer 1444 may generate an output stream by multiplexing the MMTP packets generated by the MMTP packetizer 1442. Here, the output packet may mean an MMTP packet, and the output stream may mean an MMTP stream.

구체적으로, MMTP 패킷화부(1441)는 제1 MMTP 패킷화부(1442) 및 제2 MMTP 패킷화부(1443)를 포함할 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니고, 구성예에 따라, 제1 MMTP 패킷화부(1442) 및 제2 MMTP 패킷화부(1443)는 구분되지 않고 하나의 MMTP 패킷화부로 구성될 수도 있다.In detail, the MMTP packetizer 1442 may include a first MMTP packetizer 1442 and a second MMTP packetizer 1443. However, the present invention is not limited thereto, and according to a configuration example, the first MMTP packetizer 1442 and the second MMTP packetizer 1443 may be configured as one MMTP packetizer without being distinguished.

일 실시예에서, MMTP 패킷은 MMTP 패킷 헤더 및 페이로드로 구성될 수 있다. 페이로드에는 기본 스트림이 수납될 수 있고, MMTP 패킷 헤더에는 해당 MMTP 패킷을 식별하는 식별정보 및 페이로드에 포함된 데이터와 관련된 정보들이 포함될 수 있다.In one embodiment, an MMTP packet may consist of an MMTP packet header and a payload. The payload may store an elementary stream, and the MMTP packet header may include identification information for identifying a corresponding MMTP packet and information related to data included in the payload.

일 예로, MMTP 패킷 헤더에는 페이로드에 포함된 억세스 유닛이 복호화 장치에서 순차적으로 정렬할 수 있는 패킷 시퀀스 번호 등에 대한 정보를 포함할 수 있다.For example, the MMTP packet header may include information about a packet sequence number that an access unit included in the payload can sequentially arrange in the decoding apparatus.

또한, 경우에 따라, 페이로드에는 기본 스트림에 대응되는 정보가 포함될 수도 있고, 기본 스트림에 대응되는 정보 외의 다른 정보가 포함될 수도 있고, 상기 다른 정보만이 포함될 수도 있다. 예를 들어, 제1 MMTP 패킷의 페이로드에는 ISOBMFF의 파일 타입(ftyp) 박스 및 무비(moov) 박스에 대한 데이터가 포함될 수 있고, 제2 MMTP 패킷의 페이로드에는 무비 프래그먼트(moof) 박스가 포함될 수 있고, 제3 MMTP 패킷의 페이로드에는 미디어 데이터(mdat) 박스에 대한 데이터가 포함될 수 있다. 또한, MMTP 패킷의 길이는 미리 정해질 수도 있고, 가변적일 수도 있다. 예를 들어, MMTP 패킷의 길이는 20바이트 내지 1500바이트로 생성될 수 있다.In some cases, the payload may include information corresponding to the elementary stream, other information other than the information corresponding to the elementary stream, or only the other information. For example, the payload of the first MMTP packet may include data for a file type (ftyp) box and a movie box of the ISOBMFF, and the payload of the second MMTP packet may include a movie fragment box. The payload of the third MMTP packet may include data for the media data (mdat) box. In addition, the length of the MMTP packet may be predetermined or may be variable. For example, the length of the MMTP packet may be generated from 20 bytes to 1500 bytes.

본 발명의 몇몇 실시예에서, 제1 MMTP 패킷화부(1442)는 전처리부(1450)로부터 비디오 기본 스트림에 대한 MPU를 획득하고, 상기 MPU를 기초로 MMTP 패킷을 생성할 수 있다.In some embodiments of the present disclosure, the first MMTP packetizer 1442 may obtain an MPU for the video elementary stream from the preprocessor 1450 and generate an MMTP packet based on the MPU.

또한, 제2 MMTP 패킷화부(1443)는 전처리부(1450)로부터 오디오 기본 스트림에 대한 MPU를 획득하고, 상기 MPU를 기초로 MMTP 패킷을 생성할 수 있다.In addition, the second MMTP packetizer 1443 may obtain an MPU for the audio elementary stream from the preprocessor 1450 and generate an MMTP packet based on the MPU.

또한, 제2b 다중화부(1444)는 제1 MMTP 패킷화부(1442) 및 제2 MMTP 패킷화부(1443)에서 생성된 MMTP 패킷들을 다중화하여 출력 스트림을 생성하고, 출력 스트림을 출력부(1500)에 제공할 수 있다.In addition, the 2b multiplexer 1444 multiplexes the MMTP packets generated by the first MMTP packetizer 1442 and the second MMTP packetizer 1443 to generate an output stream, and outputs the output stream to the output unit 1500. Can provide.

또한, 제2a 다중화부(1434)는 소정의 비트레이트에 따라 MMTP 패킷들을 다중화할 수 있다.In addition, the seconda multiplexer 1434 may multiplex MMTP packets according to a predetermined bitrate.

또한, 제어부(1600)는 스트림 제공장치(1600)에서 제공되는 출력 스트림의 비트량이 소정 기준보다 많거나 적을 경우, 복호화 장치의 버퍼에 오버플로 또는 언더플로가 발생되지 않도록 제2b 다중화부(1444)의 비트레이트, 즉, 출력 스트림의 비트레이트를 조정할 수 있다.In addition, when the bit amount of the output stream provided from the stream providing apparatus 1600 is greater or less than a predetermined reference, the controller 1600 may prevent the overflow or underflow from occurring in the buffer of the decoding apparatus. You can adjust the bit rate of, i.e., the bit rate of the output stream.

도 11은 본 발명의 다른 실시예에 따른 스트림 생성부를 나타낸 블록도이다.11 is a block diagram illustrating a stream generator according to another embodiment of the present invention.

도 11을 참조하면, 스트림 생성부(1400)는 패킷화부(1470) 및 다중화부(1480)를 포함할 수 있다. 패킷화부(1470)는 비디오 부호화부(1200)로부터 획득하는 비디오 기본 스트림 및 오디오 부호화부(1300)로부터 획득하는 오디오 기본 스트림을 출력 패킷으로 패킷화하는 구성으로, 도 6, 도 9 및 도 10에서 전술한 PES/TS 패킷화부(1411), ROUTE 패킷화부(1431) 및 MMTP 패킷화부(1441) 중 적어도 하나를 나타낼 수 있다. 또한. 다중화부(1480)는 패킷화부(1470)에서 생성된 출력 패킷을 다중화하여 출력 스트림을 생성하는 구성으로, 도 6, 도 9 및 도 10에서 전술한 제1 다중화부(1414), 제2a 다중화부(1434) 및 제2b 다중화부(1444) 중 적어도 하나를 나타낼 수 있다.Referring to FIG. 11, the stream generator 1400 may include a packetizer 1470 and a multiplexer 1480. The packetizer 1470 is configured to packetize the video elementary stream obtained from the video encoder 1200 and the audio elementary stream obtained from the audio encoder 1300 into output packets. In FIG. 6, 9, and 10, FIG. The PES / TS packetizer 1411, the ROUTE packetizer 1431, and the MMTP packetizer 1441 may be represented. Also. The multiplexer 1480 is configured to multiplex the output packets generated by the packetizer 1470 to generate an output stream. The first multiplexer 1414 and the second a multiplexer described above with reference to FIGS. 6, 9, and 10 are described. It may represent at least one of 1434 and the second b multiplexer 1444.

패킷화부(1470)는 비디오 부호화부(1200)로부터 L 비트레이트로 비디오 기본 스트림을 획득하고, 오디오 부호화부(1300)로부터 M 비트레이트로 오디오 기본 스트림을 획득할 수 있다. 즉, 비디오 부호화부(1200)는 소스 비디오 신호를 부호화하여 L 비트레이트(이하, 비디오 ES 비트레이트라고 표현함)로 비디오 기본 스트림을 패킷화부(1470)에 제공하고, 오디오 부호화부(1300)는 소스 오디오 신호를 부호화하여 M 비트레이트(이하, 오디오 ES 비트레이트라고 표현함)로 오디오 기본 스트림을 패킷화부(1470)에 제공할 수 있다.The packetizer 1470 may obtain the video elementary stream at the L bit rate from the video encoder 1200, and may obtain the audio elementary stream at the M bit rate from the audio encoder 1300. That is, the video encoder 1200 encodes a source video signal and provides a video elementary stream to the packetizer 1470 at an L bitrate (hereinafter, referred to as a video ES bitrate), and the audio encoder 1300 supplies a source. By encoding the audio signal, the audio elementary stream may be provided to the packetizer 1470 using an M bit rate (hereinafter, referred to as an audio ES bit rate).

패킷화부(1470)는 획득한 비디오 기본 스트림 및 오디오 기본 스트림에 대해 패킷화를 진행하여 출력 패킷들을 생성하고, 생성된 비디오 출력 패킷 및 오디오 출력 패킷을 다중화부(1480)에 제공할 수 있다.The packetizer 1470 may packetize the obtained video elementary stream and audio elementary stream to generate output packets, and provide the generated video output packet and audio output packet to the multiplexer 1480.

다중화부(1480)는 패킷화부(1470)로부터 비디오 출력 패킷 및 오디오 출력 패킷을 획득하고, 획득한 비디오 출력 패킷 및 오디오 출력 패킷을 다중화할 수 있다. 일 실시예에서, 패킷화부(1470)에서 생성된 비디오 출력 패킷 및 오디오 출력 패킷은 스트림 생성 장치(1000)내에 포함된 출력 패킷 버퍼에 저장될 수 있고, 다중화부(1480)는 출력 패킷 버퍼로부터 비디오 출력 패킷 및 오디오 출력 패킷을 리드할 수 있다.The multiplexer 1480 may obtain a video output packet and an audio output packet from the packetizer 1470, and multiplex the obtained video output packet and the audio output packet. In one embodiment, the video output packet and the audio output packet generated by the packetizer 1470 may be stored in an output packet buffer included in the stream generating apparatus 1000, and the multiplexer 1480 may store video from the output packet buffer. Output packets and audio output packets can be read.

또한, 본 발명의 몇몇 실시예에서, 다중화부(1480)는 출력 스트림을 N 비트레이트(이하, 출력 비트레이트로 표현함)로 출력할 수 있다. 일 실시예에서, 출력 비트레이트의 값은 비디오 ES 비트레이트 및 오디오 ES 비트레이트를 합한 값 이상일 수 있다. 이는, 스트림 생성부(1400)가 비디오 ES 비트레이트로 입력받는 비디오 기본 스트림 및 오디오 ES 비트레이트로 입력받는 오디오 기본 스트림을 안정적으로 출력하기 위함일 수 있다. 만약, 출력 비트레이트의 값이 비디오 ES 입력 비트레이트 및 오디오 ES 입력 비트레이트를 합한 값보다 작을 경우, 다중화부(1480)는 소정의 시간동안 비디오 부호화부(1200) 및 오디오 부호화부(1300)로부터 획득한 기본 스트림을 동일한 시간동안 출력 스트림의 형태로 출력할 수 없게 된다. 즉, 다중화부(1480)의 출력 스트림의 출력에 있어서 지연이 발생되게 되고, 이에 따라, 복호화 장치에서 역시 상기 기본 스트림의 복호화에 지연이 발생될 수 있다. 따라서, 다중화부(1480)에서의 출력 비트레이트는 비디오 ES 비트레이트 및 오디오 ES 비트레이트 이상일 수 있다.In addition, in some embodiments of the present invention, the multiplexer 1480 may output the output stream in N bitrates (hereinafter, referred to as output bitrates). In one embodiment, the value of the output bitrate may be equal to or greater than the sum of the video ES bitrate and the audio ES bitrate. This may be for the stream generation unit 1400 to stably output the video elementary stream received at the video ES bit rate and the audio elementary stream received at the audio ES bit rate. If the value of the output bitrate is smaller than the sum of the video ES input bitrate and the audio ES input bitrate, the multiplexer 1480 may be configured to perform a predetermined time from the video encoder 1200 and the audio encoder 1300. The obtained elementary stream cannot be output in the form of an output stream for the same time. That is, a delay occurs in the output of the output stream of the multiplexer 1480, and thus, a delay may occur in the decoding apparatus of the elementary stream. Accordingly, the output bitrate in the multiplexer 1480 may be equal to or more than the video ES bitrate and the audio ES bitrate.

이 때, 출력 비트레이트의 값이 비디오 ES 비트레이트 및 오디오 ES 비트레이트를 합한 값(이하, ES 비트레이트의 값) 이상임에 따라, 출력 스트림에는 출력 비트레이트의 값과 ES 비트레이트의 값의 차이만큼 Null 패킷이 포함될 수 있다. 예를 들어, 출력 비트레이트가 11Mbps이고, ES 비트레이트가 10.1Mbps인 경우, 1초를 기준으로, 출력 스트림의 비트수는 11*10^6 개이고, 출력 스트림내에서, 출력 패킷은 10.1*10^6개가 포함되고, Null패킷은 0.9*10^6개가 포함될 수 있다.At this time, as the value of the output bitrate is equal to or greater than the sum of the video ES bitrate and the audio ES bitrate (hereinafter, referred to as the value of the ES bitrate), the difference between the value of the output bitrate and the value of the ES bitrate in the output stream. As many null packets may be included. For example, if the output bit rate is 11 Mbps and the ES bit rate is 10.1 Mbps, the number of bits of the output stream is 11 * 10 ^ 6 bits per second, and within the output stream, the output packet is 10.1 * 10. ^ 6 is included, and null packets may contain 0.9 * 10 ^ 6.

그러나, 경우에 따라, 출력 스트림 내에서 Null 패킷이 집중될 수 있다. 도 12의 예를 참고하면, 도 12는 출력 패킷의 비트수를 나타내는 것으로, 그래프의 x축은 시간을 나타내고, y축은 비트수를 나타낼 수 있다. 출력 스트림은 출력 비트레이트에 따라 출력될 수 있다. 그러나, 출력 패킷의 경우, 다중화부(1480)에서 다중화가 어떠한 방식으로 진행되냐에 따라, 선(1210)과 같이 출력 패킷의 최대 비트수와 최소 비트수의 차이가 소정의 임계값 이내일 수도 있고, 선(1220)과 같이 출력 패킷의 최대 비트수와 최소 비트수의 차이가 상기 소정의 임계값보다 클 수 있다. 즉, 도 12의 예에서, 선(1210)의 경우에는 Null 패킷이 출력 스트림에 분산되어 위치함에 따라 출력 패킷의 최대 비트수와 최소 비트수의 차이가 소정의 임계값 이내가 될 수 있는 반면, 선(1220)의 경우에는 Null 패킷이 출력 스트림에 한곳에 집중되어 위치함에 따라 출력 패킷의 최대 비트수와 최소 비트수의 차이가 소정의 임계값보다 커지게 될 수 있다.However, in some cases, null packets may be concentrated in the output stream. Referring to the example of FIG. 12, FIG. 12 represents the number of bits of an output packet. The x-axis of the graph may represent time, and the y-axis may represent the number of bits. The output stream may be output according to the output bitrate. However, in the case of the output packet, depending on how the multiplexing is performed in the multiplexer 1480, the difference between the maximum number of bits and the minimum number of bits of the output packet may be within a predetermined threshold, as in the line 1210. As shown by line 1220, a difference between the maximum number of bits and the minimum number of bits of the output packet may be greater than the predetermined threshold. That is, in the example of FIG. 12, in the case of the line 1210, the difference between the maximum number of bits and the minimum number of bits of the output packet may be within a predetermined threshold as the null packets are distributed and positioned in the output stream. In the case of line 1220, the difference between the maximum number of bits and the minimum number of bits of the output packet may be greater than a predetermined threshold as the null packets are centrally located in the output stream.

그러나, 경우에 따라, 출력 패킷의 최대 비트수와 최소 비트수의 차이가 소정의 임계값보다 커지게 되는 경우, 송신 시스템(110) 내에서 스위칭(절체)가 발생될 수 있다. 구체적으로, 도 2의 송신 시스템(110)에서는 스트림 제공장치(1000)가 하나로 표현되었지만, 일 실시예에서, 송신 시스템(110)에서 스트림 제공 장치(100)는 두 개 이상 포함될 수 있다. 이 경우, 복수의 스트림 제공장치중 메인 스트림 제공장치는 게이트웨이(2000)에 출력 스트림을 제공할 수 있고, 나머지 스트림 제공장치는 메인 스트림 제공장치에 오류가 발생되는 것을 대비하여 예비적으로 사용될 수 있다. 이 때, 메인 스트림 제공장치에서 출력되는 출력 스트림에 Null패킷이 소정의 임계값 이상 발생되는 경우, 송신 시스템(110)은 메인 스트림 제공장치에 오류가 발생된 것으로 판단될 수 있다. 이 경우, 메인 스트림 제공장치에서 오류가 발생되지 않았음에도 불구하고 송신 시스템(110)은 메인 스트림 제공장치에 오류가 발생된 것으로 판단하여, 상기 나머지 스트림 제공장치를 메인 스트림 제공장치로 스위칭할 수 있다. 이러한 스트림 제공장치의 불필요한 스위칭을 방지하기 위하여 본 발명의 스트림 제공장치(1000)는 Null 패킷이 집중되지 않고 분산된 출력 스트림을 제공할 수 있다.However, in some cases, when the difference between the maximum number of bits and the minimum number of bits of the output packet becomes larger than a predetermined threshold value, switching (transition) may occur in the transmission system 110. Specifically, although the stream providing apparatus 1000 is represented as one in the transmission system 110 of FIG. 2, in an embodiment, two or more stream providing apparatuses 100 may be included in the transmission system 110. In this case, the main stream providing apparatus among the plurality of stream providing apparatuses may provide an output stream to the gateway 2000, and the remaining stream providing apparatuses may be used in preparation for an error occurring in the main stream providing apparatus. . In this case, when a null packet is generated in the output stream output from the main stream providing apparatus more than a predetermined threshold value, the transmission system 110 may determine that an error occurs in the main stream providing apparatus. In this case, although no error occurs in the main stream providing apparatus, the transmission system 110 may determine that an error has occurred in the main stream providing apparatus, and switch the remaining stream providing apparatus to the main stream providing apparatus. . In order to prevent unnecessary switching of the stream providing apparatus, the stream providing apparatus 1000 of the present invention may provide a distributed output stream without concentrating null packets.

도 13은 본 발명의 실시예에 따른 출력 패킷의 다중화 방법을 나타낸 동작 흐름도이다.13 is a flowchart illustrating a method of multiplexing output packets according to an embodiment of the present invention.

도 13을 참조하면, 스트림 생성부(1400)는 출력 패킷들을 획득할 수 있다(S1310). 일 예로, 패킷화부(1470)는 비디오 복호화부(1200)로부터 비디오 기본 스트림을 획득하고, 비디오 기본 스트림을 패킷화하여 비디오 출력 패킷을 생성할 수 있다. 또한, 패킷화부(1470)는 오디오 복호화부(1300)로부터 오디오 기본 스트림을 획득하고, 오디오 기본 스트림을 패킷화하여 오디오 출력 패킷을 생성할 수 있다. 여기서, 비디오 출력 패킷 및 오디오 출력 패킷은 제1 스트림 생성부(1410)에서 생성되는 TS 패킷일 수도 있고, 제2 스트림 생성부(1420)에서 생성되는 A3 패킷일 수도 있다.Referring to FIG. 13, the stream generator 1400 may obtain output packets (S1310). For example, the packetizer 1470 may obtain a video elementary stream from the video decoder 1200, and packetize the video elementary stream to generate a video output packet. In addition, the packetizer 1470 may obtain an audio elementary stream from the audio decoder 1300, and packetize the audio elementary stream to generate an audio output packet. The video output packet and the audio output packet may be TS packets generated by the first stream generator 1410 or A3 packets generated by the second stream generator 1420.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷들에 다중화 시각을 부여할 수 있다(S1320). 여기서, 다중화 시각은 스트림 생성부(1400) 내부에서 출력 패킷들의 다중화를 위해 부여되는 시각정보를 나타낼 수 있다. 이러한 다중화 시각은 각 출력 패킷마다 설정될 수 있다. 예를 들어, 패킷화부(1470)가 비디오 출력 패킷들을 획득하는 경우, 스트림 생성부(1400)는 각 비디오 출력 패킷마다 서로 다른 다중화 시각을 부여할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may give a multiplexed time to the output packets (S1320). Here, the multiplexed time may represent time information provided for multiplexing output packets in the stream generator 1400. This multiplexing time can be set for each output packet. For example, when the packetizer 1470 obtains video output packets, the stream generator 1400 may assign different multiplexing times to each video output packet.

또한, 출력 패킷들에 부여되는 다중화 시각의 데이터 형태는 다양할 수 있다. 예를 들어, 다중화 시각은 임의의 숫자로 설정될 수도 있고, 스트림 생성장치(1000)의 클록을 기초로 설정될 수도 있고, 스트림 생성장치(1000) 및 부호화 장치에서 사용되는 상대시간 정보를 기반으로 설정될 수도 있고, 절대 시간 정보를 기반으로 설정될 수도 있다. 이 외에도, 다중화 시각은 각 출력 패킷을 구분할 수 있는 다양한 데이터 형식으로 설정될 수도 있다.In addition, the data format of the multiplexed time given to the output packets may vary. For example, the multiplexing time may be set to any number, or may be set based on the clock of the stream generating apparatus 1000, or based on the relative time information used in the stream generating apparatus 1000 and the encoding apparatus. It may be set or may be set based on absolute time information. In addition, the multiplexing time may be set in various data formats to distinguish each output packet.

또한, 스트림 생성부(1400)는 패킷화부(1470)에서 출력 패킷이 생성되는 시간 또는 순서, 다중화부(1480)에서 출력 패킷이 리드되는 시간 또는 순서, 출력 패킷의 크기, 출력 패킷에 포함되는 억세스 유닛의 크기, 출력 패킷에 포함되는 억세스 유닛의 종류, 복호화 장치에서의 버퍼의 크기 등 다양한 기준에 따라 다중화 시각을 생성할 수 있다. 또한, 스트림 생성부(1400)는 출력 패킷을 구분할 수 있는 다양한 기준을 기초로 각 출력 패킷에 대한 다중화 시각을 설정할 수 있다.In addition, the stream generator 1400 may include the time or order in which the output packets are generated in the packetizer 1470, the time or order in which the output packets are read in the multiplexer 1480, the size of the output packets, and the accesses included in the output packets. The multiplexed time can be generated according to various criteria such as the size of the unit, the type of access unit included in the output packet, and the size of the buffer in the decoding apparatus. In addition, the stream generator 1400 may set a multiplexing time for each output packet based on various criteria for identifying the output packet.

예를 들어, 스트림 생성부(1400)는 다중화부(1480)에서 출력 패킷이 리드되는 시간 또는 순서를 기준으로 출력패킷에 다중화 시각을 설정할 수 있다. 또한, 패킷화부(1470)가 기본 스트림을 출력 패킷으로 패킷화하는 시간을 고려하지 않을 경우, 스트림 생성부(1400)는 패킷화부(1470)에서 기본스트림을 획득하는 시간 또는 순서를 기준으로 출력 패킷에 다중화 시각을 설정할 수 있다. 다중화 시각의 설정에 대해서는 도 21 및 도 22에서 보다 상세하게 설명한다.For example, the stream generator 1400 may set the multiplexing time to the output packet based on the time or order in which the output packet is read by the multiplexer 1480. In addition, when the packetizer 1470 does not consider the time for packetizing the elementary stream into an output packet, the stream generator 1400 outputs the packet based on the time or order in which the packetizer 1470 acquires the elementary stream. You can set the multiplex time. Setting of the multiplexing time will be described in more detail with reference to FIGS. 21 and 22.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷에 다중화 시각을 삽입할 수 있다. 이 때, 스트림 생성부(1400)는 출력 패킷에 추가 필드를 부가하고, 추가 헤더에 다중화 시각을 삽입할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may insert a multiplexed time into an output packet. At this time, the stream generator 1400 may add an additional field to the output packet and insert a multiplexed time into the additional header.

도 14의 예를 참조하면, 도 14는 본 발명의 실시예에 따른 다중화 시각의 삽입을 설명하기 위한 도면이다. 도 14의 예에서, (a)는 출력 패킷 #1 및 출력 패킷 #2를 나타낸다. 출력 패킷 #1 및 출력 패킷 #2는 모두 헤더 및 페이로드의 형태로 구성될 수 있다.Referring to the example of FIG. 14, FIG. 14 is a diagram for describing the insertion of multiplexed views according to an embodiment of the present invention. In the example of FIG. 14, (a) shows output packet # 1 and output packet # 2. Both output packet # 1 and output packet # 2 may be configured in the form of a header and a payload.

또한, (b)는 출력 패킷 #1 및 출력 패킷 #2에 추가 필드가 부가된 형태를 나타낼 수 있다. (b)에서 스트림 생성부(1400)는 각 출력 패킷에 다중화 시각을 삽입하기 위하여 각 출력 패킷에 추가 필드를 부가하고, 부가되는 추가 필드에 다중화 시각을 삽입할 수 있다. 일 실시예에서, 추가 필드는 추가헤더의 형태로 각 출력 패킷의 헤더의 상단에 부가될 수 있다. 다만, 이에 한정되는 것은 아니며, 추가 필드는 각 출력 패킷의 하단 또는 각 출력 패킷의 중단에 삽입될 수도 있다. 또한, 추가 필드는 복수의 필드로 구성될 수 있고, 다중화 시각 외에 다른 정보도 추가 필드에 삽입될 수 있다. 또한, 추가 필드는 고정된 크기를 가질 수 있는데, 일 예로 추가 필드는 20바이트의 크기를 가질 수도 있다. 또한, 실시예에 따라 추가 필드의 크기는 가변적일 수도 있다. 예를 들어, 추가 필드의 크기는 출력 패킷의 종류에 따라 서로 다른 크기로 설정될 수도 있다.Also, (b) may indicate a form in which an additional field is added to the output packet # 1 and the output packet # 2. In operation (b), the stream generator 1400 may add an additional field to each output packet in order to insert a multiplexed time in each output packet, and insert the multiplexed time in the added additional field. In one embodiment, additional fields may be added to the top of the header of each output packet in the form of additional headers. However, the present invention is not limited thereto, and the additional field may be inserted at the bottom of each output packet or at the interruption of each output packet. In addition, the additional field may be composed of a plurality of fields, and other information besides the multiplexing time may be inserted into the additional field. In addition, the additional field may have a fixed size. For example, the additional field may have a size of 20 bytes. In addition, according to an embodiment, the size of the additional field may be variable. For example, the size of the additional field may be set to different sizes according to the type of the output packet.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 다중화 시각에 따라 출력 패킷들을 다중화할 수 있다(S1330). 구체적으로, 스트림 생성부(1400)는 다중화를 위한 기준 시각 및 출력 패킷들의 다중화 시각을 비교하여 출력 패킷을 다중화할 수 있다. 여기서, 다중화를 위한 기준 시각은 스트림 생성부(1400)가 출력 스트림에 출력 패킷들을 삽입하기 위한 기준이 되는 시각을 의미할 수 있다. 일 실시예에서, 스트림 생성부(1400)는 출력 비트레이트를 기초로 출력 패킷의 종류를 고려하여 다중화를 위한 기준 시각을 설정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 1에 따라 다중화를 위한 기준 시각을 설정할 수 있다.In addition, in some embodiments of the present invention, the stream generation unit 1400 may multiplex output packets according to the multiplexing time (S1330). In detail, the stream generator 1400 may multiplex the output packet by comparing the reference time for multiplexing and the multiplexing time of the output packets. Here, the reference time for multiplexing may mean a time when the stream generator 1400 is a reference for inserting output packets into an output stream. According to an embodiment, the stream generator 1400 may set a reference time for multiplexing in consideration of the type of the output packet based on the output bit rate. For example, the stream generator 1400 may set a reference time for multiplexing according to Equation 1 below.

[수학식 1][Equation 1]

tmux_ref = 1/OPtot_num = OPsize / OSbitrate t mux_ref = 1 / OP tot_num = OP size / OS bitrate

여기서, tmux_ref는 다중화를 위한 기준 시각을 나타내고, OPtot_num은 1초당 출력 스트림에 삽입되는 패킷의 수를 나타내고, OPsize는 출력 패킷의 크기를 나타내고, OSbitrate는 출력스트림의 비트레이트를 나타낼 수 있다.Here, t mux_ref represents a reference time for multiplexing, OP tot_num represents the number of packets inserted into the output stream per second, OP size represents the size of the output packet, and OS bitrate represents the bitrate of the output stream. have.

예를 들어, 출력 스트림의 출력 비트레이트가 11Mbps이고, 출력 패킷의 크기가 188byte인 경우, 다중화를 위한 기준 시각은 137μsec 가 될 수 있다. 즉, 137μsec마다 출력 스트림에 출력 패킷이 삽입될 수 있다.For example, when the output bit rate of the output stream is 11 Mbps and the size of the output packet is 188 bytes, the reference time for multiplexing may be 137 μsec. That is, an output packet may be inserted into an output stream every 137 μsec.

또한, 본 발명의 실시예에서, 스트림 생성부(1400)는 다중화를 위한 기준 시각과 각 출력 패킷의 다중화 시각을 비교하여 출력 스트림을 생성할 수 있다. 예를 들어, 출력 패킷 #1의 다중화 시각이 제1 기준시각 이하일 경우, 스트림 생성부(1400)는 제1 기준시각과 대응되는 위치에 출력 패킷 #1을 출력 스트림에 포함시킬 수 있다. 또한, 출력 패킷 #2의 다중화 시각이 제1 기준 시각보다 크고 제2 기준시각 이하일 경우, 스트림 생성부(1400)는 제2 기준시각과 대응되는 위치에 출력 패킷 #2을 출력 스트림에 포함시킬 수 있다. 또한, 출력 패킷 #3의 다중화 시각이 제2 기준시각 및 제3 기준시각보다 크고 제4 기준 시각 이하인 경우, 스트림 생성부(1400)는 제3 기준시각과 대응되는 위치에 Null 패킷을 삽입하고, 제4 기준시각과 대응되는 위치에 출력 패킷 #3을 출력 스트림에 포함시킬 수 있다.In addition, in an embodiment of the present invention, the stream generator 1400 may generate an output stream by comparing the multiplexing time of each output packet with a reference time for multiplexing. For example, when the multiplexed time of the output packet # 1 is less than or equal to the first reference time, the stream generator 1400 may include the output packet # 1 in the output stream at a position corresponding to the first reference time. In addition, when the multiplexed time of the output packet # 2 is greater than the first reference time and less than or equal to the second reference time, the stream generator 1400 may include the output packet # 2 in the output stream at a position corresponding to the second reference time. have. In addition, when the multiplexed time of the output packet # 3 is greater than the second reference time and the third reference time and less than or equal to the fourth reference time, the stream generator 1400 inserts a null packet at a position corresponding to the third reference time. The output packet # 3 may be included in the output stream at a position corresponding to the fourth reference time.

구체적인 예로서, 도 15를 참고하면, 도 15는 본 발명의 실시예에 따른 다중화를 설명하기 위한 도면이다.As a specific example, referring to FIG. 15, FIG. 15 is a diagram for describing multiplexing according to an embodiment of the present invention.

도 15의 예에서, 스트림 생성부(1400)는 ES 비트레이트에 따라 소정 시간동안 5개의 출력 패킷을 획득할 수 있으며, 스트림 생성부(1400)는 130을 주기로 5개의 출력 패킷에 다중화 시각을 설정할 수 있다.In the example of FIG. 15, the stream generator 1400 may acquire five output packets for a predetermined time according to the ES bit rate, and the stream generator 1400 sets the multiplexed time to five output packets at intervals of 130. Can be.

또한, 도 15의 예에서, 스트림 생성부(1400)는 100을 주기로 다중화를 위한 기준시각을 설정할 수 있다.In addition, in the example of FIG. 15, the stream generator 1400 may set a reference time for multiplexing every 100 cycles.

일 실시예에서, 다중화 시각이 적용되지 않고 5개의 출력 패킷에 대해 다중화가 수행될 경우, 5개의 출력 패킷이 출력 스트림에 연속하여 삽입될 수 있고, 이로 인해 출력 스트림에서 Null 패킷들이 5개의 출력 패킷에 뒤따라 연속하여 위치할 수 있다.In one embodiment, if multiplexing time is not applied and multiplexing is performed on five output packets, five output packets may be inserted in the output stream consecutively, such that the Null packets in the output stream are five output packets. Can be placed consecutively following.

반면, 스트림 생성부(1400)는 5개의 출력 패킷의 다중화 시각을 고려하여 다중화를 수행할 수 있다. 이 경우, 출력 패킷 #4의 다중화 시각이 390이고, 출력 패킷 #5의 다중화 시각이 520로 설정되어 있으므로, 기준시각 400 및 기준시각 500 사이의 다중화 시각을 갖는 출력 패킷이 존재하지 않을 수 있다. 이에 따라, 스트림 생성부(1400)는 출력 스트림에서 기준시각 400에 대응하는 위치에 Null 패킷을 삽입할 수 있고, 기준시각 500에 대응하는 위치에 출력 패킷 #5을 삽입할 수 있다. 따라서, 출력 스트림에서 출력 패킷 #4과 출력 패킷 #5 사이에 Null 패킷이 존재할 수 있고, 이로 인해, 출력 스트림에서 Null 패킷이 분산될 수 있다. 이와 같이, 출력 스트림에서 Null 패킷이 분산됨에 따라, 별다른 오류없이 메인 스트림 제공장치가 예비 스트림 제공장치로 교체되는 스위칭 현상의 발생이 방지될 수 있다.On the other hand, the stream generator 1400 may perform the multiplexing in consideration of the multiplexing time of five output packets. In this case, since the multiplexed time of the output packet # 4 is 390 and the multiplexed time of the output packet # 5 is set to 520, an output packet having a multiplexed time between the reference time 400 and the reference time 500 may not exist. Accordingly, the stream generator 1400 may insert a null packet at a position corresponding to the reference time 400 in the output stream and insert the output packet # 5 at a position corresponding to the reference time 500. Thus, there may be a null packet between output packet # 4 and output packet # 5 in the output stream, which may cause null packets to be distributed in the output stream. As such, as the Null packets are distributed in the output stream, the switching phenomenon in which the main stream providing apparatus is replaced with the spare stream providing apparatus can be prevented without any error.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 기준 시간에 따라 출력 스트림에서 출력 패킷 및 Null 패킷을 서로 다른 위치에 삽입할 수 있다. 구체적인 예로서, 도 16을 참고하면, 도 16은 본 발명의 다른 실시예에 따른 다중화를 설명하기 위한 도면이다. 도 16의 예에서는, 도 15의 예와 같이 스트림 생성부(1400)는 ES 비트레이트에 따라 소정 시간동안 5개의 출력 패킷을 획득할 수 있으며, 스트림 생성부(1400)는 130을 주기로 5개의 출력 패킷에 다중화 시각을 설정할 수 있다. 그러나, 도 16의 예에서, 스트림 생성부(1400)는 도 15와 달리 80을 주기로 기준시각을 설정할 수 있다. 이 경우, 출력 패킷 #2의 다중화 시각이 130이고, 출력 패킷 #3의 다중화 시각이 260로 설정되어 있으므로, 기준시각 160 및 기준시각 240 사이의 다중화 시각을 갖는 출력 패킷이 존재하지 않을 수 있다. 이에 따라, 스트림 생성부(1400)는 출력 스트림에서 기준시각 160에 대응하는 위치에 Null 패킷을 삽입할 수 있고, 기준시각 240에 대응하는 위치에 출력 패킷 #3을 삽입할 수 있다. 즉, 도 15의 예와 비교했을 때, 도 15의 예에서는 출력 패킷 #4와 출력 패킷 #5 사이에 Null 패킷이 삽입된 반면, 도 16의 예에서는 출력 패킷 #2와 출력 패킷 #3 사이에 Null 패킷이 삽입될 수 있다. 즉, 기준시간이 어떠한 값으로 설정되었는지에 따라 출력 스트림의 출력 패킷들 및 Null 패킷들의 시퀀싱(또는, 오더링(ordering)으로 표현함)이 상이할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may insert an output packet and a null packet in different positions in the output stream according to a reference time. As a specific example, referring to FIG. 16, FIG. 16 is a diagram for describing multiplexing according to another embodiment of the present invention. In the example of FIG. 16, as in the example of FIG. 15, the stream generator 1400 may acquire five output packets for a predetermined time according to the ES bit rate, and the stream generator 1400 outputs five outputs every 130 cycles. The multiplexing time can be set for the packet. However, in the example of FIG. 16, unlike the FIG. 15, the stream generator 1400 may set a reference time at 80 intervals. In this case, since the multiplexed time of the output packet # 2 is 130 and the multiplexed time of the output packet # 3 is set to 260, an output packet having a multiplexed time between the reference time 160 and the reference time 240 may not exist. Accordingly, the stream generator 1400 may insert a null packet at a position corresponding to the reference time 160 in the output stream, and may insert the output packet # 3 at a position corresponding to the reference time 240. That is, compared with the example of FIG. 15, in the example of FIG. 15, a null packet is inserted between the output packet # 4 and the output packet # 5, whereas in the example of FIG. 16, between the output packet # 2 and the output packet # 3. Null packets may be inserted. That is, the sequencing (or expressed as ordering) of output packets and null packets of the output stream may be different depending on what value the reference time is set to.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷들을 다중화 할 때, 출력 패킷에 부가된 추가 필드들을 제거한 후 출력 패킷들에 대한 다중화를 수행할 수 있다. 구체적인 예로서, 도 14의 (c)를 참조하면, 출력 패킷 #1 및 출력 패킷 #2가 다중화되어 출력 스트림이 될 경우, 각 출력 패킷들에 부가되는 추가필드들은 출력 스트림에서 제거될 수 있다. 즉, 스트림 생성부(1400)는 추가 필드들로부터 각 출력 패킷의 다중화 시각을 획득하고, 획득된 다중화 시각을 이용하여 출력 패킷을 다중화할 수 있다. 이 때, 스트림 생성부(1400)는 출력 패킷을 다중화할 때 각 출력 패킷에 부가된 추가 필드를 제거하고, 추가 필드가 제거된 출력 패킷들을 다중화 시각을 이용하여 다중화할 수 있다.In addition, in some embodiments of the present invention, when multiplexing the output packets, the stream generator 1400 may perform multiplexing on the output packets after removing additional fields added to the output packets. As a specific example, referring to FIG. 14C, when output packet # 1 and output packet # 2 are multiplexed to become an output stream, additional fields added to each output packet may be removed from the output stream. That is, the stream generator 1400 may obtain the multiplexed time of each output packet from the additional fields, and multiplex the output packet using the obtained multiplexed time. In this case, when multiplexing the output packet, the stream generator 1400 may remove the additional field added to each output packet, and multiplex the output packets from which the additional field is removed using the multiplexing time.

도 17은 본 발명의 실시예에 따른 복수의 출력 패킷의 다중화 방법을 나타낸 동작 흐름도이다.17 is a flowchart illustrating a method of multiplexing a plurality of output packets according to an embodiment of the present invention.

도 17을 참조하면, 스트림 생성부(1400)는 제1 출력 패킷들 및 제2 출력 패킷들을 획득할 수 있다(S1710). 일 예로, 패킷화부(1470)는 비디오 복호화부(1200)로부터 비디오 기본 스트림을 획득하고, 비디오 기본 스트림을 패킷화하여 비디오 출력 패킷들을 생성할 수 있다. 이 때, 비디오 출력 패킷들은 제1 출력 패킷들로 나타낼 수 있다. 또한, 패킷화부(1470)는 오디오 복호화부(1300)로부터 오디오 기본 스트림을 획득하고, 오디오 기본 스트림을 패킷화하여 오디오 출력 패킷을 생성할 수 있다. 이 때, 비디오 출력 패킷들은 제2 출력 패킷들로 나타낼 수 있다. 물론, 제1 출력 패킷들 및 제2 출력 패킷들은 제1 스트림 생성부(1410)에서 생성되는 TS 패킷일 수도 있고, 제2 스트림 생성부(1420)에서 생성되는 A3 패킷일 수도 있다.Referring to FIG. 17, the stream generator 1400 may obtain first output packets and second output packets (S1710). For example, the packetizer 1470 may obtain a video elementary stream from the video decoder 1200, and packetize the video elementary stream to generate video output packets. In this case, the video output packets may be represented as first output packets. In addition, the packetizer 1470 may obtain an audio elementary stream from the audio decoder 1300, and packetize the audio elementary stream to generate an audio output packet. In this case, the video output packets may be represented as second output packets. Of course, the first output packets and the second output packets may be TS packets generated by the first stream generator 1410 or A3 packets generated by the second stream generator 1420.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 제1 출력 패킷들 및 제2 출력 패킷들에 다중화 시각을 부여할 수 있다(S1720). 일 실시예에서, 제1 출력 패킷들 및 제2 출력 패킷들이 생성되는 시간 또는 순서, 다중화부(1480)에서 제1 출력 패킷들 및 제2 출력 패킷들이 리드되는 시간 또는 순서 등은 서로 상이할 수 있다. 이에 따라, 스트림 생성부(1400)는 서로 다른 기준으로 제1 출력 패킷들 및 제2 출력 패킷들에 다중화 시각을 설정할 수 있다. In addition, in some embodiments of the present invention, the stream generator 1400 may assign a multiplexing time to the first output packets and the second output packets (S1720). In one embodiment, the time or order in which the first output packets and the second output packets are generated, the time or order in which the first output packets and the second output packets are read in the multiplexer 1480 may be different from each other. have. Accordingly, the stream generator 1400 may set the multiplexing time to the first output packets and the second output packets based on different criteria.

단계 S1720에 대해서는 도 13의 단계 S1320에서 설명된 내용이 그대로 적용될 수 있으므로, 자세한 설명은 생략한다.Since the content described in step S1320 of FIG. 13 may be applied to step S1720, a detailed description thereof will be omitted.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 다중화 시각에 따라 제1 출력 패킷들 및 제2 출력 패킷들을 다중화할 수 있다(S1730).Also, in some embodiments of the present invention, the stream generator 1400 may multiplex the first output packets and the second output packets according to the multiplexing time (S1730).

구체적인 예로서, 도 18을 참고하면, 도 18은 본 발명의 실시예에 따른 복수의 출력 패킷의 다중화를 설명하기 위한 도면이다.As a specific example, referring to FIG. 18, FIG. 18 is a diagram for describing multiplexing of a plurality of output packets according to an embodiment of the present invention.

도 18의 예에서, 스트림 생성부(1400)는 비디오 ES 비트레이트에 따라 소정 시간동안 3개의 비디오 출력 패킷(이하, 제1 출력 패킷)을 획득할 수 있고, 오디오 ES 비트레이트에 따라 소정 시간동안 2개의 오디오 출력 패킷(이하, 제2 출력 패킷)을 획득할 수 있다. 스트림 생성부(1400)는 제1 출력 패킷들에 대해서는 320을 주기로 다중화 시각을 설정할 수 있고, 제2 출력 패킷들에 대해서는 410을 주기로 다중화 시각을 설정할 수 있다. 또한, 도 18의 예에서, 스트림 생성부(1400)는 100을 주기로 다중화를 위한 기준시각을 설정할 수 있다.In the example of FIG. 18, the stream generator 1400 may acquire three video output packets (hereinafter, referred to as first output packets) for a predetermined time according to the video ES bit rate, and for a predetermined time according to the audio ES bit rate. Two audio output packets (hereinafter, referred to as second output packets) may be obtained. The stream generator 1400 may set the multiplexing time for the first output packets at a period of 320 and set the multiplexing time for the second output packets at a period of 410. In addition, in the example of FIG. 18, the stream generator 1400 may set a reference time for multiplexing every 100 cycles.

일 실시예에서, 다중화 시각이 적용되지 않고 제1 출력 패킷들 및 제2 출력 패킷들에 대해 다중화가 수행될 경우, 제1 출력 패킷들 및 제2 출력 패킷들이 출력 스트림에 연속하여 삽입될 수 있고, 이로 인해 출력 스트림에서 Null 패킷들이 제1 출력 패킷들 및 제2 출력 패킷들에 뒤따라 연속하여 위치할 수 있다.In one embodiment, when multiplexing is not applied and the multiplexing is performed on the first output packets and the second output packets, the first output packets and the second output packets may be inserted into the output stream in succession. This allows Null packets in the output stream to be placed in succession following the first and second output packets.

반면, 스트림 생성부(1400)는 제1 출력 패킷들 및 제2 출력 패킷들의 다중화 시각을 고려하여 다중화를 수행할 수 있다.On the other hand, the stream generator 1400 may perform the multiplexing in consideration of the multiplexing time of the first output packets and the second output packets.

제1 출력 패킷 #1과 제2 출력 패킷 #1의 다중화 시각은 모두 0일 수 있다. 이 경우, 제1 출력 패킷 #1과 제2 출력 패킷 #1은 기준 시각 0 및 기준 시각 100에 대응되는 위치에 삽입되는 위치에 따라 상이할 수 있다. 이 때, 스트림 생성부(400)는 제1 출력 패킷 #1 및 제2 출력 패킷 #1 중 우선순위가 높은 출력 패킷을 기준 시각 0에 대응하는 위치에 삽입시킬 수 있다. 출력 패킷간의 우선순위에 대해서는 도 23 및 도 24에서 보다 상세하게 설명한다The multiplexing time of the first output packet # 1 and the second output packet # 1 may both be zero. In this case, the first output packet # 1 and the second output packet # 1 may be different depending on the position inserted at the position corresponding to the reference time 0 and the reference time 100. At this time, the stream generator 400 may insert the output packet having the highest priority among the first output packet # 1 and the second output packet # 1 at a position corresponding to the reference time zero. The priority between output packets will be described in more detail with reference to FIGS. 23 and 24.

또한, 제1 출력 패킷들 및 제2 출력 패킷들 모두 기준 시각 200 및 기준 시각 300 사이의 다중화 시각을 갖는 출력패킷을 포함하지 않을 수 있다. 이에 따라, 스트림 생성부(1400)는 기준 시각 200에 대응하는 위치에 Null 패킷을 삽입할 수 있다. 마찬가지로, 기준 시각 500 및 기준 시각 600 사이의 다중화 시각을 갖는 출력패킷은 존재하지 않음에 따라, 스트림 생성부(1400)는 기준 시각 500에 대응하는 위치에 Null 패킷을 삽입할 수 있다.In addition, both the first output packets and the second output packets may not include an output packet having a multiplexed time between the reference time 200 and the reference time 300. Accordingly, the stream generator 1400 may insert a null packet at a position corresponding to the reference time 200. Similarly, since there is no output packet having a multiplexing time between the reference time 500 and the reference time 600, the stream generator 1400 may insert a null packet at a position corresponding to the reference time 500.

따라서, 출력 스트림에서 제2 출력패킷 #1과 제1 출력패킷 #2 사이 및 제2 출력패킷 #2와 제1 출력패킷 #3 사이에 Null 패킷이 존재할 수 있고, 이로 인해, 출력 스트림에서 Null 패킷이 분산될 수 있다. 이와 같이, 출력 스트림에서 Null 패킷이 분산됨에 따라, 별다른 오류없이 메인 스트림 제공장치가 예비 스트림 제공장치로 교체되는 스위칭 현상의 발생이 방지될 수 있다.Thus, there may be a null packet between the second output packet # 1 and the first output packet # 2 and between the second output packet # 2 and the first output packet # 3 in the output stream, thereby causing a null packet in the output stream. This can be dispersed. As such, as the Null packets are distributed in the output stream, the switching phenomenon in which the main stream providing apparatus is replaced with the spare stream providing apparatus can be prevented without any error.

단계 S1730에 대해서는 도 13의 단계 S1330에서 설명된 내용이 그대로 적용될 수 있으므로, 보다 자세한 설명은 생략한다.Since the content described in step S1330 of FIG. 13 may be applied to step S1730, a detailed description thereof will be omitted.

또한, 단계 S1710 내지 S1730에서는 제1 출력 패킷들 및 제2 출력 패킷들에 대해 설명하였지만, 본 발명은 이에 한정되는 것은 아니고, 제1 출력 패킷 및 제2 출력 패킷외에 다른 복수의 패킷들에 대해서도 단계 S1710 내지 S1730가 적용될 수 있다. 예를 들어, 스트림 생성부(1400)는 S1710에서 복수의 비디오 출력 패킷 및 복수의 오디오 출력 패킷(또는, 복수의 비디오 출력 패킷, 복수의 오디오 출력 패킷 및 복수의 데이터 출력 패킷, 여기서 데이터 출력 패킷은 데이터 기본 스트림을 출력 패킷으로 패킷화 한 것을 의미함)을 획득하고, S1720에서 획득한 복수의 비디오 출력 패킷 및 복수의 오디오 출력 패킷에 다중화 시각을 부여하고, S1730에서 다중화 시각에 따라 복수의 비디오 출력 패킷 및 복수의 오디오 출력 패킷을 다중화할 수 있다.In addition, although the first output packets and the second output packets have been described in the steps S1710 to S1730, the present invention is not limited thereto, and the steps for the plurality of packets other than the first output packet and the second output packet are not limited thereto. S1710 to S1730 may be applied. For example, the stream generator 1400 may include a plurality of video output packets and a plurality of audio output packets (or a plurality of video output packets, a plurality of audio output packets, and a plurality of data output packets in S1710). Means that the data elementary stream is packetized into an output packet), the multiplexed time is given to the plurality of video output packets and the plurality of audio output packets acquired in S1720, and the plurality of video outputs are output according to the multiplexed time in S1730. A packet and a plurality of audio output packets can be multiplexed.

도 19는 본 발명의 실시예에 따른 TS 패킷의 다중화 방법을 나타낸 동작 흐름도이다.19 is a flowchart illustrating a method of multiplexing TS packets according to an embodiment of the present invention.

도 19를 참조하면, 스트림 생성부(1400)는 기본 스트림을 획득할 수 있다(S1910).Referring to FIG. 19, the stream generator 1400 may obtain an elementary stream (S1910).

또한, 스트림 생성부(1400)는 기본 스트림을 TS 패킷들로 패킷화할 수 있다(S1920).In addition, the stream generator 1400 may packetize the elementary stream into TS packets (S1920).

또한, 스트림 생성부(1400)는 TS 패킷들에 다중화 시각을 부여할 수 있다(S1930).In addition, the stream generation unit 1400 may give a multiplexed time to the TS packets (S1930).

또한, 스트림 생성부(1400)는 다중화 시각에 따라 TS 패킷들을 다중화하여 출력 스트림을 생성할 수 있다(S1940)In addition, the stream generator 1400 may generate an output stream by multiplexing TS packets according to the multiplexing time (S1940).

단계 S1910 내지 단계 S1940에 대해서는 도 5 내지 도 7, 도 11, 도 13 내지 도 18에서 설명한 사항이 그대로 적용될 수 있으므로, 자세한 설명은 생략한다.Since the details described with reference to FIGS. 5 to 7, 11, and 13 to 18 may be applied to steps S1910 to S1940, detailed descriptions thereof will be omitted.

도 20은 본 발명의 실시예에 따른 A3 패킷의 다중화 방법을 나타낸 동작 흐름도이다.20 is a flowchart illustrating an A3 packet multiplexing method according to an embodiment of the present invention.

도 20을 참조하면, 스트림 생성부(1400)는 기본 스트림을 획득할 수 있다(S2010).Referring to FIG. 20, the stream generator 1400 may obtain an elementary stream (S2010).

또한, 스트림 생성부(1400)는 기본 스트림을 A3 패킷들로 패킷화할 수 있다(S2020). 일 실시예에서, 스트림 생성부(1400)는 기본 스트림을 ISOBMFF 포맷으로 변환하고, 변환된 ISOBMFF 포맷을 기초로 A3 패킷들을 생성할 수 있다. 또한, A3 패킷들은 ROUTE 패킷들 및/또는 MMTP 패킷들을 포함할 수 있다.In addition, the stream generator 1400 may packetize the elementary stream into A3 packets (S2020). In an embodiment, the stream generator 1400 may convert the elementary stream into the ISOBMFF format and generate A3 packets based on the converted ISOBMFF format. Also, A3 packets may include ROUTE packets and / or MMTP packets.

또한, 스트림 생성부(1400)는 A3 패킷들에 다중화 시각을 부여할 수 있다(S2030).In addition, the stream generation unit 1400 may give a multiplexed time to the A3 packets (S2030).

또한, 스트림 생성부(1400)는 다중화 시각에 따라 A3 패킷들을 다중화하여 출력 스트림을 생성할 수 있다(S2040)In addition, the stream generator 1400 may generate an output stream by multiplexing the A3 packets according to the multiplexing time (S2040).

단계 S1910 내지 단계 S1940에 대해서는 도 5, 도 8 내지 도 11, 도 13 내지 도 18에서 설명한 사항이 그대로 적용될 수 있으므로, 자세한 설명은 생략한다.Since the details described with reference to FIGS. 5, 8 through 11, and 13 through 18 may be applied to steps S1910 through S1940, a detailed description thereof will be omitted.

도 21은 본 발명의 실시예에 따른 다중화 시각의 설정을 설명하기 위한 도면이다.21 is a diagram for explaining setting of multiplexing time according to an embodiment of the present invention.

도 21을 참조하면, 스트림 생성부(1400)는 비디오 복호화부(1200) 또는 오디오 복호화부(1300)로부터 ES 비트레이트에 따라 기본 스트림을 생성할 수 있다. Referring to FIG. 21, the stream generator 1400 may generate an elementary stream according to an ES bit rate from the video decoder 1200 or the audio decoder 1300.

본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 ES 스트림 및 출력 패킷의 종류를 고려하여 다중화 시각을 설정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 2에 따라 출력 패킷들에 다중화 시각을 설정할 수 있다.In some embodiments of the present invention, the stream generator 1400 may set the multiplexing time in consideration of the types of ES streams and output packets. For example, the stream generator 1400 may set a multiplexing time to output packets according to Equation 2 below.

[수학식 2][Equation 2]

tmux_time = OPacc_bit / ESbitrate t mux_time = OP acc_bit / ES bitrate

여기서, tmux_time은 출력 패킷의 다중화 시각을 나타내고, OPacc_bit는 출력패킷들의 누적 발생 비트수를 나타내고, ESbitrate는 ES 비트레이트를 나타낼 수 있다.Here, t mux_time may indicate a multiplexing time of an output packet, OP acc_bit may indicate a cumulative occurrence bit number of output packets, and ES bitrate may indicate an ES bitrate .

예를 들어, 도 21의 예와 같이, 출력 패킷 #1 내지 출력 패킷 #3의 크기가 200바이트이고, ES 비트레이트가 10Mbps일 경우, 출력 패킷 #1의 다중화 시각은 0, 출력 패킷 #2의 다중화 시각은 160μsec, 출력 패킷 #3의 다중화 시각은 320μsec으로 설정될 수 있다.For example, as shown in the example of FIG. 21, when the size of the output packet # 1 to the output packet # 3 is 200 bytes and the ES bit rate is 10 Mbps, the multiplexing time of the output packet # 1 is 0 and the output packet # 2 The multiplexing time may be set to 160 μsec, and the multiplexing time of the output packet # 3 may be set to 320 μsec.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 ES 스트림 및 출력 패킷에 포함된 억세스 유닛의 크기를 고려하여 다중화 시각을 설정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 3에 따라 출력 패킷들에 다중화 시각을 설정할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may set the multiplexing time in consideration of the sizes of the access units included in the ES stream and the output packet. For example, the stream generator 1400 may set the multiplexing time to output packets according to Equation 3 below.

[수학식 3][Equation 3]

tmux_time = AUacc_bit / ESbitrate t mux_time = AU acc_bit / ES bitrate

여기서, tmux_time은 출력 패킷의 다중화 시각을 나타내고, AUacc_bit는 출력패킷에 포함된 억세스 유닛의 누적 발생 비트수를 나타내고, ESbitrate는 ES 비트레이트를 나타낼 수 있다.Here, t mux_time may indicate a multiplexing time of an output packet, AU acc_bit may indicate a cumulative occurrence bit number of an access unit included in an output packet, and ES bitrate may indicate an ES bitrate .

예를 들어, 도 21의 예와 같이, 출력 패킷 #1의 억세스 유닛의 크기는 100바이트인 반면, 출력 패킷 #2 및 출력 패킷 #3의 억세스 유닛의 크기는 180바이트일 수 있다. 또한, ES 비트레이트가 10Mbps일 경우, 출력 패킷 #1의 다중화 시각은 0, 출력 패킷 #2의 다중화 시각은 80μsec, 출력 패킷 #3의 다중화 시각은 224μsec으로 설정될 수 있다.For example, as in the example of FIG. 21, the size of the access unit of the output packet # 1 may be 100 bytes, while the size of the access unit of the output packet # 2 and the output packet # 3 may be 180 bytes. In addition, when the ES bit rate is 10 Mbps, the multiplexed time of output packet # 1 may be set to 0, the multiplexed time of output packet # 2 may be set to 80 μsec, and the multiplexed time of output packet # 3 may be set to 224 μsec.

도 22는 본 발명의 다른 실시예에 따른 다중화 시각의 설정을 설명하기 위한 도면이다.22 is a diagram for explaining setting of multiplexing time according to another embodiment of the present invention.

도 22를 참조하면, 스트림 생성부(1400)는 억세스 유닛의 종류에 따라 다중화 시각을 다르게 설정할 수 있다.Referring to FIG. 22, the stream generator 1400 may set the multiplexing time differently according to the type of access unit.

본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷에 비디오 억세스 유닛이 포함되는 경우, 출력 패킷에 포함된 비디오 억세스 유닛이 발생되는 시간을 기준으로 다중화 시각을 설정할 수 있다.In some embodiments of the present disclosure, when the video access unit is included in the output packet, the stream generator 1400 may set the multiplexing time based on the time when the video access unit included in the output packet is generated.

예를 들어, 스트림 생성부(1400)는 아래의 수학식 4에 따라 출력 패킷들에 다중화 시각을 설정할 수 있다.For example, the stream generator 1400 may set a multiplexing time to output packets according to Equation 4 below.

[수학식 4][Equation 4]

tV_mux_time = V_AUacc_bit / V_ESbitrate + V_AUdelay t V _ mux_time = V_AU acc_bit / V_ES bitrate + V_AU delay

여기서, tV_mux_time은 비디오 억세스 유닛을 포함하는 비디오 출력 패킷의 다중화 시각을 나타내고, V_AUacc_bit는 출력패킷에 포함된 비디오 억세스 유닛의 누적 발생 비트수를 나타내고, V_ESbitrate는 비디오 ES 비트레이트를 나타낼 수 있다. 또한, 스트림 생성부(1400)는 V_AUdelay를 추가적으로 고려할 수 있다. 여기서, V_AUdelay는 최초 비디오 억세스 유닛 지연시간, 즉, 스트림 생성부(1400)가 비디오 억세스 유닛을 최초로 획득한 시간을 나타낼 수 있다.Here, t V_mux_time may indicate the multiplexed time of the video output packet including the video access unit, V_AU acc_bit may indicate the cumulative occurrence bit number of the video access unit included in the output packet, and V_ES bitrate may indicate the video ES bitrate . . In addition, the stream generator 1400 may additionally consider the V_AU delay . Here, V_AU delay may indicate an initial video access unit delay time, that is, a time when the stream generator 1400 first acquires a video access unit.

도 22의 예에서, V_AUdelay는 t1일 수 있고, 스트림 생성부(1400)는 시점 t1부터 비디오 출력 패킷들에 다중화 시각을 설정하여 다중화를 수행할 수 있다.In the example of FIG. 22, V_AU delay may be t1, and the stream generator 1400 may perform multiplexing by setting a multiplexing time on video output packets from time t1.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷에 오디오 억세스 유닛이 포함되는 경우, 출력 패킷에 포함된 오디오 억세스 유닛이 발생되는 시간뿐 아니라, 복호화 장치에서 비디오 억세스 유닛이 처리되는 시간을 고려하여 오디오 억세스 유닛의 다중화 시각을 설정할 수 있다.In addition, in some embodiments of the present invention, when the audio packet includes an audio access unit, the stream generator 1400 may not only generate a time when the audio access unit included in the output packet is generated, but also the video access unit in the decoding apparatus. The multiplexing time of the audio access unit can be set in consideration of the processing time.

예를 들어, 스트림 생성부(1400)는 아래의 수학식 5에 따라 출력 패킷들에 다중화 시각을 설정할 수 있다.For example, the stream generator 1400 may set a multiplexing time to output packets according to Equation 5 below.

[수학식 5][Equation 5]

tA_mux_time = A_AUacc_bit / A_ESbitrate + V_AUdelay + (V_AU_pts - V_AU_dts) + V_AU_Buffer_delay - A_Buffering t A _ mux_time = A_AU acc_bit / A_ES bitrate + V_AU delay + (V_AU _pts - V_AU _dts) + V_AU _Buffer_delay - A _Buffering

여기서, tA_mux_time은 오디오 억세스 유닛을 포함하는 오디오 출력 패킷의 다중화 시각을 나타내고, A_AUacc_bit는 출력패킷에 포함된 오디오 억세스 유닛의 누적 발생 비트수를 나타내고, A_ESbitrate는 오디오 ES 비트레이트를 나타낼 수 있다. 또한, V_AUdelay는 최초 비디오 억세스 유닛 지연시간을 나타낼 수 있다. 또한, 스트림 생성부(1400)는 V_AU_pts - V_AU_dts 및 V_AU_Buffer_delay 를 추가적으로 고려할 수 있다. 여기서, V_AU_pts는 최초 비디오 억세스 유닛의 재생시간을 나타내고, V_AU_dts는 최초 비디오 억세스 유닛의 복호화 시간을 나타내고, V_AU_Buffer_delay는 비디오 억세스 유닛이 복호화 장치의 버퍼에서 지연되는 시간을 나타낼 수 있다. 여기서, V_AU_Buffer_delay는 CPB(Coded Picture Buffer)delay 또는 VBV(Video BufferingVerifier) delay를 포함할 수 있다.Here, t A_mux_time represents the multiplexing time of the audio output packet including the audio access unit, A_AU acc_bit represents the cumulative occurrence bit number of the audio access unit included in the output packet, and A_ES bitrate may represent the audio ES bitrate . . In addition, V_AU delay may indicate an initial video access unit delay time. Furthermore, the stream generating unit 1400 V_AU _pts - can be considered V_AU _dts and V_AU _Buffer_delay further. Here, V_AU _pts denotes a reproduction time of the first video access unit, V_AU _dts indicates a decoding time of the first video access unit, V_AU _Buffer_delay has the video access units to indicate the time delay in the buffer of the decoding device. Here, V_AU_Buffer_delay may include a Coded Picture Buffer (CPB) delay or a Video Buffering Verifier (VBV) delay.

이와 같이, 스트림 생성부(1400)가 비디오 억세스 유닛의 재생 시간, 복호화 시간 및 버퍼 지연 시간을 고려하는 것은 비디오 억세스 유닛과 오디오 억세스 유닛의 동기를 위한 것으로, 비디오 억세스 유닛의 크기가 오디오 억세스 유닛의 크기보다 상당히 크고, 오디오 억세스 유닛에 비해 비디오 억세스 유닛의 복호화 시간 및 버퍼 지연 시간이 길다는 점을 고려한 것일 수 있다. 또한, 수학식 5에서는 표현되지 않았지만, 스트림 재생부(1400)는 비디오 억세스 유닛의 리오더링(reordering) 시간을 추가적으로 고려할 수 있다.As such, the stream generation unit 1400 considers the playback time, the decoding time, and the buffer delay time of the video access unit to synchronize the video access unit and the audio access unit, and the size of the video access unit is the size of the audio access unit. It may be considered that the size is considerably larger than the size and the decoding time and the buffer delay time of the video access unit are longer than the audio access unit. In addition, although not represented in Equation 5, the stream reproducing unit 1400 may additionally consider the reordering time of the video access unit.

또한, 스트림 생성부(1400)는 오디오 출력 패킷의 다중화 시각에 있어서 오디오 버퍼링 시간을 나타내는 A_Buffering을 추가적으로 고려할 수 있다. 즉, 스트림 생성부(1400)는 비디오 억세스 유닛의 재생 시점보다 오디오 버퍼링 시간만큼 앞선 시점부터 오디오 출력 패킷의 다중화 시각을 설정하여 오디오 출력 패킷의 다중화를 수행할 수 있다. 다시 말해, 도 22의 예에 있어서, 스트림 생성부(1400)는 시점 t2에서 오디오 출력 패킷들을 획득할 수 있지만, 위 수학식 5를 반영하여 시점 t2가 아니라, 시점 t3부터 다중화를 수행할 수 있다.In addition, the stream generator 1400 may additionally consider A_Buffering indicating the audio buffering time at the multiplexing time of the audio output packet. That is, the stream generation unit 1400 may perform multiplexing of the audio output packet by setting the multiplexing time of the audio output packet from a time point earlier than the playback time of the video access unit by the audio buffering time. In other words, in the example of FIG. 22, the stream generator 1400 may acquire audio output packets at time t2, but may perform multiplexing from time t3 instead of time t2 by reflecting Equation 5 above. .

도 23은 본 발명의 실시예에 따른 우선 순위를 고려한 다중화 방법을 나타낸 동작 흐름도이다.23 is a flowchart illustrating a multiplexing method considering priority according to an embodiment of the present invention.

도 23을 참조하면, 스트림 생성부(1400)는 전술한 도 17의 단계 S1730에서, 제1 출력 패킷 및 제2 출력 패킷의 우선순위를 결정할 수 있다(S2310). 구체적으로, 스트림 생성부(1400)는 제1 출력 패킷 및 제2 출력 패킷의 다중화 시각이 동일하거나, 제1 출력 패킷 및 제2 출력 패킷의 다중화 시각이 다르더라도 대응되는 다중화를 위한 기준시각이 동일한 경우, 제1 출력 패킷 및 제2 출력 패킷의 우선순위를 확인할 수 있다.Referring to FIG. 23, in operation S1730 of FIG. 17, the stream generator 1400 may determine priorities of a first output packet and a second output packet (S2310). In detail, the stream generation unit 1400 may have the same reference time for the corresponding multiplexing even if the multiplexing times of the first output packet and the second output packet are the same or the multiplexing times of the first output packet and the second output packet are different. In this case, the priority of the first output packet and the second output packet may be checked.

일 실시예에서, 스트림 생성부(1400)는 출력 패킷에 포함된 데이터의 종류에 따라 제1 출력 패킷 및 제2 출력 패킷의 우선순위를 결정할 수 있다. 예를 들어, 제1 출력 패킷에는 비디오 억세스 유닛이 포함되고, 제2 출력 패킷에는 비디오 억세스 유닛과 관련된 메타 데이터(예를 들어, TS 패킷의 경우 PSI 정보)가 포함된 경우, 스트림 생성부(1400)는 제2 출력 패킷의 우선순위를 높게 결정할 수 있다.In one embodiment, the stream generator 1400 may determine the priority of the first output packet and the second output packet according to the type of data included in the output packet. For example, when the first output packet includes a video access unit, and the second output packet includes metadata related to the video access unit (eg, PSI information in the case of a TS packet), the stream generator 1400. ) May determine a higher priority of the second output packet.

또한, 다른 예로서, 제1 출력 패킷에는 비디오 억세스 유닛이 포함되고, 제2 출력 패킷에는 오디오 억세스 유닛이 포함되는 경우, 스트림 생성부(1400)는 오디오 억세스 유닛이 포함된 제2 출력 패킷의 우선순위를 높게 결정할 수 있다. 다만, 이는 예시일 뿐, 실시예에 따라, 스트림 생성부(1400)는 비디오 억세스 유닛을 포함하는 제1 출력 패킷의 우선순위를 높게 결정할 수 있다.As another example, when the first output packet includes the video access unit and the second output packet includes the audio access unit, the stream generator 1400 may prioritize the second output packet including the audio access unit. You can rank higher. However, this is only an example, and according to an exemplary embodiment, the stream generator 1400 may determine a high priority of the first output packet including the video access unit.

또한, 일 실시예에서, 제1 출력 패킷 및 제2 출력 패킷의 다중화 시각이 다르고 대응되는 다중화를 위한 기준시각이 동일한 경우, 다중화 시각이 앞선 패킷을 우선순위가 높은 패킷으로 결정할 수도 있다.Further, in an embodiment, when the multiplexing time of the first output packet and the second output packet are different and the reference time for the corresponding multiplexing is the same, the packet preceding the multiplexing time may be determined as a packet having a high priority.

이외에도, 스트림 생성부(1400)는 다양한 기준에 따라 제1 출력 패킷 및 제2 출력 패킷의 우선순위를 결정할 수 있다.In addition, the stream generator 1400 may determine the priority of the first output packet and the second output packet according to various criteria.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 결정된 우선순위에 따라 제1 출력 패킷 및 제2 출력 패킷을 다중화할 수 있다(S2320). 예를 들어, 제1 출력 패킷보다 제2 출력 패킷의 우선순위가 높은 것으로 결정된 경우, 스트림 생성부(1400)는 제2 출력 패킷을 우선적으로 출력 스트림에 포함시킬 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may multiplex the first output packet and the second output packet according to the determined priority (S2320). For example, when it is determined that the priority of the second output packet is higher than the first output packet, the stream generator 1400 may preferentially include the second output packet in the output stream.

구체적인 예로서, 도 24는 본 발명의 또 다른 실시예에 따른 다중화를 설명하기 위한 도면이다.As a specific example, FIG. 24 is a diagram for describing multiplexing according to another embodiment of the present invention.

도 24를 참조하면, 제1 출력 패킷 내지 제3 출력 패킷은 헤더 및 페이로드로 구성될 수 있다. 이 때, 제1 출력 패킷의 페이로드는 비디오 억세스 유닛 및 비디오 억세스 유닛에 대한 메타데이터를 포함하고, 제2 출력 패킷의 페이로드는 비디오 억세스 유닛을 포함하고, 제3 출력 패킷의 페이로드는 오디오 억세스 유닛을 포함할 수 있다. 이 때, 제1 출력 패킷 내지 제3 출력 패킷의 다중화 시각은 200μsec로 동일할 수 있다. 이 경우, 스트림 생성부(1400)는 메타데이터를 포함하는 제1 출력 패킷의 우선순위를 가장 높게 결정할 수 있다. 또한, 스트림 생성부(1400)는 비디오 억세스 유닛을 포함하는 제2 출력 패킷을 오디오 억세스 유닛을 포함하는 제3 출력 패킷보다 우선순위를 높게 결정할 수 있다. 이 경우, 스트림 생성부(1400)는 제1 출력 패킷, 제2 출력 패킷 및 제3 출력 패킷의 시퀀스로 출력 스트림을 구성할 수 있다.Referring to FIG. 24, the first to third output packets may be composed of a header and a payload. In this case, the payload of the first output packet includes the video access unit and metadata for the video access unit, the payload of the second output packet includes the video access unit, and the payload of the third output packet is audio It may include an access unit. At this time, the multiplexing time of the first output packet to the third output packet may be equal to 200 μsec. In this case, the stream generator 1400 may determine the highest priority of the first output packet including the metadata. In addition, the stream generator 1400 may determine the second output packet including the video access unit to have a higher priority than the third output packet including the audio access unit. In this case, the stream generator 1400 may configure an output stream in a sequence of a first output packet, a second output packet, and a third output packet.

도 25는 비디오 부호화부(1200)의 실제 ES 비트레이트가 미리 설정된 ES 비트레이트 보다 작을 때, 다중화 시각을 조정하지 않을 경우의 출력 스트림을 설명하기 위한 도면이다.FIG. 25 is a diagram for describing an output stream when the multiplexing time is not adjusted when the actual ES bit rate of the video encoder 1200 is smaller than the preset ES bit rate.

도 25을 참조하면, 제어부(1600)는 비디오 부호화부(1200)의 ES 비트레이트를 설정할 수 있다. 비디오 부호화부(1200)는 설정된 ES 비트레이트에 따라 비디오 기본 스트림을 생성할 수 있다. 이후, 패킷화부(1470)는 비디오 기본 스트림을 출력 패킷 그룹 A에 포함되는 출력 패킷들로 생성할 수 있다.Referring to FIG. 25, the controller 1600 may set an ES bit rate of the video encoder 1200. The video encoder 1200 may generate a video elementary stream according to the set ES bitrate. Thereafter, the packetizer 1470 may generate the video elementary stream into output packets included in the output packet group A.

다중화부(1480)는 ES 비트레이트에 따라 소정 시간동안 6개의 출력 패킷들로 구성된 출력 패킷 그룹 A를 획득할 수 있다. 출력 패킷 그룹 A에서, 출력 패킷 #1-1 내지 출력 패킷 #1-5는 억세스 유닛 #1을 기초로 생성된 출력 패킷을 나타낼 수 있고, 출력 패킷 #2-1는 억세스 유닛 #2를 기초로 생성된 출력 패킷을 의미할 수 있다. 즉, 출력 패킷 그룹 A에서, 출력 패킷 #1-1 내지 출력 패킷 #1-5는 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타내고, 출력 패킷 #2-1는 소스 비디오 신호 중 픽쳐 #2에 대응되는 출력 패킷을 의미할 수 있다.The multiplexer 1480 may obtain an output packet group A consisting of six output packets for a predetermined time according to the ES bit rate. In output packet group A, output packets # 1-1 to output packets # 1-5 may represent output packets generated based on access unit # 1, and output packets # 2-1 may be based on access unit # 2. It may mean a generated output packet. That is, in output packet group A, output packets # 1-1 to output packets # 1-5 represent output packets corresponding to picture # 1 of the source video signal, and output packets # 2-1 represent picture # of the source video signal. It may mean an output packet corresponding to two.

다중화부(1480)는 미리 설정된 ES 비트레이트에 따라 130을 주기로 출력 패킷 그룹 A에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 또한, 도 25의 예에서, 다중화부(1480)는 미리 설정된 출력 비트레이트에 따라 80을 주기로 기준시각을 설정할 수 있고, 출력 패킷 그룹 A에 포함된 출력 패킷들의 다중화 시각과 기준시각을 비교하여 출력 스트림 A를 생성할 수 있다. 이 때, 출력 패킷 그룹 A에 포함되는 출력 패킷들의 다중화 시각에 따라 출력 스트림 A에서 Null 패킷들이 분산되며, 출력 패킷 #2-1은 기준시각 640에 대응되는 위치에 삽입될 수 있다.The multiplexer 1480 may set the multiplexing time to output packets included in the output packet group A at intervals of 130 according to a preset ES bit rate. In addition, in the example of FIG. 25, the multiplexer 1480 may set a reference time at intervals of 80 according to a preset output bit rate, and output the result by comparing the multiplexed time of the output packets included in the output packet group A with the reference time. Stream A can be created. In this case, null packets are distributed in the output stream A according to the multiplexing time of the output packets included in the output packet group A, and the output packet # 2-1 may be inserted at a position corresponding to the reference time 640.

그러나, 경우에 따라, 비디오 부호화부(1200)의 실제 ES 비트레이트가 비디오 부호화부(1200)에 미리 설정된 ES 비트레이트 보다 작게되는 경우가 발생될 수 있다. 예를 들어, 도 25의 출력 패킷 그룹 B의 예를 참고하면, 비디오 부호화부(1200)는 픽쳐 #1에 대응되는 출력 패킷을 5개의 출력 패킷이 아닌 4개의 출력 패킷(출력 패킷 #1-1 내지 출력 패킷 #1-4)으로 생성할 수 있다. 즉, 동일한 픽쳐 #1에 대하여 출력 패킷 그룹 A에서는 5개의 출력 패킷이 포함되고, 출력 패킷 그룹 B에서는 4개의 출력 패킷이 포함될 수 있다. 그리고, 출력 패킷 그룹 B에는 픽쳐 #2에 대응되는 출력 패킷 #2-1이 포함될 수 있다.However, in some cases, the actual ES bitrate of the video encoder 1200 may be smaller than the ES bitrate preset in the video encoder 1200. For example, referring to the example of the output packet group B of FIG. 25, the video encoder 1200 may output an output packet corresponding to the picture # 1 instead of four output packets instead of five output packets (output packet # 1-1). To output packet # 1-4). That is, five output packets may be included in the output packet group A and four output packets may be included in the output packet group B for the same picture # 1. The output packet group B may include output packet # 2-1 corresponding to picture # 2.

이 경우, 다중화부(1480)는 실제 ES 비트레이트가 아닌 미리 설정된 ES 비트레이트에 따라, 출력 패킷 그룹 A에서와 마찬가지로 130을 주기로 출력 패킷 그룹 B에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 또한, 도 25의 예에서, 다중화부(1480)는 다중화부(1480)의 출력 비트레이트에 따라 80을 주기로 기준시각을 설정할 수 있고, 출력 패킷 그룹 B에 포함된 출력 패킷들의 다중화 시각과 기준시각을 비교하여 출력 스트림 B를 생성할 수 있다. 이 때, 출력 패킷 그룹 B에 포함되는 출력 패킷들의 다중화 시각이 실제 ES 비트레이트가 아닌 미리 설정된 ES 비트레이트를 기준으로 설정됨에 따라, 출력 패킷 그룹 B에 포함되는 출력 패킷들이 의도된 시각보다 빠른 시각에 다중화부(1480)에서 출력될 수 있다.In this case, the multiplexer 1480 may set the multiplexing time to the output packets included in the output packet group B at intervals of 130, as in the output packet group A, according to the preset ES bit rate instead of the actual ES bit rate. . In addition, in the example of FIG. 25, the multiplexer 1480 may set a reference time based on an output bit rate of the multiplexer 1480 at a period of 80, and the multiplexing time and reference time of the output packets included in the output packet group B may be used. Can be compared to generate output stream B. At this time, as the multiplexed time of the output packets included in the output packet group B is set based on the preset ES bit rate rather than the actual ES bit rate, the time at which the output packets included in the output packet group B are earlier than the intended time. May be output from the multiplexer 1480.

예를 들어, 출력 패킷 그룹 A에서 픽쳐 #1에 대한 마지막 출력 패킷인 출력 패킷 #1-5는 기준시각 480에 대응되는 위치에 출력 스트림 A에 삽입되는 반면, 출력 패킷 그룹 B에서 픽쳐 #1에 대한 마지막 출력 패킷인 출력 패킷 #1-4는 기준시각 480보다 빠른 기준시각 320에 대응되는 위치에 출력 스트림 B에 삽입될 수 있다. 또한, 출력 패킷 그룹 A에서 픽쳐 #2에 대한 출력 패킷인 출력 패킷 #2-1은 기준시각 640에 대응되는 위치에 출력 스트림 A에 삽입되는 반면, 출력 패킷 그룹 B에서 픽쳐 #2에 대한 출력 패킷인 출력 패킷 #2-1는 기준시각 640보다 빠른 기준시각 480에 대응되는 위치에 출력 스트림 B에 삽입될 수 있다. 이 경우, 출력 스트림 B와 같이 출력 패킷들이 의도된 시각보다 빨리 출력됨에 따라, 복호화 장치의 버퍼(예를 들어, 저장부)에 상기 출력 스트림 B가 복호화를 위해 대기하는 시간이 길어질 수 있다. 구체적으로, 미리 설정된 ES 비트레이트에 따라 출력 패킷이 생성되는 경우, 출력 스트림 A에서 출력 패킷 #2-1은 기준시각 640에 대응되는 시각에 출력 스트림 A로 출력될 수 있다. 이 때, 출력 패킷 #2-1에는 복호화 시간에 대한 정보가 포함될 수 있고, 상기 복호화 시간에 대한 정보에 따라, 기준시각 640은 복호화 장치에서의 출력 패킷 #2-1의 복호화 시점과 부합할 수 있다. 그러나, 출력패킷그룹 B에서와 같이 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작은 경우, 출력 패킷 #2-1은 기준시각 480에 대응되는 시각에 출력 스트림 B로 출력되고, 이는 출력 패킷 #2-1이 기준시간 160에 대응되는 시간동안 복호화 장치에서 대기해야 한다는 것을 의미할 수 있다. 이러한 과정이 반복되어 복호화 장치에서 대기하는 출력 패킷이 많아지게 되면, 복호화 장치의 버퍼에 오버플로(overflow)가 발생될 수 있다.For example, output packet # 1-5, which is the last output packet for picture # 1 in output packet group A, is inserted into output stream A at a position corresponding to time 480, while output packet group B is assigned to picture # 1 in output packet group B. The output packet # 1-4, which is the last output packet, may be inserted into the output stream B at a position corresponding to the reference time 320 earlier than the reference time 480. Also, output packet # 2-1, which is an output packet for picture # 2 in output packet group A, is inserted into output stream A at a position corresponding to reference time 640, while output packet for picture # 2 in output packet group B is output. Output packet # 2-1 may be inserted into output stream B at a position corresponding to reference time 480 earlier than reference time 640. In this case, as the output packets are output earlier than the intended time, such as the output stream B, the time for which the output stream B waits for decoding in the buffer (for example, the storage unit) of the decoding apparatus may be longer. In detail, when an output packet is generated according to a preset ES bit rate, the output packet # 2-1 in the output stream A may be output to the output stream A at a time corresponding to the reference time 640. In this case, the output packet # 2-1 may include information on the decoding time, and according to the information on the decoding time, the reference time 640 may correspond to the decoding time of the output packet # 2-1 in the decoding apparatus. have. However, when the actual ES bitrate is smaller than the preset ES bitrate as in output packet group B, output packet # 2-1 is output to output stream B at a time corresponding to the reference time 480, which is output packet # 2. It may mean that -1 is to wait in the decoding apparatus for a time corresponding to the reference time 160. If this process is repeated and the number of output packets waiting in the decoding apparatus increases, an overflow may occur in the buffer of the decoding apparatus.

또한, 도 26은 비디오 부호화부(1200)의 실제 ES 비트레이트가 미리 설정된 ES 비트레이트 보다 클때, 다중화 시각을 조정하지 않을 경우의 출력 스트림을 설명하기 위한 도면이다.FIG. 26 is a diagram for describing an output stream when the multiplexing time is not adjusted when the actual ES bit rate of the video encoder 1200 is larger than the preset ES bit rate.

도 26을 참조하면, 비디오 부호화부(1200)는 제어부(1600)에 의해 설정된 ES 비트레이트에 따라 비디오 기본 스트림을 생성하고, 패킷화부(1470)는 비디오 기본 스트림을 출력 패킷 그룹 A에 포함되는 출력 패킷들로 생성하며, 다중화부(1480)는 출력 패킷들의 다중화 시각 및 기준 시각을 비교하여 출력 스트림 A를 생성할 수 있다. 도 26에서의 출력 패킷 그룹 A 및 출력 스트림 A에 대해서는 도 25에서 설명된 출력 패킷 그룹 A 및 출력 스트림 A에 대한 설명이 적용될 수 있다.Referring to FIG. 26, the video encoder 1200 generates a video elementary stream according to an ES bit rate set by the controller 1600, and the packetizer 1470 outputs the video elementary stream included in an output packet group A. The packets are generated as packets, and the multiplexer 1480 may generate an output stream A by comparing the multiplexed time and the reference time of the output packets. The description of the output packet group A and the output stream A described in FIG. 25 may be applied to the output packet group A and the output stream A in FIG. 26.

경우에 따라, 비디오 부호화부(1200)의 실제 ES 비트레이트가 비디오 부호화부(1200)에 미리 설정된 ES 비트레이트 보다 높은 경우가 발생될 수 있다. 예를 들어, 도 26의 출력 패킷 그룹 B의 예를 참고하면, 비디오 부호화부(1200)는 픽쳐 #1에 대응되는 출력 패킷을 5개의 출력 패킷이 아닌 6개의 출력 패킷(출력 패킷 #1-1 내지 출력 패킷 #1-6)으로 생성할 수 있다. 즉, 동일한 픽쳐 #1에 대하여 출력 패킷 그룹 A에서는 5개의 출력 패킷이 포함되고, 출력 패킷 그룹 B에서는 6개의 출력 패킷이 포함될 수 있다. 이 경우, 다중화부(1480)는 실제 ES 비트레이트가 아닌 미리 설정된 ES 비트레이트에 따라, 출력 패킷 그룹 A에서와 마찬가지로 130을 주기로 출력 패킷 그룹 B에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 또한, 도 26의 예에서, 다중화부(1480)는 미리 설정된 출력 비트레이트에 따라 80을 주기로 기준시각을 설정할 수 있고, 출력 패킷 그룹 B에 포함된 출력 패킷들의 다중화 시각과 기준시각을 비교하여 출력 스트림 B를 생성할 수 있다. 이 때, 출력 패킷 그룹 B에 포함되는 출력 패킷들의 다중화 시각이 실제 ES 비트레이트가 아닌 미리 설정된 ES 비트레이트를 기준으로 설정됨에 따라, 출력 패킷 그룹 B에 포함되는 출력 패킷들이 의도된 시각보다 늦은 시각에 다중화부(1480)에서 출력될 수 있다. 이 경우, 출력 패킷들이 의도된 시각보다 늦게 출력됨에 따라, 출력 패킷이 미리 정해진 시간에 복호화되지 못할 수 있다.In some cases, the actual ES bitrate of the video encoder 1200 may be higher than the ES bitrate preset in the video encoder 1200. For example, referring to the example of the output packet group B of FIG. 26, the video encoder 1200 may output the output packet corresponding to the picture # 1 into six output packets (output packets # 1-1 instead of five output packets). To output packet # 1-6). That is, five output packets may be included in the output packet group A and six output packets may be included in the output packet group B for the same picture # 1. In this case, the multiplexer 1480 may set the multiplexing time to the output packets included in the output packet group B at intervals of 130, as in the output packet group A, according to the preset ES bit rate instead of the actual ES bit rate. . In addition, in the example of FIG. 26, the multiplexer 1480 may set a reference time at a period of 80 according to a preset output bit rate, and output the result by comparing the multiplexed time of the output packets included in the output packet group B with the reference time. Stream B can be created. At this time, as the multiplexed time of the output packets included in the output packet group B is set based on the preset ES bit rate rather than the actual ES bit rate, the time when the output packets included in the output packet group B are later than the intended time. May be output from the multiplexer 1480. In this case, as the output packets are output later than the intended time, the output packets may not be decoded at a predetermined time.

예를 들어, 출력 패킷 그룹 A에서 픽쳐 #1에 대한 마지막 출력 패킷인 출력 패킷 #1-5는 기준시각 480에 대응되는 위치에 출력 스트림 A에 삽입되는 반면, 출력 패킷 그룹 B에서 픽쳐 #1에 대한 마지막 출력 패킷인 출력 패킷 #1-6은 기준시각 480보다 늦은 기준시각 640에 대응되는 위치에 출력 스트림 B에 삽입될 수 있다. 이 때, 출력 패킷 그룹 A의 출력 패킷 #1-5 및 출력 패킷 그룹 B의 출력 패킷 #1-6 각각에는 복호화 시간에 대한 정보가 포함될 수 있고, 기준시각 480은 출력 패킷 그룹 A의 출력 패킷 #1-5 및 출력 패킷 그룹 B의 출력 패킷 #1-6의 복호화 장치에서의 복호화 시점과 부합할 수 있다. 그러나, 출력 패킷 #1-6은 기준시각 480 보다 늦은 기준시각 640에 출력되게 되므로, 복호화 장치에서 기준시간 160에 대응되는 시간동안 출력 패킷 #1-6의 복호화가 늦어지게 될 수 있다. 또한, 이러한 과정이 반복될 경우, 복호화 장치에 출력 패킷이 계속하여 늦게 전달됨에 따라, 복호화 장치의 버퍼에 언더플로가 발생될 수 있다.For example, output packet # 1-5, which is the last output packet for picture # 1 in output packet group A, is inserted into output stream A at a position corresponding to time 480, while output packet group B is assigned to picture # 1 in output packet group B. The output packet # 1-6, which is the last output packet, may be inserted into the output stream B at a position corresponding to the reference time 640 which is later than the reference time 480. In this case, each of the output packet # 1-5 of the output packet group A and the output packet # 1-6 of the output packet group B may include information on the decoding time, and the reference time 480 is the output packet # of the output packet group A. 1 to 5 and the decoding time of the decoding apparatus of the output packet # 1-6 of the output packet group B. However, since the output packet # 1-6 is output at the reference time 640 later than the reference time 480, the decoding apparatus may delay decoding of the output packet # 1-6 for a time corresponding to the reference time 160. In addition, when this process is repeated, as the output packet is continuously delivered to the decoding apparatus late, underflow may occur in the buffer of the decoding apparatus.

도 27은 본 발명의 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.27 is a flowchart illustrating an output time adjustment method of an output packet according to an embodiment of the present invention.

도 27을 참조하면, 앞서, 출력 패킷들에 부여된 다중화 시각에 따라 각 출력 패킷이 출력 스트림으로써 출력되는 시점이 결정될 수 있음을 확인하였다. 또한, 출력 패킷들에 부여된 다중화 시각이 ES 비트스트림에 부합하지 않음으로써, 출력 패킷의 출력 시점이 빨라지는 경우 복호화 장치의 버퍼에 오버플로가 발생되거나, 출력 패킷의 출력 시점이 늦어지는 경우 복호화 장치에서 출력 패킷의 복호화가 지연될 수 있음을 확인하였다.Referring to FIG. 27, it was previously confirmed that a time point at which each output packet is output as an output stream may be determined according to the multiplexing time given to the output packets. Also, since the multiplexing time given to the output packets does not correspond to the ES bitstream, when the output time of the output packet is faster, an overflow occurs in the buffer of the decoding apparatus, or the decoding is performed when the output time of the output packet is late. The device has confirmed that the decoding of the output packet may be delayed.

이 경우, 스트림 생성부(1400)는 각 출력 패킷이 출력 스트림으로 출력되는 시점을 변경하기 위해, 출력 패킷들에 대해 다중화 시각을 조정할 수 있다.In this case, the stream generator 1400 may adjust the multiplexing time with respect to the output packets in order to change the time point at which each output packet is output to the output stream.

본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 도 25 및 도 26의 예와 같이, 미리 설정된 비트레이트와 실제 비트레이트가 다를 경우, 출력 패킷들에 대한 다중화 시각을 조정할 수 있다. 일 실시예에서, 미리 설정된 비트레이트는 부호화부(1200, 1300)에서 기본 스트림을 생성하기 위해 미리 설정되는 ES 비트레이트를 의미할 수 있고, 실제 비트레이트는 출력 스트림이 부호화부(1200, 1300)에서 실제로 출력되는 ES 비트레이트를 의미할 수 있다. 또한, 다른 일 실시예에서, 미리 설정된 비트레이트는 패킷화부(1470)에서 기본 스트림을 패킷화하기 위해 미리 설정되는 비트레이트를 의미할 수 있고, 실제 비트레이트는 패킷화된 출력 패킷이 패킷화부(1470)에서 다중화부(1480)에 실제로 제공되는 경우의 출력 패킷의 비트레이트를 의미할 수 있다.In some embodiments of the present invention, as shown in the example of FIGS. 25 and 26, the stream generator 1400 may adjust the multiplexing time for output packets when the preset bit rate is different from the actual bit rate. According to an embodiment, the preset bitrate may refer to an ES bitrate that is preset to generate an elementary stream in the encoders 1200 and 1300, and the actual bitrate may correspond to an output stream of the encoders 1200 and 1300. This may mean the ES bitrate actually output. Further, in another embodiment, the preset bitrate may mean a bitrate that is preset in order to packetize an elementary stream in the packetizer 1470, and the actual bitrate may be a packetized output packet. The bit rate of the output packet when the information is actually provided to the multiplexer 1480 in 1470.

이하에서, 설명의 편의를 위하여, 미리 설정된 비트레이트 및 실제 비트레이트를 부호화부(1200, 1300)에 적용되는 ES 비트레이트를 중심으로 설명한다. 또한, 부호화부(1200, 1300) 중 비디오 부호화부(1200)에 대한 미리 설정된 ES 비트레이트 및 실제 ES 비트레이트를 중심으로 출력 패킷의 출력시점 조정 방법을 설명한다. 그러나, 이하에서 설명되는 미리 설정된 ES 비트레이트 및 실제 ES 비트레이트는 ES 비트레이트 외에 다른 비트레이트에도 적용될 수 있음은 물론이다(예를 들어, 패킷화부(1470)에서 기본 스트림을 패킷화하기 위해 미리 설정되는 비트레이트 및 패킷화부(1470)에서 다중화부(1480)에 실제로 제공되는 경우의 출력 패킷의 비트레이트). 그리고, 출력 패킷의 출력시점을 조정하는 것은 미리 설정된 비트레이트와 실제 비트레이트가 다른 경우에 복호화 장치에서 오류가 발생되지 않도록 출력 패킷을 적절히 제공한다는 의미를 포함할 수 있으므로 출력 패킷의 출력시점을 조정한다는 표현은 비트레이트를 보상한다(compensate)는 표현으로 사용될 수 있다. 또한, 이하에서, 출력 패킷의 출력시점 조정 방법은 출력 패킷의 제공시점 조정방법으로 표현될 수 있다.Hereinafter, for convenience of description, the preset bit rate and the actual bit rate will be described based on the ES bit rates applied to the encoders 1200 and 1300. In addition, a method of adjusting the output time point of the output packet will be described based on the preset ES bit rate and the actual ES bit rate of the video encoder 1200 among the encoders 1200 and 1300. However, the preset ES bitrate and the actual ES bitrate described below can be applied to other bitrates in addition to the ES bitrate (for example, the packetizer 1470 may predefine the elementary stream in advance). Bitrate to be set and the bitrate of the output packet when actually provided to the multiplexer 1480 by the packetizer 1470). And, adjusting the output time of the output packet may include the meaning that the output packet is appropriately provided so that an error does not occur in the decoding apparatus when the preset bit rate and the actual bit rate are different, so that the output time of the output packet is adjusted. Can be used as a representation to compensate for the bitrate. In addition, in the following, the output time adjustment method of the output packet may be expressed as a method of adjusting the time of providing the output packet.

또한, 이하에서, 설명의 편의를 위하여 출력 패킷들의 크기가 동일한 것으로 설명하였지만, 이에 한정되는 것은 아니고, 출력 패킷들의 크기는 상이할 수 있다. 예를 들어, 미리 설정된 ES 비트레이트에 따른 출력 패킷과 미리 설정된 ES 비트레이트보다 크기가 크거나 작은 실제 ES 비트레이트에 따른 출력 패킷의 크기는 상이할 수 있다. 또한, 동일한 ES 비트레이트에 의해 획득되는 출력패킷들 간에도 출력 패킷들의 크기가 상이할 수 있다.In addition, hereinafter, for the convenience of description, the sizes of the output packets are described as being the same, but the present invention is not limited thereto, and the sizes of the output packets may be different. For example, the size of the output packet according to the preset ES bitrate and the size of the output packet according to the actual ES bitrate larger or smaller than the preset ES bitrate may be different. In addition, output packets may have different sizes among output packets obtained by the same ES bitrate.

본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷들에 대해 다중화 시각을 조정할 수 있다(S2710). 여기서, 다중화 시각을 조정한다는 의미는 적어도 일부의 출력 패킷에 전술한 단계 S1720에서 출력 패킷들에 부여되는 다중화 시각과 다른 다중화 시각이 부여된다는 의미일 수 있다. 예를 들어, 도 18의 예에서, 단계 S1720에 따라 제1 출력 패킷들에 0, 320, 640의 다중화 시각이 설정된다면, 단계 S2710에서는 상기 제1 출력 패킷들 중 적어도 일부의 제1 출력 패킷들에 상기 다중화 시각이 아닌 다른 다중화 시각이 부여될 수 있다. 정리하면, 단계 S2710에서 출력 패킷들에 대해 다중화 시각을 조정한다고 표현되었지만, 이는 상기 출력 패킷들에 기부여된 다중화 시각을 다른 다중화 시각으로 변경한다는 의미일 수도 있고, 상기 출력 패킷들에 다중화 시각이 부여되지 않은 상태에서 단계 S1720에서 부여되는 다중화 시각이 아닌 다른 다중화 시각이 부여된다는 의미를 나타낼 수도 있다. 실시예에 따라, 스트림 생성부(1400)가 출력 패킷들에 기부여된 다중화 시각을 다른 다중화 시각으로 변경할 경우, 단계 S2710는 도 13의 단계 S1320 또는 단계 S1330의 다음 단계로서 수행될 수 있다. 또한, 스트림 생성부(1400)가 출력 패킷들에 다중화 시각이 부여되지 않은 상태에서 단계 S1720에서 부여되는 다중화 시각이 아닌 다른 다중화 시각을 부여할 경우, 단계 S2710는 도 13의 단계 S1310의 다음 단계로서 수행될 수 있다.In some embodiments of the present invention, the stream generator 1400 may adjust the multiplexing time with respect to the output packets (S2710). Here, the adjustment of the multiplexed time may mean that at least some output packets are given a multiplexed time different from the multiplexed time provided to the output packets in step S1720 described above. For example, in the example of FIG. 18, if multiplexing times of 0, 320, and 640 are set in the first output packets according to step S1720, in step S2710 first output packets of at least some of the first output packets. A multiplexing time other than the multiplexing time can be given to. In summary, although it is expressed in step S2710 that the multiplexing time is adjusted for the output packets, it may mean that the multiplexing time contributed to the output packets is changed to another multiplexing time, and the multiplexing time is included in the output packets. It may also indicate that a multiplexing time other than the multiplexing time provided in step S1720 is given in the non-provided state. According to an embodiment, when the stream generation unit 1400 changes the multiplexed time contributed to the output packets to another multiplexed time, step S2710 may be performed as a next step of step S1320 or step S1330 of FIG. 13. In addition, when the stream generation unit 1400 gives a multiplexing time other than the multiplexing time provided in step S1720 while the multiplexing time is not given to the output packets, step S2710 is the next step of step S1310 of FIG. 13. Can be performed.

또한, 이하에서 출력 패킷을 기초로 다중화 시각을 조정하는 구성에 대해 기재하였지만, 이에 한정되는 것은 아니며, 다중화 시각은 억세스 유닛을 기초로 조정될 수 있다.In addition, the following describes the configuration for adjusting the multiplexing time based on the output packet, but is not limited thereto, and the multiplexing time may be adjusted based on the access unit.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 조정된 다중화 시각에 따라 출력 패킷들을 다중화할 수 있다(S2720). 즉, 스트림 생성부(1400)는 조정된 다중화 시각과 기준 시각을 비교하여 출력 패킷들을 다중화함으로써 출력 스트림을 생성할 수 있다. 단계 S2720에 대해서는 단계 S1730에서 설명된 내용이 적용될 수 있으므로, 자세한 설명은 생략한다.In addition, in some embodiments of the present invention, the stream generation unit 1400 may multiplex output packets according to the adjusted multiplexing time (S2720). That is, the stream generator 1400 may generate an output stream by multiplexing output packets by comparing the adjusted multiplexing time with a reference time. Since the content described in step S1730 may be applied to step S2720, a detailed description thereof will be omitted.

단계 S2710에 대해 보다 자세히 설명하면, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷들에 부여되는 다중화 시각(또는, 출력 패킷들에 부여된 다중화 시각)에 소정의 조정값을 가감하여 다중화 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 6에 따라 다중화 시각을 조정할 수 있다.Referring to step S2710 in more detail, in some embodiments of the present invention, the stream generation unit 1400 provides a predetermined adjustment value at the multiplexing time (or multiplexing time given to the output packets). In addition, the multiplexing time can be adjusted. For example, the stream generator 1400 may adjust the multiplexing time according to Equation 6 below.

[수학식 6][Equation 6]

tad_mux_time = t mux_time ± △tad t ad_mux_time = t mux_time ± △ t ad

여기서, tmux_time은 출력 패킷들에 부여되는 기존의 다중화 시각을 나타내고, △tad는 조정값을 나타내고, tad_mux_time는 조정된 다중화 시각을 나타낼 수 있다. 또한, △tad는 미리 정해진 상수값으로, 하나의 상수값이 설정될 수도 있고, 복수의 상수값이 설정될 수도 있다. 예를 들어, 스트림 생성부(1400)는 각 출력 패킷에 동일한 조정값을 가감하여 다중화 시각을 조정할 수도 있고, 서로 다른 조정값을 가감하여 다중화 시각을 조정할 수 있다. 일 예로, 스트림 생성부(1400)는 다중화 시각이 부여되는 출력 패킷의 개수, 출력 패킷의 크기에 따라 서로 다른 조정값을 적용할 수도 있고, 출력 패킷에 부여되는 다중화 시각이 미리 정해진 시각을 경과한 경우에 조정값을 수정하여 다중화 시각을 조정할 수도 있다. 이와 같이, 수학식 6을 적용하여 기존의 다중화 시각에 조정값을 가감하여 다중화 시각을 조정함으로써, 스트림 생성부(1400)는 실제 ES 비트레이트가 어떤 값인지 확인하지 않고도 빠른 시간에 출력 패킷의 출력 속도를 조정할 수 있다.Here, t mux_time may indicate an existing multiplexing time given to output packets, Δt ad may indicate an adjustment value, and t ad_mux_time may indicate an adjusted multiplexing time. In addition, Δt ad is a predetermined constant value, one constant value may be set, or a plurality of constant values may be set. For example, the stream generator 1400 may adjust the multiplexing time by adding or subtracting the same adjustment value to each output packet, or may adjust the multiplexing time by adding or subtracting different adjustment values. As an example, the stream generation unit 1400 may apply different adjustment values according to the number of output packets to which the multiplexing time is given and the size of the output packet, and the multiplexing time to which the output packet is given passes a predetermined time. In this case, the multiplexing time may be adjusted by modifying the adjustment value. In this way, by applying Equation 6 to adjust the multiplexing time by adding or subtracting an adjustment value to the existing multiplexing time, the stream generator 1400 outputs an output packet at a short time without checking what the actual ES bitrate is. You can adjust the speed.

일 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트와 미리 설정된 ES 비트레이트를 비교하여 다중화 시각을 조정할 수 있다. 구체적으로, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 기존의 다중화 시각에 조정값을 더하여 다중화 시각을 조정할 수 있다.In an embodiment, the stream generator 1400 may adjust the multiplexing time by comparing the actual ES bitrate with a preset ES bitrate. In detail, when the actual ES bitrate is smaller than the preset ES bitrate, the stream generator 1400 may adjust the multiplexing time by adding an adjustment value to the existing multiplexing time.

실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 출력 패킷들이 의도된 시각보다 빨리 출력될 수 있고 이로 인해 복호화 장치의 버퍼에 오버플로가 발생될 수 있다. 이 때, 다중화 시각이 늦어진다면 출력 패킷들이 보다 늦은 시각에 출력될 수 있고 이로 인해 복호화 장치의 버퍼에 오버플로가 발생되지 않을 수 있다. 따라서, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 출력 패킷들이 의도된 시각에 따라 출력되도록, 기존의 다중화 시각에 조정값을 더하여 다중화 시각을 조정할 수 있다.When the actual ES bitrate is smaller than the preset ES bitrate, the output packets may be output earlier than the intended time, which may cause an overflow in the buffer of the decoding apparatus. At this time, if the multiplexing time is delayed, output packets may be output at a later time, and as a result, overflow may not occur in the buffer of the decoding apparatus. Therefore, when the actual ES bitrate is smaller than the preset ES bitrate, the stream generator 1400 may adjust the multiplexing time by adding an adjustment value to the existing multiplexing time so that output packets are output according to the intended time.

구체적인 예로서 도 28을 참고하면, 도 28은 본 발명의 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.Referring to FIG. 28 as a specific example, FIG. 28 is a diagram for explaining adjustment of multiplexing time according to an embodiment of the present invention.

도 28에서, 출력 패킷 그룹 A 및 출력 패킷 그룹 B는 도 25에서의 출력 패킷 그룹 A 및 출력 패킷 그룹 B와 동일한 출력 패킷들을 포함할 수 있다. 일 예로, 출력 패킷 그룹 A에서, 출력 패킷 #1-1 내지 출력 패킷 #1-5는 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타내고, 출력 패킷 #2-1는 소스 비디오 신호 중 픽쳐 #2에 대응되는 출력 패킷을 의미할 수 있다. 또한, 출력 패킷 그룹 B에서, 출력 패킷 #1-1 내지 출력 패킷 #1-4는 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타내고, 출력 패킷 #2-1는 소스 비디오 신호 중 픽쳐 #2에 대응되는 출력 패킷을 의미할 수 있다.In FIG. 28, output packet group A and output packet group B may include the same output packets as output packet group A and output packet group B in FIG. 25. For example, in output packet group A, output packets # 1-1 to output packets # 1-5 represent output packets corresponding to picture # 1 of the source video signal, and output packets # 2-1 represent pictures of the source video signal. It may mean an output packet corresponding to # 2. Also, in output packet group B, output packets # 1-1 to output packets # 1-4 represent output packets corresponding to picture # 1 of the source video signals, and output packets # 2-1 represent picture # of source video signals. It may mean an output packet corresponding to two.

스트림 생성부(1400)는 미리 설정된 ES 비트레이트에 따라 130을 주기로 출력 패킷 그룹 A에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 그러나, 출력 패킷 그룹 A에서와 동일한 다중화 시각을 출력 패킷 그룹 B에 적용할 경우, 출력 패킷 그룹 B의 출력 패킷들이 의도된 시각보다 빨리 출력될 수 있다. 출력 패킷 그룹 B의 출력 패킷들이 의도된 시각으로 출력되도록, 스트림 생성부(1400)는 기존의 다중화 시각에 소정의 조정값을 더하여 다중화 시각을 조정할 수 있다. The stream generator 1400 may set a multiplexing time to output packets included in the output packet group A at intervals of 130 according to a preset ES bit rate. However, when the same multiplexing time as in output packet group A is applied to output packet group B, output packets of output packet group B can be output earlier than the intended time. The stream generation unit 1400 may adjust the multiplexing time by adding a predetermined adjustment value to the existing multiplexing time so that the output packets of the output packet group B are output at the intended time.

구체적으로, 도 28의 예에서, 조정값은 40이 될 수 있다. 이에 따라, 스트림 생성부(1400)는 수학식 6을 적용하여, 기존의 다중화 시각에 조정값 40을 더함으로써, 출력 패킷 그룹 B에 포함된 출력 패킷들의 다중화 시각을 조정할 수 있다. 다만, 도 28의 예에서는 출력 패킷 그룹 B의 출력 패킷 #1-1에 대해서는 다중화 시각을 0으로 유지하였으나, 이에 한정되지 않고, 출력 패킷 #1-1에 대해서도 다중화 시각을 조정할 수 있음은 물론이다.Specifically, in the example of FIG. 28, the adjustment value may be 40. Accordingly, the stream generator 1400 may adjust the multiplexed time of the output packets included in the output packet group B by adding the adjustment value 40 to the existing multiplexed time by applying Equation (6). However, in the example of FIG. 28, the multiplexing time is maintained at 0 for the output packet # 1-1 of the output packet group B. However, the present invention is not limited thereto, and the multiplexing time can also be adjusted for the output packet # 1-1. .

스트림 생성부(1400)는 조정된 다중화 시각과 기준 시각을 비교하여 출력 스트림 B를 생성할 수 있다. 다중화 시각이 조정됨에 따라, 도 28의 출력 스트림 B에서는 출력 패킷 #2-1은 도 25에서의 출력 스트림 B의 출력 패킷 #2-1보다 느린 시각인 기준시각 560에 대응되는 시각에 출력될 수 있다. 즉, 도 28에서의 출력 스트림 B의 출력 패킷 #1-1 내지 출력 패킷 #2-1 및 Null 패킷의 시퀀싱은 도 25에서의 출력 스트림 B의 출력 패킷 #1-1 내지 출력 패킷 #2-1 및 Null 패킷의 시퀀싱과 상이할 수 있다.The stream generator 1400 may generate the output stream B by comparing the adjusted multiplexed time with the reference time. As the multiplexing time is adjusted, the output packet # 2-1 in the output stream B of FIG. 28 may be output at a time corresponding to the reference time 560, which is slower than the output packet # 2-1 of the output stream B in FIG. 25. have. That is, the sequencing of the output packet # 1-1 to the output packet # 2-1 and the null packet of the output stream B in FIG. 28 is the output packet # 1-1 to output packet # 2-1 of the output stream B in FIG. And sequencing of null packets.

또한, 도 28에서는 출력 스트림 B의 출력 패킷 #2-1가 출력 스트림 A의 출력 패킷 #2-1의 출력 시점보다 빠른 시점인 기준시각 560에 대응되는 시각에 출력되는 예가 기재되었지만, 조정값의 크기에 따라, 출력 스트림 B의 출력 패킷 #2-1의 출력 시점이 출력 스트림 A의 출력 패킷 #2-1의 출력 시점과 동일할 수 있다. 예를 들어, 조정값이 120인 경우, 출력 스트림 B의 출력 패킷 #2-1은 출력 스트림 A의 출력 패킷 #2-1과 동일하게 기준시각 640에 대응되는 시점에 출력될 수 있다. 이와 같이, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 스트림 생성부(1400)가 출력 패킷이 보다 천천히 출력되도록 조정함으로써, 출력 패킷들이 복호화 장치의 버퍼에서 대기하는 시간을 감소시키고, 복호화 장치의 버퍼에 오버플로가 발생되는 것을 방지할 수 있다.In addition, although FIG. 28 describes an example in which the output packet # 2-1 of the output stream B is output at a time corresponding to the reference time 560, which is a time earlier than the output time of the output packet # 2-1 of the output stream A, an adjustment value According to the size, the output time point of the output packet # 2-1 of the output stream B may be the same as the output time point of the output packet # 2-1 of the output stream A. For example, when the adjustment value is 120, the output packet # 2-1 of the output stream B may be output at a time corresponding to the reference time 640, similarly to the output packet # 2-1 of the output stream A. As such, when the actual ES bitrate is smaller than the preset ES bitrate, the stream generation unit 1400 adjusts the output packet to be output more slowly, thereby reducing the time for which the output packets wait in the buffer of the decoding apparatus, and decoding. The overflow of the device buffer can be prevented.

또한, 일 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 클 경우, 기존의 다중화 시각에 조정값을 빼서 다중화 시각을 조정할 수 있다.In addition, in one embodiment, when the actual ES bitrate is larger than the preset ES bitrate, the stream generator 1400 may adjust the multiplexing time by subtracting an adjustment value from the existing multiplexing time.

실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 클 경우, 출력 패킷들이 의도된 시각보다 늦게 출력될 수 있고, 이로 인해 복호화 장치에서 의도된 시간에 출력 패킷이 복호화되지 못할 수 있고, 복호화 장치의 버퍼에 언더플로가 발생될 수 있다. 이 때, 다중화 시각이 빨라진다면 출력 패킷들이 보다 빠른 시각에 출력될 수 있고 이로 인해 복호화 장치에서 의도된 시간에 출력 패킷이 복호화될 수 있다. 따라서, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 클 경우, 출력 패킷들이 의도된 시각에 따라 출력되도록, 또한, 복호화 장치의 버퍼에 언더플로가 발생되지 않도록, 기존의 다중화 시각에 조정값을 빼서 다중화 시각을 조정할 수 있다.If the actual ES bitrate is greater than the preset ES bitrate, the output packets may be output later than the intended time, which may result in the output packet not being decoded at the intended time in the decoding device, Underflow may occur. At this time, if the multiplexing time is faster, the output packets may be output at a faster time, which may cause the output packet to be decoded at the intended time in the decoding apparatus. Therefore, when the actual ES bitrate is larger than the preset ES bitrate, the stream generator 1400 outputs the output packets according to the intended time, and prevents the occurrence of underflow in the buffer of the decoding apparatus. The multiplexing time can be adjusted by subtracting the adjustment value from the multiplexing time.

구체적인 예로서 도 29를 참고하면, 도 29는 본 발명의 다른 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.Referring to FIG. 29 as a specific example, FIG. 29 is a diagram for describing adjustment of multiplexing time according to another embodiment of the present invention.

도 29에서, 출력 패킷 그룹 A 및 출력 패킷 그룹 B는 도 26에서의 출력 패킷 그룹 A 및 출력 패킷 그룹 B와 동일한 출력 패킷들을 포함할 수 있다. 일 예로, 출력 패킷 그룹 A에서, 출력 패킷 #1-1 내지 출력 패킷 #1-5는 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타낼 수 있다. 또한, 출력 패킷 그룹 B에서, 출력 패킷 #1-1 내지 출력 패킷 #1-4는 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타낼 수 있다.In FIG. 29, output packet group A and output packet group B may include the same output packets as output packet group A and output packet group B in FIG. 26. For example, in the output packet group A, output packets # 1-1 to output packets # 1-5 may represent output packets corresponding to picture # 1 of the source video signal. In addition, in the output packet group B, the output packet # 1-1 to the output packet # 1-4 may represent an output packet corresponding to the picture # 1 of the source video signal.

스트림 생성부(1400)는 미리 설정된 ES 비트레이트에 따라 130을 주기로 출력 패킷 그룹 A에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 그러나, 출력 패킷 그룹 A에서와 동일한 다중화 시각을 출력 패킷 그룹 B에 적용할 경우, 출력 패킷 그룹 B의 출력 패킷들이 의도된 시각보다 늦게 출력될 수 있다. 출력 패킷 그룹 B의 출력 패킷들이 의도된 시각으로 출력되도록, 스트림 생성부(1400)는 기존의 다중화 시각에 소정의 조정값을 빼서 다중화 시각을 조정할 수 있다. The stream generator 1400 may set a multiplexing time to output packets included in the output packet group A at intervals of 130 according to a preset ES bit rate. However, when the same multiplexing time as in output packet group A is applied to output packet group B, output packets of output packet group B may be output later than the intended time. The stream generation unit 1400 may adjust the multiplexing time by subtracting a predetermined adjustment value from the existing multiplexing time so that the output packets of the output packet group B are output at the intended time.

구체적으로, 도 29의 예에서, 조정값은 40이 될 수 있다. 이에 따라, 스트림 생성부(1400)는 수학식 6을 적용하여, 기존의 다중화 시각에 조정값 40을 뺌으로써, 출력 패킷 그룹 B에 포함된 출력 패킷들의 다중화 시각을 조정할 수 있다. 다만, 도 28의 경우와 마찬가지로, 도 29의 예에서도 출력 패킷 그룹 B의 출력 패킷 #1-1에 대해서는 다중화 시각을 0으로 유지하였으나, 이에 한정되지 않고, 출력 패킷 #1-1에 대해서도 다중화 시각을 조정할 수 있음은 물론이다.Specifically, in the example of FIG. 29, the adjustment value may be 40. Accordingly, the stream generator 1400 may adjust the multiplexed time of the output packets included in the output packet group B by subtracting the adjustment value 40 from the existing multiplexed time by applying Equation (6). 28, however, in the example of FIG. 29, the multiplexing time was maintained at 0 for the output packet # 1-1 of the output packet group B. However, the present invention is not limited thereto, and the multiplexing time is also provided for the output packet # 1-1. Of course it can be adjusted.

스트림 생성부(1400)는 조정된 다중화 시각과 기준 시각을 비교하여 출력 스트림 B를 생성할 수 있다. 다중화 시각이 조정됨에 따라, 도 29의 출력 스트림 B에서는 출력 패킷 #1-6은 도 26에서의 출력 스트림 B의 출력 패킷 #1-6보다 빠른 시각인 기준시각 560에 대응되는 시각에 출력될 수 있다. 즉, 도 29에서의 출력 스트림 B의 출력 패킷 #1-1 내지 출력 패킷 #1-6 및 Null 패킷의 시퀀싱은 도 26에서의 출력 스트림 B의 출력 패킷 #1-1 내지 출력 패킷 #1-6 및 Null 패킷의 시퀀싱과 상이할 수 있다.The stream generator 1400 may generate the output stream B by comparing the adjusted multiplexed time with the reference time. As the multiplexing time is adjusted, in output stream B of FIG. 29, output packet # 1-6 may be output at a time corresponding to reference time 560, which is earlier than output packet # 1-6 of output stream B in FIG. 26. have. That is, the sequencing of the output packet # 1-1 to the output packet # 1-6 and the null packet of the output stream B in FIG. 29 is the output packet # 1-1 to the output packet # 1-6 of the output stream B in FIG. And sequencing of null packets.

물론, 도 29에서는 출력 스트림 B의 출력 패킷 #1-6이 출력 스트림 A의 출력 패킷 #1-5의 출력 시점보다 느린 시점인 기준시각 560에 대응되는 시각에 출력되는 예가 기재되었지만, 조정값의 크기에 따라, 출력 스트림 B의 출력 패킷 #1-6의 출력 시점이 출력 스트림 A의 출력 패킷 #1-5의 출력 시점과 동일할 수 있다. 예를 들어, 조정값이 100인 경우, 출력 스트림 B의 출력 패킷 #1-6은 출력 스트림 A의 출력 패킷 #1-5과 동일하게 기준시각 480에 대응되는 시점에 출력될 수 있다.Of course, in FIG. 29, an example in which the output packet # 1-6 of the output stream B is output at a time corresponding to the reference time 560, which is a point in time slower than the output time of the output packet # 1-5 of the output stream A, has been described. According to the size, the output time point of the output packet # 1-6 of the output stream B may be the same as the output time point of the output packet # 1-5 of the output stream A. For example, when the adjustment value is 100, the output packet # 1-6 of the output stream B may be output at a time corresponding to the reference time 480, similarly to the output packet # 1-5 of the output stream A.

이와 같이, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 클 경우, 스트림 생성부(1400)가 출력 패킷이 보다 빨리 출력되도록 조정함으로써, 복호화 장치에서 출력 패킷들이 의도된 시간에 복호화되지 못하거나, 복호화 장치의 버퍼에 언더플로가 발생하는 것을 방지할 수 있다. As such, when the actual ES bitrate is larger than the preset ES bitrate, the stream generation unit 1400 adjusts the output packet to be output faster, so that the output packets are not decoded at the intended time or decoded by the decoding apparatus. Underflow can be prevented from occurring in the device buffer.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 출력 패킷들에 부여되는 다중화 시각(또는, 출력 패킷들에 부여된 다중화 시각)에 실제 ES 비트레이트를 반영하여 다중화 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 7에 따라 다중화 시각을 조정할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may adjust the multiplexing time by reflecting the actual ES bitrate in the multiplexing time (or multiplexing time given to the output packets). have. For example, the stream generator 1400 may adjust the multiplexing time according to Equation 7 below.

[수학식 7][Equation 7]

tad_mux_time = t mux_time × (ESbitrate_set / ESbitrate_act)t ad_mux_time = t mux_time × (ES bitrate_set / ES bitrate_act )

여기서, tmux_time은 출력 패킷들에 부여되는 기존의 다중화 시각을 나타내고, ESbitrate_set는 미리 설정된 ES 비트레이트를 나타내고, ESbitrate_act는 실제 ES 비트레이트를 나타낼 수 있다. 일 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트를 획득하고, 상기 수학식 7에 따라 다중화 시각을 조정할 수 있다. 일 예로, 스트림 생성부(1400)는 부호화부(1200, 1300)로부터 실제 ES 비트레이트를 획득할 수도 있고, 소정의 시간동안 부호화부(1200, 1300)에서 출력되는 기본 스트림의 비트수를 이용하여 실제 ES 비트레이트를 산출할 수도 있다. Here, t mux_time may indicate an existing multiplexing time applied to output packets, ES bitrate_set may indicate a preset ES bitrate, and ES bitrate_act may indicate an actual ES bitrate. In an embodiment, the stream generator 1400 may obtain the actual ES bitrate and adjust the multiplexing time according to Equation 7 above. As an example, the stream generator 1400 may obtain an actual ES bitrate from the encoders 1200 and 1300 or by using the number of bits of the elementary stream output from the encoders 1200 and 1300 for a predetermined time. The actual ES bitrate may be calculated.

또한, 수학식 7을 적용할 경우, 수학식 2는 아래의 수학식 8과 같이 수정될 수 있고, 수학식 3은 아래의 수학식 9와 같이 수정될 수 있다.In addition, when Equation 7 is applied, Equation 2 may be modified as in Equation 8 below, and Equation 3 may be modified as in Equation 9 below.

[수학식 8][Equation 8]

tad_mux_time = OPacc_bit / ESbitrate_act t ad_mux_time = OP acc_bit / ES bitrate_act

[수학식 9][Equation 9]

tad_mux_time = AUacc_bit / ESbitrate_act t ad_mux_time = AU acc_bit / ES bitrate_act

여기서, OPacc_bit는 출력 패킷들의 누적 발생 비트수를 나타내고, AUacc_bit는 출력 패킷들에 포함된 억세스 유닛의 누적 발생 비트수를 나타낼 수 있다. 즉, 수학식 8, 9는 수학식 7을 적용하여 다중화 시각이 조정되는 경우, 미리 설정된 ES 비트레이트가 실제 ES 비트레이트로 대체되어 다중화 시각이 설정된다는 것을 의미할 수 있다. 이에 따라, 다중화 시각에 실제 ES 비트레이트가 반영됨으로써, 보다 정확한 시점에 출력 패킷이 출력 스트림을 통해 출력될 수 있다.Here, OP acc_bit may represent the cumulative occurrence bits of the output packets, and AU acc_bit may represent the cumulative occurrence bits of the access unit included in the output packets. That is, Equations 8 and 9 may mean that when the multiplexed time is adjusted by applying Equation 7, the preset ES bitrate is replaced with the actual ES bitrate to set the multiplexed time. Accordingly, the actual ES bitrate is reflected in the multiplexing time, so that the output packet can be output through the output stream at a more accurate time point.

구체적인 예로서, 도 30은 본 발명의 또 다른 실시예에 따른 다중화 시각의 조정을 설명하기 위한 도면이다.As a specific example, FIG. 30 is a diagram for explaining adjustment of multiplexing time according to another embodiment of the present invention.

도 30을 참조하면, 도 30의 예에서, 출력 패킷들의 크기는 188byte일 수 있다. 이 때, 출력 패킷 그룹 A는 미리 설정된 ES 비트레이트와 동일한 실제 ES 비트레이트에 따라 생성된 출력 패킷들을 포함하고, 출력 패킷 그룹 B는 미리 설정된 ES 비트레이트보다 작은 실제 ES 비트레이트에 따라 생성된 출력 패킷들을 포함하고, 출력 패킷 그룹 C는 미리 설정된 ES 비트레이트보다 큰 실제 ES 비트레이트에 따라 생성된 출력 패킷들을 포함할 수 있다. 여기서, 미리 설정된 ES 비트레이트는 5Mbps일 수 있고, 출력 패킷 그룹 B에 대한 제 ES 비트레이트는 미리 설정된 ES 비트레이트 보다 작은 4Mbps일 수 있고, 출력 패킷 그룹 C에 대한 실제 ES 비트레이트는 미리 설정된 ES 비트레이트 보다 큰 6Mbps일 수 있다. 그리고, 출력 패킷 그룹 A에서의 출력 패킷 #1-1 내지 출력 패킷 #1-5, 출력 패킷 그룹 B에서의 출력 패킷 #1-1 내지 출력 패킷 #1-4, 출력 패킷 그룹 C에서의 출력 패킷 #1-1 내지 출력 패킷 #1-6은 소스 비디오 신호 중 픽쳐 #1에 대응되는 출력 패킷을 나타내고, 출력 패킷 그룹 A, B, C에서의 출력 패킷 #2-1는 소스 비디오 신호 중 픽쳐 #2에 대응되는 출력 패킷을 의미할 수 있다. 그리고, 출력 스트림 A, B, C는 각각 출력 패킷 그룹 A, B, C에 대응되는 출력 스트림을 나타낼 수 있다.Referring to FIG. 30, in the example of FIG. 30, the size of output packets may be 188 bytes. At this time, the output packet group A includes output packets generated according to the actual ES bitrate equal to the preset ES bitrate, and the output packet group B is generated according to the actual ES bitrate smaller than the preset ES bitrate. And packets, the output packet group C may include output packets generated according to an actual ES bitrate that is greater than the preset ES bitrate. Here, the preset ES bitrate may be 5Mbps, the first ES bitrate for the output packet group B may be 4Mbps less than the preset ES bitrate, and the actual ES bitrate for the output packet group C is the preset ES. It may be 6 Mbps larger than the bit rate. Then, output packet # 1-1 to output packet # 1-5 in output packet group A, output packet # 1-1 to output packet # 1-4 in output packet group B, and output packet in output packet group C # 1-1 to output packet # 1-6 indicate an output packet corresponding to picture # 1 of the source video signal, and output packet # 2-1 in output packet groups A, B, and C is picture # of the source video signal. It may mean an output packet corresponding to two. The output streams A, B, and C may represent output streams corresponding to the output packet groups A, B, and C, respectively.

또한, 출력 스트림의 출력 비트레이트가 7Mbps임에 따라, 다중화를 위한 기준 시각은 214μsec 가 될 수 있다. 즉, 214μsec마다 출력 스트림에 출력 패킷이 삽입될 수 있다.Also, as the output bitrate of the output stream is 7 Mbps, the reference time for multiplexing may be 214 μsec. That is, an output packet may be inserted into an output stream every 214 μsec.

일 실시예에서, 출력 패킷 그룹 A의 경우 미리 설정된 ES 비트레이트와 실제 ES 비트레이트가 동일하므로, 스트림 생성부(1400)는 미리 설정된 ES 비트레이트인 5Mbps에 따라 출력 패킷 그룹 A에 포함된 출력 패킷들에 다중화 시각을 설정할 수 있다. 또한, 스트림 생성부(1400)는 출력 패킷 그룹 B, C에 포함된 출력 패킷들에 대해서는 수학식 7에 따라 실제 ES 비트레이트인 4Mbps, 6Mbps를 반영하여 다중화 시각을 조정할 수 있다. 이에 따라, 출력 패킷 그룹 B에 포함된 출력 패킷들의 다중화 시각은 출력 패킷 그룹 A에 포함된 출력 패킷들의 다중화 시각보다 느리게 조정되고, 출력 패킷 그룹 C에 포함된 출력 패킷들의 다중화 시각은 출력 패킷 그룹 A에 포함된 출력 패킷들의 다중화 시각보다 빠르게 조정될 수 있다.In an embodiment, since the output ES group A has the same ES bitrate as the preset ES bitrate, the stream generator 1400 may output the output packets included in the output packet group A according to the preset ES bitrate 5Mbps. You can set the multiplexing time for these fields. In addition, the stream generation unit 1400 may adjust the multiplexing time for the output packets included in the output packet groups B and C by reflecting the actual ES bit rates of 4 Mbps and 6 Mbps according to Equation (7). Accordingly, the multiplexed time of the output packets included in the output packet group B is adjusted to be slower than the multiplexed time of the output packets included in the output packet group A, and the multiplexed time of the output packets included in the output packet group C is adjusted to the output packet group A. It can be adjusted faster than the multiplexing time of the output packets included in the.

또한, 스트림 생성부(1400)는 출력 패킷들에 설정된 다중화 시각에 따라 출력 패킷 그룹 A, B, C에 포함된 출력 패킷들을 다중화할 수 있다.Also, the stream generator 1400 may multiplex output packets included in the output packet groups A, B, and C according to the multiplexing time set for the output packets.

출력 스트림 B의 출력 패킷 #2-1의 경우, 다중화 시각이 조정되지 않는다면 출력 스트림 A의 출력 패킷 #1-5가 출력되는 시각과 동일하게 기준시각 1074 μsec에 대응되는 시각에 출력되지만, 다중화 시각이 조정됨에 따라, 출력 스트림 B의 출력 패킷 #2-1은 출력 스트림 A의 출력 패킷 #2-1이 출력되는 시각과 동일하게 기준시각 1504 μsec에 대응되는 시각에 출력될 수 있다. 이에 따라, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 스트림 생성부(1400)가 출력 패킷이 보다 천천히 출력되도록 조정함으로써, 출력 패킷들이 복호화 장치의 버퍼에서 대기하는 시간을 감소시키고, 복호화 장치의 버퍼에 오버플로가 발생되는 것을 방지할 수 있다.In case of the output packet # 2-1 of the output stream B, if the multiplexing time is not adjusted, the output packet # 1-5 of the output stream A is output at the time corresponding to the reference time 1074 μsec, which is the same as the output time. As this is adjusted, the output packet # 2-1 of the output stream B may be output at a time corresponding to the reference time 1504 μsec, the same as the time at which the output packet # 2-1 of the output stream A is output. Accordingly, when the actual ES bitrate is smaller than the preset ES bitrate, the stream generator 1400 adjusts the output packet to be output more slowly, thereby reducing the time for which the output packets wait in the buffer of the decoding apparatus, and decoding. The overflow of the device buffer can be prevented.

또한, 출력 스트림 C에서 픽쳐 #1에 대응되는 마지막 출력 패킷인 출력 패킷 #1-6의 경우, 다중화 시각이 조정되지 않는다면 출력 스트림 A의 출력 패킷 #2-1이 출력되는 시각과 동일하게 기준시각 1504 μsec에 대응되는 시각에 출력되지만, 다중화 시각이 조정됨에 따라, 출력 스트림 B의 출력 패킷 #1-6은 출력 스트림 A의 픽쳐 #1에 대응되는 마지막 출력 패킷인 출력 패킷 #1-5가 출력되는 시각과 동일하게 기준시각 1074 μsec에 대응되는 시각에 출력될 수 있다. 이와 같이, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 클 경우, 스트림 생성부(1400)가 출력 패킷이 보다 빨리 출력되도록 조정함으로써, 복호화 장치에서 출력 패킷들이 의도된 시간에 복호화되지 못하는 것을 방지할 수 있다. 이와 같이, 수학식 7에 따라 다중화 시각이 조정될 경우, 출력 패킷 그룹 A, B, C에서, 픽쳐 #1에 대응되는 마지막 출력 패킷이 동일한 시점에 출력되고, 픽쳐 #2에 대응되는 처음 출력 패킷 역시 동일한 시점에 출력될 수 있다. 따라서, 다중화 시각의 조정에 실제 ES 비트레이트가 반영될 경우, 보다 정확한 시점에 출력 패킷이 복호화 장치에 전달될 수 있다. Also, in case of output packet # 1-6, which is the last output packet corresponding to picture # 1 in output stream C, if the multiplexing time is not adjusted, the reference time is the same as the time when output packet # 2-1 of output stream A is output. Although output at a time corresponding to 1504 μsec, as the multiplexing time is adjusted, output packet # 1-6 of output stream B is output packet # 1-5, which is the last output packet corresponding to picture # 1 of output stream A, output. It may be output at a time corresponding to the reference time 1074 μsec in the same way as the time. As such, when the actual ES bitrate is larger than the preset ES bitrate, the stream generation unit 1400 adjusts the output packet to be output faster, thereby preventing the decoding apparatus from decoding the output packets at the intended time. Can be. As such, when the multiplexing time is adjusted according to Equation 7, the last output packet corresponding to picture # 1 is output at the same time in output packet groups A, B, and C, and the first output packet corresponding to picture # 2 is also output. Can be output at the same time. Therefore, when the actual ES bitrate is reflected in the adjustment of the multiplexing time, the output packet can be delivered to the decoding apparatus at a more accurate time point.

또한, 이에 한정되지 않고, 스트림 생성부(1400)는 출력 패킷들에 부여되는 다중화 시각에 소정의 조정값을 가감하는 경우에도 실제 ES 비트레이트를 반영하여 다중화 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 실제 ES 비트레이트를 획득한 후, 복수의 조정값 중 실제 ES 비트레이트와 미리 설정된 ES 비트레이트와의 차이값에 대응되는 조정값을 선택하고, 선택된 조정값을 다중화 시각의 조정에 적용할 수 있다. 이와 같이, 출력 패킷들에 부여되는 다중화 시각에 소정의 조정값을 가감하는 경우에도 실제 ES 비트레이트를 반영함으로써, 출력 패킷이 보다 정확한 시점에 복호화 장치에 전달될 수 있다.In addition, the present invention is not limited thereto, and the stream generation unit 1400 may adjust the multiplexing time by reflecting the actual ES bit rate even when a predetermined adjustment value is added to or subtracted from the multiplexing time applied to the output packets. For example, after obtaining the actual ES bit rate, the stream generator 1400 selects an adjustment value corresponding to a difference value between the actual ES bit rate and the preset ES bit rate among the plurality of adjustment values, and selects the selected adjustment. The value can be applied to the adjustment of the multiplexing time. In this way, even when a predetermined adjustment value is added to or subtracted from the multiplexing time applied to the output packets, the actual ES bitrate is reflected, so that the output packet can be delivered to the decoding apparatus at a more accurate time point.

도 31은 본 발명의 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.31 is a flowchart illustrating an output time adjustment method of an output packet according to another embodiment of the present invention.

도 31을 참조하면, 스트림 생성부(1400)는 출력 패킷의 출력과 관련된 이상여부(또는, 오류여부)를 감지할 수 있다(S3110). 여기서, 출력 패킷의 출력과 관련된 이상여부는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트에 부합하지 않는지 여부, 복호화 장치의 버퍼에 오버플로 또는 언더플로가 발생되는지 여부, 출력 패킷이 의도된 시점과 다른 시점에 복호화 장치에 출력되는지 여부 및/또는 출력 패킷이 의도된 시점과 다른 시점에 복호화 장치에 출력됨으로써 복호화 장치에서 오류가 발생되는지 여부 등을 포함할 수 있다. 또한, 이외에도 출력 패킷의 출력과 관련된 이상여부는 출력 패킷의 출력과 관련있는 모든 이상사항이 발생되었는지 여부를 포함할 수 있다.Referring to FIG. 31, the stream generator 1400 may detect an abnormality (or an error) related to the output of an output packet (S3110). Here, whether or not an abnormality related to the output of the output packet is different from whether the actual ES bitrate does not correspond to the preset ES bitrate, whether the overflow or underflow occurs in the buffer of the decoding apparatus, and when the output packet is different from the intended time. And whether an error occurs in the decoding apparatus by outputting the output packet to the decoding apparatus at a different time than the intended time. In addition, the abnormality related to the output of the output packet may include whether all abnormalities related to the output of the output packet have occurred.

일 실시예에서, 스트림 생성부(1400)는 복호화 장치로부터 출력 패킷의 출력과 관련된 이상여부에 대한 정보를 획득할 수 있다. 예를 들어, 스트림 생성부(1400)는 복호화 장치의 버퍼에 오버플로 또는 언더플로가 발생되었는지 여부 또는 출력 패킷이 복호화 장치에서 의도되지 않은 시간에 복호화되는지 여부에 대한 정보를 획득할 수 있다.According to an embodiment, the stream generator 1400 may obtain information about an abnormality related to the output of the output packet from the decoding apparatus. For example, the stream generator 1400 may obtain information about whether an overflow or an underflow occurs in a buffer of the decoding apparatus or whether an output packet is decoded at an unintended time in the decoding apparatus.

또한, 스트림 생성부(1400)는 복호화 장치로부터 획득한 정보를 기초로 출력 패킷의 출력과 관련된 이상이 발생되었는지 여부를 판단할 수 있다. 이 경우, 스트림 생성부(1400)는 스트림 생성 장치(1000)로부터 해당 출력 패킷을 포함하는 출력 스트림이 전달된 이후에 해당 출력 패킷의 출력과 관련된 이상이 발생되었는지 여부를 판단할 수 있다.In addition, the stream generator 1400 may determine whether an abnormality related to the output of the output packet has occurred based on the information obtained from the decoding apparatus. In this case, the stream generator 1400 may determine whether an abnormality related to the output of the corresponding output packet occurs after the output stream including the corresponding output packet is transmitted from the stream generating apparatus 1000.

또한, 복호화 장치로부터, 복호화 장치의 버퍼에 오버플로가 발생되었다는 정보를 획득한 경우, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작다는 것을 판단할 수 있다. 다른 예로서, 복호화 장치로부터, 복호화 장치에서 출력 패킷이 의도된 시간에 복호화되지 못한다는 정보 또는 복호화 장치의 버퍼에 언더플로가 발생되었다는 정보를 획득한 경우, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 크다는 것을 판단할 수 있다.In addition, when the decoding apparatus obtains information indicating that an overflow occurs in the buffer of the decoding apparatus, the stream generator 1400 may determine that the actual ES bitrate is smaller than the preset ES bitrate. As another example, when the decoding apparatus obtains information indicating that an output packet is not decoded in the decoding apparatus or information indicating that an underflow has occurred in the buffer of the decoding apparatus, the stream generator 1400 may perform actual ES bits. It can be determined that the rate is greater than the preset ES bitrate.

다른 일 실시예에서, 스트림 생성부(1400)는 복호화 장치로부터 별도의 정보를 획득하지 않고도, 자체적으로 출력 패킷의 출력과 관련된 이상이 발생되었는지 여부를 판단할 수 있다. 이 경우, 스트림 생성부(1400)는 스트림 생성 장치(1000)로부터 복호화 장치에 해당 출력 패킷을 포함하는 출력 스트림이 전달되기 전에 해당 출력 패킷의 출력과 관련된 이상이 발생되었는지 여부를 판단할 수 있다. 물론, 스트림 생성부(1400)는 이 경우에도 해당 출력 패킷을 포함하는 출력 스트림이 전달된 이후에 해당 출력 패킷의 출력과 관련된 이상이 발생되었는지 여부를 판단할 수 있다.In another embodiment, the stream generator 1400 may determine whether an abnormality related to the output of the output packet has occurred, without obtaining additional information from the decoding apparatus. In this case, the stream generator 1400 may determine whether an abnormality related to the output of the output packet occurs before the output stream including the output packet is transmitted from the stream generator 1000 to the decoding apparatus. Of course, in this case, even after the output stream including the corresponding output packet is delivered, the stream generator 1400 may determine whether an abnormality related to the output of the corresponding output packet has occurred.

예를 들어, 스트림 생성부(1400)는 미리 정해진 주기 또는 임의적인 시점에서, 부호화부(1200, 1300)로부터 실제 ES 비트레이트를 획득하거나, 소정의 시간동안 부호화부(1200, 1300)에서 출력되는 기본 스트림의 비트수를 이용하여 실제 ES 비트레이트를 획득할 수도 있다. 스트림 생성부(1400)는 획득된 실제 ES 비트레이트와 미리 설정된 ES 비트레이트를 비교하여 실제 ES 비트레이트와 미리 설정된 ES 비트레이트가 부합하는지 여부를 판단할 수 있다.For example, the stream generator 1400 obtains the actual ES bitrate from the encoders 1200 and 1300 at a predetermined period or an arbitrary time point, or is output from the encoders 1200 and 1300 for a predetermined time. The actual ES bitrate may be obtained using the number of bits of the elementary stream. The stream generator 1400 may determine whether the actual ES bitrate matches the preset ES bitrate by comparing the obtained ES bitrate with the preset ES bitrate.

다른 예로서, 스트림 제공 장치(1000)에 가상 버퍼가 포함될 수 있다. 여기서, 가상 버퍼는 복호화 장치에서의 버퍼의 부하를 예상하기 위한 것으로, 스트림 제공 장치(1000)는 복호화 장치의 버퍼에 저장되는 데이터의 양, 복호화 장치의 버퍼에서 상기 데이터가 제거되는 시점을 예측하여 가상 버퍼를 운영할 수 있다. 예를 들어, 스트림 제공 장치(1000)는 스트림 제공 장치(1000)에서 제공되는 출력 스트림의 양을 기초로 복호화 장치의 버퍼에 저장되는 데이터의 양을 예측할 수 있고, 출력 패킷들의 복호화 시간에 대한 정보 및/또는 출력 패킷들의 재생시간에 대한 정보를 기초로 복호화 장치의 버퍼에서 상기 데이터가 제거되는 시점을 예측할 수 있다.As another example, a virtual buffer may be included in the stream providing apparatus 1000. Here, the virtual buffer is for estimating the load of the buffer in the decoding apparatus, and the stream providing apparatus 1000 estimates the amount of data stored in the buffer of the decoding apparatus and when the data is removed from the buffer of the decoding apparatus. You can run a virtual buffer. For example, the stream providing apparatus 1000 may predict the amount of data stored in the buffer of the decoding apparatus based on the amount of the output stream provided by the stream providing apparatus 1000, and may inform the decoding time of the output packets. And / or predict the time point at which the data is removed from the buffer of the decoding apparatus based on the information about the reproduction time of the output packets.

일 실시예에서, 스트림 생성부(1400)는 가상 버퍼에서의 데이터의 양이 소정의 기준양 보다 많을 경우, 복호화 장치의 버퍼에 오버플로가 발생되고, 실제 ES 비트레이트 미리 설정된 ES 비트레이트 보다 작다는 것을 판단할 수 있다. 또한, 스트림 생성부(1400)는 가상버퍼에서의 데이터의 양이 소정의 기준양 보다 적을 경우, 복호화 장치의 버퍼에 언더플로가 발생되고, 실제 ES 비트레이트와 미리 설정된 ES 비트레이트 보다 크다는 것을 판단할 수 있다.In an embodiment, when the amount of data in the virtual buffer is greater than a predetermined reference amount, the stream generator 1400 generates an overflow in the buffer of the decoding apparatus, and the actual ES bitrate is smaller than the preset ES bitrate. Can be determined. In addition, when the amount of data in the virtual buffer is less than the predetermined reference amount, the stream generation unit 1400 determines that underflow occurs in the buffer of the decoding apparatus and is larger than the actual ES bit rate and the preset ES bit rate. can do.

또한, 본 발명의 실시예에서, 스트림 생성부(1400)는 출력 패킷의 출력과 관련된 이상여부가 발생한 것으로 판단한 경우, 단계 S2710을 수행하여 출력 패킷들에 대해 다중화 시각을 조정할 수 있다.In addition, in the embodiment of the present invention, when it is determined that abnormality related to the output of the output packet has occurred, the stream generator 1400 may perform step S2710 to adjust the multiplexing time for the output packets.

도 32는 본 발명의 또 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.32 is a flowchart illustrating an output time adjustment method of an output packet according to another embodiment of the present invention.

도 32를 참조하면, 스트림 생성부(1400)는 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다(S3210). 여기서, 정상화 되었다는 것은 실제 ES 비트레이트가 미리 설정된 ES 비트레이트에 부합하는 것, 복호화 장치의 버퍼에 오버플로 및 언더플로가 발생되지 않는 것, 출력 패킷이 의도된 시점에 복호화 장치에 출력되는 것 및/또는 출력 패킷이 의도된 시점과 다른 시점에 복호화 장치에 출력됨으로써 복호화 장치에서 발생된 오류가 해결된 것 등을 포함할 수 있다. 또한, 이외에도 정성화 되었다는 의미는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트에 부합함으로써 상기 이상상태가 해결되는 것과 관련된 모든 상황을 포함할 수 있다.Referring to FIG. 32, the stream generator 1400 may determine whether an abnormal state related to output of an output packet is normalized (S3210). Here, normalization means that the actual ES bitrate matches the preset ES bitrate, that overflow and underflow do not occur in the buffer of the decoding apparatus, that the output packet is output to the decoding apparatus at the intended time point, and And / or the output packet is output to the decoding apparatus at a different time than the intended time, thereby solving an error generated in the decoding apparatus. In addition, the qualitative meaning may include all situations related to the resolution of the abnormal state by the actual ES bitrate matching the preset ES bitrate.

일 실시예에서, 스트림 생성부(1400)는 도 31의 단계 S3110에서 이상여부를 감지하는 것과 유사하게, 이상 상태가 정상화 되었는지 여부를 판단할 수 있다. 예를 들어, 스트림 생성부(1400)는 복호화 장치로부터 출력 패킷의 출력과 관련된 이상상태가 정상화되었는지에 대한 정보를 획득하여 정상화 여부를 판단할 수 있다. 일 예로, 스트림 생성부(1400)는 복호화 장치의 버퍼에 발생된 오버플로 또는 언더플로가 해소되었는지 여부 또는 출력 패킷이 복호화 장치에서 의도된 시간에 복호화되었는지 여부에 대한 정보를 획득할 수 있다. 이 경우, 스트림 생성부(1400)는 스트림 생성 장치(1000)로부터 해당 출력 패킷을 포함하는 출력 스트림이 전달된 이후에 해당 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다. 예를 들어, 스트림 생성부(1400)는 단계 S2710 및 단계 S2720를 수행하고 스트림 생성 장치(1000)로부터 복호화 장치에 상기 다중화 시각이 조정된 출력 패킷을 포함하는 출력 스트림이 전달된 이후에, 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다.In an embodiment, the stream generator 1400 may determine whether the abnormal state is normalized, similarly to detecting the abnormality in step S3110 of FIG. 31. For example, the stream generator 1400 may determine whether the normalization is performed by obtaining information on whether an abnormal state related to the output of the output packet is normalized from the decoding apparatus. As an example, the stream generator 1400 may obtain information about whether an overflow or an underflow generated in the buffer of the decoding apparatus is resolved or whether the output packet is decoded at an intended time in the decoding apparatus. In this case, the stream generator 1400 may determine whether an abnormal state related to the output of the output packet is normalized after the output stream including the output packet is transmitted from the stream generator 1000. For example, the stream generation unit 1400 performs the steps S2710 and S2720 and after the output stream including the output packet of which the multiplexed time has been adjusted is passed from the stream generation device 1000 to the decoding device, the output packet. It is possible to determine whether the abnormal state related to the output of the controller is normalized.

다른 예로서, 스트림 생성부(1400)는 복호화 장치로부터 별도의 정보를 획득하지 않고, 자체적으로 이상상태가 정상화 되었는지 여부를 판단할 수 있다. 이 경우, 스트림 생성부(1400)는 스트림 생성 장치(1000)로부터 복호화 장치에 해당 출력 패킷을 포함하는 출력 스트림이 전달되기 전에 해당 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다. 예를 들어, 스트림 생성부(1400)는 단계 S2720이 수행되기 이전 또는 스트림 생성 장치(1000)로부터 복호화 장치에 상기 다중화 시각이 조정된 출력 패킷을 포함하는 출력 스트림이 전달되기 전에 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다. 물론, 이 경우에도 스트림 생성부(1400)는 해당 출력 패킷을 포함하는 출력 스트림이 전달된 이후에 해당 출력 패킷의 출력과 관련된 이상상태가 정상화 되었는지 여부를 판단할 수 있다.As another example, the stream generator 1400 may determine whether the abnormal state is normalized by itself without obtaining additional information from the decoding apparatus. In this case, the stream generator 1400 may determine whether the abnormal state related to the output of the output packet is normalized before the output stream including the output packet is transmitted from the stream generator 1000 to the decoding device. . For example, the stream generator 1400 may output an output packet before the output of the output stream including the output packet of which the multiplexed time is adjusted from the stream generator 1000 or the stream generator 1000 to the decoding apparatus. It is possible to determine whether the relevant abnormality is normalized. Of course, even in this case, the stream generator 1400 may determine whether an abnormal state related to the output of the output packet is normalized after the output stream including the output packet is delivered.

예를 들어, 스트림 생성부(1400)는 상기 가상버퍼의 데이터 양을 기초로 복호화 장치의 버퍼에 발생된 오버플로 또는 언더플로가 해소되었는지 여부를 판단할 수도 있고, 미리 정해진 주기 또는 임의적인 시점에서, 부호화부(1200, 1300)로부터 실제 ES 비트레이트를 획득하거나, 소정의 시간동안 부호화부(1200, 1300)에서 출력되는 기본 스트림의 비트수를 이용하여 실제 ES 비트레이트를 획득함으로써, 이상상태가 정상화 되었는지 여부를 판단할 수도 있다.For example, the stream generator 1400 may determine whether an overflow or an underflow occurred in the buffer of the decoding apparatus based on the amount of data of the virtual buffer is resolved, and at a predetermined period or an arbitrary time point. The abnormal state is obtained by acquiring the actual ES bitrate from the encoders 1200 and 1300 or by using the number of bits of the elementary stream output from the encoders 1200 and 1300 for a predetermined time. You can also determine whether it is normalized.

또한, 스트림 생성부(1400)는 이상상태가 정상화 되었다고 판단된 경우, 다중화 시각의 조정을 중단할 수도 있고, 다중화 시각의 조정을 계속하여 단계 S2710 내지 단계 S2720을 계속하여 수행할 수도 있다. 예를 들어, 단계 S3210에서, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트에 부합한다고 판단된 경우, 다중화 시각의 조정을 중단할 수 있다. 그러나, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트에 부합하지 않으나, 복호화 장치의 버퍼에 오버플로 또는 언더플로가 해소되거나, 출력 패킷들이 복호화 장치에서 의도된 시간에 복호화되는 것으로 판단된 경우, 단계 S2710 내지 단계 S2720을 계속하여 수행할 수도 있다.In addition, when it is determined that the abnormal state is normalized, the stream generating unit 1400 may stop adjusting the multiplexing time, or may continuously perform the steps S2710 to S2720 by adjusting the multiplexing time. For example, if it is determined in step S3210 that the actual ES bitrate matches the preset ES bitrate, the adjustment of the multiplexing time can be stopped. However, if the actual ES bitrate does not match the preset ES bitrate, but overflow or underflow is resolved in the buffer of the decoding apparatus, or it is determined that output packets are decoded at the intended time in the decoding apparatus, step S2710. To step S2720 may be continued.

또한, 스트림 생성부(1400)는 이상상태가 정상화 되지 않았다고 판단된 다중화 시각의 조정을 계속하여 단계 S2710 내지 단계 S2720을 계속하여 수행할 수도 있다. 이 때, 스트림 생성부(1400)는 단계 S2710에서, 다중화 시각을 재조정할 수 있다. 여기서, 다중화 시각을 재조정한다는 것은, 기존에 수행된 S2710에서 조정된 다중화 시각과 다른 다중화 시각을 출력 패킷들에 적용한다는 것을 의미할 수 있다.In addition, the stream generation unit 1400 may continue to adjust the multiplexing time determined that the abnormal state is not normalized and continue to perform steps S2710 to S2720. At this time, the stream generation unit 1400 may readjust the multiplexing time in step S2710. Here, re-adjusting the multiplexed time may mean applying a multiplexed time different from the multiplexed time adjusted in the previously performed S2710 to the output packets.

예를 들어, 스트림 생성부(1400)가 수학식 6에 따라, 출력 패킷들에 부여되는 다중화 시각에 소정의 조정값을 가감하는 경우, 조정값의 크기를 변경하여 다중화 시각을 재조정할 수 있다. 구체적인 예로서, 스트림 생성부(1400)는 복수의 조정값 중 값이 낮은 조정값을 이용하여 다중화 시각을 조정한 후, 이상상태가 정상화되지 않았다고 판단된 경우, 조정값의 크기를 증가시켜 다중화 시각을 재조정할 수 있다. 예를 들어, 스트림 생성부(1400)가 조정값을 30으로 설정하여 다중화 시각을 조정하였으나, 아직 이상상태가 정상화되지 않았다고 판단된 경우, 스트림 생성부(1400)는 조정값을 40으로 변경하여 다중화 시각을 조정할 수 있다. 이후, 이상상태가 정상화 되었다고 판단된 경우에는 조정값을 40으로 유지하여 다중화 시각을 조정하고, 이상상태가 정상화 되지 않았다고 판단된 경우, 조정값을 50으로 변경하여 다중화 시각을 조정할 수 있다. 또한, 복수의 조정값 중 값이 높은 조정값을 이용하여 다중화 시각을 조정한 후, 이상상태가 정상화되지 않았다고 판단된 경우, 조정값의 크기를 감소시켜 다중화 시각을 재조정할 수 있다.For example, when the stream generator 1400 adds or subtracts a predetermined adjustment value to the multiplexing time applied to the output packets according to Equation 6, the stream generation unit 1400 may readjust the multiplexing time by changing the size of the adjustment value. As a specific example, if the stream generation unit 1400 adjusts the multiplexing time by using an adjustment value having a lower value among the plurality of adjustment values, and determines that the abnormal state is not normalized, the stream generation unit 1400 increases the size of the adjustment value to increase the multiplexing time. Can be readjusted. For example, if the stream generator 1400 adjusts the multiplexing time by setting the adjustment value to 30, but determines that the abnormal state is not normalized, the stream generator 1400 changes the adjustment value to 40 and multiplexes it. You can adjust the time. Thereafter, when it is determined that the abnormal state is normalized, the multiplexing time may be adjusted by maintaining the adjustment value at 40, and when it is determined that the abnormal state is not normalized, the multiplexing time may be adjusted by changing the adjustment value to 50. In addition, after the multiplexing time is adjusted using an adjustment value having a higher value among the plurality of adjustment values, when it is determined that the abnormal state is not normalized, the multiplexing time may be readjusted by reducing the size of the adjustment value.

다른 예로서, 스트림 생성부(1400)가 수학식 7 내지 9에 따라, 실제 ES 비트레이트를 다중화 시각에 조정하는 경우, 스트림 생성부(1400)는 가장 최근에 획득된 실제 ES 비트레이트를 반영하여, 즉, 실제 ES 비트레이터를 업데이트하여 업데이트된 실제 ES 비트레이트를 기초로 다중화 시각을 조정할 수 있다.As another example, when the stream generator 1400 adjusts the actual ES bitrate to the multiplexing time according to Equations 7 to 9, the stream generator 1400 may reflect the most recently obtained actual ES bitrate. That is, the actual ES bitator may be updated to adjust the multiplexing time based on the updated actual ES bitrate.

또한, 일 실시예에서, 스트림 생성부(1400)는 출력 패킷이 출력 스트림을 통해 복호화 장치에 전달되기 전에 해당 출력 패킷의 다중화 시각을 재조정할 수 있다. 예를 들어, 스트림 생성부(1400)가 해당 출력 패킷을 포함하는 출력 스트림이 전달되기 전에 해당 출력 패킷의 출력과 관련된 이상상태가 정상화 되지 않았다고 판단한 경우, 스트림 생성부(1400)는 출력 패킷이 출력 스트림을 통해 복호화 장치에 전달되기 전에 해당 출력 패킷의 다중화 시각을 재조정할 수 있다.In addition, in one embodiment, the stream generator 1400 may readjust the multiplexing time of the corresponding output packet before the output packet is delivered to the decoding apparatus through the output stream. For example, when the stream generator 1400 determines that an abnormal state related to the output of the output packet is not normalized before the output stream including the output packet is delivered, the stream generator 1400 outputs the output packet. The multiplexed time of the corresponding output packet may be readjusted before being delivered to the decoding apparatus through the stream.

또한, 다른 일 실시예에서, 스트림 생성부(1400)는 출력 패킷이 출력 스트림을 통해 복호화 장치에 전달된 후에 해당 출력 패킷이 아닌 다른 출력 패킷의 다중화 시각을 재조정할 수 있다. 예를 들어, 스트림 생성부(1400)가 해당 출력 패킷을 포함하는 출력 스트림이 전달된 후에 해당 출력 패킷의 출력과 관련된 이상상태가 정상화 되지 않았다고 판단한 경우, 스트림 생성부(1400)는 해당 출력 패킷의 다음 출력 패킷에 대하여 다중화 시각을 재조정할 수 있다.In another exemplary embodiment, the stream generator 1400 may readjust the multiplexing time of an output packet other than the corresponding output packet after the output packet is delivered to the decoding apparatus through the output stream. For example, when the stream generator 1400 determines that an abnormal state related to the output of the output packet is not normalized after the output stream including the output packet is delivered, the stream generator 1400 may determine the output packet. The multiplexing time can be readjusted for the next output packet.

도 33은 본 발명의 또 다른 실시예에 따른 출력 패킷의 출력시점 조정 방법을 나타낸 동작 흐름도이다.33 is a flowchart illustrating a method of adjusting an output time point of an output packet according to another embodiment of the present invention.

도 33을 참조하면, 스트림 생성부(1400)는 출력 스트림의 기준 시각을 조정할 수 있다(S3310). 여기서, 기준 시각을 조정한다는 것은, 출력 스트림의 출력 비트레이트를 조정한다는 의미일 수 있다. Referring to FIG. 33, the stream generator 1400 may adjust a reference time of an output stream (S3310). Here, adjusting the reference time may mean adjusting the output bitrate of the output stream.

즉, 전술한 바와 같이, 실제 ES 비트레이트와 미리 설정된 ES 비트레이트가 부합되지 않은 경우, 출력 패킷의 출력과 관련된 이상상태가 발생할 수 있음을 확인하였다. 이러한 이상상태를 해결하기 위해 도 27에서는 다중화 시각을 조정하는 방법에 대해 언급하였으나 상기 이상상태를 해결하는 방법은 이에 한정되지 않을 수 있다. 예를 들어, 단계 S3310에서는, 출력 스트림의 기준 시각을 조정하여 상기 이상상태를 해결할 수 있다.That is, as described above, when the actual ES bitrate does not match the preset ES bitrate, it was confirmed that an abnormal state related to the output of the output packet may occur. In order to solve such an abnormal state, the method of adjusting the multiplexing time is described in FIG. 27, but the method of solving the abnormal state may not be limited thereto. For example, in step S3310, the abnormal state can be solved by adjusting the reference time of the output stream.

일 실시예에서, 스트림 생성부(1400)는 출력 패킷들에 부여되는 다중화 시각(또는, 출력 패킷들에 부여된 다중화 시각)에 소정의 조정값을 가감하여 기준 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 10에 따라 기준 시각을 조정할 수 있다.In one embodiment, the stream generation unit 1400 may adjust the reference time by adding or subtracting a predetermined adjustment value to the multiplexing time (or the multiplexing time provided to the output packets). For example, the stream generator 1400 may adjust the reference time according to Equation 10 below.

[수학식 10][Equation 10]

tad_mux_ref = t mux_ref ± △tad_ref t ad_mux_ref = t mux_ref ± △ t ad_ref

여기서, tmux_ref은 기존의 기준 시각을 나타내고, △tad_ref는 기준시간의 조정을 위한 조정값을 나타내고, tad_mux_ref는 조정된 기준 시각을 나타낼 수 있다. 또한, △tad는 미리 정해진 상수값으로, 하나의 상수값이 설정될 수도 있고, 복수의 상수값이 설정될 수도 있다. 예를 들어, 스트림 생성부(1400)는 각 출력 패킷에 동일한 조정값을 가감하여 기준 시각을 조정할 수도 있고, 다른 조정값을 가감하여 기준 시각을 조정할 수 있다. 일 예로, 스트림 생성부(1400)는 다중화 시각이 부여되는 출력 패킷의 개수, 출력 패킷의 크기에 따라 서로 다른 조정값을 적용할 수도 있고, 출력 패킷에 부여되는 다중화 시각이 미리 정해진 시각을 경과한 경우에 조정값을 수정하여 기준 시각을 조정할 수도 있다.Here, t mux_ref may indicate an existing reference time, Δt ad_ref may indicate an adjustment value for adjusting the reference time, and t ad_mux_ref may indicate an adjusted reference time. In addition, Δt ad is a predetermined constant value, one constant value may be set, or a plurality of constant values may be set. For example, the stream generator 1400 may adjust the reference time by adding or subtracting the same adjustment value to each output packet, or may adjust the reference time by adding or subtracting another adjustment value. As an example, the stream generation unit 1400 may apply different adjustment values according to the number of output packets to which the multiplexing time is given and the size of the output packet, and the multiplexing time to which the output packet is given passes a predetermined time. In this case, the reference time may be adjusted by modifying the adjustment value.

일 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트를 비교하여 기준 시각을 조정할 수 있다. 구체적으로, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우, 기존의 기준 시각에 조정값을 더해서 기준 시각을 조정할 수 있다. 이는, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 작을 경우에, 출력 패킷을 복호화 장치에 천천히 제공하여야 복호화 장치에서 오버플로가 발생되지 않고, 출력 패킷을 복호화 장치에 천천히 제공하기 위해서는, 기준 시각이 증가되어야 하기 때문이다.According to an embodiment, the stream generator 1400 may adjust the reference time by comparing the ES bit rate in which the actual ES bit rate is preset. In detail, when the actual ES bitrate is smaller than the preset ES bitrate, the stream generator 1400 may adjust the reference time by adding an adjustment value to the existing reference time. This means that when the actual ES bitrate is smaller than the preset ES bitrate, the output packet should be slowly provided to the decryption apparatus so that no overflow occurs in the decryption apparatus. Because it must be increased.

이와 반대로, 스트림 생성부(1400)는 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 큰 경우, 기존의 기준 시각에 조정값을 빼서 기준 시각을 조정할 수 있다. 이는, 실제 ES 비트레이트가 미리 설정된 ES 비트레이트보다 큰 경우에, 출력 패킷을 복호화 장치에 보다 빠른 시간에 제공하여야 복호화 장치에서 언더플로가 발생되지 않고 의도한 시간에 출력 패킷이 복호화되며, 출력 패킷을 복호화 장치에 보다 빠른 시간에 제공하기 위해서는 기준 시각이 감소되어야 하기 때문이다.On the contrary, when the actual ES bitrate is larger than the preset ES bitrate, the stream generator 1400 may adjust the reference time by subtracting an adjustment value from the existing reference time. This means that when the actual ES bitrate is larger than the preset ES bitrate, the output packet must be provided to the decoding device at a faster time, so that the output packet is decoded at the intended time without underflow occurring in the decoding device, and the output packet This is because the reference time must be reduced to provide the decoding apparatus to the decoding apparatus at a faster time.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트를 반영하여 기준 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 아래의 수학식 11에 따라 기준 시각을 조정할 수 있다.In addition, in some embodiments of the present invention, the stream generator 1400 may adjust the reference time by reflecting the actual ES bitrate. For example, the stream generator 1400 may adjust the reference time according to Equation 11 below.

[수학식 11][Equation 11]

tad_mux_ref = t mux_ref × (ESbitrate_set / ESbitrate_act)t ad_mux_ref = t mux_ref × (ES bitrate_set / ES bitrate_act )

여기서, tmux_ref은 기존의 기준 시각을 나타내고, ESbitrate_set는 미리 설정된 ES 비트레이트를 나타내고, ESbitrate_act는 실제 ES 비트레이트를 나타낼 수 있다. Here, t mux_ref may indicate an existing reference time, ES bitrate_set may indicate a preset ES bitrate, and ES bitrate_act may indicate an actual ES bitrate.

또한, 스트림 생성부(1400)는 기준 시각에 소정의 조정값을 가감하는 경우에도 실제 ES 비트레이트를 반영하여 기준 시각을 조정할 수 있다. 예를 들어, 스트림 생성부(1400)는 실제 ES 비트레이트를 획득한 후, 복수의 조정값 중 실제 ES 비트레이트와 미리 설정된 ES 비트레이트와의 차이값에 대응되는 조정값을 선택하고, 선택된 조정값을 기준 시각의 조정에 적용할 수 있다. In addition, even when a predetermined adjustment value is added to or subtracted from the reference time, the stream generator 1400 may adjust the reference time by reflecting the actual ES bit rate. For example, after obtaining the actual ES bit rate, the stream generator 1400 selects an adjustment value corresponding to a difference value between the actual ES bit rate and the preset ES bit rate among the plurality of adjustment values, and selects the selected adjustment. The value can be applied to the adjustment of the reference time.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 실제 ES 비트레이트와 미리 설정된 ES 비트레이트가 부합되지 않은 경우, 출력 패킷의 출력과 관련된 이상상태가 발생되지 않도록 출력 비트레이트를 조정할 수도 있다.Further, in some embodiments of the present invention, the stream generator 1400 adjusts the output bitrate so that an abnormal state related to the output of the output packet does not occur when the actual ES bitrate does not match the preset ES bitrate. It may be.

이와 같이, 스트림 생성부(1400)는 출력 스트림의 기준 시각 또는 출력 스트림을 조정함으로써, 보다 간단하게 출력 패킷의 출력 시간을 조정할 수 있다.In this way, the stream generation unit 1400 can adjust the output time of the output packet more simply by adjusting the reference time or the output stream of the output stream.

또한, 물론, 단계 S3310에서는 출력 스트림의 기준 시각만을 조정하는 방식에 대해 언급하였으나, 이에 한정되지 않고, 단계 S3310의 기준 시각을 조정하는 단계와 단계 S2710의 다중화 시각을 조정하는 단계가 함께 수행되어 출력 패킷의 출력시점이 조정될 수 있다.In addition, of course, the method of adjusting only the reference time of the output stream was mentioned in step S3310, but the present invention is not limited to this. The output point of the packet can be adjusted.

또한, 본 발명의 몇몇 실시예에서, 스트림 생성부(1400)는 조정된 기준 시각에 따라 출력 패킷들을 다중화할 수 있다(S3320). 즉, 스트림 생성부(1400)는 다중화 시각과 조정된 기준 시각을 비교하여 출력 패킷들을 다중화함으로써 출력 스트림을 생성할 수 있다. 단계 S3320에 대해서는 단계 S1730 및 단계 S2720에서 설명된 내용이 적용될 수 있으므로, 자세한 설명은 생략한다.In addition, in some embodiments of the present invention, the stream generator 1400 may multiplex output packets according to the adjusted reference time (S3320). That is, the stream generator 1400 may generate an output stream by multiplexing output packets by comparing the multiplexed time with the adjusted reference time. Since the content described in steps S1730 and S2720 may be applied to step S3320, a detailed description thereof will be omitted.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (20)

출력 패킷들을 포함하는 출력 스트림을 복호화 장치에 제공하는 스트림 생성장치의 상기 출력 패킷 제공시점 조정 방법에 있어서,
제1 출력 패킷 및 제2 출력 패킷을 획득하는 단계;
상기 제1 출력 패킷에 제1 다중화 시각을 부여하고, 상기 제2 출력 패킷에 상기 제1 다중화 시각과 다른 제2 다중화 시각을 부여하는 단계; 및
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 기초로 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 다중화하여, 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하는 단계
를 포함하되,
상기 복호화 장치에서 상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류가 발생되지 않도록, 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점을 조정하고,
상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류는, 상기 복호화 장치의 저장부에서 오버플로가 발생되는 제1 오류 및 상기 복호화 장치의 저장부에서 언더플로가 발생되는 제2 오류 중 적어도 하나를 포함하는,
출력 패킷 제공시점 조정 방법.
In the output packet providing time adjustment method of the stream generating device for providing an output stream including output packets to the decoding device,
Obtaining a first output packet and a second output packet;
Assigning a first multiplexed time to the first output packet and giving a second multiplexed time different from the first multiplexed time to the second output packet; And
The first output packet and the second output packet are multiplexed based on the first multiplexed time and the second multiplexed time, and the first output packet and the second output packet are provided to the decoding apparatus as the output stream. Steps to
Including,
Adjust a time point at which the first output packet and the second output packet are provided to the decoding apparatus such that an error associated with the first output packet and the second output packet does not occur in the decoding apparatus;
The error associated with the first output packet and the second output packet may include at least one of a first error in which an overflow occurs in the storage of the decoding apparatus and a second error in which an underflow occurs in the storage of the decoding apparatus. Including,
How to adjust output packet timing.
제1항에 있어서,
상기 제1 출력 패킷 및 상기 제2 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하는 단계는,
소정의 출력 비트레이트를 기초로 상기 제1 출력 패킷을 다중화하기 위한 제1 기준 시각 및 상기 제2 출력 패킷을 다중화하기 위한 제2 기준 시각을 설정하는 단계;
상기 제1 기준 시각과 상기 제1 다중화 시각을 비교하여 상기 출력 스트림에 상기 제1 출력 패킷을 시퀀싱하는 단계; 및
상기 제2 기준 시각과 상기 제2 다중화 시각을 비교하여 상기 출력 스트림에 상기 제2 출력 패킷을 시퀀싱하는 단계
를 포함하는,
출력 패킷 제공시점 조정 방법.
The method of claim 1,
The step of providing the first output packet and the second output packet to the decoding apparatus as the output stream,
Setting a first reference time for multiplexing the first output packet and a second reference time for multiplexing the second output packet based on a predetermined output bitrate;
Comparing the first reference time with the first multiplexed time to sequence the first output packet in the output stream; And
Sequencing the second output packet to the output stream by comparing the second reference time with the second multiplexed time
Including,
How to adjust output packet timing.
제2항에 있어서,
상기 제1 출력 패킷 및 상기 제2 출력 패킷을 제1 비트레이트로 획득하도록 미리 설정하는 단계
를 더 포함하고,
상기 제1 출력 패킷에 제1 다중화 시각을 부여하고, 상기 제2 출력 패킷에 상기 제1 다중화 시각과 다른 제2 다중화 시각을 부여하는 단계는,
상기 제1 비트레이트를 기초로 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 부여하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 2,
Presetting to obtain the first output packet and the second output packet at a first bitrate
More,
Giving a first multiplexed time to the first output packet, and giving a second multiplexed time different from the first multiplexed time to the second output packet,
Characterized in that the first multiplexed time and the second multiplexed time are given based on the first bitrate.
How to adjust output packet timing.
제3항에 있어서,
상기 제1 비트레이트가 아닌 제2 비트레이트로 상기 제1 출력 패킷 및 제2 출력 패킷이 획득될 경우,
상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점이 조정되도록 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계
를 더 포함하는,
출력 패킷 제공시점 조정 방법.
The method of claim 3,
When the first output packet and the second output packet are obtained at a second bit rate other than the first bit rate,
Adjusting the first multiplexed time and the second multiplexed time such that a time point at which the first output packet and the second output packet are provided to the decoding apparatus is adjusted.
Further comprising,
How to adjust output packet timing.
제4항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제2 비트레이트를 이용하지 않고 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 4, wherein
Adjusting the first multiplexed time and the second multiplexed time,
Characterized in that the first multiplexed time and the second multiplexed time are adjusted without using the second bitrate.
How to adjust output packet timing.
제5항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제1 다중화 시각 및 상기 제2 다중화 시각에 소정의 조정값을 적용하여 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 5,
Adjusting the first multiplexed time and the second multiplexed time,
Characterized in that the first multiplexed time and the second multiplexed time are adjusted by applying a predetermined adjustment value to the first multiplexed time and the second multiplexed time.
How to adjust output packet timing.
제6항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제1 비트레이트가 상기 제2 비트레이트보다 클 경우, 상기 제1 다중화 시각 및 상기 제2 다중화 시각에 상기 소정의 조정값만큼 증가시켜 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 6,
Adjusting the first multiplexed time and the second multiplexed time,
If the first bitrate is larger than the second bitrate, adjusting the first multiplexed time and the second multiplexed time by increasing the first multiplexed time and the second multiplexed time by the predetermined adjustment value. Characterized by
How to adjust output packet timing.
제6항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제1 비트레이트가 상기 제2 비트레이트보다 작을 경우, 상기 제1 다중화 시각 및 상기 제2 다중화 시각에 상기 소정의 조정값만큼 감소시켜 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 6,
Adjusting the first multiplexed time and the second multiplexed time,
When the first bitrate is smaller than the second bitrate, adjusting the first multiplexed time and the second multiplexed time by decreasing the first multiplexed time and the second multiplexed time by the predetermined adjustment value. Characterized by
How to adjust output packet timing.
제4항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제2 비트레이트를 이용하여 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 4, wherein
Adjusting the first multiplexed time and the second multiplexed time,
Characterized in that the first multiplexed time and the second multiplexed time are adjusted using the second bit rate.
How to adjust output packet timing.
제9항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제1 다중화 시각 및 상기 제2 다중화 시각에 상기 제1 비트레이트와 상기 제2 비트레이트의 비율을 적용하여 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 9,
Adjusting the first multiplexed time and the second multiplexed time,
Characterized in that the first multiplexed time and the second multiplexed time are adjusted by applying a ratio of the first bit rate and the second bit rate to the first multiplexed time and the second multiplexed time.
How to adjust output packet timing.
제9항에 있어서,
상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계는,
상기 제1 비트레이트와 상기 제2 비트레이트의 차이를 기초로 복수의 조정값 중 소정의 조정값을 선택하는 단계; 및
상기 제1 다중화 시각 및 상기 제2 다중화 시각에 상기 선택된 소정의 조정값을 적용하여 상기 제1 다중화 시각 및 상기 제2 다중화 시각을 조정하는 단계를 포함하는,
출력 패킷 제공시점 조정 방법.
The method of claim 9,
Adjusting the first multiplexed time and the second multiplexed time,
Selecting a predetermined adjustment value from a plurality of adjustment values based on a difference between the first bit rate and the second bit rate; And
Adjusting the first multiplexed time and the second multiplexed time by applying the selected predetermined adjustment value to the first multiplexed time and the second multiplexed time;
How to adjust output packet timing.
제1항에 있어서,
상기 복호화 장치에서 상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류가 발생된 경우, 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점을 조정하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 1,
When an error associated with the first output packet and the second output packet occurs in the decoding apparatus, the time point at which the first output packet and the second output packet are provided to the decoding apparatus is adjusted.
How to adjust output packet timing.
제12항에 있어서,
상기 복호화 장치로부터 상기 오류에 대한 정보를 획득하고, 상기 정보를 기초로 상기 복호화 장치에서 상기 오류가 발생되었는지 여부를 판단하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 12,
Acquiring information about the error from the decoding device, and determining whether the error has occurred in the decoding device based on the information.
How to adjust output packet timing.
제12항에 있어서,
상기 스트림 생성장치에 포함된 가상버퍼를 기초로 상기 복호화 장치의 저장부에 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 저장되는 시간 및 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치의 저장부에서 제거되는 시간을 예상하고,
상기 예상된 상기 복호화 장치의 저장부에 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 저장되는 시간 및 상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치의 저장부에서 제거되는 시간을 기초로 상기 복호화 장치에서 상기 오류가 발생되었는지 여부를 판단하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
The method of claim 12,
A time at which the first output packet and the second output packet are stored in a storage unit of the decoding apparatus based on the virtual buffer included in the stream generation device, and the first output packet and the second output packet are stored in the decoding apparatus. Estimate the time it will be removed from
Based on a time at which the first output packet and the second output packet are stored in the expected storage unit of the decoding device, and a time at which the first output packet and the second output packet are removed from the storage unit of the decoding device. Characterized in that the decoding apparatus determines whether the error has occurred,
How to adjust output packet timing.
삭제delete 제1항에 있어서,
상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류는 상기 제1 출력 패킷 및 상기 제2 출력 패킷 중 적어도 하나가 상기 복호화 장치에서 의도된 시간에 복호화되지 못하는 것을 포함하는,
출력 패킷 제공시점 조정 방법.
The method of claim 1,
An error associated with the first output packet and the second output packet includes that at least one of the first output packet and the second output packet cannot be decoded at an intended time in the decoding apparatus;
How to adjust output packet timing.
제3항에 있어서,
상기 제1 비트레이트가 아닌 제2 비트레이트로 상기 제1 출력 패킷 및 제2 출력 패킷이 획득될 경우,
상기 제1 출력 패킷 및 상기 제2 출력 패킷이 상기 복호화 장치에 제공되는 시점이 조정되도록 상기 제1 기준 시각 및 상기 제2 기준 시각을 조정하는 단계
를 더 포함하는,
출력 패킷 제공시점 조정 방법.
The method of claim 3,
When the first output packet and the second output packet are obtained at a second bit rate other than the first bit rate,
Adjusting the first reference time and the second reference time such that a time point at which the first output packet and the second output packet are provided to the decoding apparatus is adjusted.
Further comprising,
How to adjust output packet timing.
출력 패킷들을 포함하는 출력 스트림을 복호화 장치에 제공하는 스트림 생성장치의 상기 출력 패킷 제공시점 조정 방법에 있어서,
제1 출력 패킷 및 제2 출력 패킷을 제1 비트레이트로 획득하도록 미리 설정하는 단계;
상기 제1 출력 패킷 및 상기 제2 출력 패킷을 획득하는 단계;
제1 시퀀스 - 상기 제1 시퀀스는 상기 제1 출력 패킷, 상기 제2 출력 패킷 및 적어도 하나의 Null 패킷이 상기 출력 스트림에 삽입되는 순서를 나타냄 - 로, 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 다중화하는 단계; 및
상기 제1 출력 패킷 및 상기 제2 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하는 단계
를 포함하되,
상기 제1 출력 패킷 및 상기 제2 출력 패킷을 획득하는 단계에서, 상기 제1 비트레이트가 아닌 제2 비트레이트로 상기 제1 출력 패킷 및 제2 출력 패킷이 획득될 경우,
상기 복호화 장치에서 상기 제1 출력 패킷 및 상기 제2 출력 패킷과 관련된 오류가 발생되지 않도록, 상기 제1 시퀀스와 상이한 제2 시퀀스로 상기 제1 출력 패킷 및 상기 제2 출력 패킷을 다중화하는 것을 특징으로 하는,
출력 패킷 제공시점 조정 방법.
In the output packet providing time adjustment method of the stream generating device for providing an output stream including output packets to the decoding device,
Presetting to obtain a first output packet and a second output packet at a first bitrate;
Obtaining the first output packet and the second output packet;
A first sequence, wherein the first sequence indicates the order in which the first output packet, the second output packet and at least one null packet are inserted into the output stream; and wherein the first output packet and the second output packet. Multiplexing; And
Providing the first output packet and the second output packet to the decoding apparatus as the output stream.
Including,
In the step of acquiring the first output packet and the second output packet, when the first output packet and the second output packet are obtained at a second bit rate instead of the first bit rate,
The decoding apparatus multiplexes the first output packet and the second output packet in a second sequence different from the first sequence so that an error associated with the first output packet and the second output packet does not occur. doing,
How to adjust output packet timing.
제1항 내지 제14항 및 제16항 내지 제18항 중 어느 하나의 항의 방법을 수행하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체.
19. A computer-readable recording medium having recorded thereon a program for performing the method of any one of claims 1-14 and 16-18.
출력 패킷을 포함하는 출력 스트림을 복호화 장치에 제공하는 스트림 생성장치에 있어서,
상기 스트림 생성장치는 제어부를 포함하고,
상기 제어부는,
제1 출력 패킷을 획득하고,
상기 제1 출력 패킷에 제1 다중화 시각을 부여하고,
상기 제1 다중화 시각을 기초로 상기 제1 출력 패킷을 다중화하여, 상기 제1 출력 패킷을 상기 출력 스트림으로써 상기 복호화 장치에 제공하되,
상기 복호화 장치에서 상기 제1 출력 패킷과 관련된 오류가 발생되지 않도록, 상기 제1 출력 패킷이 상기 복호화 장치에 제공되는 시점을 조정하고,
상기 제1 출력 패킷과 관련된 오류는, 상기 복호화 장치의 저장부에서 오버플로가 발생되는 제1 오류 및 상기 복호화 장치의 저장부에서 언더플로가 발생되는 제2 오류 중 적어도 하나를 포함하는,
스트림 생성 장치.
A stream generating device for providing an output stream including an output packet to a decoding device,
The stream generation device includes a control unit,
The control unit,
Obtain a first output packet,
Give a first multiplexing time to the first output packet,
Multiplexing the first output packet based on the first multiplexing time, and providing the first output packet as the output stream to the decoding apparatus;
Adjust a time point at which the first output packet is provided to the decoding device such that an error associated with the first output packet does not occur in the decoding device;
The error associated with the first output packet includes at least one of a first error in which an overflow occurs in the storage of the decoding apparatus and a second error in which an underflow occurs in the storage of the decoding apparatus.
Stream generator.
KR1020180021142A 2017-12-28 2018-02-22 The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data KR102034373B1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020180021142A KR102034373B1 (en) 2018-02-22 2018-02-22 The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data
PCT/KR2018/003059 WO2019132119A1 (en) 2017-12-28 2018-03-15 Multiplexing method and device for broadcast signal transmission
US16/032,983 US10700799B2 (en) 2017-12-28 2018-07-11 Method and apparatus for broadcast signal transmission
EP18186170.9A EP3506642A1 (en) 2017-12-28 2018-07-27 The method and apparatus for broadcast signal transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180021142A KR102034373B1 (en) 2018-02-22 2018-02-22 The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data

Publications (2)

Publication Number Publication Date
KR20190101145A KR20190101145A (en) 2019-08-30
KR102034373B1 true KR102034373B1 (en) 2019-10-18

Family

ID=67776231

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180021142A KR102034373B1 (en) 2017-12-28 2018-02-22 The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data

Country Status (1)

Country Link
KR (1) KR102034373B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1499135A3 (en) * 2003-07-18 2006-04-12 Canon Kabushiki Kaisha Digital data multiplexing and demultiplexing

Also Published As

Publication number Publication date
KR20190101145A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
JP6982021B2 (en) Receiving method and receiving device
US9668007B2 (en) Adaptive streaming transcoder synchronization
JP6961778B2 (en) Transmission method, reception method, transmitter and receiver
US8046815B2 (en) Optical network for bi-directional wireless communication
CA2965667C (en) Methods of implementing multi mode trickplay
CA2839553C (en) Media content transceiving method and transceiving apparatus using same
US20130293677A1 (en) Reception device for receiving a plurality of real-time transfer streams, transmission device for transmitting same, and method for playing multimedia content
US20130346566A1 (en) Apparatus and method of transmitting and receiving associated broadcasting contents based on heterogeneous network
EP3226566A1 (en) Transmission device, transmission method, reception device, and reception method
JP2017034664A (en) Transmission method, reception method, transmission device and reception device
US9854019B2 (en) Method and apparatus for modifying a stream of digital content
US20180288452A1 (en) Method of delivery audiovisual content and corresponding device
US20130250975A1 (en) Method and device for packetizing a video stream
US10700799B2 (en) Method and apparatus for broadcast signal transmission
KR102034373B1 (en) The method and apparatus for multiplexing data for broadcast transmission for preventing error in a device that performs decoding the data
KR20170130883A (en) Method and apparatus for virtual reality broadcasting service based on hybrid network
KR102001067B1 (en) The method and apparatus for multiplexing broadcast signal transmission
KR102211539B1 (en) The method and apparatus for the additional information generation for the streaming complying with buffer model
KR102324504B1 (en) Apparatus and method for transmitting content in a network
Yun et al. A hybrid architecture based on TS and HTTP for real-time 3D video transmission
KR101347827B1 (en) Method and apparatus for changing active audio codec of mpeg-ts signal processor
KR20150045869A (en) Video reception unit to provide hybrid service based on transport stream system target decoder model
KR20120058373A (en) Video transmission and device playing system based on http streaming using svc server
KR20130115975A (en) Transmitting system and receiving device for providing hybrid service, and methods thereof
KR20070002964A (en) Method for providing multi level channel in digital broadcasting system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant