An electronic apparatus, comprising a decoder module configured to: decode a first denominator for a luma weighting factor of a target image from encoded data; decode 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 of the target image from the encoded data; derive the second denominator by adding the first denominator and the first difference value; derive a first reference value of the luma weighting factor according to the first denominator, wherein the first reference value is equal to a value obtained by left shift of "1" by at least one binary digit, the number of binary digits specified by the first denominator; decode a second difference value of the luma weighting factor from the encoded data, wherein the second difference value is equal to a value of a difference between the luma weighting factor and the first reference value, and the second difference value is in a fixed range of-128 to +127 regardless of the first denominator; derive the luma weighting factor by adding the first reference value and the second difference value, wherein the luma weighting factor is in a range of (the first reference value ― 128) to (the first reference value + 127); derive a second reference value of the chroma weighting factor according to the second denominator, wherein the second reference value is equal to 1 <<chroma_log2_weight_denom, wherein chroma_log2_weight_denom is the second denominator; decode a third difference value of the chroma weighting factor from the encoded data, wherein the third difference value is equal to a value of a difference between the chroma weighting factor and the second reference value, wherein the third difference value is in a fixed range of-128 to +127 regardless of the second denominator; and derive the chroma weighting factor by adding the second reference value and the third difference value, wherein the chroma weighting factor is in a range of (the second reference value - 128) to (the second reference value + 127), wherein the weighting factors are used for making a motion-compensated prediction of a change in a pixel value by multiplying a reference image by the weighting factors. decode a first denominator for a luma weighting factor of a target image from encoded data; decode 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 of the target image from the encoded data; derive the second denominator by adding the first denominator and the first difference value; derive a first reference value of the luma weighting factor according to the first denominator, wherein the first reference value is equal to a value obtained by left shift of "1" by at least one binary digit, the number of binary digits specified by the first denominator; decode a second difference value of the luma weighting factor from the encoded data, wherein the second difference value is equal to a value of a difference between the luma weighting factor and the first reference value, and the second difference value is in a fixed range of-128 to +127 regardless of the first denominator; derive the luma weighting factor by adding the first reference value and the second difference value, wherein the luma weighting factor is in a range of (the first reference value ― 128) to (the first reference value + 127); derive a second reference value of the chroma weighting factor according to the second denominator, wherein the second reference value is equal to 1 <<chroma_log2_weight_denom, wherein chroma_log2_weight_denom is the second denominator; decode a third difference value of the chroma weighting factor from the encoded data, wherein the third difference value is equal to a value of a difference between the chroma weighting factor and the second reference value, wherein the third difference value is in a fixed range of-128 to +127 regardless of the second denominator; and derive the chroma weighting factor by adding the second reference value and the third difference value, wherein the chroma weighting factor is in a range of (the second reference value - 128) to (the second reference value + 127),