主权项 |
1. A picture coding and decoding system which includes a picture coding apparatus that codes a current macroblock included in a current B picture in direct mode and a picture decoding apparatus that decodes a current macroblock included in a current B picture in direct mode,
wherein the picture coding apparatus includes: a non-transitory memory storing a program; and a hardware processor that executes the program and causes the picture coding apparatus to operate as: a co-located block specifying unit operable to specify a co-located block which is co-located with a current block in the current macroblock and is included in the co-located macroblock, the co-located macroblock being co-located with the current macroblock and included in a picture different from the current B picture including the current macroblock, and the current macroblock, and the co-located macroblock having a size of 16 pixels×16 pixels, and the current block and the co-located block having a size of 8 pixels×8 pixels; a reference motion vector deriving unit operable to derive a reference motion vector of the co-located block in the case that a motion compensation of the respective current block in direct mode is prohibited to a size smaller than 8 pixels×8 pixels; a motion vector size judging unit operable to judge if a size of the reference motion vector is within a predetermined range; a motion vector determining unit operable to determine a motion vector of the respective current block; a generating unit operable to generate a predictive image of the respective current block, using the determined motion vector of the respective current block; and a coding unit operable to code a difference image between the respective current block and the generated predictive image of the respective current block generated by the generating unit, wherein, the reference motion vector deriving unit is operable to derive the reference motion vector of the co-located block to be an actual motion vector of a corner block which is included in the co-located block and is located in a corner of the co-located macroblock, and the motion vector determining unit is operable to (1) determine the motion vector of the respective current block to be a value of “0” when it is judged by the motion vector size judging unit that the reference motion vector is within the predetermined range, and (2) determine the motion vector of the respective current block to be a median of plural motion vectors of the plural adjacent macroblocks which are located adjacent to the current macroblock when it is judged by the motion vector size judging unit that the reference motion vector is beyond the predetermined range,
wherein the picture decoding apparatus includes: a non-transitory memory storing a program; and a hardware processor that executes the program and causes the picture decoding apparatus to operate as: a co-located block specifying unit operable to specify a co-located block which is co-located with a current block in the current macroblock and is included in the co-located macroblock, the co-located macroblock being co-located with the current macroblock and included in a picture different from the current B picture including the current macroblock, and the current macroblock, and the co-located macroblock having a size of 16 pixels×16 pixels, and the current block and the co-located block having a size of 8 pixels×8 pixels; a reference motion vector deriving unit operable to derive a reference motion vector of the co-located block in the case that a motion compensation of the respective current block in direct mode is prohibited to a size smaller than 8 pixels×8 pixels; a motion vector size judging unit operable to judge if a size of the reference motion vector is within a predetermined range; a motion vector determining unit operable to determine a motion vector of the respective current block; a difference image decoding unit operable to decode a coded difference image between the respective current block and a predictive image of the respective current block; a generating unit operable to generate the predictive image of the respective current block, using the determined motion vector of the respective current block; and an adding unit operable to add the predictive image and a decoded difference image obtained by decoding the coded difference image to generate a reconstructed image,
wherein,the reference motion vector deriving unit is operable to derive the reference motion vector of the co-located block to be an actual motion vector of a corner block which is included in the co-located block and is located in a corner of the co-located macroblock, andthe motion vector determining unit is operable to (1) determine the motion vector of the respective current block to be a value of “0” when it is judged by the motion vector size judging unit that the reference motion vector is within the predetermined range, and (2) determine the motion vector of the respective current block to be a median of plural motion vectors of the plural adjacent macroblocks when it is judged by the motion vector size judging unit that the reference motion vector is beyond the predetermined range. |