Device and method for error detection and correction

Abstract: In an error detection and correction device for receiving via a transmission path a code train including a number of error correction codes each constructed of a plurality of codes and correcting error code of the code train, the error code rate of the received code train is detected, and in accordance with the detected error code rate an error correction capability is selected to thereby making small as error correction probability even at a high error code rate and reproducing the code train with less deterioration.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an error detection and correction circuit, and more particularly to a circuit for detecting and correcting an error of a code train transmitted via a transmission path such as a magnetic recording/reproducing system. It also relates to the corresponding method. Related Background Art In a recording/reproducing system for digital data (code train), i.e., in a data transmission system, error detection and correction codes are generally used for correcting an error code generated during the data transmission. Fig.1 is a block diagram showing an example of the circuit arrangement of a conventional error detection and correction circuit. Digital data (code train) is inputted to an input terminal 10, the digital data having been error-correction coded at the recording (or transmitting) side and passed through a transmission system and may include a transmission error. A data reproduction circuit 12 causes the input data at the input terminal 10 to be subjected to demodulation, synchronous separation, ID recognition, and other processes to thereby reproduce each data (code) and output the reproduced data. This reproduced data (code train) is directly written in a data memory 20 in accordance with the recognized ID information, and is also applied to a syndrome calculation circuit 14 for error correction. In accordance with a known manner, the syndrome calculation circuit 14 executes a syndrome calculation for each error correction code constructed of a plurality of transmission codes, and sequentially writes a plurality of syndromes for each error correction code into a syndrome memory 16. An error position and error pattern calculation circuit 18 reads syndromes written in the syndrome memory 16 and decodes the error correction code. The circuit 18 may be constructed of a general arithmetic operation processing circuit, and the operation thereof is controlled by a microprogram 19. If an error is detected and it is judged that the error is correctable, then the error position and error pattern are calculated, and using the calculated results the data (code) in the data memory 20 is corrected. If it is judged that the error is not correctable, the corresponding data (code) in the data memory 20 is maintained unchanged, and a correction flag indicative of a presence of an error is entered in the data memory 20 while performing other necessary processes. After the above operations, the error-corrected data (codes) in the data memory 20 is outputted from an output terminal 22. In the conventional circuit described above, if digital data to be processed is image data, uncorrectable data can be corrected by means of interpolation at a high probability. In such a case, the quality of image is deteriorated by a large probability of error correction rather than by a large probability of uncorrectable error and interpolation. Namely, the degree of deterioration of the image quality is greater upon occurrence of error correction. With the advent of a recent transmission path having a large change in transmission error rate such as in the case of a satellite broadcasting whose error rate depends on weather conditions, there has been highly desired to improve the image quality under bad weather as good as possible. One way to solve this is to enhance the error correction capability of the transmission system to the extent that it can support the worst case. However, this solution is not practical because large cast and facilities are required for such an enhanced error correction capability. EP-A-0136604 discloses a decoding system capable of high speed decoding using an inner code and an outer code. The decoding system performs a first decoding using the inner code. Using the results of the inner coding a number of decoding modes are decided between on the basis of a statistical processing of the error number flags issued from the first decoder. US-A-4541091 describes a code error detection and correction method and apparatus in which a code error rate counter detects the error code rate of an input code train. When the code error counter detects more than a predetermined number of code errors, the code error correction is inhibited. SMPTE Journal, Vol. 95, No. 11, November 1986, New York, US, "The SMPTE Type D-1 Digital Television Tape Recorder-Error Control" by J.H. Wilkinson describes a method of error correction using a two level code array in order to enable the correction of very short errors in the inner correction coding, and the correction of a small number of very long sequences of coding in the outer correction coding. EP-A-0102782 describes a method of correcting errors in a digital television signal. In the method a parity word is formed from correction units derived from the data words of the television signal. SUMMARY OF THE INVENTION It is an object of the present invention to solve the above problems. It is another object of the present invention to provide an error detection and correction device capable of obtaining an optimum reproduced code train irrespective of a change in reliability of a transmission line. With the above objects in view, according to one aspect of the present invention, there is provided an error detection and correction device, comprising: a) input means for inputting a code train including a number of error correction codes each constructed of a plurality of codes; b) error correction means for correcting error codes by using an error correction code within the code train; and c) selection means for selecting as the operation mode of said error correction means one of a plurality of modes including first and second modes arranged to select said second mode when error information representative of the error code rate of said code train exceeds a predetermined value, and to select said first mode when the error information is smaller than said predetermined value; characterized in that the first mode is a mode in which error correction is performed when the number of the error codes is less than or equal to m and in which no error correction is performed otherwise and the second mode is a mode in which error correction is performed when the number of the error codes is less than or equal to n and in which no error correction is performed otherwise, wherein m and n are different nonzero natural numbers, wherein m is greater than n, and both of the first and second modes use the same error correction code. According to a second aspect of the present invention there is provided an error detection and correction method comprising steps of: inputting via a transmission path a code train including a number of error correction codes each constructed of a plurality of code, correcting error codes by using the error correction code within the code train, and selecting as the operation mode of said error correction means one of a plurality of modes including first and second modes, arranged to select said second mode when error information representative of the error code rate of said code train exceeds a predetermined value, and to select said first mode when the error information is smaller than said predetermined value; said method being characterized in including the further steps of: correcting the error codes in the first mode when the number of the error codes is less than or equal to m and performing no error correction otherwise, and correcting the error codes in the second mode when the number of the error codes is less than or equal to n and performing no error correction otherwise, wherein m and n are different nonzero natural numbers, wherein m is greater than n, and both of the first and second modes use the same error correction code. The above and other objects and advantages of the present invention will become apparent from the following detailed description of the preferred embodiments. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing an example of the arrangement of a conventional error correction circuit; Fig.2 is a block diagram showing an example of the arrangement of an error correction circuit according to an embodiment of this invention; Fig.3 is a diagram showing the uncorrectable probability and error correction probability in each error correction mode; Fig.4 is a block diagram showing an example of the arrangement of an error correction circuit according to another embodiment of this invention; and Fig.5 is a block diagram showing an example of the arrangement of an error correction circuit according to a further embodiment of this invention. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS The embodiments of this invention will be described with reference to the accompanying drawings. Fig.2 is a block diagram showing the arrangement of the error correction circuit according to the embodiment of this invention. Similar to the input terminal 10, digital data (code train) is inputted to an input terminal 30, the digital data having passed through a transmission path and may include a transmission error. A data reproduction circuit 32 causes the input data at the input terminal 30 to be subjected to demodulation, synchronous separation, ID recognition, and other processes to thereby reproduce each data (code) and output the reproduced data. This reproduced data is directly written in a data memory 40 in accordance with the recognized ID information, and is also applied to a syndrome calculation circuit 34 for error correction. In accordance with a known manner, the syndrome calculation circuit 34 executes a syndrome calculation for each error correction code constructed of a plurality of transmission codes, and sequentially writes a plurality of syndrome for each error correction code into a syndrome memory 36. The calculation results obtained by the syndrome calculation circuit 34 are also supplied to a syndrome 0 detection circuit 44. This circuit 44 judges whether the plurality of syndromes for each error correction code are all 0 or not. From the output of the syndrome 0 decision circuit 44, a counter 46 counts the number of error correction codes whose syndrome are not all 0, i.e., counts during a predetermined time duration the number of error correction codes having an error. The count value of the counter 46 at the predetermined time duration corresponds to the information representative of the transmission error rate. In accordance with this error rate information, the counter 46 generates and outputs a mode selection signal for selecting an error correction algorithm to be described later. Asa simplified example of the mode selection signal, it uses one bit information which takes a value 1 for the transmission error rate equal to or larger than a predetermined value, and 0 for the transmission error rate smaller than the predetermined value. An error position and error pattern calculation circuit 38 is constructed of a general arithmetic operation processing circuit, and is controlled by a microprogram generator 48. As will be described later, the microprogram generator 48 is provided with a plurality of program modules each having a different decoding algorithm. The error position and error pattern calculation circuit 38 is controlled by a module selected by a mode selection signal supplied from the counter 46. Specifically, the circuit 38 executes an error correction suitable for reproducing image data with less image deterioration, by using the optimum decoding algorithm for the current transmission error rate. A more particular description will be given in the following. It is assumed now that the current error correction code is a two errors correctable code, and that two types of decoding modes for different transmission error rates have been set in the microprogram generator 48. In the normal mode while the error rate is low, i.e., while each error correction code has one or two error codes, the error position and error pattern calculation circuit 38 executes an error correction process, and executes not an error correction process but an uncorrectable error process if three or more error codes are generated. The error correction process means to calculate the error position and error pattern, and by using the calculated results, correct the error code in the data memory 40. The uncorrectable error process means to judge the error as uncorrectable, maintain unchanged the corresponding error correction code in the data memory 40, enter a correction flag indicative of a presence of an error in the data memory, and perform other necessary processes. If the transmission error rate becomes bad and the count value of the counter 46 exceeds the predetermined threshold value, the microprogram generator 48 selects a program module for a specific mode in accordance with a mode selection signal supplied thereto. For example, an error correction process is executed only if there is one error code in each error correction code, and an uncorrectable error process is executed if there are two error codes or more. Example of the decoding error rate characteristics for the normal mode and for the specific mode used with a bad error rate are shown in Fig.3. A line 1 indicates the uncorrectable probability during the normal mode, i.e., during a mode for correcting up to two error codes, a line 2 indicates the error correction probability during the normal mode, a line 3 indicates the uncorrectable probability during the specific mode used with a bad error rate, i.e., during a mode for correcting only one error code, and a line 4 indicates the error correction probability during the specific mode. As compared with the normal mode, during the specific mode, although the uncorrectable probability increases, i.e., becomes bad, the error correction probability becomes small. Accordingly, by using the normal mode while the error rate is small and the specific mode while it is large, the error correction probability can be restricted within an allowable range except a considerably large error rate. The error position and error pattern calculation circuit 38 reads syndromes written in the syndrome memory 36 to execute a decoding process for the error correction code. If all syndromes for the corresponding error correction code are 0, it is judged that there is no error to thereby terminate the processing for that code. On the other hand, all syndromes are not 0, there is an error and if the error is judged as correctable, the circuit 38 calculates the error position and error pattern, and using the calculated results, the code stored in the data memory is corrected. If the error is judged as uncorrectable, the corresponding code in the data memory is remained unchanged, a flag indicative of a presence of an error is entered in the data memory 40, and other necessary processes are executed. For data such as image data which can be effectively corrected even if they are regarded uncorrectable, it is desirable, as described previously, to make small the number of interpolations and make small the number of error corrections from the standpoint of signal quality (image quality). The embodiment therefore allows to reproduce image data with less image quality deterioration. In the above embodiment, a code capable of two errors detection and two errors correction has been described by way of example. It is obvious that the present invention is not limited thereto. Also the number of modes which can be set by the microprogram generator 48 is not limited to two. As readily appreciated from the foregoing description of this embodiment, use of an additional simple circuit can make small the error probability. If a code capable of effectively executing an interpolation process is used such as in video data, it can be processed with the advantageous effects of making small the quality deterioration of a produced image. Fig.4 is a block diagram showing the arrangement of an error detection and correction device according to another embodiment of this invention. Like elements to those shown in Fig.2 are represented by identical reference numerals, and the description therefor is omitted. In this embodiment, the present invention is applied to a digital VTR having a transmission path of a magnetic recording and reproducing system. In Fig.4, T represents a magnetic tape, and Ha and Hb represent a rotary magnetic head. The rotary magnetic heads Ha and Hb alternately trace the magnetic tape T and alternately output a reproduced signal. A switch 31 selects the outputs of the heads Ha and Hb, and supplies it as the reproduced data (code train) to a data reproduction circuit 32. The VTR of this embodiment has two modes, one being the normal reproduction mode for running the magnetic tape T at the speed same as that during the recording, and the other being the specific reproduction mode for running the magnetic tape T at the speed different from that during the recording. These reproduction modes are selected by an operator from an operation unit 52. In accordance with an instruction from the operation unit 52, a system controller 50 outputs a mode setting signal to control the circuits of the device. Specifically, the system controller 50 supplies the mode setting signal to a capstan controller 54 to control a capstan C so that during the normal reproduction mode magnetic tape T is caused to run at the speed same as that during the recording, whereas during the specific reproduction mode, it is caused to run at a preset speed different from that during the recording. The system controller supplies the mode setting signal also to a microprogram generator 48 which selects a program for the normal mode during the normal reproduction mode, and a program for the specific mode during the specific reproduction mode. During the normal reproduction mode, an error correction process is executed if there are two or less error codes, and an uncorrectable process is executed if there are three of more error codes. During the specific reproduction mode, an error correction process is executed if there is one error code, and an uncorrectable process if there is three or more error codes. In general, during the normal reproduction mode, the tracing loci of the rotary heads Ha and Hb are generally parallel with the recorded helical track and the tracking control is executed. Therefore, there seldom occurs a high error code rate of a reproduced code train from the switch 31. On the other hand, during the specific reproduction mode, the tracing loci of the rotary heads Ha and Hb intersect with the recorded helical track so that the error code rate of a reproduced code train becomes high. In view of this, according to this embodiment, a normal error correction is executed during the normal reproduction mode, and an error correction capability is lowered during the specific reproduction mode to thereby make the error correction probability equal to or lower than a predetermined value. The embodiment device shown in Fig.4 has similar advantageous effects to the embodiment shown in Fig. 2. In addition, the embodiment device applied to a reproducing system can make the circuit for switching between the normal mode and specific mode considerably simple, as compared with the embodiment shown in Fig.2. Fig.5 is a block diagram showing the arrangement of an error detection and correction device according to a still further embodiment of this invention. Like elements to those shown in Fig.2 are represented by identical reference numerals, and the detailed description therefor is omitted. The embodiment shown in Fig.5 assumes to use as the correction coding system a so-called chain coding system which has as the error correction code so-called inner and outer codes. Reference numeral 35 represents a syndrome calculation circuit for an inner code, 37 a syndrome memory for an inner code, 39 an error calculation circuit for an inner code, 49 a microprogram generator for an inner code. These circuits perform, for an inner code, similar operations to those of the circuits 34, 36, 38 and 48 shown in Fig.2. Reference numeral 55 represents a syndrome calculation circuit for an outer code, 57 a syndrome memory for an outer code, 59 an error calculation circuit for an outer code, and 51 a microprogram generator for an outer code. These circuits perform, for an outer code, similar operations to those of the circuits 34, 36, 38 and 48 shown in Fig.2. In this embodiment, the microprogram generator 49 for an inner code is always set at a normal mode. The results calculated by the syndrome calculation circuit 55 for an outer code are supplied to a syndrome 0 decision circuit lls to decide whether or not all of a plurality of syndromes for each outer code are 0. A counter 47, similar to the counter 46 shown in Fig.2, causes the microprogram generator 51 for an outer code to select a program module which performs an error correction process if there are two or less error codes and performs an uncorrectable process if there are three or more error codes, respectively when the number of outer codes with error is equal to or smaller than a predetermined threshold value during a predetermined time duration. The counter also causes the microprogram generator 51 for an outer code to select a program module which always performs not an error correction process but an uncorrectable process when the number of outer codes with error exceeds the predetermined threshold value. With the above circuit arrangement, a sufficient error correction is executed if the error code rate is low, and another error correction process for an outer code is executed if the error code rate is high. Namely, if the error code rate is high, the error correction capability is lowered as a whole to restrict the occurrence of error corrections equal to or lower than a predetermined value, to thereby prevent large deterioration of the reproduced data (code train). In the embodiment shown in Fig.5, if the number of outer codes with error during the predetermined time duration exceeds the predetermined threshold value, the microprogram generator 51 for an outer code selects a program module for executing another process. For instance, advantageous effects can be obtained by selecting a program module which executes an error correction process only when there is one error code and executes an uncorrectable process which there are two or more error codes.

