A method for coding weighted prediction syntax elements for inter-prediction of a moving image using weighted prediction, comprising: encoding a first denominator for a luma weighting factor for a target block, wherein the first denominator for the luma weighting factor represents fixed point precision of the luma weighting factor; encoding a difference value that is equal to a value of a difference between a second denominator for a chroma weighting factor for the target block and the first denominator, wherein the second denominator for the chroma weighting factor represents fixed point precision of the chroma weighting factor; encoding a difference value of the luma weighting factor, wherein the difference value of the luma weighting factor 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 at least one binary digit specified by the first denominator; encoding a difference value of the chroma weighting factor, wherein the difference value of the chroma weighting factor is equal to a value of a difference between the chroma weighting factor and a second reference value, and the second reference value is equal to a value obtained by left shift of "1" by at least one binary digit specified by the second denominator; and encoding a difference value of a chroma offset, wherein the difference value of the chroma offset is equal to a value of a difference between the chroma offset and a third reference value, 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 for chroma by the chroma weighting factor and shifting to right for the at least one binary digit specified by the second denominator, from the median value. encoding a first denominator for a luma weighting factor for a target block, wherein the first denominator for the luma weighting factor represents fixed point precision of the luma weighting factor; encoding a difference value that is equal to a value of a difference between a second denominator for a chroma weighting factor for the target block and the first denominator, wherein the second denominator for the chroma weighting factor represents fixed point precision of the chroma weighting factor; encoding a difference value of the luma weighting factor, wherein the difference value of the luma weighting factor 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 at least one binary digit specified by the first denominator; encoding a difference value of the chroma weighting factor, wherein the difference value of the chroma weighting factor is equal to a value of a difference between the chroma weighting factor and a second reference value, and the second reference value is equal to a value obtained by left shift of "1" by at least one binary digit specified by the second denominator; and encoding a difference value of a chroma offset, wherein the difference value of the chroma offset is equal to a value of a difference between the chroma offset and a third reference value, 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 for chroma by the chroma weighting factor and shifting to right for the at least one binary digit specified by the second denominator, from the median value.