A method of decoding video data, the method comprising: determining that a first block of video data is encoded using an inter prediction mode; performing interpolation filtering using an N-tap filter to generate an interpolated search space, wherein N is an integer and corresponds to a number of taps in the N-tap filter; obtaining a first predictive block for the first block of video data in the interpolated search space; determining that a second block of video data is encoded using a bi-directional inter prediction mode; determining that the second block of video data is encoded using a bi-directional optical flow, BIO, process; performing an inter prediction process for the second block of video data using the bi-directional inter prediction mode to determine a second predictive block; performing the BIO process on the second predictive block to determine a BIO-refined version of the second predictive block, wherein performing the BIO process on the second predictive block comprises: i) calculating intermediate values that comprise horizontal and vertical gradients of sample values within the second predictive block, the horizontal and vertical gradients obtained by horizontal and vertical interpolation of the sample values within the second predictive block using an N-tap filter, ii) calculating an offset value for each sample value in the second predictive block based on the intermediate values, and iii) modifying a motion vector for the second predictive block on a per-sample basis using the offset value determined for the sample value, wherein a number of reference samples used for calculating intermediate values for BIO offsets is limited to a region of (W+N-1)x(H+N-1) integer samples, wherein W corresponds to a width of the second block in integer samples, and H corresponds to a height of the second block in integer samples; and decoding the first block of video data using the first predictive block and decoding the second block of video data using the BIO-refined version of the second predictive block, characterised by, within the second predictive block, the calculation of intermediate values for the BIO process is performed on a sub-block basis based on a partitioning of the second predictive block into a plurality of equal sized sub-blocks that have the same size as a minimum block size in which motion compensation is permitted to occur. determining that a first block of video data is encoded using an inter prediction mode; performing interpolation filtering using an N-tap filter to generate an interpolated search space, wherein N is an integer and corresponds to a number of taps in the N-tap filter; obtaining a first predictive block for the first block of video data in the interpolated search space; determining that a second block of video data is encoded using a bi-directional inter prediction mode; determining that the second block of video data is encoded using a bi-directional optical flow, BIO, process; performing an inter prediction process for the second block of video data using the bi-directional inter prediction mode to determine a second predictive block; performing the BIO process on the second predictive block to determine a BIO-refined version of the second predictive block, wherein performing the BIO process on the second predictive block comprises: i) calculating intermediate values that comprise horizontal and vertical gradients of sample values within the second predictive block, the horizontal and vertical gradients obtained by horizontal and vertical interpolation of the sample values within the second predictive block using an N-tap filter, ii) calculating an offset value for each sample value in the second predictive block based on the intermediate values, and iii) modifying a motion vector for the second predictive block on a per-sample basis using the offset value determined for the sample value, wherein a number of reference samples used for calculating intermediate values for BIO offsets is limited to a region of (W+N-1)x(H+N-1) integer samples, wherein W corresponds to a width of the second block in integer samples, and H corresponds to a height of the second block in integer samples; and decoding the first block of video data using the first predictive block and decoding the second block of video data using the BIO-refined version of the second predictive block, characterised by, within the second predictive block, the calculation of intermediate values for the BIO process is performed on a sub-block basis based on a partitioning of the second predictive block into a plurality of equal sized sub-blocks that have the same size as a minimum block size in which motion compensation is permitted to occur.