CN104702977A - Achievement method for searching TS stream synchronization head of digital TV - Google Patents

Achievement method for searching TS stream synchronization head of digital TV Download PDF

Info

Publication number
CN104702977A
CN104702977A CN201510095965.8A CN201510095965A CN104702977A CN 104702977 A CN104702977 A CN 104702977A CN 201510095965 A CN201510095965 A CN 201510095965A CN 104702977 A CN104702977 A CN 104702977A
Authority
CN
China
Prior art keywords
byte
synchronous
cnt
sync
data
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201510095965.8A
Other languages
Chinese (zh)
Inventor
王绍徐
袁三男
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai University of Electric Power
University of Shanghai for Science and Technology
Original Assignee
Shanghai University of Electric Power
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 Shanghai University of Electric Power filed Critical Shanghai University of Electric Power
Priority to CN201510095965.8A priority Critical patent/CN104702977A/en
Publication of CN104702977A publication Critical patent/CN104702977A/en
Pending legal-status Critical Current

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention relates to an achievement method for searching a TS stream synchronization head of a digital TV. The method is that a synchronizing state is achieved after detecting A successive synchronizing bits; a synchronizing losing state is achieved when B successive synchronizing bits are not detected under the synchronizing state. Compared with the prior art, the method has the advantages of quickly searching the TS stream synchronizing head, and being high in efficiency, high in precision, and low in cost.

Description

A kind of implementation method of digital TV TS stream synchronous head search
Technical field
The present invention relates to a kind of TS and flow synchronous head searching method, especially relate to the implementation method of a kind of digital TV TS stream synchronous head search.
Background technology
Digital Television is the new technology just grown up recent years, develops very fast.Code stream form in Digital Television is TS stream mainly, and carrying out analyzing and processing to Digital Television must realize for TS stream.TS stream has the code stream form of regulation, in order to analyzing and processing TS stream, must find the complete packet form of TS, and first must find the packet header that TS wraps, i.e. the synchronous head of TS stream.The problems such as the synchronous head ubiquity search efficiency searching TS stream in prior art is low, the time of searching is long.
Summary of the invention
Object of the present invention be exactly in order to overcome above-mentioned prior art exist defect and the implementation method that a kind of digital TV TS stream synchronous head is searched for is provided.
Object of the present invention can be achieved through the following technical solutions:
An implementation method for digital TV TS stream synchronous head search, is characterized in that, think enter synchronous regime when continuous A sync byte being detected, does not detect that B sync byte thinks synch lost state continuously under synchronous regime.
Preferably, described A is 4-6, and B is 2-4.
Preferably, described A is 5, and B is 3.
Preferably, described TS stream format is: 4 byte TS heads and 184 byte TS data, wherein TS head is: 1 byte of sync position is 0x47,1 error of transmission instruction, 1 load start instruction, 1 transmission priority, 13 PID, 2 bit encryptions control, and 2 adjustment fields control, and 4 identical PID TS wrap counting.
Preferably, the method specifically comprises the following steps:
1) arranging synchronous regime during initialization is asynchronous N_SYNC, counting CNT=0;
2) receive when cushioning full 188 byte data and start process;
3) whether if synchronous regime is asynchronous N_SYNC, then comparing current data is 0x47:
If a) current data is not 0x47, then counts CNT clear 0, abandon 1 byte data, return step 2;
If b) current data is 0x47, then counts CNT and add 1, and perform step c);
C) judge whether counting CNT reaches 5, if not to 5, then abandons 188 byte datas, returns step 2;
If d) count CNT to reach 5, then thought synchronously, arranging synchronous regime is synchronous SYNC, and counting CNT=0, processes this TS bag data, return step 2;
4) whether if synchronous regime is synchronous SYNC, then comparing current data is 0x47:
A) if current data is 0x47, then count CNT clear 0, process this TS bag data, return step 2;
B) if current data is not 0x47, then count CNT and add 1, and perform step C);
C) count CNT and whether reach 3, if not to 3, then process this TS bag data, return step 2;
D) if counting CNT reaches 3, then think and lose synchronously, putting synchronous regime is asynchronous N_SYNC, and counting CNT clear 0, abandons 1 byte data, return step 2.
Compared with prior art, the present invention has TS and flows that synchronous head retrieval rate is fast, efficiency is high, precision is accurate, realize low cost and other advantages.
Accompanying drawing explanation
Fig. 1 is concrete flow chart of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
Embodiment
The bag that TS flows employing 188 byte length is that unit transmits, current flux is generally about 40Mbps, Digital Television adopts mpeg2 coding, often overlap SD joint target flow and be generally 4-5Mbps, therefore each frequency of Digital Television and each TS flow reusable 8 programs, actual multiplexing 6 programs many.
TS stream format is: TS head (4 byte) and TS data (184 byte).TS head is: synchronous (1 byte) is 0x47, error of transmission instruction (1), load start instruction (1), transmission priority (1), PID (13), control extension (2), adjustment field controls (2), identical PID TS wraps counting (4), totally 4 bytes.First must find synchronous head when therefore analyzing conversion TS, then carry out different process according to different PID for each TS bag.
The algorithm of search synchronous head as shown in Figure 1.First need to carry out the synchronous search of TS when analyzing TS bag in Fig. 1, be divided into two states, be i.e. synchronous and synchronization loss.Think when continuous 5 sync bytes being detected and enter synchronous regime, under synchronous regime, do not detect continuously that 3 sync bytes think synchronization loss, under carrying out must being in synchronous regime when TS bag is analyzed.Process the analysis and processing module that 188 byte block are TS bag in figure, carry out different process depending on different application.
1. arranging synchronous regime during initialization is asynchronous (N_SYNC), counting CNT=0.
2. receive when cushioning full 188 byte data and start process.
Whether if 3. synchronous regime is asynchronous (N_SYNC), then comparing current data is 0x47:
If a) current data is not 0x47, then counts CNT clear 0, abandon 1 byte data, return step 2.
If b) current data is 0x47, then counts CNT and add 1;
C) count CNT and whether reach 5, if not to 5, then abandon 188 byte datas, return step 2.
If d) count CNT to reach 5, then think synchronously, synchronous regime has been set for synchronous (SYNC), counting CNT=0; Process this TS bag data (188 byte), return step 2.
4. whether if synchronous regime is synchronous (SYNC), then comparing current data is 0x47:
If a) current data is 0x47, then counts CNT clear 0, process this TS bag data (188 byte), return step 2.
If b) current data is not 0x47, then counts CNT and add 1;
C) count CNT and whether reach 3, if not to 3, then process this TS bag data (188 byte), return step 2.
If d) count CNT to reach 3, then think and lose synchronously, putting synchronous regime is asynchronous (N_SYNC), and counting CNT clear 0, abandons 1 byte data, return step 2.

