[go: up one dir, main page]

KR20020002611A - Sync byte searching method for detecting header of packet stream - Google Patents

Sync byte searching method for detecting header of packet stream Download PDF

Info

Publication number
KR20020002611A
KR20020002611A KR1020000036835A KR20000036835A KR20020002611A KR 20020002611 A KR20020002611 A KR 20020002611A KR 1020000036835 A KR1020000036835 A KR 1020000036835A KR 20000036835 A KR20000036835 A KR 20000036835A KR 20020002611 A KR20020002611 A KR 20020002611A
Authority
KR
South Korea
Prior art keywords
byte
sync
bit pattern
comparison
sync byte
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.)
Withdrawn
Application number
KR1020000036835A
Other languages
Korean (ko)
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 KR1020000036835A priority Critical patent/KR20020002611A/en
Publication of KR20020002611A publication Critical patent/KR20020002611A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/89Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

본 발명은 검색 시간을 단축하고, 잘못된 판단으로 인해 발생하는 데이터의 손실을 보상하기 위한 동기 바이트 검색 방법을 제공하기 위한 것으로, 이를 위해 본 발명은 전송 패킷 다중 분리 장치에서 입력되는 패킷 스트림의 헤더 부분을 검출하기 위한 동기 바이트 검색 방법에 있어서, 상기 패킷 스트림을 입력받아 최초로 동기 바이트의 비트 패턴과 일치하는 바이트를 검색하는 제1 단계; 상기 제1 단계에서 검색된 제1 바이트의 그 다음 바이트가 상기 동기 바이트의 비트 패턴과 일치하는 지를 비교하는 제2 단계; 상기 제2 단계의 비교 결과, 상기 제1 바이트의 그 다음 제2 바이트가 상기 동기 바이트의 비트 패턴과 일치할 때 플래그를 발생하는 제3 단계; 상기 제1 바이트로부터 패킷의 크기만큼 뒤에 있는 제3 바이트와, 상기 제3 바이트의 그 이전 바이트인 제4 바이트와, 상기 제3 바이트의 그 다음 바이트인 제5 바이트가 상기 동기 바이트의 비트 패턴과 각각 일치하는 지를 비교하는 제4 단계; 상기 제4 단계의 비교 결과, 상기 제4 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제5 단계; 상기 제4 단계의 비교 결과, 상기 제4 바이트 및 상기 제3 바이트가 상기 동기 바이트의 비트 패턴과 일치하면 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제3 바이트로부터 패킷의 크기만큼 뒤에 있는 제6 바이트를 상기 동기 바이트의 비트 패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로 판단하는 제6 단계; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되었으면, 상기 제6 바이트와 상기 제6 바이트의 그 다음 바이트인 제7 바이트를 상기 동기 바이트 비트 패턴과 각각 비교하여 어느 하나라도 일치하면 상기 패킷 스트림이 동기된 것으로 판단하는 제7 단계; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기 바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되지 않았으면, 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제6 바이트를 상기 동기 바이트의 비트 패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로 판단하는 제8 단계; 및 상기 제4 단계의 비교 결과, 상기 제5 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제9 단계를 포함한다.The present invention provides a method for retrieving a sync byte to shorten a retrieval time and compensate for a loss of data caused by a wrong determination. To this end, the present invention provides a header portion of a packet stream input from a transport packet multiplexing apparatus. A sync byte search method for detecting a data, comprising: a first step of receiving a packet stream and searching for a byte matching a bit pattern of a sync byte; A second step of comparing whether a next byte of the first byte retrieved in the first step matches a bit pattern of the sync byte; A third step of generating a flag when a result of the comparison of the second step is that a next second byte of the first byte matches a bit pattern of the sync byte; A third byte after the size of the packet from the first byte, a fourth byte that is the previous byte of the third byte, and a fifth byte that is the next byte of the third byte, A fourth step of comparing each match; A fifth step of repeating from the first step when only the fourth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step; As a result of the comparison in the fourth step, if the fourth byte and the third byte match the bit pattern of the sync byte, it is determined that the third byte is synchronously fixed, and again after the size of the packet from the third byte. A sixth step of comparing the sixth byte to the bit pattern of the sync byte and determining that the packet stream is synchronized; As a result of the comparison of the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and a flag is generated in the third step, the next byte of the sixth byte and the sixth byte Comparing the seventh byte with the sync byte bit pattern, and determining that the packet stream is synchronized if any one of them matches; As a result of the comparison in the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and no flag is generated in the third step, it is determined that the third byte is synchronized and fixed. An eighth step of comparing the sixth byte with the bit pattern of the sync byte again and determining that the packet stream is synchronized; And a ninth step of repeating from the first step when only the fifth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step.

