Method to derive at least one motion vector of a bi-predictive block in a current picture

09743108 · 2017-08-22

Assignee

Inventors

Cpc classification

International classification

Abstract

In one embodiment, a method for a moving picture coding system to derive at least one motion vector of a bi-predictive block in a current picture from a motion vector of a first block in a first picture includes selecting, by the moving picture coding system, a list 1 motion vector of the first block in the first picture as a motion vector for deriving list 0 and list 1 motion vectors of the bi-predictive block if the first block only has the list 1 motion vector, the first picture being permitted to be located temporally before the current picture and permitted to be located temporally after the current picture, scaling the selected motion vector and deriving the list 0 and list 1 motion vectors of the bi-predictive block by applying a bit operation to the scaled motion vector, the bit operation including 8 bits right shift.

Claims

1. A method for a moving picture coding system to derive at least one motion vector of a bi-predictive block in a current picture from a motion vector of a first block in a first picture, comprising: selecting, by the moving picture coding system, a list 1 motion vector of the first block in the first picture as a motion vector for deriving list 0 and list 1 motion vectors of the bi-predictive block if the first block only has the list 1 motion vector, the first picture being permitted to be located temporally before the current picture and permitted to be located temporally after the current picture; deriving a temporal distance between the current picture and a reference picture of the current picture; scaling the selected motion vector based on the temporal distance; and deriving the list 0 and list 1 motion vectors of the bi-predictive block based on the scaled motion vector.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above and other objects, features and other advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:

(2) FIGS. 1(A) to 1(C) are views illustrating list 1 reference pictures for direct mode in a general IBBBP pattern;

(3) FIGS. 2(A) to 2(C) are views illustrating list 1 reference pictures for direct mode in a general IBBB pattern;

(4) FIGS. 3(A) to 3(H) are views illustrating cases where a list 1 reference picture for direct mode temporally follows a B picture (L0 MV: list 0 motion vector and L1 MV: list 1 motion vector);

(5) FIGS. 4(A) to 4(H) are views illustrating cases where a list 1 reference picture for direct mode temporally precedes a B picture (L0 MV: list 0 motion vector and L1 MV: list 1 motion vector);

(6) FIG. 5 is a view illustrating the motion vector prediction of a block E using motion vectors of neighboring blocks A, B and C in consideration of a general spatial redundancy;

(7) FIGS. 6(A) to 6(C) are views illustrating cases where both a macroblock of a B picture and a co-located macroblock in a list 1 reference picture for direct mode are in a frame mode and the list 1 reference picture temporally follows the B picture;

(8) FIGS. 7(A) to 7(D) are views illustrating cases where both a macroblock of a B picture and a co-located macroblock in a list 1 reference picture for direct mode are in a field mode and the list 1 reference picture temporally follows the B picture;

(9) FIGS. 8(A) to 8(C) are views illustrating cases where a macroblock of a B picture is in a field mode, a co-located macroblock in a list 1 reference picture for direct mode is in a frame mode, and the list 1 reference picture temporally follows the B picture;

(10) FIGS. 9(A) to 9(C) are views illustrating cases where a macroblock of a B picture is in a frame mode, a co-located macroblock in a list 1 reference picture for direct mode is in a field mode, and the list 1 reference picture temporally follows the B picture;

(11) FIGS. 10(A) and 10(B) are views illustrating cases where both a macroblock of a B picture and a co-located macroblock in a list 1 reference picture for direct mode are in a frame mode and the list 1 reference picture temporally precedes the B picture;

(12) FIGS. 11(A) to 11(D) are views illustrating cases where both a macroblock of a B picture and a co-located macroblock in a list 1 reference picture for direct mode are in a field mode and the list 1 reference picture temporally precedes the B picture;

(13) FIGS. 12(A) and 12(B) are views illustrating cases where a macroblock of a B picture is in a field mode, a co-located macroblock in a list 1 reference picture for a general direct mode is in a frame mode, and the list 1 reference picture temporally precedes the B picture; and

(14) FIGS. 13(A) and 13(B) are views illustrating cases where a macroblock of a B picture is in a frame mode, a co-located macroblock in a list 1 reference picture for a general direct mode is in a field mode, and the list 1 reference picture temporally precedes the B picture.

