ENCODER AND DECODER

Abstract: An encoder, in which a data length generated by a variable length encoding is counted and the information of the data length is encoded by multiplexing the information in a time-sharing way to produce variable length encoded data. An encoder, in which the information relative to the number of bits included from the bit after the fixed divider used in the error correction encoding to the first bit of a variable length data is multiplexed in a time-sharing way to produce variable length encoded data, and the variable length encoded data is transmitted. An encoder, in which when there is one symbol of variable length code across the divider used in the error correction encoding, a special code is inserted in front of the divider, or it is ensured that the head of the division is always the head of the variable length code. An encoder, in which the sum of the lengths of the fields and the difference between the field lengths are found and the sum and difference are encoded by applying an orthogonal transformation to them.

Description: This invention relates to an encoder for encoding a video signal used in a television system or the like, and to a decoder for decoding an encoded data which is recorded on a recording medium. When a video signal of a dynamic image such as a television signal is transmitted at a low bit rate, it is general to use the discrete cosine transform (DCT). For example, the DCT is employed in the recommendation draft firmed September, 1990 in MPEG (Moving Picture Experts Group) of the International Standards Organization (abbreviated as ISO). The MPEG further intends to use Huffman coding which is a kind of the variable-length encoding, so that information is compressed by a combination of the DCT and the variable-length encoding to be transmitted. In this variable-length encoding method, however, when an error once occurs, the error may propagate over blocks of the DCT. Since error-correcting codes are generally added, such errors can be reduced. However, in a transmission channel such as a digital VTR in which burst errors relatively frequently occur, for example, there is a case that burst errors occur in a degree exceeding the error correction capability. In such a case, there arises a problem in that the error propagation spreads over the blocks. An example of such a case will be described below. Figs. 1(A) and 1(B) are block diagrams illustrating the configuration of a conventional encoder and decoder. The encoder has a DCT circuit 101 which performs the DCT on each block, a quantizer 102 which quantizes transform coefficients from the DCT circuit 101, and a Huffman encoding circuit 103 which performs the Huffman encoding on the output of the quantizer 102. The decoder comprises a Huffman decoding circuit 104 which performs the Huffman decoding on input data, an inverse quantizer 105 which performs the inverse quantization on the output of the Huffman decoding circuit 104, and an inverse DCT circuit 106 which performs the inverse DCT on the output of the inverse quantizer 105. The operation will be specifically described. It is assumed that, for example, results obtained by the blocking of 8 x 8 pixels and the transform in the DCT circuit 101 are arranged as shown in Fig. 2. The results are subjected to the run-length encoding by scanning them in a zig-zag manner as shown in Fig. 3. In a case of a specific example of data shown in Fig. 4, for example, these data are transformed by the run-length encoding into the data shown in the left side of Fig. 5. When subjected to the Huffman encoding using the Huffman encoding table shown in Fig. 6, these are trans-formed into codes having various code lengths as shown in the right side of Fig. 5. In general, after the blocking process, added is a data which is called EOB (End of Block) and indicates the end of a block. Fig. 7 shows the code configuration in an error correction system which is used very frequently in recent years and called the double Reed-Solomon. To the data of m bytes x n bits, at first, an error-correcting code of C n x m bytes is added in the longitudinal direction, and then an error-correcting code of C m x (n + C n ) bytes is added in the transverse direction, so as to perform the double error correction. Thereafter, the encoded data are transmitted. Fig. 8 shows an example of a specific transmission. The simplest transmission method is shown in Fig. 8 in which codes of m + C m bytes are transmitted in one unit and this is repeated (n + C n ) x 8 times (1 byte consists of 8 bits). In this case, the error-correcting code of C m bytes is referred to as C1 parity, and the error-correcting code of C n row as C2 parity. Since a transmission is conducted in the unit of one bit in a general digital transmission system, synchronous data (hereinafter, referred to as SYNC) for performing the synchronization for the conversion into the unit of byte, and identity data indicative of the row number (the position in the longitudinal direction) in Fig. 7 and their parity data (hereinafter, these are generally referred to as ID data) are added to the m + C m bytes, and thereafter the transmission is conducted. In order to improve the pulling-in of a PLL in the decoding system, a synchronous area which is sometimes called a preamble may be placed before the entire (n + C n ) x 8 cycles, and then the transmission is conducted. Recently, for business or domestic use, a recorder of the helical scan type has been employed for recording a large amount of data (especially, video data) on a magnetic tape. Fig. 9 shows an example of its tape pattern. As shown in Fig. 9, track patterns which are oblique with respect to the tape running direction are formed. This method is a very effective one because it is relatively easy to improve the area recording density as compared with the method in which data are recorded in parallel with the tape running direction. As seen also from Fig. 9, however, it is difficult to achieve the continuity in time between the tracks in the microscopic sense. In a VTR or the like for domestic use, for example, the portions connecting tracks are assigned to record the video signal regions called the vertical blanking periods which are affected in a reduced degree even if damaged. Namely, in such a VTR use double error correction is usually selected so that the block size for the error correction code is included within one track and does not extend over tracks. The Huffman coding described above is an example of variable-length encoding which is one of the means for efficiently transforming data having redundancy of a high level. This is described in general with reference to Fig. 10. A to F shown in Fig. 10, which are called symbols, indicate the states of data to be compressed. In the event that this encoding is used in combination with the run-length encoding, the zero run-length functions as a symbol, and in case of a gray-scale video signal the value itself functions as a symbol. When a video signal is subjected to the high-efficiency encoding, the combination of the orthogonal transform, the run-length encoding and the value itself may function as a symbol. Each symbol is assigned with a code in accordance its generation frequency. Fig. 10 shows an example in which generation frequencies are gradually decreased along the sequence of A to F. While the code-length of A is 1 bit, the code-length of F is 5 bits. In this way, the higher generation frequency a symbol has, a code of shorter code-length is allocated to the symbol. This causes the entire code-length to be shortened, thereby enabling the encoding to be efficiently performed. A block diagram of an encoder which adds error-correcting codes to thus encoded variable-length data is shown in Fig. 11. The encoder shown in Fig. 11 has a code converter 111 which performs the variable-length encoding, a buffer memory 112 which stores the capacity of m x n bytes shown in Fig. 7, and an error-correction encoding unit 113 which adds error-correcting codes of C1 parity and C2 parity. This encoder operates as follows: a code conversion process is done using, for example, an encoding table such as shown in Fig. 10 in a ROM or the like, and the code-converted data is stored in the buffer memory 112, and the error-correcting codes are added to the output of the buffer memory 112 by the error-correcting encoder 113, and then the data is sent out to a transmission channel. When a tape recorder of the helical scan type is employed as a transmission medium, there arise the problems described below. Fig. 12 shows a locus of a head trace of a tape recorder of the helical scan type in a trick play state such as the fast forward moving. In Fig. 12, L and R indicate the directions of azimuth recording which has an object of eliminating crosstalk components between adjacent tracks. The L and R azimuths are symmetric with respect to an axis perpendicular to the longitudinal direction of the track. Tracks of the L azimuth cannot be reproduced by the R azimuth head, and tracks of the R azimuth cannot be reproduced by the L azimuth head. In Fig. 12, the locus of a head trace in a high speed reproduction in which the tape velocity is eight times as that of the normal running is shown on the tape pattern. If the azimuth of this head is the L azimuth, tracks of the R azimuth cannot be reproduced, and therefore the reproduction output of the head is obtained only from the hatched portions in Fig. 12. This output is shown in Fig. 13. As shown in Fig. 13, in a high speed reproduction, a satisfactory output can be obtained only during a fixed period. Unless one or more C1 blocks are included within this period, it is impossible to perform the error correction in the C1 direction. Generally, one or more C1 blocks are included. In such a trick play, despite of the sign of double product, it is possible for the error correction to be performed only in one direction, and the decoding in a trick play also is generally performed in the unit of C1. In this case, assuming that, for example, data shown in Fig. 14 are recorded and that the reverse azimuth trace is conducted so that the portion before the dotted line cannot be decoded and the portion after the dotted line is decoded, when the decoding is performed on data after the dotted line using the encoding table of Fig. 10, there is a problem in that the original symbols F and A are erroneously decoded as symbol D. When an image signal is encoded, for example, the video signal is subjected to the DCT transform onto the frequency region as shown in Fig. 3, and then to the variable-length encoding by performing the run-length encoding as shown by the arrow. In such an encoding process, the problem of a changed symbol appears as data shifted to a different frequency region, so that the resulting image is entirely different from the original image. Furthermore, in the subband encoding which is frequently employed in a high-efficient encoding of an audio signal or the like, a signal such as shown in Fig. 15(A) is passed through a subband filter to be frequency-divided, whereby the signal is band-divided to be encoded as shown in Fig. 15(B), with the result that the problem of a changed decoding symbol appears as data shifted to an entirely different band. The problems of the high-efficient encoding and error correction blocking involve a serious problem in a transmission system of a tape medium, particularly in a trick play, etc. According to the present invention there is provided an encoder for encoding digital data for recording and subsequent reproduction in a normal mode or in a trick mode in which parts of the recorded data are reproduced, comprising: means for dividing input digital data into blocks of predetermined size; transform means for performing a discrete cosine transformation (DCT) of input digital data to produce DCT coefficients; variable-length encoding means for converting the DCT coefficients into a data string of variable-length encoded data; means for adding an error correcting code to the data string; characterised by: means for copying parts of the DCT coefficients as data to be used in the trick mode; and means for multiplexing the copied parts into respective predetermined positions in the data string, whereby on reproduction in the trick mode, said copied parts are sequentially reproduced. The invention also provides a corresponding decoder which comprises an error correction means for correcting errors using the error correcting code, means for decoding the variable-length encoded data and means for performing an inverse DCT; characterised in that in response to reproduction in the trick mode, wherein the parts of the recorded data are reproduced, said decoder is arranged to operate in a mode in which only copied parts at the predetermined positions in the data string is decoded. The invention allows the insertion of particular important information such as a high-efficient encoded data of one frame among several tens of frames, or data in which the compression ratio of each frame is raised, into a previously set position of a variable-length encoded data. Since, in a special reproduction such as a trick play, an important data can be located at a given position of the object of trace, only the important data can be entirely reproduced in the special reproduction. A decoder of the invention is provided with a mode in which only particular information at a previously set position after error-correcting decoding is decoded. Since only important data can be surely decoded even in a super high speed reproduction such as a trick play, a reproduced image of excellent quality can be obtained. Thus the invention can provide an encoder and decoder which can eliminate errors during a decoding operation in a system of intermittently transmitting data such as a trick play. The invention will be further described by way of example with reference to the accompanying drawings, in which:- Fig. 1 is a block diagram showing the configuration of a conventional encoder and decoder; Fig. 2 is a diagram showing blocks of the DCT; Fig. 3 is a diagram showing a sequence of a zig-zag scan for performing the run-length encoding in the variable-length encoding; Fig. 4 is a diagram showing a specific example of DCT coefficients; Fig. 5 is a diagram showing data which are obtained by performing the run-length encoding on Fig. 4 and the Huffman encoding using the Huffman encoding table of Fig. 6; Fig. 6 is a diagram showing a portion (an example) of a Huffman encoding table; Fig. 7 is a structural diagram of double Reed-Solomon codes; Fig. 8 is a diagram showing an example of a conventional code configuration to be transmitted; Fig. 9 is a diagram showing a tape pattern used in a tape recorder of the helical scan type; Fig. 10 is a diagram showing an example of a conventional variable-length encoding table; Fig. 11 is a block diagram showing the configuration of a conventional encoder; Fig. 12 is a diagram showing a locus of a head trace in a trick play state; Fig. 13 is a diagram showing an example of a reproduction envelope obtained when a high speed reproduction is done in a tape recorder of the helical scan type; Fig. 14 is a diagram indicating a problem of a conventional encoder; Fig. 15 is a diagram showing the subband encoding of audio data; Fig. 16 is a block diagram showing the configuration of an encoder according to an embodiment of the invention; Fig. 17 is a block diagram showing the configuration of characteristic portions of a corresponding decoder; Fig. 18 is a diagram showing the operation of the decoder; and Fig. 19 is a diagram illustrating another improvement in the decoder. Fig. 16 is a block diagram showing the configuration of an encoder embodying the invention. In Fig. 16, 37 designates a switch which turns ON only when a special data is input into the code converter 16, 39 a first buffer memory which stores the output of the code converter 16, 40 a second buffer memory which stores data input through the switch 37, and 38 a switch which selects between the outputs of the first and second buffer memories 39 and 40. Next, the operation will be described. Input signals are variable-length encoded by the code converter 16 and stored in the first buffer memory 39. On the other hand, when a special data is to be encoded, the switch 37 is turned ON so that the special data is stored in the second buffer memory 40. The switch 38 is normally connected to the upper side (the side of the first buffer memory 39), and, when a specific position of the m x n bytes is pointed out, is connected to the lower side (the side of the second buffer memory 40) so that the reading out of the second buffer memory 40 is started. The contents of a certain fixed data length of the second buffer memory 40 are time-division-multiplexed and then supplied to the error-correction encoding unit 23. Naturally, the reading out of the second buffer memory 40 is conducted only when the switch 38 is connected to the lower side, and during this period the reading out of the first buffer memory 39 is stopped. When the connection of the switch 38 is changed, the reading out of the buffer memory 39 is started from the address at which the reading out has been stopped, and the reading out of the second buffer memory 40 is stopped. Specific examples of cases in which the switch 37 is turned ON will be described. When a video signal is to be encoded, it is general to perform the DCT and variable-length encode the DCT coefficients. Usually, the lower frequency DCT coefficients have a more important meaning, and therefore it is possible to obtain a rough recognition of an image using only a sequence of such lower frequency coefficients. If in such a case the switch 37 is operated to turn ON so as to send only the results of encoding the lower sequence, the data of the lower sequence becomes an image which is double-drawn in a time-axis multiplex state. In an extreme case, the lower sequence may consist of a DC component only, and it is possible to understand a scene formed by a DC component only, and therefore a DC component only is double-drawn. Since, in view of a transmission capacity, it is preferable that the amount of data to be double-drawn is as small as possible, the encoding may be performed only on the upper some bits of the DC component. In such a case, however, the encoder may be so configured that the fixed length code before the code conversion is connected to the switch 37. In a scan type such as the NTSC system or PAL system, signals of the odd and even fields in one frame are similar to each other, and therefore calculation means for obtaining the sum of DC components in the fields may be provided, or a calculation means for obtaining a mean value of DC components of four DCT blocks en bloc may be provided and the calculation results may be stored in the second buffer memory 40. For example, the operations of averaging DC components of four DCT blocks en bloc, obtaining the sum of the fields, rounding it to 5 bits and storing it in the second buffer memory 40 allow basic data of an image to exist with the code amount of about 3 % of the all data (excluding error-correcting codes) . When this data is time-axis multiplexed so as to be positioned in the hatched portions of Fig. 12, it is possible to obtain this basic data with a certain constant high speed reproduction. According to calculations, data can be arranged so that a 20-fold or less super high speed reproduction can reproduce this data. It is not necessary that the double-drawn data is written in all frames. Encoding results obtained from only one of several tens of frames are stored in the second buffer memory 40, and the switching operation of the switch 38 is conducted in such a manner that they are gradually time-axis multiplexed during the time period corresponding to the several tens of frames and allows the data to be arranged so as to be reproduced in a super high speed reproduction. Furthermore, a suitable combination of the above-described examples such as that the encoding is performed on coefficients which are higher than the DC components though still relatively low frequency of only one of several tens of frames may be used. In the description above, special reproductions are mainly described, but it is apparent that when a non-correctable error occurs it may be used in the interpolation wherein the error data is interpolated on the basis of the double-drawn data. For example, a method which employs data of the DC components may be used. Fig. 17 is a block diagram showing the configuration of characteristic portions of a decoder. In Fig. 17, 41 designates an inverse DCT circuit which performs the inverse DCT only on input DC components, and 42 an overlap smoothing circuit which makes the boundary of blocks inconspicuous. Next, the operation will be described. This embodiment differs from a conventional decoder in that it has a mode in which, when it enters in an operation state such as a super high speed reproduction, an image is decoded only from double-drawn data. The approach method slightly varies according to the kind of data which has been double-drawn during the encoding. For example, in a case that the DC components only are double-drawn in the encoder of the above-described embodiment, only one data exists for each DCT block (or for every four DCT blocks), and therefore the boundary of DCT blocks can be clearly detected, and the boundary of blocks has a rectangular shape. Hence, it rather obstructs the scene recognition of an image. A circuit for reducing it is shown in Fig. 17. The inverse DCT circuit 41 performs the inverse DCT only on DC components to obtain a block-shaped image as shown in Fig. 18(A). In Fig. 18(A), eight blocks A-J with the block E as the centre are shown. The size of the block E coincides with the DCT block size (usually, 8 x 8 pixels) when data of each block of the DCT are double-drawn, and to the 4-DCT block size when the DC mean value of 4 DCT blocks is appended. After these data which produce a block-shaped reproduction display are obtained, the overlap smoothing circuit 42 makes the boundary of blocks inconspicuous, thereby obtaining basic data which will be output to a TV monitor as a super high speed reproduction display. Hereinafter, the operation of the overlap smoothing circuit 42 will be described. It is assumed that, for example, the decoded data of each of the blocks A-J in Fig. 18(A) is a block in which the block of itself is expanded to be quadrupled in area and doubled in length, centering around itself. This causes the nine blocks of Fig. 18(A) which are compactly arranged, to overlap, with the result that the blocks overlap as shown in Fig. 18(B). A' of Fig. 18(B) is a block which is obtained by expanding A of Fig. 18(A), and B', C', D' and E' indicate blocks which are obtained by expanding B, C, D and E, respectively. The manner of processing under such a state the value of the hatched portion of, for example, block E (indicated by dotted lines in Fig. 18(B)) to make the block boundary in-conspicuous will be illustrated. The part of the hatched portion of Fig. 18(B) which is in the vicinity of the centre of block E allows block E to pass as it is, and the part which is in the vicinity of the boundary of block E reduces by half the data of block E, and averages them so as to be added with the overlap portion from other blocks. Specifically, block E' is multiplied by a window function such as a sine function and added to the data of the overlap portion. In this case, attention must be paid so that the addition of the overlap portion does not cause the expansion of the dynamic range. Namely, attention is paid so that the result of the multiplication of a function having the value equal to or less than 1 and the addition is prevented from becoming 1 or more. Furthermore, the same effect can be achieved by performing the inverse DCT as a smoothing means other than overlap smoothing, so as to interpolate its DCT coefficient from the DCT coefficients of adjoining blocks such as shown in Fig. 19(A). An example of interpolating the next higher sequence, for example, only from DC components will be il-lustrated below. For example, the component C21 (shown in Fig. 19(B)) of block E is obtained by subtracting the DC component of block H from the DC component of block B and by multiplying a certain coefficient P(""-), and the component C12 by subtracting the DC component of block F from the DC component of block D and by multiplying the coefficient P. In view of the basis function of the DCT, it will be understood that such an interpolation can be well done. Thus with the invention a data of a high compression ratio is again inserted during the encoding process into a prefixed position, and therefore it has an advantage that an important data is positioned at a location at which the reproduction is surely done during a special reproduction, so that only important data can be entirely reproduced in the special reproduction. Moreover, a mode in which only an important data is decoded is provided in the de-coding, and therefore it has an advantage that a re-production image of excellent quality can be obtained even in a super high speed reproduction.