Description

패킷 스트림의 헤더 검출을 위한 동기 바이트 검색 방법{SYNC BYTE SEARCHING METHOD FOR DETECTING HEADER OF PACKET STREAM}SYNC BYTE SEARCHING METHOD FOR DETECTING HEADER OF PACKET STREAM}

본 발명은 디지털 TV의 지상파 전송규격인 VSB(Vestigial Side Band)의 전송 패킷 스트림을 입력받아 PES 패킷으로 파싱(parsing)하는 전송 패킷 다중 분리 장치(demultiplexer)에 관한 것으로, 특히 전송 패킷 다중 분리 장치에서 패킷 스트림의 헤더 부분을 검출하기 위한 동기 바이트(SYNC BYTE) 검색 방법에 관한 것이다.The present invention relates to a transport packet demultiplexer for receiving a transport packet stream of a VSB (Vestigial Side Band), which is a terrestrial transmission standard of digital TV, and parsing it into PES packets. A sync byte (SYNC BYTE) retrieval method for detecting a header portion of a packet stream.

일반적으로 전송 패킷 다중 분리 장치는 보통 디지털 TV용의 MPEG 2(MovingPicture Expert Group 2) 압축 데이터를 비디오 디코더나 오디오 디코더가 기본 스트림(Elementary Stream)을 디코딩할 수 있도록 각 디코더의 전단에 위치하여 수신 튜너와 복조기를 거친 전송 패킷 스트림을 PES 패킷으로 파싱한다.In general, a transport packet multiplexing device usually receives moving picture expert group 2 (MPEG 2) compressed data for digital TV, located at the front of each decoder so that the video decoder or audio decoder can decode the elementary stream. Parse the transport packet stream through the demodulator into PES packets.

종래의 전송 패킷 다중 분리 장치는 동기 바이트를 검색하기 위해서 두 개의 카운터와 두 개의 버퍼를 구비하여, 입력되는 8비트의 데이터를 동기 바이트인 0X47h와 비교하여 일치하면 그 데이터를 동기 바이트라고 가정하여 하나의 카운터를 '1' 증가시킨다. 이후, 그 다음 187번째 바이트를 0X47h와 다시 비교하여 일치하면 카운터를 '1' 증가시키고, 일치하지 않으면 카운터를 '0'으로 리셋한다. 계속해서, 그 다음 187번째 바이트와 0X47h를 비교하여 입력되는 8비트의 데이터가 0X47h와 같으면 카운터를 '1' 증가시켜 카운터의 값이 3이 되면, 이때 입력된 패킷 스트림을 동기 고정된 것으로 간주하고, 이때부터 패킷 스트림에 대한 본격적인 파싱 동작을 수행하게 된다.The conventional transport packet multiplexing device includes two counters and two buffers to retrieve sync bytes. If 8-bit data is matched with the sync byte 0X47h, the data is assumed to be sync bytes. Increments the counter of '1'. After that, the next 187th byte is compared again with 0X47h, and if it matches, the counter is incremented by '1'. If the 8-bit data input by comparing the next 187th byte with 0X47h is equal to 0X47h, the counter is incremented by '1'. When the value of the counter reaches 3, the input packet stream is regarded as synchronous fixed. At this point, full parsing of the packet stream is performed.

여기서, 전송 패킷 다중 분리 장치의 두 개 카운터 중 제1 카운터는 동기 바이트 이후 그 다음번 동기 바이트의 위치를 알아내기 위해 '0'에서 '187'까지를 카운팅할 수 있는 8비트 카운터이고, 제2 카운터는 감지된 동기 바이트(0X47h)의 감지 횟수를 카운팅하기 위한 2비트 카운터이다.Here, the first of the two counters of the transport packet multiplexing device is an 8-bit counter that can count from '0' to '187' to locate the next sync byte after the sync byte, the second counter Is a 2-bit counter for counting the number of detections of the detected sync byte (0X47h).