Claims (5)

1. an implementation method for digital TV TS stream synchronous head search, is characterized in that, think enter synchronous regime when continuous A sync byte being detected, does not detect that B sync byte thinks synch lost state continuously under synchronous regime.
2. the implementation method of a kind of digital TV TS stream synchronous head search according to claim 1, it is characterized in that, described A is 4-6, and B is 2-4.
3. the implementation method of a kind of digital TV TS stream synchronous head search according to claim 2, it is characterized in that, described A is 5, and B is 3.
4. the implementation method of a kind of digital TV TS stream synchronous head search according to claim 3, it is characterized in that, described TS stream format is: 4 byte TS heads and 184 byte TS data, and wherein TS head is: 1 byte of sync position is 0x47,1 error of transmission instruction, 1 load start instruction, 1 transmission priority, 13 PID, 2 bit encryptions control, 2 adjustment fields control, and 4 identical PID TS wrap counting.
5. the implementation method of a kind of digital TV TS stream synchronous head search according to claim 4, it is characterized in that, the method specifically comprises the following steps:
1) arranging synchronous regime during initialization is asynchronous N_SYNC, counting CNT=0;
2) receive when cushioning full 188 byte data and start process;
3) whether if synchronous regime is asynchronous N_SYNC, then comparing current data is 0x47:
If a) current data is not 0x47, then counts CNT clear 0, abandon 1 byte data, return step 2;
If b) current data is 0x47, then counts CNT and add 1, and perform step c);
C) judge whether counting CNT reaches 5, if not to 5, then abandons 188 byte datas, returns step 2;
If d) count CNT to reach 5, then thought synchronously, arranging synchronous regime is synchronous SYNC, and counting CNT=0, processes this TS bag data, return step 2;
4) whether if synchronous regime is synchronous SYNC, then comparing current data is 0x47:
A) if current data is 0x47, then count CNT clear 0, process this TS bag data, return step 2;
B) if current data is not 0x47, then count CNT and add 1, and perform step C);
C) count CNT and whether reach 3, if not to 3, then process this TS bag data, return step 2;
D) if counting CNT reaches 3, then think and lose synchronously, putting synchronous regime is asynchronous N_SYNC, and counting CNT clear 0, abandons 1 byte data, return step 2.
CN201510095965.8A 2015-03-04 2015-03-04 Achievement method for searching TS stream synchronization head of digital TV Pending CN104702977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510095965.8A CN104702977A (en) 2015-03-04 2015-03-04 Achievement method for searching TS stream synchronization head of digital TV

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510095965.8A CN104702977A (en) 2015-03-04 2015-03-04 Achievement method for searching TS stream synchronization head of digital TV

Publications (1)

Publication Number Publication Date
CN104702977A true CN104702977A (en) 2015-06-10

Family

ID=53349687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510095965.8A Pending CN104702977A (en) 2015-03-04 2015-03-04 Achievement method for searching TS stream synchronization head of digital TV

Country Status (1)

Country Link
CN (1) CN104702977A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020107314A1 (en) * 2018-11-29 2020-06-04 鹤壁天海电子信息系统有限公司 Radio interface data synchronization head searching method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1781036A2 (en) * 2005-09-15 2007-05-02 Samsung Electronics Co.,Ltd. Synchronization method and apparatus of moving picture experts group transport stream for reducing initial delay
CN101516029A (en) * 2009-02-27 2009-08-26 航天恒星科技有限公司 Frame synchronous byte recognition system based on FPGA and recognition method
CN101835036A (en) * 2009-03-13 2010-09-15 北京北广科技股份有限公司 Method for converting ASI code stream into SPI code stream and interface circuit for realizing same
CN102256118A (en) * 2011-08-15 2011-11-23 成都市广达电子电讯技术开发有限公司 Synchronous circuit and method for TS (Telecommunication Service) code streams
CN103596043A (en) * 2013-11-14 2014-02-19 上海电力学院 Method for converting TS into PS in digital television

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1781036A2 (en) * 2005-09-15 2007-05-02 Samsung Electronics Co.,Ltd. Synchronization method and apparatus of moving picture experts group transport stream for reducing initial delay
CN101516029A (en) * 2009-02-27 2009-08-26 航天恒星科技有限公司 Frame synchronous byte recognition system based on FPGA and recognition method
CN101835036A (en) * 2009-03-13 2010-09-15 北京北广科技股份有限公司 Method for converting ASI code stream into SPI code stream and interface circuit for realizing same
CN102256118A (en) * 2011-08-15 2011-11-23 成都市广达电子电讯技术开发有限公司 Synchronous circuit and method for TS (Telecommunication Service) code streams
CN103596043A (en) * 2013-11-14 2014-02-19 上海电力学院 Method for converting TS into PS in digital television

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020107314A1 (en) * 2018-11-29 2020-06-04 鹤壁天海电子信息系统有限公司 Radio interface data synchronization head searching method and device

Similar Documents

Publication Publication Date Title
EP3657808B1 (en) Transmission method, receiving method, transmission device, and receiving device
US11523191B2 (en) Transmission method, reception method, transmission apparatus, and reception apparatus
US8532171B1 (en) Multiple stream adaptive bit rate system
EP2661848B1 (en) Apparatus and method for supporting variable length of transport packet in video and audio communication system
US20210345008A1 (en) Transmission method, reception method, transmission apparatus, and reception apparatus
CN102404348A (en) Multimedia data transport protocol
CN102665141B (en) AVS (audio video standard) audio and video presynchronizing method based on RTP (real time protocol) package
CN103731716B (en) Method for synchronizing audio and video in TS stream playing
EP2001219A1 (en) Method and system for unified start code emulation prevention bits processing for AVS
CN102547299A (en) Audio and video synchronous control method based on moving picture experts group (MPEG)-2
CN106790044B (en) Method and device for converting TS (transport stream) code stream into RTP (real-time transport protocol) code stream
CN1838773B (en) Apparatus and methods for video synchronization by parsing time stamps from buffered packets
CN104702977A (en) Achievement method for searching TS stream synchronization head of digital TV
US9615130B2 (en) Method and device for processing multimedia frame and storage medium
CN102665140A (en) RTP (real-time transport protocol) packaging method of AVS (audio video coding standard) video frame
CN105573952A (en) Multi-channel data transmission system
CN103067745B (en) A kind of cutting method of video data and device, online editing method and system
CN104768062A (en) Real-time video stream seamless switching method
CN103596043B (en) Method for converting TS into PS in digital television
CN101540899B (en) I frame resolution method and I frame resolver in streaming media system
US20090265478A1 (en) Method and apparatus for data stream analysis and decoding apparatus
US20110096775A1 (en) System and method for multiplexing and streaming contents
CN102934435B (en) Video display devices
CN101982981B (en) Classified detection device for digital television transport streams
KR101349487B1 (en) Apparatus and method for creating variable mpeg-2 transport packet

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150610

RJ01 Rejection of invention patent application after publication