1. A method performed by a device for generating a predicted value of an image block based on a forward reference image and a backward reference image, comprising: obtaining a template using preset reconstructed pixels around the image block; obtaining an up-sampled template by performing up-sample interpolation on the obtained template using a first filter; obtaining candidate motion vectors for the image block, wherein the candidate motion vectors include known motion vectors from neighboring blocks of the image block; obtaining a first forward reference block and a first backward reference block, for each of the candidate motion vectors, from the forward reference image and the backward reference image, respectively, wherein a location of the first forward reference block in the forward reference image and a location of the first backward reference block in the backward reference image are indicated by each of the candidate motion vectors; obtaining an up-sampled forward reference image by performing the up-sample interpolation on a corresponding forward template of the first forward reference block using the first filter; obtaining an up-sampled backward reference image by performing the up-sample interpolation on a corresponding backward template of the backward reference image using the first filter; calculating a matching difference corresponding to each of the candidate motion vectors, wherein the matching difference indicates a forward difference, a backward difference, or a sum of the forward difference and the backward difference, wherein the forward difference comprises a difference between the up-sampled template of the image block and the corresponding forward template of the first forward reference block, and wherein the backward difference comprises a difference between the up-sampled template of the image block and the corresponding backward template of the first backward reference block; selecting a target candidate motion vector from the candidate motion vectors, wherein the target candidate motion vector corresponds to a minimal calculated matching difference; obtaining a second forward reference block and a second backward reference block, for the target candidate motion vector, from the forward reference image and the backward reference image, respectively, wherein a location of the second forward reference block in the forward reference image and a location of the second backward reference block in the backward reference image are indicated by the target candidate motion vector; obtaining an up-sampled second forward reference block by performing the up-sample interpolation on the second forward reference block using a second filter; obtaining an up-sampled second backward reference block by performing the up-sample interpolation on the second backward reference block using the second filter; and generating the predicted value of the image block by averaging a value of the up-sampled second forward reference block and a value of the up-sampled second backward reference block.