도 1은 전송 패킷 다중 분리 장치에서 이루어지는 동기 바이트 검색 방법을 설명하기 위한 개념도로서, 도면을 참조하여 종래의 동기 바이트 검색 방법을 보다 구체적으로 설명한다.FIG. 1 is a conceptual diagram illustrating a sync byte searching method performed in a transport packet multiplexing apparatus. The conventional sync byte searching method will be described in more detail with reference to the accompanying drawings.

전송 패킷 다중 분리 장치에서 VSB 또는 QPSK(Quadrature Phase ShiftKeying)의 복조기를 거친 전송 패킷 스트림을 8비트 입력으로 받아서 188 바이트의 길이를 가진 전송 패킷의 헤더 부분을 감지해 다음단의 디코더로 보내게 된다. 그런데, 만약 전송 패킷의 헤더 부분 검출 시 동기 바이트를 찾아내지 못하거나 동기 바이트가 아닌 데이터를 동기 바이트로 잘못 감지하게 되면 그 다음의 모든 데이터가 다음단의 디코더에서 디코딩되지 못하게 된다.In a transport packet multiplexing device, a transport packet stream that has undergone a VSB or quadrature phase shift keying (QPSK) demodulator is received as an 8-bit input, and a header portion of a transport packet having a length of 188 bytes is detected and sent to a next decoder. However, if the header portion of the transport packet is not detected, if the sync byte is not found or the data other than the sync byte is incorrectly detected as the sync byte, all subsequent data cannot be decoded by the next decoder.

따라서, 종래의 전송 패킷 다중 분리 장치에서 동기 바이트를 검색하기 위해, 입력되는 8비트의 데이터가 동기 바이트의 비트 패턴인 0X47h로 들어오는 지를 검사하여 만약 0X47h의 비트 패턴으로 입력되면 카운터의 제2 카운터를 '1'만큼 증가시키고, 그 다음 8비트의 데이터부터 차례로 제1 카운터의 카운트를 증가시키면서 입력되는 8비트의 데이터 수를 체크하게 된다. 이때, 제1 카운터의 카운트 횟수가 '187'이 되면 총 188 바이트의 1개의 전송 패킷을 입력받은 것으로 생각하고, 제1 카운터를 '0'으로 리셋한 후 다시 그 바로 다음의 8비트 데이터가 동기 바이트의 비트 패턴인 0X47h로 들어오는 지를 검사하여 0X47h 비트 패턴으로 입력되면 제2 카운터를 '1' 증가시킨다.Therefore, in order to retrieve the sync byte in the conventional transport packet multiplexing device, it is checked whether the input 8-bit data enters 0X47h, which is the bit pattern of the sync byte, and if it is input in the bit pattern of 0X47h, the second counter of the counter is checked. It increments by '1' and then checks the number of 8-bit data input by increasing the count of the first counter in order from the next 8-bit data. At this time, when the number of times of the first counter reaches '187', one transmission packet having a total of 188 bytes is considered to be input, and after the first counter is reset to '0', the next 8-bit data is synchronized again. The second counter is incremented by '1' when it is input in the 0X47h bit pattern.

계속해서, 제1 카운터의 카운트를 8비트의 데이터가 입력될 때마다 '1'씩 증가시키면서 들어오는 데이터의 수를 카운트하고, 제1 카운터의 카운트가 다시 '187'이 되면 두 번째의 전송 패킷을 입력받은 것으로 판단하여 제1 카운터를 '0'으로 리셋한 후 그 바로 다음의 8비트 데이터가 0X47의 동기 바이트인지를 확인한다. 그 결과, 8비트 데이터가 0X47 비트 패턴과 일치하게 되면 현재 입력되고 있는 전송 패킷 스트림을 동기된 것으로 판단한다. 그러나, 만약 0X47의 비트 패턴으로입력되지 않으면 전송 패킷 스트림이 동기되지 않은 것으로 판단하고, 제1 및 제2 카운터를 리셋한 후 상기한 과정을 반복 수행하게 된다.Subsequently, the number of incoming data is counted by increasing the count of the first counter by '1' each time 8-bit data is input, and when the count of the first counter reaches '187', the second transport packet is counted. After determining that the input is received, the first counter is reset to '0', and then the next 8-bit data is checked to be a sync byte of 0X47. As a result, when 8-bit data matches the 0X47 bit pattern, it is determined that the transport packet stream currently being input is synchronized. However, if it is not input in the bit pattern of 0X47, it is determined that the transport packet stream is not synchronized, and the above process is repeated after resetting the first and second counters.

