An inter prediction method, wherein a to-be-processed block comprises one or more subblocks, and the method comprises: determining a temporal offset vector, tempMV, of the to-be-processed block based on a spatially neighboring block of the to-be-processed block according to the followings: when availableFlagA 1 is equal to TRUE, the following applies: - if all of the following conditions are true, tempMV is set equal to mvL0A 1: - predFlagL0A 1 is equal to 1, - DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is equal to 0; - otherwise, if all of the following conditions are true, tempMV is set equal to mvL1A 1: - slice_type is equal to B, - predFlagL1A 1 is equal to 1, - DiffPicOrderCnt(ColPic, RefPicList [ refIdxL1A 1]) is equal to 0; wherein tempMV is used to determine a collocated subblock of the subblock of the to-be-processed block, wherein, availableFlagA 1 is the availability flag of a neighboring coding unit, A 1, which neighbors a current coding unit to the left; mvLO A 1 is a motion vector corresponding to the list 0 of A 1; mvL1 A 1 is a motion vector corresponding to the list 1 of A 1; predFlagL0A 1 is a prediction direction flag for the list 0 of A 1 predFlagL1A 1 is a prediction direction flag for the list 1 of A,; DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is a function that determines a picture order count difference between a first picture, ColPic, which is the collocated picture of the current picture, and a second picture, RefPicList [ refldxL0A 1], which is a reference picture of the list 0, wherein, the RefPicList is a set of reference pictures of the list 0 and refIdxL0A 1 is a list 0 reference index of A,; DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL1A 1]) is a function that determines a picture order count difference between the first picture, ColPic, and a third picture, RefPicList [ refIdxL1A 1], which is a reference picture of the list 1, wherein, the RefPicList is a set of reference pictures of the list 1 and refIdxL1A 1 is a list 1 reference index of A,; slice_type is the type of the current slice; wherein the method further comprises: determining a motion vector of the subblock of the to-be-processed block based on a motion vector of the collocated subblock, wherein the motion vector of the subblock of the to-be-processed block is obtained based on a first preset motion vector when the motion vector of the collocated subblock is unavailable. when availableFlagA 1 is equal to TRUE, the following applies: - if all of the following conditions are true, tempMV is set equal to mvL0A 1: - predFlagL0A 1 is equal to 1, - DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is equal to 0; - otherwise, if all of the following conditions are true, tempMV is set equal to mvL1A 1: - slice_type is equal to B, - predFlagL1A 1 is equal to 1, - DiffPicOrderCnt(ColPic, RefPicList [ refIdxL1A 1]) is equal to 0; - if all of the following conditions are true, tempMV is set equal to mvL0A 1: - predFlagL0A 1 is equal to 1, - DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is equal to 0; - predFlagL0A 1 is equal to 1, - DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is equal to 0; - otherwise, if all of the following conditions are true, tempMV is set equal to mvL1A 1: - slice_type is equal to B, - predFlagL1A 1 is equal to 1, - DiffPicOrderCnt(ColPic, RefPicList [ refIdxL1A 1]) is equal to 0; - slice_type is equal to B, - predFlagL1A 1 is equal to 1, - DiffPicOrderCnt(ColPic, RefPicList [ refIdxL1A 1]) is equal to 0; wherein tempMV is used to determine a collocated subblock of the subblock of the to-be-processed block, wherein, availableFlagA 1 is the availability flag of a neighboring coding unit, A 1, which neighbors a current coding unit to the left; mvLO A 1 is a motion vector corresponding to the list 0 of A 1; mvL1 A 1 is a motion vector corresponding to the list 1 of A 1; predFlagL0A 1 is a prediction direction flag for the list 0 of A 1 predFlagL1A 1 is a prediction direction flag for the list 1 of A,; DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL0A 1]) is a function that determines a picture order count difference between a first picture, ColPic, which is the collocated picture of the current picture, and a second picture, RefPicList [ refldxL0A 1], which is a reference picture of the list 0, wherein, the RefPicList is a set of reference pictures of the list 0 and refIdxL0A 1 is a list 0 reference index of A,; DiffPicOrderCnt(CoIPic, RefPicList [ refIdxL1A 1]) is a function that determines a picture order count difference between the first picture, ColPic, and a third picture, RefPicList [ refIdxL1A 1], which is a reference picture of the list 1, wherein, the RefPicList is a set of reference pictures of the list 1 and refIdxL1A 1 is a list 1 reference index of A,; slice_type is the type of the current slice; wherein the method further comprises: determining a motion vector of the subblock of the to-be-processed block based on a motion vector of the collocated subblock, wherein the motion vector of the subblock of the to-be-processed block is obtained based on a first preset motion vector when the motion vector of the collocated subblock is unavailable.