Claims: An error detection and correction device, comprising: a) input means (32) for inputting a code train including a number of error correction codes each constructed of a plurality of codes; b) error correction means (38, 59) for correcting error codes by using an error correction code within the code train; and c) selection means (48, 51) for selecting as the operation mode of said error correction means (38, 59) one of a plurality of modes including first and second modes, arranged to select said second mode when error information representative of the error code rate of said code train exceeds a predetermined value, and to select said first mode when the error information is smaller than said predetermined value; characterized in that the first mode is a mode in which error correction is performed when the number of the error codes is less than or equal to m and in which no error correction is performed otherwise and the second mode is a mode in which error correction is performed when the number of the error codes is less than or equal to n and in which no error correction is performed otherwise, wherein m and n are different nonzero natural numbers, wherein m is greater than n, and both of the first and second modes use the same error correction code. A device according to claim 1, further comprising detection means (44, 46, 45, 47) for detecting error information representative of the error code rate of said code train, wherein said selection means (48) is arranged to select the first mode and the second mode according to an output of said detection means (44, 46, 45, 47). A device according to claim 1 or 2, wherein said error correction code is of the type that two error codes for each error correction code can be corrected, and said error correction means (38) is arranged to execute an error correction process in said first mode if there are two or less error codes for each error correction code, and to execute an error correction process in said second mode only if there is one error code for each error correction code. A device according to claim 1 or 2, wherein said error correction code comprises first and second error correction codes. A device according to claim 4, wherein said first error correction code is a code which is coded and decoded at the more outer part of the transmission path of the code train than said second error correction code. A device according to claim 2, wherein said detection means (44, 46, 45, 47) includes a detection circuit (44, 45) which is arranged to detect the presence or absence of an error code in each error correction code in accordance with a plurality of syndromes for each error correction code. A device according to claim 6, wherein said detection circuit (44, 45) is arranged to detect whether all said plurality of syndromes are 0. A device according to claim 6, wherein said detection means (44, 46, 45, 47) includes a counter circuit (46, 47) arranged to count the number of error detection codes with an error code during a predetermined time duration by using a detection output from said detection circuit (44, 45). A device according to claim 1, wherein said input means includes a reproducion head (Ha, Hb) for reproducing said code train from a number of helical tracks formed on a tape recording medium (T), said device further comprising: generation means (50) for generating mode setting information associated with error code rate of said code train; feeding means (54, C) for feeding said tape recording medium (T), said feeding means (54, C) being arranged to select as the feeding speed of said tape recording medium (T) one of a plurality of speeds including first and second speeds, in accordance with the mode setting information from said generation means (50), wherein when said tape recording medium (T) is fed at said first speed, said reproduction head (Ha, Hb) is arranged to trace said tape recording medium (T) substantially in parallel with the longitudinal direction of said helical track, and when said tape recording medium (T) is fed at said second speed, said reproduction head (Ha, Hb) is arranged to trace said tape recording medium (T) in the direction to intersect said longitudinal direction of said helical track. A device according to claim 9, wherein said selection means (48, 51) is arranged to select said first mode when said feeding means feeds said tape recording medium (T) at said first speed, and to select said second mode when said feeding means feeds said tape recording medium (T) at said second speed. A device according to claim 1, wherein said input means (32) includes a reproducion head (Ha, Hb) for reproducing said code train from a tape recording medium (T). A device according to claim 11, further comprising: setting means for setting a reproduction mode of said reproducion head, wherein said selection means selects the first and second modes of said error correction means according to an output of said setting means. An error detection and correction method comprising steps of: inputting via a transmission path a code train including a number of error correction codes each constructed of a plurality of code, correcting error codes by using the error correction code within the code train, and selecting as the operation mode of said error correction means one of a plurality of modes including first and second modes, arranged to select said second mode when error information representative of the error code rate of said code train exceeds a predetermined value, and to select said first mode when the error information is smaller than said predetermined value; said method being characterized in including the further steps of: correcting the error codes in the first mode when the number of the error codes is less than or equal to m and performing no error correction otherwise, and correcting the error codes in the second mode when the number of the error codes is less than or equal to n and performing no error correction otherwise, wherein m and n are different nonzero natural numbers, wherein m is greater than n, and both of the first and second modes use the same error correction code.

Inventors: SHIKAKURA AKIHIRO, SHIKAKURA, AKIHIRO, SHIKAKURA, AKIHIRO, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1990
Main classification: H03M13
IPC codes: H03M13, G11B20