상술한 바와 같이 이루어지는 종래의 동기 바이트 검색 방법은 데이터와 동기 바이트 패턴을 3번에 걸쳐 비교, 검사하고, 그 결과 데이터가 동기 바이트 패턴과 일치하지 않을 때에는 그 이전에 일치한 동기 바이트 패턴을 무시하고 다시 처음부터 동기 바이트 검색을 시작함으로써 입력되는 8비트의 데이터의 헤더 부분의 동기 바이트가 아닌 페이로드(Pay load)에 OX47h의 비트 패턴이 존재하는 경우에 잘못된 동기 바이트를 기준으로 188 바이트씩 건너 뛰어 데이터를 검사하기 때문에 동기 바이트를 검색하기 위해 걸리는 시간이 길어지고, 데이터의 손실 분이 많아지게 된다.The conventional sync byte retrieval method as described above compares and checks the data and the sync byte pattern three times. As a result, when the data does not match the sync byte pattern, the previously matched sync byte pattern is ignored. If the bit pattern of OX47h exists in the payload rather than the sync byte of the header of the 8-bit data input by starting the sync byte search from the beginning again, 188 bytes are skipped based on the wrong sync byte. Since the data is checked, the time taken to retrieve the sync byte is longer and the loss of data is increased.

본 발명은 상기 문제점을 해결하기 위하여 안출된 것으로써, 검색 시간을 단축하고, 잘못된 판단으로 인해 발생하는 데이터의 손실을 보상하기 위한 동기 바이트 검색 방법을 제공하는데 그 목적이 있다.An object of the present invention is to provide a synchronization byte retrieval method for reducing the retrieval time and compensating for the loss of data caused by erroneous determination.

도 1은 전송 패킷 다중 분리 장치에서 이루어지는 동기 바이트 검색 방법을 설명하기 위한 개념도.1 is a conceptual diagram for explaining a sync byte searching method performed in a transport packet multiple separation apparatus.

도 2는 본 발명의 동기 바이트 검색 방법을 설명하기 위한 개념도.2 is a conceptual diagram illustrating a sync byte searching method of the present invention.

도 3은 본 발명의 일실시예에 따른 동기 바이트 검색 방법의 흐름도.3 is a flowchart of a sync byte search method according to an embodiment of the present invention;

상기 목적을 달성하기 위한 본 발명은 전송 패킷 다중 분리 장치에서 입력되는 패킷 스트림의 헤더 부분을 검출하기 위한 동기 바이트 검색 방법에 있어서, 상기 패킷 스트림을 입력받아 최초로 동기 바이트의 비트 패턴과 일치하는 바이트를검색하는 제1 단계; 상기 제1 단계에서 검색된 제1 바이트의 그 다음 바이트가 상기 동기 바이트의 비트 패턴과 일치하는 지를 비교하는 제2 단계; 상기 제2 단계의 비교 결과, 상기 제1 바이트의 그 다음 제2 바이트가 상기 동기 바이트의 비트 패턴과 일치할 때 플래그를 발생하는 제3 단계; 상기 제1 바이트로부터 패킷의 크기만큼 뒤에 있는 제3 바이트와, 상기 제3 바이트의 그 이전 바이트인 제4 바이트와, 상기 제3 바이트의 그 다음 바이트인 제5 바이트가 상기 동기 바이트의 비트 패턴과 각각 일치하는 지를 비교하는 제4 단계; 상기 제4 단계의 비교 결과, 상기 제4 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제5 단계; 상기 제4 단계의 비교 결과, 상기 제4 바이트 및 상기 제3 바이트가 상기 동기 바이트의 비트 패턴과 일치하면 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제3 바이트로부터 패킷의 크기만큼 뒤에 있는 제6 바이트를 상기 동기 바이트의 비트 패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로 판단하는 제6 단계; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기 바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되었으면, 상기 제6 바이트와 상기 제6 바이트의 그 다음 바이트인 제7 바이트를 상기 동기 바이트 비트 패턴과 각각 비교하여 어느 하나라도 일치하면 상기 패킷 스트림이 동기된 것으로 판단하는 제7 단계; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기 바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되지 않았으면, 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제6 바이트를 상기 동기 바이트의 비트패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로 판단하는 제8 단계; 및 상기 제4 단계의 비교 결과, 상기 제5 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제9 단계를 포함하여 이루어진다.In order to achieve the above object, the present invention provides a sync byte search method for detecting a header portion of a packet stream input by a transport packet multiplexing apparatus, wherein the first byte is received by matching the bit pattern of the sync byte. A first step of searching; A second step of comparing whether a next byte of the first byte retrieved in the first step matches a bit pattern of the sync byte; A third step of generating a flag when a result of the comparison of the second step is that a next second byte of the first byte matches a bit pattern of the sync byte; A third byte after the size of the packet from the first byte, a fourth byte that is the previous byte of the third byte, and a fifth byte that is the next byte of the third byte, A fourth step of comparing each match; A fifth step of repeating from the first step when only the fourth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step; As a result of the comparison in the fourth step, if the fourth byte and the third byte match the bit pattern of the sync byte, it is determined that the third byte is synchronously fixed, and again after the size of the packet from the third byte. A sixth step of comparing the sixth byte to the bit pattern of the sync byte and determining that the packet stream is synchronized; As a result of the comparison of the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and a flag is generated in the third step, the next byte of the sixth byte and the sixth byte Comparing the seventh byte with the sync byte bit pattern, and determining that the packet stream is synchronized if any one of them matches; As a result of the comparison in the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and no flag is generated in the third step, it is determined that the third byte is synchronized and fixed. An eighth step of comparing the sixth byte with the bit pattern of the sync byte again and determining that the packet stream is synchronized; And a ninth step of repeating from the first step when only the fifth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step.

이하, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 정도로 상세히 설명하기 위하여, 본 발명의 가장 바람직한 실시예를 첨부된 도면을 참조하여 설명하기로 한다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described with reference to the accompanying drawings so that those skilled in the art may easily implement the technical idea of the present invention. do.

먼저, 본 발명의 개념을 간략히 요약하면, 스트림 중 어느 8비트 데이터가 동기 바이트 패턴과 일치하게 되면 그로부터 188번째 바이트만을 검사하는 종래 기술과 다르게 첫 번째 동기 바이트와 그로부터 188번째의 8비트 데이터가 동기 바이트가 아닌 경우 첫 번째 동기 바이트로부터 1 내지 188바이트 사이에 실제의 동기 바이트가 존재할 수 있는 확률적인 개념을 도입하여 첫 번째 동기 바이트를 검색한 후 그 다음번의 동기 바이트 검색 시 도 2에 도시된 바와 같이 첫 번째 동기 바이트로부터 187, 188 및 189 번째 바이트를 검사함으로써 검색 시간을 줄이도록 한다.First, briefly summarizing the concept of the present invention, the first sync byte and the 188th 8-bit data is synchronized, unlike the prior art in which any 8-bit data in the stream matches the sync byte pattern, only the 188th byte is checked therefrom. In case of non-byte, it introduces the probabilistic concept that actual sync bytes can exist between 1 to 188 bytes from the first sync byte, and then retrieves the first sync byte and then retrieves the next sync byte as shown in FIG. Similarly, the search time is reduced by checking the 187th, 188th, and 189th bytes from the first sync byte.

