A method of deriving one or more sets of affine motion parameters at a decoder, comprising: obtaining, by the decoder, video data from an encoded video bitstream, the video data including at least a current picture and a reference picture; and determining, by the decoder, a set of affine motion parameters for a current block of the current picture, the set of affine motion parameters being used for performing motion compensation prediction for the current block, wherein the set of affine motion parameters are determined using a current affine template of the current block and a reference affine template of the reference picture; wherein determining the set of affine motion parameters for the current block includes: obtaining, by the decoder, an initial set of affine motion parameters; deriving, by the decoder, one or more affine motion vectors for one or more pixels in the current affine template of the current block using the initial set of affine motion parameters, the current affine template of the current block including reconstructed pixels neighboring the current block; determining, by the decoder, one or more pixels in the reference affine template of the reference picture using the one or more affine motion vectors derived for the one or more pixels in the current affine template; minimizing, by the decoder, an error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template determined using the one or more affine motion vectors; and determining, by the decoder, the set of affine motion parameters the one or more control points of the current affine template based on the minimized error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template; characterised in that the initial set of affine motion parameters are determined based on a translational motion vector determined for the current block. obtaining, by the decoder, video data from an encoded video bitstream, the video data including at least a current picture and a reference picture; and determining, by the decoder, a set of affine motion parameters for a current block of the current picture, the set of affine motion parameters being used for performing motion compensation prediction for the current block, wherein the set of affine motion parameters are determined using a current affine template of the current block and a reference affine template of the reference picture; wherein determining the set of affine motion parameters for the current block includes: obtaining, by the decoder, an initial set of affine motion parameters; deriving, by the decoder, one or more affine motion vectors for one or more pixels in the current affine template of the current block using the initial set of affine motion parameters, the current affine template of the current block including reconstructed pixels neighboring the current block; determining, by the decoder, one or more pixels in the reference affine template of the reference picture using the one or more affine motion vectors derived for the one or more pixels in the current affine template; minimizing, by the decoder, an error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template determined using the one or more affine motion vectors; and determining, by the decoder, the set of affine motion parameters the one or more control points of the current affine template based on the minimized error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template; characterised in that the initial set of affine motion parameters are determined based on a translational motion vector determined for the current block. obtaining, by the decoder, an initial set of affine motion parameters; deriving, by the decoder, one or more affine motion vectors for one or more pixels in the current affine template of the current block using the initial set of affine motion parameters, the current affine template of the current block including reconstructed pixels neighboring the current block; determining, by the decoder, one or more pixels in the reference affine template of the reference picture using the one or more affine motion vectors derived for the one or more pixels in the current affine template; minimizing, by the decoder, an error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template determined using the one or more affine motion vectors; and determining, by the decoder, the set of affine motion parameters the one or more control points of the current affine template based on the minimized error between at least the one or more pixels in the current affine template and the one or more pixels in the reference affine template; characterised in that the initial set of affine motion parameters are determined based on a translational motion vector determined for the current block.