ENCODING DEVICE, DECODING DEVICE, ENCODING METHOD, AND DECODING METHOD
According to an embodiment, an encoding device includes an index setting unit and an encoding unit. The index setting unit generates a common index in which reference indices of one or more reference images included in a first index and a second index are sorted in a combination so as not to include a same reference image in accordance with a predetermined scanning order. The first index representing a combination of the one or more reference images referred to by a first reference image. The second index representing a combination of the one or more reference images referred to by a second reference image. The encoding unit encodes the common index.
1 . An encoding device comprising:
an index setting unit configured to generate a common index in which reference indices of one or more reference images included in a first index and a second index are sorted in a combination so as not to include a same reference image in accordance with a predetermined scanning order, the first index representing a combination of the one or more reference images referred to by a first reference image, the second index representing a combination of the one or more reference images referred to by a second reference image; and
an encoding unit configured to encode the common index.
2 . The device according to claim 1 , wherein
the first index and the second index includes one or more weighting factors,
the device further comprising
a predicted image generating unit configured to generate a predicted image of a target block by multiplying motion compensated predicted values by weighting factors of the first reference image and the second reference image, the motion compensated predicted values being obtained based on motion vectors; and
a quantization unit configured to generate a quantization transformation coefficient of the target block based on the input image and the predicted image, and
the encoding unit further encodes the quantization transformation coefficient and the motion vectors.
3 . The device according to claim 2 , wherein
the first index and the second index includes one or more offsets, and
the predicted image generating unit
generates motion compensated predicted values based on the motion vectors,
multiples the motion compensated predicted images values by the weighting factors of the first reference image and the second reference image, and
adds offsets corresponding to the first reference image and the second reference image, to generate the predicted image of the target block.
4 . The device according to claim 2 , wherein the encoding unit encodes high-level information and low-level information as mutually-different units, the high-level information including the common index in units of one or more pictures, the low-level information including the quantization transformation coefficient and the motion vectors and referring to an identification number of the high-level information.
5 . The device according to claim 4 , wherein the common index includes information of a maximum number of allowed reference images and the number of reference images maintained by a unit structure higher than the picture.
6 . The device according to claim 1 , wherein
the predicted image generating unit replaces a reference image that is the same as the reference image included in the first index out of the one or more reference images included in the second index with reference information for referring to the reference image included in the first index, and
the encoding unit encodes the first index and the second index after being replaced with the reference information.
7 . The device according to claim 1 , wherein the index setting unit and the encoding unit are implemented as a processor.
8 . The device according to claim 1 , wherein the index setting unit and the encoding unit are implemented as a circuit.
9 . A decoding device comprising:
an decoding unit configured to decode encoded data and generate a common index in which reference indices of one or more reference images included in a first index and a second index are sorted in a combination so as not to include a same reference image in accordance with a predetermined scanning order; and
an index setting unit configured to generate the first index and the second index from the generated common index.
10 . The device according to claim 9 , wherein
the first index and the second index includes one or more weighting factors,
the decoding unit generates a quantization transformation coefficient and motion vectors by decoding the encoded data,
the device further comprising
a predicted image generating unit configured to generate a predicted image of a target block by multiplying motion compensated predicted values by weighting factors of a first reference image and a second reference image, the motion compensated predicted values being obtained based on motion vectors; and
an addition unit configured to generate an output image using the decoded image and the predicted image.
11 . The device according to claim 10 , wherein
the first index and the second index includes one or more offsets, and
the predicted image generating unit
generates motion compensated predicted values based on the motion vectors,
multiples the motion compensated predicted images values by the weighting factors of the first reference image and the second reference image, and
adds offsets corresponding to the first reference image and the second reference image, to generate the predicted image of the target block.
12 . The device according to claim 9 , wherein the decoding unit decodes high-level information and low-level information as mutually-different units, the high-level information including the common index in units of one or more pictures, the low-level information including the quantization transformation coefficient and the motion vectors and referring to an identification number of the high-level information.
13 . The device according to claim 12 , wherein the common index includes information of a maximum number of allowed reference images and the number of reference images maintained by a unit structure higher than the picture.
14 . The device according to claim 9 , wherein
the decoding unit decodes the encoded data and generating the first index that represents a combination including one or more reference images referred to by a first reference image and the second index in which a reference image that is the same as the reference image included in the first index out of the one or more reference images is replaced with reference information for referring to the reference image included in the first index, and
the index setting unit generates of the first index and the second index includes replacing the reference information of the second index with the reference image included in the first index.
15 . The device according to claim 9 , wherein the decoding unit and the index setting unit are implemented as a processor.
16 . The device according to claim 9 , wherein the decoding unit and the index setting unit are implemented as a circuit.
17 . An encoding method comprising:
generating a common index in which reference indices of one or more reference images included in a first index and a second index are sorted in a combination so as not to include a same reference image in accordance with a predetermined scanning order, the first index representing a combination of the one or more reference images referred to by a first reference image, the second index representing a combination of the one or more reference images referred to by a second reference image; and
encoding the common index.
18 . A decoding method comprising:
decoding encoded data and generating a common index in which reference indices of one or more reference images included in a first index and a second index are sorted in a combination so as not to include a same reference image in accordance with a predetermined scanning order; and
generating the first index and the second index from the generated common index.