A method of video coding, the method comprising: performing an intra-prediction process of a block comprising samples to be predicted, wherein an interpolation filter is applied to reference samples of the block during the intra-prediction process of the block; wherein the interpolation filter is selected from a set of interpolation filters used for the intra-prediction process on the basis of an offset between the reference samples and the samples to be predicted, wherein the interpolation is at sub-pixel precision of 1/32; wherein a size of a main reference side used in the intra-prediction process is determined according to a length of the interpolation filter and an intra-prediction mode that provides, out of a set of available intra-prediction modes, the maximum subpixel offset, the subpixel offset being a product of a size of a non-main side of the block with a value of a subpixel offset per line of samples that is specified for the respective intra-prediction mode, the maximum subpixel offset being a non-multiple of 32, wherein the main reference side comprises the reference samples; and wherein the size of the main reference side is determined as a sum of: an integer part of said maximum subpixel offset, said integer part obtained by right-shifting by 5 said maximum subpixel offset in binary representation, a size of a main side of the block, and a half of the length of the interpolation filter, wherein the main reference side is parallel to the main side. performing an intra-prediction process of a block comprising samples to be predicted, wherein an interpolation filter is applied to reference samples of the block during the intra-prediction process of the block; wherein the interpolation filter is selected from a set of interpolation filters used for the intra-prediction process on the basis of an offset between the reference samples and the samples to be predicted, wherein the interpolation is at sub-pixel precision of 1/32; wherein a size of a main reference side used in the intra-prediction process is determined according to a length of the interpolation filter and an intra-prediction mode that provides, out of a set of available intra-prediction modes, the maximum subpixel offset, the subpixel offset being a product of a size of a non-main side of the block with a value of a subpixel offset per line of samples that is specified for the respective intra-prediction mode, the maximum subpixel offset being a non-multiple of 32, wherein the main reference side comprises the reference samples; and wherein the size of the main reference side is determined as a sum of: an integer part of said maximum subpixel offset, said integer part obtained by right-shifting by 5 said maximum subpixel offset in binary representation, a size of a main side of the block, and a half of the length of the interpolation filter, wherein the main reference side is parallel to the main side. an integer part of said maximum subpixel offset, said integer part obtained by right-shifting by 5 said maximum subpixel offset in binary representation, a size of a main side of the block, and a half of the length of the interpolation filter, wherein the main reference side is parallel to the main side.