Patent ID: 7974344

Claim:
A method used by a hardware apparatus for determining a reference image block in direct coding mode, comprising the steps of: (1) obtaining a motion vector in a backward reference frame of a B frame with respect to a current image block; (2) obtaining a motion vector MV(x,y) for direct coding a current B frame image block in accordance with the obtained motion vector of a corresponding image block in the backward reference frame, calculating a forward motion vector MV F of the current block by using the following formulas: assuming scale_factor=2 shift — len , td=tp−tb; if mv ( i )<0: MV F ( i )=−(((scale_factor / tp )×(1 −mv ( i )× tb )−1)>>shift_len) else, MV F ( i )=((scale_factor / tp )×(1 +mv ( i )× tb )−1)>>shift_len) calculating a backward motion vector MV B of the current block by using the following formulas: if mv ( i )<0: MV B ( i )=((scale_factor / tp )×(1 −mv ( i )× td )−1)>>shift_len else, MV B ( i )=−(((scale_factor / tp )×(1 +mv ( i )× td )−1)>>shift_len) where the scale_factor value is a decimal fraction amplification factor; the shift_len denotes times for right shift and shift len is a natural number; MV F and MV B denote a forward motion vector and a backward motion vector corresponding to the current block; tb is a distance in time domain between a current picture and a forward reference picture; td denotes a distance in time domain between a forward reference picture and a backward reference picture; tp is a distance in time domain between a current picture and a backward reference picture; MV(i) denotes a horizontal component or vertical component of motion vector of the corresponding part of the backward reference picture with respect to a forward reference frame; MV(x,y)×(MV(x) , MV(y)) is a two-dimensional vector, of which the corresponding components are MV(x),MV(y); MV(i)denotes MV(x) or MV(y); and a/b denotes an integer of a quotient of a and b towards zero, a is the dividend of MV F (i) or MV B (i), b is the divisor of MV F (i) or MV B (i); (3)the forward and backward image block pointed by the motion vector obtained from step (2) acting as a reference image block of the current image block.