DESCRIPTION OF THE EXAMPLE EMBODIMENTS

(15) The present invention proposes a method for deriving direct mode motion vectors when a co-located macroblock in a list 1 reference picture for direct mode is in an intra mode, and a method for acquiring the direct mode motion vectors in a case where the list 1 reference picture temporally follows a B picture and in a case where the list 1 reference picture temporally precedes the B picture.

(16) The present invention further proposes a method for calculating the direct mode motion vectors regardless of the locations of list 0 and list 1 reference pictures for direct mode by assigning a sign to an inter-picture temporal distance value to simplify algorithms used for calculation of the direct mode motion vectors.

(17) On the other hand, a frame mode and a field mode are switched at a picture level, so the B picture and list 1 reference picture can be coded into frame mode or field mode. As a result, a macroblock of the B picture and a co-located macroblock of the list 1 reference picture have four types of frame/field-coded combinations.

(18) [1] Case where Co-Located Macroblock of List 1 Reference Picture is in Intra Mode

(19) As shown in FIGS. 3(F) and 4(F), a co-located macroblock in a list 1 reference picture for direct mode can be in the intra mode regardless of a temporal location of the reference picture. Because the macroblock in this mode has no motion information, a conventional method simply sets direct mode motion vectors to 0 and defines a list 0 reference picture to be the latest decoded picture. However, the conventional method cannot guarantee a high coding efficiency. Therefore, the present invention predicts and calculates list 0 and list 1 reference pictures and motion vectors from neighboring blocks of a macroblock of a B picture to be coded, on the basis of a spatial redundancy.

(20) A reference picture index for each list mode is acquired in the following manner. FIG. 5 is a view illustrating the motion vector prediction of a block E using motion vectors of neighboring blocks A, B and C in consideration of a general spatial redundancy. if the neighboring blocks A, B and C have different reference picture indexes, a smallest one of the reference picture indexes is determined to be a reference picture index for the direct mode. if two ones of the neighboring blocks have the same reference picture index, this index is determined to be a reference picture index for the direct mode. if all the neighboring blocks have the same reference picture index, this index is determined to be a reference picture index for the direct mode.

(21) Also, a motion vector for each list mode is acquired through the following motion vector prediction. At this time, if any one of the neighboring blocks A, B and C is in the intra mode, its list 0 and list 1 motion vectors are set to 0. a motion vector having the same direction as that of a temporal location of the above-acquired reference picture for each list mode is selected from a neighboring block and a motion vector for each list mode is acquired through a median operation. if a neighboring block has two motion vectors with the same directions, only one of the two motion vectors is selected in that block and included in the median operation.

(22) On the other hand, if neither of the effective list 0 and list 1 reference picture indexes can be derived from a neighboring block, they are set to 0 and a motion vector for each list mode is set to 0.

(23) [2] Cases where List 1 Reference Picture for Direct Mode Temporally Follows B Picture

(24) Case 1: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Frame Mode

(25) As seen from FIGS. 3(A) to 3(H), the co-located block in the list 1 reference picture can have one motion vector or two motion vectors. In the present invention, if the co-located block has two motion vectors, one (L0 MV or L1 MV) of the two motion vectors is selected and direct mode motion vectors are derived from the selected motion vector (this will hereinafter be described on the basis of the case where L0 MV (list 0 motion vector) is selected).

(26) Accordingly, FIGS. 3(A) and 3(C) can be simply depicted as FIG. 6(A), FIGS. 3(B), 3(D) and 3(E) as FIG. 6(C), and FIGS. 3(G) and 3(H) as FIG. 6(B), respectively.

(27) If the list 0 reference picture and list 1 reference picture for direct mode are located temporally before and after the B picture, respectively (FIG. 6(A)), or if both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally follows the list 1 reference picture (FIG. 6(B)), direct mode motion vectors MV.sub.F and MV.sub.B are calculated as follows:
MV.sub.F=TD.sub.B×MV/TD.sub.D
MV.sub.B=(TD.sub.B−TD.sub.D)×MV/TD.sub.D

(28) where, TD.sub.B represents a temporal distance between a current B frame and a list 0 reference frame, and TD.sub.D represents a temporal distance between a list 1 reference frame and the list 0 reference frame.

