Patent ID: 7899117

Claim:
A motion vector encoding apparatus comprising: a detection unit for, upon receipt of a to-be-encoded picture and a reference picture, detecting motion vectors of respective blocks of a predetermined size and a range of the motion vectors; a first storage unit for storing therein the motion vectors detected by the detection unit; a generation unit for generating motion vector predictors from the motion vectors outputted from the first storage unit; a calculation unit for calculating an average value of differential vectors between the motion vectors outputted from the first storage unit and the motion vector predictors outputted from the generation unit; a determination unit for determining a parameter representing a motion vector encodable range based on the range of the motion vectors detected by the detection unit and the average value of the differential vectors calculated by the calculation unit; and an encoding unit for encoding the motion vectors based on the differential vectors and the parameter representing an encodable range outputted from the determination unit, wherein the determination unit determines as the parameter a first encodable range if the first encodable range is equal to or greater than a second encodable range, and determines as the parameter the second encodable range if the first encodable range is smaller than the second encodable range, the first encodable range including maximum and minimum values of the motion vectors detected by the detection unit and the second encodable range producing a minimum code length of the average value calculated by the calculation unit.