도 3은 본 발명의 일실시예에 따른 동기 바이트 검색 방법의 흐름도이다.3 is a flowchart of a sync byte search method according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 동기 바이트 검색 방법은 먼저 패킷 스트림을 입력받아 처음으로 0X47h 비트 패턴과 일치하는 바이트를 검색하고(100), 검색된 첫 번째 0X47h 패턴 바이트의 그 다음 바이트가 0X47h 비트 패턴과 일치하는 지를 비교하여 일치할 경우 플래그를 발생한다(200). 이후, 첫 번째 0X47h 패턴 바이트로부터의 187, 188 및 189번째 바이트가 각각 0X47h 비트 패턴과 일치하는 지 비교하고(300), 비교 결과에 따라 187번째 바이트만이 0X47h 비트 패턴과 일치할 때는 첫 번째 0X47h 패턴 바이트와 이 바이트의 그 다음 바이트의 비트 패턴 일치 여부와 관계없이 단계(100)에서부터 반복 수행(400)하고, 187번째 바이트와 188번째 바이트가 0X47h 비트 패턴과 일치하면 188번째 바이트에서 동기된 것으로 판단하여(500) 그 다음 188번째 바이트가 0X47h 비트 패턴과 일치하면 상기 패킷 스트림이 동기된 것으로 판단한다(600). 또한, 단계(300)의 비교 결과에 따라 188번째 바이트와 189번째 바이트가 0X47h 비트 패턴과 일치하고 단계(200)에서 플래그가 발생된 경우에는 그 다음 188번째 바이트 및 189번째 바이트를 0X47h 비트 패턴과 비교하여 둘 중 어느 하나라도 일치하면 패킷 스트림이 동기된 것으로 판단하고(700), 188번째 바이트와 189번째 바이트가 0X47h 비트 패턴과 일치하고 단계(200)에서 플래그가 발생되지 않은 경우에는 188번째 바이트에서 동기된 것으로 판단(800)하고 단계(600)를 수행한다. 그리고, 단계(300)의 비교 결과에 따라 189번째 바이트만이 일치하면 단계(100)에서부터 반복 수행(800)한다.Referring to FIG. 3, the method of searching for a sync byte according to the present invention first receives a packet stream and searches for a byte that matches a 0X47h bit pattern for the first time (100), and the next byte of the first 0X47h pattern byte found is a 0X47h bit pattern. If a match is compared and a flag is generated (200). Then, compare (300) whether the 187, 188, and 189th bytes from the first 0X47h pattern byte match the 0X47h bit pattern, respectively, and if the only 187th byte matches the 0X47h bit pattern according to the comparison result, the first 0X47h Repeat 400 from step 100, regardless of whether the pattern byte and the next byte of this byte match the bit pattern, and if the 187th and 188th bytes match the 0X47h bit pattern, they are synchronized at the 188th byte. If the next 188th byte matches the 0X47h bit pattern, it is determined that the packet stream is synchronized (600). Also, if the 188th byte and the 189th byte match the 0X47h bit pattern according to the comparison result of step 300 and the flag is generated in step 200, the next 188th byte and the 189th byte are matched with the 0X47h bit pattern. If either of the two matches, it is determined that the packet stream is synchronized (700), and if the 188th and 189th bytes match the 0X47h bit pattern and no flag is generated in step 200, the 188th byte. In step 800, it is determined to be synchronized, and the operation 600 is performed. If only the 189 th byte is matched according to the comparison result of step 300, the process is repeated 800 from step 100.

본 발명의 기술 사상은 상기 바람직한 실시예에 따라 구체적으로 기술되었으나, 상기한 실시예는 그 설명을 위한 것이며 그 제한을 위한 것이 아님을 주의하여야 한다. 또한, 본 발명의 기술 분야의 통상의 전문가라면 본 발명의 기술 사상의 범위 내에서 다양한 실시예가 가능함을 이해할 수 있을 것이다.Although the technical idea of the present invention has been described in detail according to the above preferred embodiment, it should be noted that the above-described embodiment is for the purpose of description and not of limitation. In addition, those skilled in the art will understand that various embodiments are possible within the scope of the technical idea of the present invention.

상기와 같이 이루어지는 본 발명은, 별도의 하드웨어 추가 없이 첫 번째 패턴 바이트로부터의 187, 188 및 189번째 바이트를 비트 패턴과 비교하여 동기 바이트를 검색함으로써 동기 바이트 검색에 걸리는 시간을 줄여 보다 빠르게 패킷 스트림의 동기 여부를 판단할 수 있으며, 잘못된 검색으로 인해 손실되는 데이터 양도 줄일 수 있다.According to the present invention, the 187, 188, and 189th bytes from the first pattern byte are searched for the sync byte by comparing the bit pattern without additional hardware, thereby reducing the time taken for the sync byte search. You can determine if there is synchronization, and reduce the amount of data lost due to bad retrieval.