(29) Applying a bit operation to the calculation of the direct mode motion vectors MV.sub.F and MV.sub.B for the convenience thereof, the above equation may be expressed as follows:
Z=TD.sub.B×256/TD.sub.D MV.sub.F=(Z×MV+128)>>8
W=Z−256 MV.sub.B=(W×MV+128)>>8

(30) If both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally precedes the list 1 reference picture (FIG. 6(C)), the direct mode motion vectors MV.sub.F and MV.sub.B are calculated as follows:
MV.sub.F=−TD.sub.B×MV/TD.sub.D
MV.sub.B=−(TD.sub.B+MDMV/TD.sub.D

(31) This equation may be expressed as follows:
Z=−TD.sub.B×256/TD.sub.D MV.sub.F=(Z×MV+128)>>8
W=Z−256 MV.sub.B=(W×MV+128)>>8

(32) Case 2: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Field Mode

(33) FIGS. 7(A) to 7(D) show cases where both the macroblock of the B picture and the co-located macroblock of the list 1 reference picture are in the field mode. Each motion vector of the macroblock of the B picture is derived from a motion vector of a co-located block in a list 1 reference field of the same parity.

(34) If the list 0 and list 1 reference pictures for the direct mode are located temporally before and after the B picture, respectively (FIG. 7(A)), or if both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally follows the list 1 reference picture (FIG. 7(B)), direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of a B frame (i=0 signifies a first field and i=1 signifies a second field) are calculated as follows:
MV.sub.F,i=TD.sub.B,i×MV.sub.i/TD.sub.D,i
MV.sub.B,i=(TD.sub.B,i−TD.sub.D,i)×MV.sub.i/TD.sub.D,i
where, MV.sub.i represents a motion vector of a co-located block of a field i in a list 1 reference frame, TD.sub.B,i represents a temporal distance between a current B field and a list 0 reference field, and TD.sub.D,i represents a temporal distance between a list 1 reference field and the list 0 reference field.

(35) The above equation may be expressed as follows:
Z=TD.sub.B,i×256/TD.sub.D,i MV.sub.F,i=(Z×MV.sub.i+128)>>8
W=Z−256 MV.sub.B,i=(W×MV.sub.i+128)>>8

(36) If, because the co-located block of the field i in the list 1 reference frame has a motion vector pointing to a field in a frame temporally following the B picture, both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally precedes the list 1 reference picture (FIGS. 7(C) and 7(D)), the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i are calculated as follows:
MV.sub.F,i=−TD.sub.B,i×MV.sub.i/TD.sub.D,i
MV.sub.B,i=−(TD.sub.B,i+TD.sub.D,i)×MV.sub.i/TD.sub.D,i

(37) The above equation may be expressed as follows:
Z=−TD.sub.B,i×256/TD.sub.D,i MV.sub.F,i=(Z×MV.sub.i+128)>>8
W=Z−256 MV.sub.B,i=(W×MV.sub.i+128)>>8

(38) Case 3: Macroblock of B Picture is in Field Mode and Co-Located Macroblock of List 1 Reference Picture is in Frame Mode

(39) FIGS. 8(A) to 8(C) show cases where the macroblock of the B picture is in the field mode and the co-located macroblock of the list 1 reference picture is in the frame mode. Here, letting the vertical coordinate of the current macroblock be y.sub.current and the vertical coordinate of the co-located macroblock of the list 1 reference picture be y.sub.co-located, the relation of y.sub.co-located=2×y.sub.current is established between the two coordinates. Also, list 0 and list 1 reference fields are present in the same parities of the list 0 and list 1 reference frames, respectively.

(40) If the list 0 and list 1 reference pictures for the direct mode are located temporally before and after the B picture, respectively (FIG. 8(A)), or if both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally follows the list 1 reference picture (FIG. 8(B)), the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame are calculated as follows:
MV.sub.F,i=TD.sub.B,i×MV/TD.sub.D
MV.sub.B,i=(TD.sub.B,i−TD.sub.D)×MV/TD.sub.D

(41) The above equation may be expressed as follows:
Z=TD.sub.B,i×256/TD.sub.D MV.sub.F,i=(Z×MV+128)>>8
W=Z−256 MV.sub.B,i=(W×MV+128)>>8

(42) If, because the co-located block in the list 1 reference frame has a motion vector pointing to a frame temporally following the B picture, both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally precedes the list 1 reference picture (FIG. 8(C)), the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame are calculated as follows:
MV.sub.F,i=TD.sub.B,i×MV/TD.sub.D
MV.sub.B,i=−(TD.sub.B,i+TD.sub.D)×MV/TD.sub.D

(43) The above equation may be expressed as follows:
Z=−TD.sub.B,i×256/TD.sub.D MV.sub.F,i=(Z×MV+128)>>8
W=Z−256 MV.sub.B,i=(W×MV+128)>>8

(44) where, TD.sub.B,i represents a temporal distance between the current B field and the list 0 reference field, TD.sub.D represents a temporal distance between the list 1 reference frame and the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference frame for direct mode.

(45) Case 4: Macroblock of B Picture is in Frame Mode and Co-Located Macroblock of List 1 Reference Picture is in Field Mode

(46) FIGS. 9(A) to 9(C) show cases where the macroblock of the B picture is in the frame mode and the co-located macroblock of the list 1 reference picture is in the field mode. Here, letting the vertical coordinate of the current macroblock be y.sub.current and the vertical coordinate of the co-located macroblock of the list 1 reference picture be y.sub.co-located, the relation of y.sub.co-located=y.sub.current/2 is established between the two coordinates. Also, because the field 0 of the list 1 reference frame is temporally closer to the B picture than the field 1 thereof, motion information of a co-located block of the field 0 is used for calculation of the direct mode motion vectors.

(47) If the list 0 and list 1 reference pictures for the direct mode are located temporally before and after the B picture, respectively (FIG. 9(A)), or if both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally follows the list 1 reference picture (FIG. 9(B)), the direct mode list 0 and list 1 motion vectors MV.sub.F and MV.sub.B of the B frame are calculated as follows:
MV.sub.F=TD.sub.B×MV.sub.0/TD.sub.D,0
MV.sub.B=(TD.sub.B−TD.sub.D,0)×MV.sub.0/TD.sub.D,0

(48) The above equation may be expressed as follows:
Z=TD.sub.B×256/TD.sub.D,0 MV.sub.F=(Z×MV.sub.0+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.0+128)>>8

(49) If, because the co-located block of the field 0 of the list 1 reference frame has a motion vector pointing to a field of a frame temporally following the B picture, both the list 0 and list 1 reference pictures for the direct mode are located temporally after the B picture and the list 0 reference picture temporally precedes the list 1 reference picture (FIG. 9(C)), the direct mode list 0 and list 1 motion vectors MV.sub.F and MV.sub.B are calculated as follows:
MV.sub.F=−TD.sub.B×MV.sub.0/TD.sub.D,0
MV.sub.B=−(TD.sub.B+TD.sub.D,0)×MV.sub.0/TD.sub.D,0

(50) The above equation may be expressed as follows:
Z=−TD.sub.B×256/TD.sub.D,0 MV.sub.F(Z×MV.sub.0+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.0+128)>>8
where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, TD.sub.D,0 represents a temporal distance between a field 0 of the list 1 reference frame and the list 0 reference field, and MV.sub.0 represents a motion vector of the co-located block in the field 0 of the list 1 reference frame for direct mode.

(51) [3] Cases where List 1 Reference Picture for Direct Mode Temporally Precedes B Picture

(52) In this case, both the list 0 and list 1 reference pictures are located temporally before the B picture.

(53) Case 1: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Frame Mode

(54) As seen from FIGS. 4(A) to 4(H), the co-located block in the list 1 reference picture can have one motion vector or two motion vectors. In the present invention, if the co-located block has two motion vectors, one (L0 MV or L1 MV) of the two motion vectors is selected and direct mode motion vectors are derived from the selected motion vector (this will hereinafter be described on the basis of the case where L0 MV (list 0 motion vector) is selected).

(55) Accordingly, FIGS. 4(A), 4(C), 4(E), 4(G) and 4(H) can be simply depicted as FIG. 10(A), and FIGS. 4(B) and 4(D) as FIG. 10(B), respectively.

(56) If the list 0 reference picture for direct mode temporally precedes the list 1 reference picture for direct mode, direct mode motion vectors MV.sub.F and MV.sub.B are calculated as follows (FIG. 10(A)):
MV.sub.F=TD.sub.B×MV/TD.sub.D
MV.sub.B=(TD.sub.B−TD.sub.D)×MV/TD.sub.D

(57) where, TD.sub.B represents a temporal distance between a current B frame and a list 0 reference frame, TD.sub.D represents a temporal distance between a list 1 reference frame and the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference picture for direct mode.

(58) The above equation may be expressed as follows:
Z=TD.sub.B×256/TD.sub.D MV.sub.F=(Z×MV+128)>>8
W=Z−256 MV.sub.B=(W×MV+128)>>8

(59) If the list 0 reference picture temporally follows the list 1 reference picture, the direct mode motion vectors MV.sub.F and MV.sub.B are calculated as follows (FIG. 10(B)):
MV.sub.F=−TD.sub.B×MV/TD.sub.D
MV.sub.B=−(TD.sub.B+TD.sub.D)×MV/TD.sub.D

(60) This equation may be expressed as follows:
Z=−TD.sub.B×256/TD.sub.D MV.sub.F=(Z×MV+128)>>8
W=Z−256 MV.sub.B=(W×MV+128)>>8

(61) where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, TD.sub.D represents a temporal distance between the list 1 reference frame and the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference picture for direct mode.

(62) Case 2: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Field Mode

(63) If the list 0 reference picture for direct mode temporally precedes the list 1 reference picture for direct mode, direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of a B frame are calculated as follows (FIGS. 11(A) and 11(B)):
MV.sub.F,i=TD.sub.B,i×MV.sub.i/TD.sub.D,i
MV.sub.B,i=(TD.sub.B,i−TD.sub.D,i)×MV.sub.i/TD.sub.D,i

(64) The above equation may be expressed as follows:
Z=TD.sub.B,i×256/TD.sub.D,i MV.sub.F,i=(Z×MV.sub.i+128)>>8
W=Z−256 MV.sub.B,i=(W×MV.sub.i+128)>>8

(65) where, TD.sub.B,i represents a temporal distance between a current B field and a list 0 reference field, TD.sub.D,i represents a temporal distance between a list 1 reference field and the list 0 reference field, and MV.sub.i represents a motion vector of a co-located block in a list 1 reference field for direct mode.

(66) If, because the co-located block of the field i in the list 1 reference frame has a motion vector pointing to a field in a temporally following frame, the list 0 reference picture temporally precedes the list 1 reference picture, the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i are calculated as follows (FIGS. 11(C) and 11(D)):
MV.sub.F,i=−TD.sub.B,i×MV.sub.i/TD.sub.D,i
MV.sub.B,i=−(TD.sub.B,i+TD.sub.D,i)×MV.sub.i/TD.sub.D,i

(67) The above equation may be expressed as follows:
Z=−TD.sub.B,i×256/TD.sub.D,i MV.sub.F,i=(Z×MV.sub.i+128)>>8
W=Z−256 MV.sub.B,i=(W×MV.sub.i+128)>>8

(68) where, TD.sub.B,i represents a temporal distance between the current B field and the list 0 reference field, TD.sub.D,i represents a temporal distance between the list 1 reference field and the list 0 reference field, and MV.sub.i represents a motion vector of the co-located block in the list 1 reference field for direct mode.

(69) Case 3: Macroblock of B Picture is in Field Mode and Co-Located Macroblock of List 1 Reference Picture is in Frame Mode

(70) If the list 0 reference picture for direct mode temporally precedes the list 1 reference picture for direct mode, the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame are calculated as follows (FIG. 12(A)):
MV.sub.F,i=TD.sub.B,i×MV/TD.sub.D
MV.sub.B,i=(TD.sub.B,i−TD.sub.D)×MV/TD.sub.D

(71) The above equation may be expressed as follows:
Z=TD.sub.B,i×256/TD.sub.D MV.sub.F,i=(Z×MV+128)>>8
W=Z−256 MV.sub.B,i=(W×MV+128)>>8

(72) where, TD.sub.B,i represents a temporal distance between the current B field and the list 0 reference field, TD.sub.D represents a temporal distance between the list 1 reference frame and the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference frame for direct mode.

(73) If, because the co-located block in the list 1 reference frame has a motion vector pointing to a temporally following frame, the list 0 reference picture temporally follows the list 1 reference picture, the direct mode list 0 and list 1 motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame are calculated as follows (FIG. 12(B)):
MV.sub.F,i=−TD.sub.B,i×MV/TD.sub.D
MV.sub.B,i=−(TD.sub.B,i+TD.sub.D)×MV/TD.sub.D

(74) The above equation may be expressed as follows:
Z=−TD.sub.B,i×256/TD.sub.D MV.sub.F,i=(Z×MV+128)>>8
W=Z−256 MV.sub.B,i=(W×MV+128)>>8

(75) where, TD.sub.B,i represents a temporal distance between the current B field and the list 0 reference field, TD.sub.D represents a temporal distance between the list 1 reference frame and the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference frame for direct mode.

(76) Case 4: Macroblock of B Picture is in Frame Mode and Co-Located Macroblock of List 1 Reference Picture is in Field Mode

(77) Because the field 1 f1 of the list 1 reference frame is temporally closer to the B picture than the field 0 f0 thereof, motion information of a co-located block of the field 1 f1 is used for calculation of the direct mode motion vectors.

(78) If the list 0 reference picture for direct mode temporally precedes the list 1 reference picture for direct mode, the direct mode list 0 and list 1 motion vectors MV.sub.F and MV.sub.B for each field i of the B frame are calculated as follows (FIG. 13(A)):
MV.sub.F=TD.sub.B×MV.sub.1/TD.sub.D,1
MV.sub.B=(TD.sub.B−TD.sub.D,1)×MV.sub.1/TD.sub.D,1

(79) The above equation may be expressed as follows:
Z=TD.sub.B×256/TD.sub.D,1 MV.sub.F=(Z×MV.sub.1+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.1+128)>>8

(80) where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, TD.sub.D,1 represents a temporal distance between a field 1 of the list 1 reference frame and the list 0 reference field, and MV.sub.1 represents a motion vector of the co-located block in the field 1 of the list 1 reference frame for direct mode.

(81) If, because the co-located block of the field 1 f1 of the list 1 reference frame has a motion vector pointing to a field of a temporally following frame, the list 0 reference picture temporally follows the list 1 reference picture, the direct mode list 0 and list 1 motion vectors MV.sub.F and MV.sub.B are calculated as follows (FIG. 13(B)):
MV.sub.F=−TD.sub.B×MV.sub.1/TD.sub.D,1
MV.sub.B=−(TD.sub.B+TD.sub.D,1)×MV.sub.1/TD.sub.D,1

(82) The above equation may be expressed as follows:
Z=−TD.sub.B×256/TD.sub.D,1 MV.sub.F=(Z×MV.sub.1+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.1+128)>>8

(83) where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, TD.sub.D,1 represents a temporal distance between a field 1 of the list 1 reference frame and the list 0 reference field, and MV.sub.1 represents a motion vector of the co-located block in the field 1 of the list 1 reference frame for direct mode.

(84) [4] Cases where Direct Mode Motion Vectors are Calculated by Assigning Sign to Inter-Picture Temporal Distance Value

(85) In case the list 1 reference picture for direct mode is located temporally before or after the B picture, two types of algorithms are given in each case. Such algorithms can be simply expressed by assigning a sign to an inter-picture temporal distance value, as follows.

(86) Case 1: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Frame Mode

(87) If both the macroblock of the B picture and the co-located macroblock of the list 1 reference picture are in the frame mode, the direct mode motion vectors MV.sub.F and MV.sub.B of the B picture can be calculated as follows:
MV.sub.F=TD.sub.B×MV/TD.sub.D
MV.sub.B=(TD.sub.B−TD.sub.D)×MV/TD.sub.D
or
Z=TD.sub.B×256/TD.sub.D MV.sub.F=(Z×MV+128)>>8
W=Z−256 MV.sub.B=(W×MV+128)>>8

(88) where, TD.sub.B represents a temporal distance between a current B frame and a list 0 reference frame, which is assigned a positive (+) sign if it is measured from the B frame and a negative (−) sign if it is measured from the list 0 reference frame, TD.sub.D represents a temporal distance between a list 1 reference frame and the list 0 reference frame, which is assigned a positive (+) sign if it is measured from the list 1 reference frame and a negative (−) sign if it is measured from the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference picture for direct mode.

(89) Case 2: Both Macroblock of B Picture and Co-Located Macroblock of List 1 Reference Picture are in Field Mode

(90) If both the macroblock of the B picture and the co-located macroblock of the list 1 reference picture are in the field mode, the direct mode motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame can be calculated as follows:
MV.sub.F,i=TD.sub.B,i×MV.sub.i/TD.sub.D,i
MV.sub.B,i=(TD.sub.B,i−TD.sub.D,i)×MV.sub.i/TD.sub.D,i
or
Z=TD.sub.B,i×256/TD.sub.D,i MV.sub.F,i=(Z×MV.sub.i+128)>>8
W=Z−256 MV.sub.B,i=(W×MV.sub.i+128)>>8

(91) where, TD.sub.B,i represents a temporal distance between a current B field and a list 0 reference field, which is assigned a positive (+) sign if it is measured from the B field and a negative (−) sign if it is measured from the list 0 reference field, TD.sub.D,i represents a temporal distance between a list 1 reference field and the list 0 reference field, which is assigned a positive (+) sign if it is measured from the list 1 reference field and a negative (−) sign if it is measured from the list 0 reference field, and MV.sub.i represents a motion vector of a co-located block in a list 1 reference field for direct mode.

(92) Case 3: Macroblock of B Picture is in Field Mode and Co-Located Macroblock of List 1 Reference Picture is in Frame Mode

(93) If the macroblock of the B picture is in the field mode and the co-located macroblock of the list 1 reference picture is in the frame mode, the direct mode motion vectors MV.sub.F,i and MV.sub.B,i for each field i of the B frame can be calculated as follows:
MV.sub.F,i=TD.sub.B,i×MV/TD.sub.D
MV.sub.B,i=(TD.sub.B,i−TD.sub.D)×MV/TD.sub.D
or
Z=TD.sub.B,i×256/TD.sub.D MV.sub.F,i=(Z×MV+128)>>8
W=Z−256 MV.sub.B,i=(W×MV+128)>>8

(94) where, TD.sub.B,i represents a temporal distance between the current B field and the list 0 reference field, which is assigned a positive (+) sign if it is measured from the B field and a negative (−) sign if it is measured from the list 0 reference field, TD.sub.D represents a temporal distance between the list 1 reference frame and the list 0 reference frame, which is assigned a positive (+) sign if it is measured from the list 1 reference frame and a negative (−) sign if it is measured from the list 0 reference frame, and MV represents a motion vector of the co-located block in the list 1 reference frame for direct mode.

(95) Case 4: Macroblock of B Picture is in Frame Mode and Co-Located Macroblock of List 1 Reference Picture is in Field Mode

(96) If the macroblock of the B picture is in the frame mode, the co-located macroblock of the list 1 reference picture is in the field mode and the list 1 reference picture temporally follows the B picture, the field 0 of the list 1 reference frame is temporally closer to the B picture than the field 1 thereof, so motion information of a co-located block of the field 0 is used for calculation of the direct mode motion vectors. As a result, the direct mode motion vectors MV.sub.F and MV.sub.B of the B frame can be obtained from the below equation where the motion information of the co-located block in the field 0 of the list 1 reference frame is used for calculation of the direct mode motion vectors:
MV.sub.F=TD.sub.B×MV.sub.0/TD.sub.D,0
MV.sub.B=(TD.sub.B−TD.sub.D,0)×MV.sub.0/TD.sub.D,0
or
Z=TD.sub.B×256/TD.sub.D,0 MV.sub.F(Z×MV.sub.0+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.0+128)>>8

(97) where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, which is assigned a positive (+) sign if it is measured from the B frame and a negative (−) sign if it is measured from the list 0 reference frame, TD.sub.D,0 represents a temporal distance between a field 0 of the list 1 reference frame and the list 0 reference field, which is assigned a positive (+) sign if it is measured from the field 0 of the list 1 reference frame and a negative (−) sign if it is measured from the list 0 reference field, and MV.sub.0 represents a motion vector of the co-located block in the field 0 of the list 1 reference frame for direct mode.

(98) If the list 1 reference picture temporally precedes the B picture, the field 1 of the list 1 reference frame is temporally closer to the B picture than the field 0 thereof, so motion information of a co-located block of the field 1 is used for calculation of the direct mode motion vectors. As a result, the direct mode motion vectors MV.sub.F and MV.sub.B of the B frame can be obtained from the below equation where the motion information of the co-located block in the field 1 of the list 1 reference frame is used for calculation of the direct mode motion vectors:
MV.sub.F=TD.sub.B×MV.sub.1/TD.sub.D,1
MV.sub.B=(TD.sub.B−TD.sub.D,1)×MV.sub.1/TD.sub.D,1
or
Z=TD.sub.B×256/TD.sub.D,1 MV.sub.F=(Z×MV.sub.1+128)>>8
W=Z−256 MV.sub.B=(W×MV.sub.1+128)>>8
where, TD.sub.B represents a temporal distance between the current B frame and the list 0 reference frame, which is assigned a positive (+) sign if it is measured from the B frame and a negative (−) sign if it is measured from the list 0 reference frame, TD.sub.D,1 represents a temporal distance between a field 1 of the list 1 reference frame and the list 0 reference field, which is assigned a positive (+) sign if it is measured from the field 1 of the list 1 reference frame and a negative (−) sign if it is measured from the list 0 reference field, and MV.sub.1 represents a motion vector of the co-located block in the field 1 of the list 1 reference frame for direct mode.

(99) As apparent from the above description, the present invention provides a method for calculating direct mode motion vectors of a B (Bi-predictive) picture defined in a next-generation moving picture compression technique. A technique for extracting the direct mode motion vectors of the B picture is proposed to raise the probability that a direct mode will be selected as a predictive mode of a macroblock, thereby improving a B picture coding efficiency.

(100) As further described with respect to the above embodiments, a method for determining motion vectors of a B (Bi-predictive) picture includes, if a co-located block in a list 1 reference picture for direct mode has two motion vectors, selecting one (a list 0 motion vector or list 1 motion vector) of the two motion vectors, and deriving the direct mode motion vectors of the B picture from the selected motion vector.

(101) The one of the list 0 and list 1 motion vectors, which points to a picture temporally closer to the list 1 reference picture for direct mode, may be selected as the motion vector for derivation of the direct mode motion vectors, or the list 0 motion vector may be selected as the motion vector for derivation of the direct mode motion vectors if the two motion vectors point to the same reference picture. The direct mode motion vectors may then be derived as discussed in detail above using the selected motion vector.

(102) However, instead of selecting between the list 1 and list 0 motion vectors of the co-located block, the list 0 motion vector may be unconditionally selected as the motion vector for derivation of the direct mode motion vectors. Namely, if both the list 0 and list 1 motion vectors of the co-located block exist, the list 0 motion vector is selected as the motion vector for derivation of the direct mode motion vectors. Accordingly, in this embodiment, the list 0 motion vector is selected regardless of whether a list 1 motion vector is present. Stated another way, the list 0 motion vector is selected regardless of the prediction modes of the co-located block. The direct mode motion vectors may then be derived as discussed in detail above using the selected motion vector.

(103) Also, according to another embodiment, one of the motion vectors of the co-located block in the list 1 reference picture for direct mode may be selected as the motion vector for derivation of the direct mode motion vectors regardless of modes (a list 0 mode and/or a list 1 mode) of the motion vectors of the co-located block. The direct mode motion vectors may then be derived as discussed in detail above using the selected motion vector.

(104) In a further alternative embodiment, if a co-located block in a list 1 reference picture for direct mode has only a list 1 motion vector, the list 1 motion vector of the co-located block is selected and used as the motion vector for derivation of the direct mode motion vectors. The direct mode motion vectors may then be derived as discussed in detail above using the selected motion vector.

(105) The embodiments of the present invention may further include determining the list 0 reference picture for direct mode as a reference picture referenced by the co-located block. The co-located block may include reference information referencing a reference picture. For example, the selected motion vector may point to a reference picture, and this reference picture may be selected as the list 0 reference picture for direct mode.

(106) Alternatively, a decoded picture located temporally just before the B picture may be determined as the list 0 reference picture for direct mode.

(107) Although example embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention.