An encoding method, comprising: encoding a first denominator for a luma weighting factor; encoding a first difference value that is equal to a value of a difference between the first denominator and a second denominator for a chroma weighting factor; encoding a second difference value of the luma weighting factor, wherein the second difference value is equal to a value of a difference between the luma weighting factor and a first reference value, and the first reference value is equal to a value obtained by left shift of "1" by the number of binary digits specified by the first denominator, and the second difference value is in a fixed range of -128 to +127 regardless of the first denominator; encoding a third difference value of the chroma weighting factor, wherein the third difference value is equal to a value of a difference between the chroma weighting factor and a second reference value, the second reference value is equal to a value obtained by left shift of "1" by the number of binary digits specified by the second denominator, and the third difference value is in a fixed range of -128 to +127 regardless of the second denominator; and encoding a fourth difference value of a chroma offset, wherein the fourth difference value is equal to a value of a difference between the chroma offset and a third reference value, the fourth difference value is in a fixed range, and the third reference value is equal to a value obtained by subtracting a value obtained by both multiplying a median value of a maximum pixel value by the chroma weighting factor and shifting to right for the number of binary digits J Z specified by the second denominator, from the median value; wherein: the weighting factors are used for making a weighted motion-compensated prediction of a change in a pixel value by multiplying a reference image by the weighting factors, and the offset is used for correcting the pixel value by being added to the reference image. encoding a first denominator for a luma weighting factor; encoding a first difference value that is equal to a value of a difference between the first denominator and a second denominator for a chroma weighting factor; encoding a second difference value of the luma weighting factor, wherein the second difference value is equal to a value of a difference between the luma weighting factor and a first reference value, and the first reference value is equal to a value obtained by left shift of "1" by the number of binary digits specified by the first denominator, and the second difference value is in a fixed range of -128 to +127 regardless of the first denominator; encoding a third difference value of the chroma weighting factor, wherein the third difference value is equal to a value of a difference between the chroma weighting factor and a second reference value, the second reference value is equal to a value obtained by left shift of "1" by the number of binary digits specified by the second denominator, and the third difference value is in a fixed range of -128 to +127 regardless of the second denominator; and encoding a fourth difference value of a chroma offset, wherein the fourth difference value is equal to a value of a difference between the chroma offset and a third reference value, the fourth difference value is in a fixed range, and the third reference value is equal to a value obtained by subtracting a value obtained by both multiplying a median value of a maximum pixel value by the chroma weighting factor and shifting to right for the number of binary digits J Z specified by the second denominator, from the median value; <EOS>