A method for decoding a video, the method comprising: obtaining a first motion vector of a current block based on a first motion vector predictor and a first motion vector difference, the first motion vector difference being derived from a bitstream; obtaining a second motion vector of the current block based on a second motion vector predictor and a second motion vector difference, the second motion vector difference being derived from the bitstream; obtaining, based on the first motion vector and a first reference picture, a first prediction block of the current block; obtaining, based on the second motion vector and a second reference picture, a second prediction block of the current block; obtaining a weighted prediction parameter of the current block, the weighted prediction parameter being representative of a second weight applying to the second prediction block; determining a first weight applying to the first prediction block, the first weight having a value by subtracting the weighted prediction parameter from 1; and obtaining a final prediction block of the current block based on a weighted sum of the first prediction block and the second prediction block, wherein the weighted prediction parameter is selected based on index information signaled via the bitstream, the index information specifying one of a plurality of weighted prediction parameter candidates, characterised in that a number of the plurality of weighted prediction parameter candidates is varied based on a temporal direction of the first reference picture and the second reference picture, the temporal direction representing whether an output order of a reference picture is previous to or subsequent to a current picture. obtaining a first motion vector of a current block based on a first motion vector predictor and a first motion vector difference, the first motion vector difference being derived from a bitstream; obtaining a second motion vector of the current block based on a second motion vector predictor and a second motion vector difference, the second motion vector difference being derived from the bitstream; obtaining, based on the first motion vector and a first reference picture, a first prediction block of the current block; obtaining, based on the second motion vector and a second reference picture, a second prediction block of the current block; obtaining a weighted prediction parameter of the current block, the weighted prediction parameter being representative of a second weight applying to the second prediction block; determining a first weight applying to the first prediction block, the first weight having a value by subtracting the weighted prediction parameter from 1; and obtaining a final prediction block of the current block based on a weighted sum of the first prediction block and the second prediction block, wherein the weighted prediction parameter is selected based on index information signaled via the bitstream, the index information specifying one of a plurality of weighted prediction parameter candidates, characterised in that a number of the plurality of weighted prediction parameter candidates is varied based on a temporal direction of the first reference picture and the second reference picture, the temporal direction representing whether an output order of a reference picture is previous to or subsequent to a current picture.