A method of decoding video data, the method comprising: determining a block of video data is encoded using a bi-directional inter prediction mode; determining a first motion vector, MV, for the block, wherein the first MV points to a first reference picture; determining a second MV for the block, wherein the second MV points to a second reference picture, the first reference picture being different than the second reference picture; using the first MV, locating a first predictive block in the first reference picture; using the second MV, locating a second predictive block in the second reference picture; for a first 4x4 sub-block of the first predictive block, determining a first amount of bi-directional optical flow, BIO, motion based on gradient values of samples of the first 4x4 sub-block; determining a first final predictive 4x4 sub-block for the block of video data based on the first 4x4 sub-block of the first predictive block, a 4x4 first sub-block of the second predictive block, and the first amount of BIO motion, wherein determining the first final predictive 4x4 sub-block for the block of video data based on the first 4x4 sub-block of the first predictive block, the first 4x4 sub-block of the second predictive block, and the first amount of BIO motion comprises, for each sample of the first final predictive 4x4 sub-block, determining a sample value of the first final predictive 4x4 sub-block based on co-located samples of the first 4x4 sub-block of the first predictive block and the first 4x4 sub-block of the second predictive block using the first amount of BIO motion;; for a second 4x4 sub-block of the first predictive block, determining a second amount of BIO motion based on gradient values of samples in the second 4x4 sub-block; determining a second final predictive 4x4 sub-block for the block of video data based on the second 4x4 sub-block of the first predictive block, a second 4x4 sub-block of the second predictive block, and the second amount of BIO motion, wherein determining the second final predictive 4x4 sub-block for the block of video data based on the second 4x4 sub-block of the first predictive block, the second 4x4 sub-block of the second predictive block, and the second amount of BIO motion comprises, for each sample of the second final predictive 4x4 sub-block, determining a sample value of the second final predictive 4x4 sub-block based on co-located samples of the second 4x4 sub-block of the first predictive block and the second 4x4 sub-block of the second predictive block using the second amount of BIO motion; based on the first final predictive 4x4 sub-block and the second final predictive 4x4 sub-block, determining a final predictive block for the block of video data; and outputting a picture of video data comprising a decoded version of the block of video data. determining a block of video data is encoded using a bi-directional inter prediction mode; determining a first motion vector, MV, for the block, wherein the first MV points to a first reference picture; determining a second MV for the block, wherein the second MV points to a second reference picture, the first reference picture being different than the second reference picture; using the first MV, locating a first predictive block in the first reference picture; using the second MV, locating a second predictive block in the second reference picture; for a first 4x4 sub-block of the first predictive block, determining a first amount of bi-directional optical flow, BIO, motion based on gradient values of samples of the first 4x4 sub-block; determining a first final predictive 4x4 sub-block for the block of video data based on the first 4x4 sub-block of the first predictive block, a 4x4 first sub-block of the second predictive block, and the first amount of BIO motion, wherein determining the first final predictive 4x4 sub-block for the block of video data based on the first 4x4 sub-block of the first predictive block, the first 4x4 sub-block of the second predictive block, and the first amount of BIO motion comprises, for each sample of the first final predictive 4x4 sub-block, determining a sample value of the first final predictive 4x4 sub-block based on co-located samples of the first 4x4 sub-block of the first predictive block and the first 4x4 sub-block of the second predictive block using the first amount of BIO motion;; for a second 4x4 sub-block of the first predictive block, determining a second amount of BIO motion based on gradient values of samples in the second 4x4 sub-block; determining a second final predictive 4x4 sub-block for the block of video data based on the second 4x4 sub-block of the first predictive block, a second 4x4 sub-block of the second predictive block, and the second amount of BIO motion, wherein determining the second final predictive 4x4 sub-block for the block of video data based on the second 4x4 sub-block of the first predictive block, the second 4x4 sub-block of the second predictive block, and the second amount of BIO motion comprises, for each sample of the second final predictive 4x4 sub-block, determining a sample value of the second final predictive 4x4 sub-block based on co-located samples of the second 4x4 sub-block of the first predictive block and the second 4x4 sub-block of the second predictive block using the second amount of BIO motion; based on the first final predictive 4x4 sub-block and the second final predictive 4x4 sub-block, determining a final predictive block for the block of video data; and outputting a picture of video data comprising a decoded version of the block of video data.