A method of encoding a video signal, comprising: selecting a set of base prediction filters from a base prediction filter bank; determining prediction filter parameters of a target block; performing a filtering of a reference block for the target block based on a prediction filter which is determined by using the prediction filter parameters and filter selection information of the set of base prediction filters, wherein the reference block represents a motion compensated block obtained by using a motion vector which is calculated by motion estimation/compensation techniques; and predicting the target block based on the filtered reference block, characterized in that the prediction filter parameters include a filter coefficient and partition information, wherein the partition information is information indicating whether the target block is further divided into sub-blocks, wherein the method further comprises: calculating a first cost of the target block by using the reference block without filtering; dividing the target block into a first set of four sub-blocks, and dividing the reference block into a second set of four sub-blocks; calculating a second cost of the first set of four sub-blocks by adding each costs of the four sub-blocks; and (S1350, S1360) comparing the first cost and the second cost, and determining the partition information based on a result of the comparison, wherein the cost for each of the first set of the four sub-blocks is calculated using a filter coefficient for each of the first set of the four sub-blocks, wherein the filter coefficient for each of the first set of the four sub-blocks is calculated based on the set of base prediction filters, each of the first set of the four sub-blocks, and each of the second set of four sub-blocks. selecting a set of base prediction filters from a base prediction filter bank; determining prediction filter parameters of a target block; performing a filtering of a reference block for the target block based on a prediction filter which is determined by using the prediction filter parameters and filter selection information of the set of base prediction filters, wherein the reference block represents a motion compensated block obtained by using a motion vector which is calculated by motion estimation/compensation techniques; and predicting the target block based on the filtered reference block, characterized in that the prediction filter parameters include a filter coefficient and partition information, wherein the partition information is information indicating whether the target block is further divided into sub-blocks, wherein the method further comprises: calculating a first cost of the target block by using the reference block without filtering; dividing the target block into a first set of four sub-blocks, and dividing the reference block into a second set of four sub-blocks; calculating a second cost of the first set of four sub-blocks by adding each costs of the four sub-blocks; and (S1350, S1360) comparing the first cost and the second cost, and determining the partition information based on a result of the comparison, wherein the cost for each of the first set of the four sub-blocks is calculated using a filter coefficient for each of the first set of the four sub-blocks, wherein the filter coefficient for each of the first set of the four sub-blocks is calculated based on the set of base prediction filters, each of the first set of the four sub-blocks, and each of the second set of four sub-blocks. calculating a first cost of the target block by using the reference block without filtering; dividing the target block into a first set of four sub-blocks, and dividing the reference block into a second set of four sub-blocks; calculating a second cost of the first set of four sub-blocks by adding each costs of the four sub-blocks; and (S1350, S1360) comparing the first cost and the second cost, and determining the partition information based on a result of the comparison, wherein the cost for each of the first set of the four sub-blocks is calculated using a filter coefficient for each of the first set of the four sub-blocks, wherein the filter coefficient for each of the first set of the four sub-blocks is calculated based on the set of base prediction filters, each of the first set of the four sub-blocks, and each of the second set of four sub-blocks.