1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to detecting an error in an image data stream, and more particularly, to an apparatus for and a method of determining whether or not an error is present in an input image data stream and detecting the starting position of the error more accurately if an error is present.
2. Description of the Related Art
In a wired/wireless network environment where TVs, DVD players, devices supporting digital multimedia broadcasting (DMB), and especially, personal portable devices play digital moving pictures, communication channels for picture streaming vary according to time, and burst errors occur frequently due to poor conditions of transmission and receipt of data. For this reason, the quality of service (QoS) of and quality of experience (QoE) of moving pictures cannot be ensured.
A real-time system of streaming, in which procedures for inputs and outputs and the interaction with the surrounding environment should be performed within limited time, depends on the logical functional features and temporal features of the accuracy of the system operation. In such a system of streaming, since a receiving terminal can display moving pictures only for limited time, generally, it is hard to ensure the QoS of the moving pictures by retransmitting.
Therefore, the receiving terminal needs to determine if there are errors in the moving pictures and detect and conceal the errors.
FIG. 1 is a functional block diagram of procedures of detecting an error in a received image data stream and decoding the image data according to the conventional art.
Referring to FIG. 1, a channel decoder 110 receives image signals from an external source. An image decoding system includes a transport stream (TS) demultiplexing unit 120 that demultiplexes an image signal (TS packets), which the channel decoder 110 that is a signal receiving unit uses to extract an elementary stream (ES), and an image data decoder 130 that reproduces an image signal by decoding a reduction encoded image data stream.
The channel decoder 110 receives TS packets from the image signal of a channel chosen by a user. Channel coding and cyclic redundancy check (CRC) is performed on the received TS packets to detect errors, and in the case of a TS packet where an error occurs, a flag of a transport error indicator in a TS header of the TS packet is set to 1. In the case of a TS packet which goes missing during transmission, since the values of continuity counters of packets before and after the omitted packet are not continuous, the existence of a missing packet can also be detected.
The TS demultiplexing unit 120 includes a TS program ID (PID) filter 121 and an error detector 122. The TS PID filter 121 filters image packets using program ID information in a header of the received TS packets, and makes an ES consisting of TS image packets.
The error detector 122 inserts information about loss or damage of the packets which has been checked by the channel decoder 110 into the ES as error information in the course of producing the ES. The error information includes a predetermined bit sequence which informs of starting of the error and the number of damaged or lost TS packets to inform of the size of the error.
The image data decoder 130 includes a bit parsing unit 131, a macroblock decoder 132, and a slice decoder 133. The bit parsing unit 131 transmits bits necessary to the macroblock decoder 132 from among bit sequences of a video stream received from the TS demultiplexing unit 120. Also, during real-time decoding, the bit parsing unit 131 checks the error information that the TS demultiplexing unit 120 detected and displayed. The macroblock decoder 132 and the slice decoder 133 decode an image while performing concealment or restoring of the error on a macro basis and on a slice basis, respectively.
However, the conventional art has a problem in that it cannot be used when the transmission standard does not support CRC or the TS demultiplexing unit 120 is not able to detect an error in an elementary stream.
FIG. 2 is a diagram showing images to which error detection and error concealment methods are applied according to the conventional art.
In FIG. 2, the left drawing 210 shows an image without an error concealment (restoring) process, and the right drawing 220 shows an image which is reproduced after an error concealment process according to the conventional art. However, it is noticeable that the right drawing still has a macroblock in which an error 221 is present, and this problem occurs because the accurate starting point of the error cannot be detected during the error detection process.
According to the moving picture experts group (MPEG) standard, a decoding procedure includes variable length decoding, and during this decoding, error detection can fail if a symbol matches another symbol in a range of defined bit sequences even when the received bit sequence includes an error bit. For example, if bit sequences assigned to letters ‘A’, ‘B’, ‘C’, and ‘D’ are 00, 01, 10, and 11, respectively, when the bit sequence of 00 is received wrongly instead of the bit sequence of 01 (=B), a decoder in a receipt side continues decoding, while recognizing the bit sequence of 00(=A), since the symbol ‘A’ corresponding to the wrong bit sequence, that is, 00 is still present in a range of the defined bit sequences. As such, this method (range check method) cannot detect the actual position of occurrence of an error, and can cause repetition of errors which may be determined as errors at incorrect locations afterwards, and thus the determination of accurate error detection points cannot be ensured.