Video coding method and decoding method and devices thereof
A new predictive coding is used to increase the temporal frame rate and coding efficiency without introducing excessive delay. Currently the motion vector for the blocks in the bi-directionally predicted frame is derived from the motion vector of the corresponding block in the forward predicted frame using a linear motion model. This however is not effective when the motion in the image sequence is not linear. The efficiency of this method can be further improved if a non-linear motion model is used. In this model a delta motion vector is added to or subtracted from the derived forward and backward motion vector, respectively. The encoder performs an additional search to determine if there is a need for the delta motion vector. The presence of this delta motion vector in the transmitted bitstream is signalled to the decoder which then takes the appropriate action to make use of the delta motion vector to derive the effective forward and backward motion vectors for the bi-directionally predicted block.
Latest Matsushita Electric Industrial Co., Ltd. Patents:
- Cathode active material for a nonaqueous electrolyte secondary battery and manufacturing method thereof, and a nonaqueous electrolyte secondary battery that uses cathode active material
- Optimizing media player memory during rendering
- Navigating media content by groups
- Optimizing media player memory during rendering
- Information process apparatus and method, program, and record medium
This application is a divisional reissue application of U.S. Pat. No. 5,825,421, issued Oct. 20, 1998. This application also has a related divisional reissue application Ser. No. 09/691,858, filed on Oct. 18, 2000.
BACKGROUND OF THE INVENTION1. Field of the Invention
This invention can be used in low bit rate video coding for tele-communicative applications. It improves the temporal frame rate of the decoder output as well as the overall picture quality.
2. Related art of the Invention
In a typical hybrid transform coding algorithm such as the ITU-T Recommendation H.261 [1] and MPEG [2] motion compensation is used to reduce the amount of temporal redundancy in the sequence. In the H.261 coding scheme, the frames are coded using only forward prediction, hereafter referred to as P-frames. In the MPEG coding scheme, some frames are coded using bi-direction prediction, hereafter referred to as B-frames. B-frames improve the efficiency of the coding scheme. Now the [1] is ITU-T Recommendation H.261 (Formerly CCITT Recommendation H.261) Codes for audiovisual services at p×64 kbit/s Geneva, 1990 , and the [2] is ISO/IEC 11172-2 1993 , Information technology—Coding of moving pictures and associated audio for digital storage media at up to about 1,5 Mbit/s - Part 2: Video.
However, it introduces delay in the encoding and decoding, making it unsuitable for applications in the communicative services where delay is an important parameter.
In the PB-block only the motion vectors for the P-block is transmitted to the decoder. The forward and backward motion vectors for the B-block is derived from the P motion vectors. A linear motion model is used and the temporal reference of the B and P frame is used to scale the motion vector appropriately.
MVF=(TRB×MV)/TRP (1)
MVB=((TRB−TRP)×MV)/TRP (2)
where
-
- MV is the motion vector of the P-block,
- MVF and MVB are the forward and backward motion vectors for the B-block,
- TRB is the increment in the temporal reference from the last P-frame to the current B-frame, and
- TRP is the increment in the temporal reference from the last P-frame to the current P-frame.
Currently the method used in the prior art assumes a linear motion model. However this assumption is not valid in a normal scene where the motion is typically not linear. This is especially true when the camera shakes and when objects are not moving at constant velocities.
A second problem involves the quantization and transmission of the residual of the prediction error in the B-block Currently the coefficients from the P-block and the B-block are interleaved in some scanning order which requires the B-block efficients to be transmitted even when they are all zero. This is not very efficient as it is quite often that there are no residual coefficients to transmit (all coefficients are zero).
SUMMARY OF THE INVENTIONIn order to solve the first problem, the current invention employs a delta motion vector to compensate for the non-linear motion. Thus it becomes necessary for the encoder to perform an additional motion search to obtain the optimum delta motion vector that when added to the derived motion vectors would result in the best match in the prediction This delta motion vectors are transmitted to the decoder at the block level only when necessary. A flag is used to indicate to the decoder if there are delta motion vectors present for the B-block.
For the second problem, this invention also uses a flag to indicate if there are coefficients for the B-block to be decoded.
The operation of the Invention is described as follows.
In the current invention the problem is solved by adding a small delta motion vector to the derived motion vector to compensate for the difference between the derived and true motion vector. Therefore the equations in (1) and (2) are now replaced by equations (3) and (4), respectively.
MVF′=(TRB×MV)/TRP+MVDelta (3)
MVB′=((TRB−TRP)×MV)/TRP−MVDelta (4)
where
-
- MV is the motion vector of the P-block,
- MVDelta is the delta motion vector,
- MVF′ and MVB′ are the new forward and backward motion vectors for the B-block according to the current invention,
- TRB is the increment in the temporal reference from the last P-frame to the current B-frame, and
- TRP is the increment in the temporal reference from the last P-frame to the current P-frame.
- Note: Equations (3) and (4) are used for the motion vector in the horizontal as well as the vertical directions. Thus the motion vectors are in pairs and there are actually two independent delta motion vectors, one each for the horizontal and vertical directions.
The preferred embodiment of the current invention is described here.
The encoding functionality block diagram depicts an encoder using a motion estimation and compensation for reducing the temporal redundancy in the sequence to be coded. The input sequences is organized into a first frame and pairs of subsequent frames. The first frame, hereafter referred to as the I-frame, is coded independent of all other frames. The pairs of subsequent frames, hereafter referred to as PB-frame, consist of a B-frame followed by a P-frame. The P-frame is forward predicted based on the previously reconstructed I-frame or P-frame and the B-frame is bi-directionally predicted based on the previously reconstructed I-frame or P-frame and the information in the current P-frame.
The input frame image sequence, 1, is placed in the Frame Memory 2. If the frame is classified as an I-frame or a P-frame it is passed through line 14 to the Reference Memory 3, for use as the reference frame in the motion estimation of the next PB-frame to be predictively encoded. The signal is then passed through line 13 to the Block Sampling module 4, where it is partitioned into spatially non-overlapping blocks of pixel data for further processing.
If the frame is classified as an I-frame, the sampled blocks are passed through line 16 to the DCT module 7. If the frame is classified as a PB-frame, the sampled blocks are passed through line 17 to the Motion Estimation module 5. The Motion Estimation module 5 uses information from the Reference Frame Memory 3 and the current block 17 to obtain the motion vector for that provides the best match for the P-block The motion vector and the local reconstructed frame, 12, are passed through line 19 and 20, respectively, to the Motion Compensation module 6. The difference image is formed by subtracting the motion compensated decoded frame, 21, from the current P-block, 15. This signal is then passed through line 22 to the DCT module 7.
In the DCT module 7, each block is transformed into the DCT domain coefficients. The transform coefficients are passed through line 23 to the Quantization module 8, where they are quantized. The quantized coefficients are then passed through line 24 to the Run-length & Variable Length Coding module 9. Here the coefficients are entropy coded to form the Output Bit Stream, 25.
If the current block is an I-block or a P-block, the quantized coefficients are also passed through line 26 to the Inverse Quantization module 10. The output of the Inverse Quantization 10, is then passed through line 27 to the Inverse DCT module 11. If the current block is an I-block then the reconstructed block is placed, via line 28, in the Local Decoded Frame Memory 12. If the current block is a P-block then the output of the Inverse DCT 29 is added to the motion compensated output 21, to from the reconstructed block 30. The reconstructed block 30, is then placed in the Local Decoded Frame Memory 12, for the motion compensation of the subsequent frames.
After the P-block have been locally reconstructed, the information is passed again to the Motion Compensation Module 6, where the prediction of the B-block is formed.
The prediction difference block is then passed through line 22 to the DCT module 7. The DCT coefficients are then passed through line 23 to the Quantization module 8. The result of the Quantization module 8, is passed through line 24 to the Run-length & Variable Length Coding 9. In this module the presence of the delta motion vector and the quantized residual error in the Output Bitstream 25, is indicated a variable length code, NOB which is the acronym for No B-block This flag is generated in Run-length & Variable Length Coding module 9 based on whether there are residual error in the Quantization module 8 and delta motion vectors found in the Delta Motion Search module 54 is not zero. Table 1 provides the preferred embodiment of the variable length code for the NOB flag. The variable length code of the NOB flag is inserted in the Output Bitstream, 25, prior to the delta motion vector and quantized residual error codes.
If the current frame is an I-frame then the output of Inverse DCT 34, is passed through line 39 and stored in the Frame Memory 42.
If the current frame is a PB-frame, the side information containing the motion vectors are passed through line 45 to the Motion compensation module 36. The motion Compensation module 36, uses this information and the information in the Local Decoded Memory, 35, to from the motion compensated signal, 44. This signal is then added to the output of the Inverse DCT module 34, to form the reconstruction of the P-block.
The Motion Compensation module 36, then uses the additional information obtained in the reconstructed P-block to obtain the bi-directional prediction for the B-block. The B-block is then reconstructed and placed in the Frame Memory, 42, together with the P-block.
By implementing this invention, the temporal frame rate of the decoded sequences can be effectively doubled at a fraction of the expected cost in bit rate. The delay is similar to that of the same sequence decoded at half the frame rate.
As described above in the present invention a new predictive coding is used to increase the temporal frame rate and coding efficiency without introducing excessive delay. Currently the motion vector for the blocks in the bi-directionally predicted frame is derived from the motion vector of the corresponding block in the forward predicted frame using a linear motion model. This however is not effective when the motion in the image sequence is not linear. According to this invention, the efficiency of this method can be further improved if a non-linear motion model is used. In this model a delta motion vector is added to or subtracted from the derived forward and backward motion vector, respectively. The encoder performs an additional search to determine if there is a need for the delta motion vector. The presence of this delta motion vector in the transmitted bitstream is signalled to the decoder which then takes the appropriate action to make use of the delta motion vector to derive the effective forward and backward motion vectors for the bi-directionally predicted block.
Claims
1. A method for encoding a sequence of video image frames comprising the steps of:
- dividing a source sequence into a set of group of pictures, each group of pictures comprising a first frame (I-frame) followed by a plurality of pairs of predictively encoded frames (PB-frame pairs), each PB-frame pair having a corresponding P-block;
- dividing each I-frame or PB-frame pair into a plurality of spatially non-overlapping blocks of pixel data;
- encoding the blocks from the I-frame (I-blocks) independently from any other frames in the group of pictures;
- predictively encoding the blocks from the second frame of the PB-frame pair (P-blocks), based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair;
- bi-directionally predictively encoding the blocks from the first frame of the PB-frame pair (B-blocks), based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair and the corresponding P-block in the current PB-frame pair;
- deriving a scaled forward motion vector and a scaled backward motion vector for the B-block by scaling the motion vector of the corresponding P-block in the current PB-frame pair;
- obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector; and
- obtaining a final backward motion vector for the B-block by subtracting the delta motion vector from the scaled backward motion vector.
2. A method for encoding a sequence of video image frames according to claim 1, wherein
- the scaling of the motion vector is based on a temporal reference of the first and second frames of the PB-frame pair.
3. A method for encoding a sequence of video image frames according to claim 1, further comprising the step of forming an encoded output, wherein the encoded output is a bitstream comprising:
- temporal reference information for the first and second frames of the PB-frame pairs;
- motion vector information for the P-blocks;
- quantized residual error information for the P-blocks;
- delta motion vector information for the B-blocks; and
- quantized residual error information for the B-blocks.
4. A method for encoding a sequence of video image frames according to claim 3, wherein
- the output bitstream contains additional information to indicate the presence of at least one of:
- the delta motion vector information for the B-blocks; and
- the quantized residual error information for the B-blocks.
5. A method for decoding a sequence of video image frames comprising the steps of:
- decoding the compressed video image sequence as a set of group of pictures, each group of pictures comprising an I-frame followed by a plurality of PB-frame pairs, each PB-frame pair having a corresponding P-block;
- decoding each I-frame or PB-frame pair into a plurality of spatially non-overlapping blocks of pixel data;
- decoding the I-blocks from the I-frame independently from any other frames in the group of pictures;
- predictively decoding the P-blocks from the second frame of the PB-frame pair based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair;
- bi-directionally predictively decoding the B-blocks from the first frame of the PB-frame pair based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair and the corresponding P-block in the current PB-frame pair;
- deriving a scaled forward motion vector and a scaled backward motion vector for the B-block by scaling the motion vector of the corresponding P-block in the current PB-frame pair;
- obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector; and
- obtaining a final backward motion vector for the B-block by subtracting the delta motion vector from the scaled backward motion vector.
6. A method for decoding a sequence of video image frames according to claim 5, further comprising the step of forming a decoded output, wherein the decoded output is responsive to a bitstream comprising:
- temporal reference information for the first and second frames of the PB-frame pairs;
- motion vector information for the P-blocks;
- quantized residual error information for the P-blocks;
- the delta motion vector information for the B-blocks; and
- quantized residual error information for the B-blocks.
7. A method for decoding a sequence of video image frames according to claim 6, wherein
- the bitstream contains additional information to indicate the presence of at least one of:
- the delta motion vector information for the B-blocks; and
- the quantized residual error information for the B-blocks.
8. A method of decoding a sequence of video image frames according to claim 5, wherein
- the scaling is based on a temporal reference of the first and second frames of the PB-frame pair.
9. An apparatus for encoding a sequence of video image frames comprising:
- means for encoding each frame in a sequence of video image frames into a set of group of pictures, each group of pictures comprising an I-frame followed by a plurality of PB-frame pairs;
- means for dividing the I-frame and the PB-frame pair into a plurality of spatially non-overlapping blocks of pixel data;
- means for encoding and decoding the I-blocks of the I-frame independently from any other frames in the group of pictures;
- means for storing the decoded I-blocks to predictively encode subsequent frames;
- means for predictively encoding and decoding the P-blocks of the second frame of the PB-frame pair based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair;
- means for storing the decoded P-blocks to predictively encode subsequent frames;
- means for deriving a scaled forward motion vector and a scaled backward motion vector for a B-block by scaling the motion vector of the corresponding P-block in the current PB-frame pair, the B-block being the first frame of the PB-frame pair;
- means for obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector;
- means for obtaining a final backward motion vector for the B-block by subtracting the same delta motion vector from the scaled backward motion vector; and
- means for encoding the B-blocks of the first frame of the PB-frame pairs based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair and the corresponding P-block in the current PB-frame pair using the final forward motion vector and the final backward motion vector.
10. An apparatus for decoding a sequence of video image frames comprising:
- means for decoding each frame in a sequence of video image frames into a set of group of pictures, each group of pictures comprising an I-frame followed by a plurality of PB-frame pairs;
- means for decoding the I-blocks of the I-frame independently of any other frames in the group of pictures;
- means for storing the decoded I-blocks to predictively decode subsequent frames;
- means for decoding the P-blocks of the second frame of the PB-frame pair based on the I-blocks in the previous I-frame or the P-blocks in the previous PB-frame pair;
- means for storing the decoded P-blocks to predictively decode subsequent frames;
- means for deriving a scaled forward motion vector and a scaled backward motion vector for a B-block by scaling the motion vector of the corresponding P-block in the current PB-frame pair, the B-block being the first frame of the PB-frame pair;
- means for obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector;
- means for obtaining a final backward motion vector for the B-block by subtracting the delta motion vector to the scaled backward motion vector; and
- means for decoding the B-blocks of the first frame of the PB-frame pairs based on the I-blocks in the previous I-frame of the P-blocks in the previous PB-frame pair and the corresponding P-block in the current PB-frame pair using the final forward motion vector and the final backward motion vector.
11. A method for encoding a sequence of video image frames comprising the steps of:
- dividing a source sequence into a plurality of groups of pictures, each group of pictures comprising a first frame (I-frame) followed by a plurality of pairs of predictively encoded frames (PB-frame pairs);
- dividing each I-frame or PB-frame pair into a plurality of blocks;
- encoding the blocks from the I-frame;
- predictively encoding the blocks from the second frame of the PB-frame pair;
- bi-directionally predictively encoding the blocks from the first frame of a PB-frame pair (B-blocks);
- deriving a scaled forward motion vector and a scaled backward motion vector for the B-block;
- obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector; and
- obtaining a final backward motion vector for the B-block by subtracting the delta motion vector from the scaled backward motion vector.
12. An apparatus for encoding a sequence of video image frames comprising:
- means for dividing a source sequence into a plurality of groups of pictures, each group of pictures comprising a first frame (I-frame) followed by a plurality of pairs of predictively encoded frames (PB-frame pairs);
- means for dividing each I-frame or PB-frame pair into a plurality of blocks;
- means for encoding the blocks from the I-frame;
- means for predictively encoding the blocks from the second frame of the PB-frame pair;
- means for bi-directionally predictively encoding the blocks from the first frame of a PB-frame pair (B-blocks);
- means for deriving a scaled forward motion vector and a scaled backward motion vector for the B-block;
- means for obtaining a final forward motion vector for the B-block by adding a delta motion vector to the scaled forward motion vector; and
- means for obtaining a final backward motion vector for the B-block by subtracting the delta motion vector from the scaled backward motion vector.
13. A method for encoding a sequence of video image frames comprising the steps of:
- dividing a source sequence into a group of pictures, each group of pictures comprising an I-frame followed by a plurality of P-frames and B-frames,
- dividing each I-frame, P-frame and B-frame into a plurality of spatially non-overlapping blocks of pixel data;
- encoding a block in the I-frame independently from any other frames in the group of pictures;
- predictively encoding a block in a P-frame, based on the I-frame positioned before the P-frame or a previous P-frame positioned before the P-frame;
- bi-directionally predictively encoding a block in a B-frame, based on the I-frame positioned before the B-frame or the previous P-frame and the P-frame positioned after the B-frame;
- deriving a scaled forward motion vector and a scaled backward motion vector for the block in the B-frame by scaling a motion vector of the block predictively encoded in the P-frame positioned after the B-frame;
- obtaining a final forward motion vector for the block in the B-frame by adding a delta motion vector to the scaled forward motion vector; and
- obtaining a final backward motion vector for the block in the B-frame by adding the delta motion vector to the scaled backward motion vector.
14. A method for encoding a sequence of video image frames according to claim 13, wherein the deriving step includes
- scaling of the forward and backward motion vectors is based on a temporal reference of the P-frame and B-frame.
15. A method for encoding a sequence of video image frames according to claim 13, further comprising the step of forming an encoded output, wherein the encoded output is a bitstream comprising:
- temporal reference information for the B-frame and the P-frame;
- motion vector information for the block in the P-frame;
- quantized residual error information for the block in the P-frame;
- delta motion vector information for the block in the B-frame; and
- quantized residual error information for the block in the B-frame.
16. A method for encoding a sequence of video image frames according to claim 15, wherein
- the output bitstream contains additional information indicating a presence of at least one of the delta motion vector information for the block in the B-frame; and the quantized residual error information for the block in the B-frame.
5136378 | August 4, 1992 | Tsurube |
5144426 | September 1, 1992 | Tanaka et al. |
5150432 | September 22, 1992 | Ueno et al. |
5155593 | October 13, 1992 | Yonemitsu et al. |
5267334 | November 30, 1993 | Normille et al. |
5293229 | March 8, 1994 | Iu |
5315326 | May 24, 1994 | Sugiyama |
5361105 | November 1, 1994 | Iu |
5386234 | January 31, 1995 | Veltman et al. |
5412428 | May 2, 1995 | Tahara |
5436665 | July 25, 1995 | Ueno et al. |
5467136 | November 14, 1995 | Odaka et al. |
5481310 | January 2, 1996 | Hibi |
5905534 | May 18, 1999 | Sumihiro et al. |
6104753 | August 15, 2000 | Kim et al. |
6184935 | February 6, 2001 | Iaquinto et al. |
6219383 | April 17, 2001 | Park |
651574 | May 1995 | EP |
- Secretariat: Japan (JISC), “Coded Representation of Audio, Picture, Multimedia and Hypermedia Information,” ISO/IEC JTC 1/SC 29 N 313, dated May 20, 1993.
- “Recommendation H.261-Video Codec for Audiovisual at px 64 kbit/s”, International Telegraph and Telephone Consultative Committee, Study Group XV—Report R 37, Aug. 1990.
- Han et al., Efficient encoding of dense motion fields of motion-compensated compression, Image Processing, 1999. ICIP 99. Proceedings 1999 International Conference vol. 1, 1999, pp. 84-88.
- Yo, Y et al., Adaptive quantization without side information using scalar-vector quantization and trellis quantization, Signals, Systems and Computers, 1995. Conference Record of the Twenty-Nine Asilomar Conference on, vol. 2, 1996, pp. 1398-1402.
- K. Rijkae, “H-263: Video Coding For Low-Bit-Rate Communication”, IEEE Communications Magazine vol. 34, No. 12, Dec. 1, 1996, pp. 42-45, XP000636452.
- K. Rijkse, “ITU Standardization of Very Low Bitrate Video Coding Algorithms”, vol. 7, No. 4, pp. 553-565, XP004047099, Nov. 1, 1995.
- Kozu et al., “A new Technique for Block-Based Motion Compensation”, pp. V/217-20, vol. 5, XP002151093, Apr. 1, 1994.
- “Transmission of Non-Telephone Signals Information Technology-Generic Coding of Moving Pictures and Associated Audio Information: Video”, ITU-T Telecommunication Standardization Sector of ITU, XX, XX, Jul. 1, 1995, pp. A-B, I-VIII, 1, XP000198491.
- W. Lynch, “Bidirectional Motion Estimation Based On P Frame Motion Vectors and Area Overlap”, vol. Conf. 17, Mar. 23, 1992, pp. 445-448, XP000378964.
- A. Nagata, “Moving Picture Coding System for Digital Storage Media Using Hybrid Coding”, vol. 2, No. 2 Aug. 1, 1990, pp. 109-116, XP000243471.
- European Search Report dated Nov. 8, 2000, application No. EP 96120920.
Type: Grant
Filed: Oct 18, 2000
Date of Patent: Jan 2, 2007
Assignee: Matsushita Electric Industrial Co., Ltd. (Osaka)
Inventor: Thiow Keng Tan (Singapore)
Primary Examiner: Tung Vo
Attorney: RatnerPrestia
Application Number: 09/691,857
International Classification: H04B 1/66 (20060101); H04N 7/32 (20060101);