Claims (3)

전송 패킷 다중 분리 장치에서 입력되는 패킷 스트림의 헤더 부분을 검출하기 위한 동기 바이트 검색 방법에 있어서,A sync byte search method for detecting a header portion of a packet stream input by a transport packet multiplexing device, 상기 패킷 스트림을 입력받아 최초로 동기 바이트의 비트 패턴과 일치하는 바이트를 검색하는 제1 단계;A first step of receiving the packet stream and first searching for a byte matching a bit pattern of a sync byte; 상기 제1 단계에서 검색된 제1 바이트의 그 다음 바이트가 상기 동기 바이트의 비트 패턴과 일치하는 지를 비교하는 제2 단계;A second step of comparing whether a next byte of the first byte retrieved in the first step matches a bit pattern of the sync byte; 상기 제2 단계의 비교 결과, 상기 제1 바이트의 그 다음 제2 바이트가 상기 동기 바이트의 비트 패턴과 일치할 때 플래그를 발생하는 제3 단계;A third step of generating a flag when a result of the comparison of the second step is that a next second byte of the first byte matches a bit pattern of the sync byte; 상기 제1 바이트로부터 패킷의 크기만큼 뒤에 있는 제3 바이트와, 상기 제3 바이트의 그 이전 바이트인 제4 바이트와, 상기 제3 바이트의 그 다음 바이트인 제5 바이트가 상기 동기 바이트의 비트 패턴과 각각 일치하는 지를 비교하는 제4 단계;A third byte after the size of the packet from the first byte, a fourth byte that is the previous byte of the third byte, and a fifth byte that is the next byte of the third byte, A fourth step of comparing each match; 상기 제4 단계의 비교 결과, 상기 제4 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제5 단계;A fifth step of repeating from the first step when only the fourth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step; 상기 제4 단계의 비교 결과, 상기 제4 바이트 및 상기 제3 바이트가 상기 동기 바이트의 비트 패턴과 일치하면 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제3 바이트로부터 패킷의 크기만큼 뒤에 있는 제6 바이트를 상기 동기 바이트의 비트 패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로판단하는 제6 단계;As a result of the comparison in the fourth step, if the fourth byte and the third byte match the bit pattern of the sync byte, it is determined that the third byte is synchronously fixed, and again after the size of the packet from the third byte. A sixth step of judging that the packet stream is synchronized when the sixth byte is compared with the bit pattern of the sync byte; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기 바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되었으면, 상기 제6 바이트와 상기 제6 바이트의 그 다음 바이트인 제7 바이트를 상기 동기 바이트 비트 패턴과 각각 비교하여 어느 하나라도 일치하면 상기 패킷 스트림이 동기된 것으로 판단하는 제7 단계;As a result of the comparison of the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and a flag is generated in the third step, the next byte of the sixth byte and the sixth byte Comparing the seventh byte with the sync byte bit pattern, and determining that the packet stream is synchronized if any one of them matches; 상기 제4 단계의 비교 결과, 상기 제3 바이트 및 상기 제5 바이트가 상기 동기 바이트의 비트 패턴과 일치하고 상기 제3 단계에서 플래그가 발생되지 않았으면, 상기 제3 바이트에서 동기 고정된 것으로 판단하고, 다시 상기 제6 바이트를 상기 동기 바이트의 비트 패턴과 비교하여 일치할 때 상기 패킷 스트림이 동기된 것으로 판단하는 제8 단계; 및As a result of the comparison in the fourth step, if the third byte and the fifth byte match the bit pattern of the sync byte and no flag is generated in the third step, it is determined that the third byte is synchronized and fixed. An eighth step of comparing the sixth byte with the bit pattern of the sync byte again and determining that the packet stream is synchronized; And 상기 제4 단계의 비교 결과, 상기 제5 바이트만이 상기 동기 바이트의 비트 패턴과 일치할 때 상기 제1 단계에서부터 반복 수행하는 제9 단계A ninth step of repeating from the first step when only the fifth byte matches the bit pattern of the sync byte as a result of the comparison in the fourth step 를 포함하여 이루어지는 동기 바이트 검색 방법.Synchronous byte search method comprising a. 제 1 항에 있어서, 상기 동기 바이트의 비트 패턴은,The method of claim 1, wherein the bit pattern of the sync byte, 헥사값 0X47인 동기 바이트 검색 방법.Sync byte search method with hexadecimal value 0X47. 제 1 항에 있어서, 상기 패킷의 크기는,The method of claim 1, wherein the size of the packet, 188바이트인 동기 바이트 검색 방법.A synchronous byte retrieval method of 188 bytes.
KR1020000036835A 2000-06-30 2000-06-30 Sync byte searching method for detecting header of packet stream Withdrawn KR20020002611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000036835A KR20020002611A (en) 2000-06-30 2000-06-30 Sync byte searching method for detecting header of packet stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000036835A KR20020002611A (en) 2000-06-30 2000-06-30 Sync byte searching method for detecting header of packet stream

