For example, in systems that transmit moving-image signals to a remote place, for example, in video conference systems and videophone systems, the line correlation and inter-frame correlation of video signals are used, in order to efficiently use a transmission path, to compress and encode image signals.
When image signals are compressed and encoded, the encoding is performed so that a bit stream generated has a predetermined bit rate. However, in an actual operation, a need for converting the bit rate of bit streams may arise due to the problem of a transmission path.
For example, when transmitted image signals are edited at a broadcast station, the editing is performed at every second. It is, therefore, desirable that the image information of a frame be independent from the image information of another frame. Accordingly, in order to ensure that the image quality does not deteriorate even with transfer at a low bit rate (e.g., 3 to 9 Mbps), there is a need to perform mutual conversion between a long GOP (Group of Picture) and a short GOP, between of which information is correlated. The long GOP has a large number of frames constituting a GOP, which is a combination of frames, and the short GOP has a small number of frames constituting a GOP and is transferred at a high bit rate (18 to 50 Mbps).
A system that is capable of editing frames, for example, by encoding the stream data of a long GOP transmitted/received through a transmission path into the stream data of all intra-frames (All Intra), which are included in a short GOP, will be described with reference to FIG. 1.
The stream data of a long GOP suitable for transmission is transmitted to a transmission path 1.
In a transcoder 2, the decoding unit 21 temporarily decodes the stream data of an MPEG Long GOP, the stream data being supplied through the transmission path 1, and an encoding unit 22 encodes the stream data so that it becomes all intra-frames (All Intra) and outputs the encoded all intra stream data (an SDTI CP (Serial Data Transport Interface-Contents Package) stream) to a frame editing device 3 having an SDTI CP interface.
The stream data that has been subjected to frame editing by the frame editing unit 3 is supplied to a transcoder 4. In the transcoder 4, a decoding unit 31 temporarily decodes the supplied all-intra stream data, and then an encoding unit 32 encodes the stream data so that it becomes an MPEG Long GOP and outputs the stream data of the encoded MPEG long GOP to a predetermined data transmission destination thorough the transmission path 1.
A system that is capable of encoding an input image into an MPEG long GOP at a high bit rate and decoding it so that it is re-encoded into a low-bit-rate MPEG long GOP will be described with reference to FIG. 2.
In a transcoder 51, a decoding unit 61 temporarily decodes a supplied uncompressed input image and an encoding unit 62 then encodes the input data so that it becomes a high-bit-rate MPEG long GOP and outputs the stream data of the encoded MPEG Long GOP. In a transcoder 52, a decoding unit 71 temporarily decodes the supplied high-bit-rate MPEG long GOP, and an encoding unit 72 then encodes the long GOP so as to provide a low-bit-rate MPEG long GOP and outputs the stream data of the encoded low-bit-rate MPEG long GOP to a predetermined data transmission destination through the transmission path 1.
When the encoding and decoding of image information are repeated as described above, a change in an encoding parameter used at every encoding operation causes the image information to deteriorate. In order to prevent the image-information deterioration, Japanese Unexamined Patent Application Publication No. 2000-059788 discloses a technology that can suppress the image deterioration, involved in the re-encoding, by using encoding history information inserted in a user data area in a bit-stream picture layer.
For example, a case in which encoding history information is used in a system that is capable of converting an MPEG long GOP into a short GOP that allows frame editing will be described with reference to FIG. 3. Units corresponding to those in FIG. 1 are denoted with the same reference numerals and the descriptions thereof are omitted as appropriate.
That is, a transcoder 101 receives an MPEG long GOP through the transmission path 1.
Since an MPEG long GOP is constituted by three types of pictures (I pictures, P pictures, and B pictures) which have different encoding formats, video data encoded therefrom also has an I-picture, P-picture, or B-picture format, depending on a frame. Thus, in a case in which the video data is re-encoded using an MPEG long GOP, when encoding for another picture type is performed on video data having the I picture, P picture, or B picture format, image deterioration may occur. For example, when video data for a B picture, which is more likely to cause distortion than an I picture and P picture, is encoded as an I picture before decoding, image deterioration occurs since pictures around it predicts the I picture as a reference image to perform encoding.
In order to prevent such image degradation caused by re-encoding, for example, when the transcoder 101 receives stream data encoded in the past by another transcoder through the transmission path 1, a decoding unit 111 temporarily decodes the stream data of the supplied MPEG long GOP and an encoding unit 112 then performs encoding such that all of the decoded stream data becomes intra-frames. In this case, parameters of encoding performed in the past, i.e., parameters such as a picture type or quantization value of encoding of encoded stream supplied to the decoding unit 111, are attached to the all-intra encoded stream, as history information (history data) based on SMPTE (Society of Motion Picture and Television Engineers) 328, and the resulting stream is supplied to the frame editing device 3.
The stream data that has been subjected to frame editing by the frame editing unit 3 is supplied to a transcoder 102 again. In the transcoder 102, a decoding unit 121 decodes the supplied all-intra stream data with the history information. An encoding unit 122 uses necessary parameters, such as a picture type and a quantization value, contained in the decoded history information to re-encode the data into a long GOP, and outputs the long GOP.
A case in which image deterioration is prevented for re-encoding in a system that can encode uncompressed data into an MPEG long GOP at a high bit rate and re-encode, by decoding, the GOP into a low-bit-rate long GOP, as described with reference to FIG. 2, will be described with reference to FIG. 4. Units corresponding to those in the case of FIG. 2 are denoted with the same reference numerals and the descriptions thereof are omitted as appropriate.
That is, upon receiving the stream data of the MPEG long GOP encoded by the transducer 51, a transcoder 131 obtains necessary encoding parameters when a decoding unit 141 decodes a high-bit-rate MPEG long GOP, and supplies decoded video data and the obtained encoding parameters to an encoding unit 142. The encoding unit 142 uses the supplied encoding parameters to encode the video data so that it becomes a low-bit-rate MPEG long GOP and outputs the steam data of the encoded low-bit-rate MPEG long GOP.
As described above, reusing past-encoding information (picture-layer and macroblock-layer parameters, such as a picture type, motion vector, quantization value in encoding performed in the past), by using the history information or encoding parameters, to perform encoding makes it possible to prevent image deterioration. However, for example, a stream that is different in a bit rate, image frame, or chroma format from a stream during the previous encoding processing may be replaced or inserted through editing. In such a case, re-encoding cannot be performed by reusing all encoding information from the picture layer to the macroblock layer.