Claims: An encoder for encoding digital data for recording and subsequent reproduction in a normal mode or in a trick mode in which parts of the recorded data are reproduced, comprising: means for dividing input digital data into blocks of predetermined size; transform means for performing a discrete cosine transformation (DCT) of input digital data to produce DCT coefficients; variable-length encoding means (16) for converting the DCT coefficients into a data string of variable-length encoded data; means (23) for adding an error correcting code to the data string; characterised by: means (37,40) for copying parts of the DCT coefficients as data to be used in the trick mode; and means (38) for multiplexing the copied parts into respective predetermined positions in the data string, whereby on reproduction in the trick mode, said copied parts are sequentially reproduced. An encoder according to claim 1 wherein said means (38) for multiplexing is arranged to multiplex the copied parts into the data string prior to the addition of said error correcting code. An encoder according to any one of the preceding claims, wherein said digital data is digital video data. An encoder according to claim 3, wherein, in use, each of the copied parts corresponds to video data from one frame which is multiplexed amongst video data of several tens of frames. A decoder for decoding a reproduced data string encoded by the encoder of any one of the preceding claims, the decoder comprising an error correction means for correcting errors using the error correcting code, means for decoding the variable-length encoded data and means for performing an inverse DCT; characterised in that in response to reproduction in the trick mode, wherein the parts of the recorded data are reproduced, said decoder is arranged to operate in a mode in which only copied parts at the predetermined positions in the data string are decoded. A decoder according to claim 5, wherein said data string comprises encoded digital video data and said trick mode comprises super high speed reproduction. An encoder/decoder for encoding a digital video signal for recording it on a recording medium, and decoding the encoded data for reproducing the original video signal from the recording medium, comprising an encoder according to claim 3 or 4 in combination with a decoder according to claim 5 or 6 arranged to decode digital video data encoded by the encoder of the encoder/decoder.

Inventors: ITOW TAKASHI, MISHIMA HIDETOSHI, MISHIMA, HIDETOSHI, ITOW TAKASHI MITSUBISHI DENKI K. K., MISHIMA, HIDETOSHI MITSUBISHI DENKI K.K
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N7
IPC codes: H03M7, H04N5, H04N7, H04N9