Publications (1)

Publication Number Publication Date
KR20020002611A true KR20020002611A (en) 2002-01-10

Family

ID=19675138

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000036835A Withdrawn KR20020002611A (en) 2000-06-30 2000-06-30 Sync byte searching method for detecting header of packet stream

Country Status (1)

Country Link
KR (1) KR20020002611A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100706213B1 (en) * 2005-02-21 2007-04-11 삼성전자주식회사 Method and apparatus for synchronizing TS packets of terrestrial DMV

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100706213B1 (en) * 2005-02-21 2007-04-11 삼성전자주식회사 Method and apparatus for synchronizing TS packets of terrestrial DMV
US7817724B2 (en) 2005-02-21 2010-10-19 Samsung Electronics Co., Ltd. Apparatus and method for synchronizing transport packet in ground wave digital multimedia broadcasting

Similar Documents

Publication Publication Date Title
US5371547A (en) Apparatus for excising (and reinserting) specific data from a compressed video data stream to reduce its transmission bandwidth
US20090168805A1 (en) Methods and systems for start code emulation prevention and data stuffing
US20080259962A1 (en) Contents reproducing apparatus
WO2012093846A2 (en) Apparatus and method for supporting variable length of transport packet in video and audio communication system
US9503777B2 (en) Method and system for unified start code emulation prevention bits processing for AVS
US20090177952A1 (en) Transcoder and receiver
US20070242678A1 (en) Method for reconstructing system time clock (STC) without carrying PCR
EP1500278A2 (en) Method and system for preventing start code emulation at non-byte aligned and/or bit-shifted locations
US8872970B2 (en) System and method for transport stream sync byte detection with transport stream having multiple emulated sync bytes
US20060274737A1 (en) Method and apparatus for processing null packets in a digital media receiver
US20080007653A1 (en) Packet stream receiving apparatus
KR102035912B1 (en) Method And Apparatus for Repairing and Detecting Packet Loss
WO2012074333A2 (en) Apparatus and method for supporting variable length of transport packet in an audio and video communication system
US7197688B2 (en) Method of detecting broadcasting table change
US7020812B2 (en) System and method for detection and recovery of false synchronization using packet header information
US8369418B2 (en) Digital data receiver
US7839925B2 (en) Apparatus for receiving packet stream
KR20020002611A (en) Sync byte searching method for detecting header of packet stream
KR0175371B1 (en) Apparatus for detecting the sync. byte of transport stream
KR20000055874A (en) Apparatus for caption information processing of digital tv
US20010040934A1 (en) Synchronization detection apparatus and receiving apparatus and methods of the same
KR101879194B1 (en) Method and Apparatus for Recovering Packet Loss
WO2016203968A1 (en) Broadcast receiver, method, and program
JPS62131636A (en) Data transmission method
TWI762980B (en) Method for debugging digital stream and circuit system thereof

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20000630

PG1501 Laying open of application
N231 Notification of change of applicant
PN2301 Change of applicant

Patent event date: 20041006

Comment text: Notification of Change of Applicant

Patent event code: PN23011R01D

PC1203 Withdrawal of no request for examination
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid