Patent Publication Number: US-2019191171-A1

Title: Prediction image generation device, video decoding device, and video coding device

Description:
TECHNICAL FIELD 
     The present invention relates to a prediction image generation device, a video decoding device, and a video coding device. 
     BACKGROUND ART 
     In order to efficiently transmit or record video, a video coding device which generates coded data by coding video, and a video decoding device which generates a decoded image by decoding the coded data have been used. 
     Specific examples of a video coding scheme include schemes proposed in H.264/MPEG-4. AVC or High-Efficiency Video Coding (HEVC). 
     In such a video coding scheme, images (pictures) constituting video are managed by a hierarchical structure including slices obtained by partitioning the images, units of coding (also referred to as Coding Units: CUs) obtained by partitioning the slices, and prediction units (PUs) and transform units (TUs) which are blocks obtained by partitioning the coding units, and each CU is coded/decoded. 
     In such a video coding scheme, generally, an input image is coded/decoded to obtain a local decoded image, based on the local decoded image, a prediction image is generated, and the prediction image is subtracted from the input image (original image) to obtain a prediction residual (also referred to as a “difference image” or a “residual image”), and the prediction residual is coded. Examples of a method for generating a prediction image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction). 
     One of video coding and decoding technologies in recent year is disclosed in NPL 1. 
     CITATION LIST 
     Non Patent Literature 
     NPL 1: Video/WET, “Algorithm Description of Joint Exploration TestModel 1 (JEM 1)”, INTERNATIONAL ORGANIZATION FOR STANDARDIZATION ORGANISATION INTERNATIONALE DE NORMALISATION ISO/IEC JTC1/SC29/WG11 CODING OF MOVING PICTURES AND AUDIO, ISO/IEC JTC1/SC29/WG11/N15790, October 2015, Geneva, CH. 
     SUMMARY OF INVENTION 
     Technical Problem 
     In video coding and decoding technology in recent years, motion compensation processing in a prediction image generation utilizes processing (OBMC processing) for generating an interpolation image of a target PU with the use of an interpolation image generated by using an inter-prediction parameter added to the target PU and an interpolation image generated by using a motion parameter of a neighboring PU of the target PU. On the other hand, OBMC processing includes a first problem of large memory band for accessing image data. 
     In addition, a second problem is included that processing amount increases in a case of performing OBMC processing. 
     Furthermore, in the case of performing OBMC processing, a third problem is included that accuracy of a prediction image degrades in the OBMC processing. An object of the disclosure is to provide an image decoding device, an image coding device, and a prediction image generation device capable of solving at least any of the above first, second, and third problems. 
     Solution to Problem 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a motion compensation unit configured to generate the prediction image in a target sub-block, wherein the motion compensation unit includes: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target prediction unit (PU) and filter processing to a sub-block on the reference image corresponding to the target sub-block; an additional interpolation image generation unit configured to generate an additional interpolation image by applying motion information of a neighboring sub-block neighboring the target sub-block and filter processing to the sub-block on the reference image corresponding to the target sub-block; and a prediction unit configured to generate the prediction image in a first mode that generates the prediction image from the interpolation image and the additional interpolation image, and in a case that the first mode is selected, the interpolation image generation unit and the additional interpolation image generation unit perform filter processing using a filter with a smaller number of taps compared to a case that the second mode that generates the prediction image by using only the interpolation image is selected. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a motion compensation unit configured to generate a prediction image in the target sub-block, wherein the motion compensation unit includes: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target prediction unit (PU) and filter processing to a sub-block on the reference image corresponding to the target sub-block; an additional interpolation image generation unit configured to generate an additional interpolation image by applying motion information of a neighboring sub-block neighboring the target sub-block and filter processing to the sub-block on the reference image corresponding to the target sub-block; and a prediction unit configured to generate the prediction image in a first mode that generates the prediction image from the interpolation image and the additional interpolation image, and in a case that the first mode is selected, the additional interpolation image generation unit configures the number of taps of a filter used for generation of the additional interpolation image to be smaller than the number of taps of a filter used for generation of the interpolation image. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a prediction image generation unit configured to perform inter-prediction of uni-prediction or bi-prediction to generate the prediction image, wherein the prediction image generation unit includes: an image generation unit configured to generate an interpolation image obtained by applying motion information of a target prediction unit (PU) to and filter processing a PU on the reference image corresponding to the target PU, and an additional interpolation image obtained by applying motion information of a neighboring PU and filter processing to pixels in a boundary area of the PU on the reference image corresponding to the target PU; and a prediction unit configured to generate the prediction image with reference to the interpolation image and the additional interpolation image in the boundary area, and in a case that the prediction image is generated in bi-prediction, the image generation unit configures the boundary area to be narrower compared to a case of generating he prediction image in uni-prediction. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a prediction image generation unit configured to perform inter-prediction of uni-prediction or bi-prediction to generate the prediction image, wherein the prediction image generation unit includes: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target prediction unit (PU) and filter processing to a PU on the reference image corresponding to the target PU; an availability check unit configured to check, for each neighboring direction, availability of motion information of the PU neighboring the target PU in the neighboring direction; an additional interpolation image generation unit configured to generate an additional interpolation image by applying motion information that are determined available by the availability check unit and filter processing to the PU on the reference image corresponding to the target PU; and a prediction unit configured to generate the prediction image with reference to the interpolation image and the additional interpolation image, and in a case that the prediction image is generated in bi-prediction, the availability check unit configures the number of neighboring directions to be smaller compared to a case of generating the prediction image in uni-prediction. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a motion compensation unit configured to generate a prediction image in the target sub-block, wherein the motion compensation unit includes: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target prediction unit (PU) and filter processing to a sub-block on the reference image corresponding to the target sub-block; an additional interpolation image generation unit configured to generate an additional interpolation image by applying motion information of a neighboring sub-block neighboring the target sub-block and filter processing to pixels in a boundary area of at least one of a coding unit (CU) and a PU of the sub-block on the reference image corresponding to the target sub-block; and a prediction unit configured to generate the prediction image to generate the prediction image from the interpolation image and the additional interpolation image, and the additional interpolation image generation unit applies filter processing using a filter with a smaller number of taps to the boundary area of the coding unit (CU), compared to a case for the boundary area of the prediction unit (PU). 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: a motion compensation unit configured to generate a prediction image in the target sub-block, wherein the motion compensation unit includes: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target prediction unit (PU) and filter processing to a sub-block on the reference image corresponding to the target sub-block; an additional interpolation image generation unit configured to generate an additional interpolation image by applying motion information of a neighboring sub-block neighboring the target sub-block and filter processing to only pixels in a boundary area of a PU on the reference image corresponding to the target sub-block; and a prediction unit configured to generate the prediction image to generate the prediction image from the interpolation image and the additional interpolation image. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: an image generation unit configured to generate an interpolation image obtained by applying motion information of a target prediction unit (PU) and filter processing to a sub-block on the reference image corresponding to a target sub-block, and an additional interpolation image obtained by applying motion information of a neighboring sub-block and filter processing to pixels in a boundary area of the sub-block on the reference image corresponding to the target sub-block; and a prediction unit configured to generate the prediction image with reference to the interpolation image and the additional interpolation image, wherein the image generation unit configures a boundary area of a coding unit (CU) in the sub-block on the reference image corresponding to the target sub-block to be narrower compared to a boundary area of a PU. 
     In order to solve the above problems, a prediction image generation device according to an aspect of the present invention is a prediction image generation device for generating a prediction image with reference to a reference image, the prediction image generation device including: an interpolation image generation unit configured to generate an interpolation image by applying motion information of a target unit (PU) and filter processing to a sub-block on the reference image corresponding to a target sub-block; an availability check unit configured to check, for each neighboring direction included in a group of neighboring directions including multiple neighboring directions, availability of the motion information to a neighboring sub-block neighboring the target sub-block in corresponding neighboring direction, and to generate an additional interpolation image by applying the motion information determined available and filter processing to the target sub-block; and an image correction unit configured to correct an image for correct by a linear sum of the interpolation image and the additional interpolation image using coefficients of integer precision, wherein the image correction unit adds, after updating the image for correct with regard to all the neighboring directions included in the group of neighboring directions, weighted interpolation image and weigted additional interpolation image, and right-bit shifts the sum to generate the prediction image. 
     Advantageous Effects of Invention 
     According to the above configuration, at least any of t ove first, second, and third problems can be solved. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         FIGS. 1A to 1F  are diagrams illustrating a hierarchical structure of data of a coded stream according to the present embodiment. 
         FIGS. 2A to 2H  are diagrams illustrating patterns for a PU partition mode.  FIGS. 2A to 2H  respectively illustrate partition shapes in cases that the PL partition mode is 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N. 
         FIG. 3  is a conceptual diagram illustrating an example of a reference picture list. 
         FIG. 4  is a conceptual diagram illustrating an example of a reference picture. 
         FIG. 5  is a block diagram illustrating a configuration of an image decoding device according to the present embodiment. 
         FIG. 6  is a schematic diagram illustrating a configuration of an inter-prediction parameter decoding unit according to the present embodiment. 
         FIG. 7  is a schematic diagram illustrating a configuration of a merge prediction parameter derivation unit according to the present embodiment. 
         FIG. 8  is a schematic diagram illustrating a configuration of an AMVP prediction parameter derivation unit according to the present embodiment. 
         FIG. 9  is a conceptual diagram illustrating an example of vector candidates. 
         FIG. 10  is a schematic diagram illustrating a configuration of an inter-prediction parameter decoding controller according to the present embodiment. 
         FIG. 11  is a schematic diagram illustrating a configuration of an inter-prediction image generation unit according to the present embodiment. 
         FIG. 12A  is a diagram for illustrating Bilateral matching in the above matching process.  FIG. 12B  is a diagram for illustrating Template matching. It is a block diagram illustrating a configuration of an image coding device according to the present embodiment. 
         FIG. 13  is a diagram illustrating an example in which a motion vector mvLX of each of sub-blocks which constitute a PU (width nPbW) whose motion vector is to be predicted is derived. 
         FIG. 14  is a diagram illustrating an example of an area for performing prediction image generation by using a motion parameter of a neighboring PU according to the present embodiment. 
         FIG. 15  is a block diagram illustrating main components of a motion compensation unlit which performs OBMC processing according to the present embodiment. 
         FIG. 16  is a flowchart illustrating an example of a processing flow of the motion compensation unit according to the present embodiment. 
         FIG. 17  illustrates a pseudo-code which represents the OBMC processing according to the present embodiment. 
         FIG. 18  is a diagram for illustrating whether or not the motion parameter of the neighboring sub-block is unknown. 
         FIGS. 19A and 19B  are diagrams illustrating an overview of filter processing performed by the motion compensation unit according to the present embodiment. 
         FIG. 20  is a flowchart illustrating an example of the processing flow of the inter-prediction image generation unit according to the present embodiment. 
         FIG. 21  is a pseudo-code indicating the processing of the inter-prediction image generation unit according to the present embodiment. 
         FIGS. 22A and 22B  are diagrams illustrating an overview of an example of filter processing performed by the motion compensation unit according to the present embodiment. 
         FIG. 23  is a flowchart illustrating an example of a processing flow of the motion compensation unit according to the present embodiment. 
         FIG. 24  is a pseudo-code illustrating an example of the processing of the motion compensation unit according to the present embodiment. 
         FIGS. 25A to 25C  are diagrams illustrating an overview of an example of the processing of the motion compensation unit according to the present embodiment. 
         FIG. 26  is a flowchart illustrating an example of a processing flow of the motion compensation unit according to the present embodiment. 
         FIG. 27  is a pseudo-code illustrating an example of the processing of the motion compensation unit according to the present embodiment. 
         FIG. 28  is a flowchart illustrating an example of the processing flow of the motion compensation unit according to the present embodiment. 
         FIG. 29  is a pseudo-code illustrating an example of the processing of the motion compensation unit according to the present embodiment. 
         FIGS. 30A and 30B  are diagrams illustrating an overview of an example of filter processing performed by the additional motion compensation unit according to the present embodiment. 
         FIG. 31  is a flowchart illustrating an example of a processing flow of the motion compensation unit according to the present embodiment. 
         FIGS. 32A to 30C  are diagrams illustrating an overview of an example of filter processing performed by the motion compensation unit according to the present embodiment. 
         FIGS. 33A and 33B  are diagrams illustrating an overview of an example of the processing of the motion compensation unit according to the present embodiment. 
         FIG. 34  is a flowchart illustrating an example of the processing flow of the motion compensation unit according to the present embodiment. 
         FIGS. 35A and 35B  are diagrams illustrating an overview of an example of the processing of the motion compensation unit according to the present embodiment. 
         FIG. 36  is a flowchart illustrating an example of the processing flow of the motion compensation unit according to the present embodiment. 
         FIGS. 37A to 37C  are diagrams illustrating an overview of an example of processing performed by the motion compensation unit according to the present embodiment. 
         FIG. 38  is a block diagram illustrating a configuration of an image coding device according to the present embodiment. 
         FIG. 39  is a schematic diagram illustrating a configuration of an inter-prediction image generation unit of an image coding device according to the present embodiment. 
         FIG. 40  is a block diagram illustrating main components of the motion compensation unit which performs OBMC processing of the image coding device according to the present embodiment. 
         FIG. 41  is a schematic diagram illustrating a configuration of an inter-prediction parameter coding unit of the image coding device according to the present embodiment. 
         FIGS. 42A and 42B  are diagrams illustrating configurations of a transmission device equipped with the image coding device and a reception device equipped with the image decoding device according to the present embodiment.  FIG. 42A  illustrates the transmission device equipped with the image coding device and  FIG. 42B  illustrates the reception device equipped with the image decoding device. 
         FIGS. 43A and 43B  are diagrams illustrating configurations of a recording device equipped with the image coding device and a reproducing device equipped with the image decoding device according to the present embodiment.  FIG. 43A  illustrates the recording device equipped with the image coding device and  FIG. 43B  illustrates the reproducing device equipped with the image decoding device. 
         FIG. 44  is a schematic diagram illustrating a configuration of an image transmission system according to an embodiment of the disclosure. 
     
    
    
     DESCRIPTION OF EMBODIMENTS 
     First Embodiment 
     Hereinafter, embodiments of the present invention are described in detail with reference to the drawings. 
       FIG. 44  is a schematic diagram illustrating a configuration of an image transmission system  1  according to the present embodiment. 
     The image transmission system  1  is a system in which a code obtained by coding a coding target image is transmitted and the image obtained by decoding the transmitted code is displayed. The image transmission system  1  is configured to include an image coding device  11  (video coding device), a network  21 , an image decoding device  31  (video decoding device), and an image display device  41 . 
     Signals T representing an image of a single layer or multiple layers are input to the image coding device  11 . A layer is a concept used to distinguish multiple pictures in a case that a certain time period is constituted by one or more pictures. For example, scalable coding applies in a case that the same picture is coded in multiple layers which are different in image quality or resolution, and view scalable coding applies in a case that pictures different in a viewpoint are coded in multiple layers. In a case that prediction is performed between pictures of multiple layers (inter-layer prediction, inter-view prediction), the coding efficiency is highly improved. In a case also that prediction is not performed (simulcast), the coded data can be collected. 
     The network  21  transmits a coded stream Te generated by the image coding device  11  to the image decoding device  31 , The network  21  includes the Internet, a Wide Area Network (WAN), or a Local Area Network (LAN), or a combination thereof. The network  21  is not necessarily limited to a bidirectional communication network, but may be a unidirectional or bidirectional communication network transmitting broadcast waves such as digital terrestrial broadcasting and satellite broadcasting, The network  21  may be substituted by a storage medium in which the coded stream Te is recorded such as a Digital Versatile Disc (DVD) and a Blue-ray Disc (BD). 
     The image decoding device  31  decodes each coded stream Te transmitted by the network  21 , and generates one or multiple decoded images Td. 
     The image display device  41  displays all or some of one or multiple decoded images Td generated by the image decoding device  31 . The image display device  41  includes a display device, for example, a liquid crystal display and an organic Electro-luminescence (EL) display. In spatial scalable coding and SNR scalable coding, the image decoding device  31  and the image display device  41  display an enhancement layer image which is higher in image quality in a case of having high processing capability, and display a base layer image for which processing capability and display capability are required not so much high as the enhancement layer in a case of having only lower processing capability. 
     Structure of Coded Stream Te 
     Before describing in detail, the image coding device  11  and the image decoding device  31  according to the present embodiment, a description is given of a data structure of the coded stream Te which is generated by the image coding device  11  and decoded by the image decoding device  31 . 
       FIGS. 1A to 1F  are diagrams illustrating a hierarchical structure of data in the coded stream Te. The coded stream Te exemplarily contains a sequence and multiple pictures constituting the sequence.  FIGS. 1A to 1F  are diagrams respectively illustrating a sequence layer specifying a sequence SEQ, a picture layer specifying a picture PICT, a slice layer specifying a slice S, a slice data layer specifying slice data, a coded tree layer specifying a coded tree unit included in the slice data, and a coded unit layer specifying a Coding Unit (CU) included in the coding tree. 
     Sequence Layer 
     The sequence layer specifies a set of data to which the image decoding device  31  refers in order to decode the sequence SEQ to be processed. The sequence SEQ contains, as illustrated in  FIG. 1A , a Video Parameter Set, a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), a picture PICT, and Supplemental Enhancement Information (SEI). Here, a value following “#” indicates a layer ID.  FIGS. 1A to 1F  illustrate an example in which there is coded data of # 0  and # 1 , that is, a layer  0  and a layer  1 , but types of layer and the number of layers are not limited thereto. 
     The video parameter set VPS specifies, for a video configured with multiple layers, set of coding parameters common to multiple videos and a set of coding parameters associated with multiple layers and individual layers contained in the video. 
     The sequence parameter set SPS specifies a set of coding parameters to which the image decoding device  31  refers in order to decode a target sequence. For example, a width and height of a picture are specified. There may be multiple SPSs. In this case, any of multiple SPSs is selected from the PPS. 
     The picture parameter set PPS specifies a set of coding parameters to which the image decoding device  31  refers in order to decode pictures in the target sequence. For example, the PPS includes a reference value of a quantization width (pic_init_qp_minus26) used to decode the picture and a flag indicating that a weighted prediction is applied (weighted_pred_flag). There may be multiple PPSs. In this case, any of multiple PPSs is selected from the pictures in the target sequence. 
     Picture Layer 
     The picture layer specifies a set of data to which the image decoding device  31  refers in order to decode a picture PICT to be processed. The picture PICT contains slices S 0  to SNS- 1  (NS represents the total number of slices contained in the picture PICT) as illustrated in  FIG. 1B . 
     Hereinafter, the slices S 0  to SNS- 1  may be expressed with their suffixes omitted in a case that it is not necessary to distinguish them from each other. The same holds for other data with a suffix which is contained in the coded stream Te described below. 
     Slice Layer 
     The slice layer specifies a set of data to which the image decoding device  31  refers in order to decode a slice S to be processed. The slice S contains a slice header SH and slice data SDATA, as illustrated in  FIG. 1C . 
     The slice header SH contains a coding parameter group to which the image decoding device  31  refers in order to determine a method of decoding a target slice. Slice type specifying information (slice type) specifying a slice type is an example of the coding parameter contained in the slice header SH. 
     Examples of the slice type specifiable by the slice type specifying information include (1) I slice that is coded using intra prediction only, (2) P slice that is coded using unidirectional prediction or intra prediction, and (3) B slice that is coded using unidirectional prediction, bidirectional prediction, or intra prediction. 
     The slice header SH may include reference to the picture parameter set PPS (pic_parameter_set_id) which is contained in the above sequence layer. 
     Slice Data Layer 
     The slice data layer specifies a set of data to which the image decoding device  31  refers in order to decode slice data SDATA to be processed. The slice data SDATA contains a Coding Tree Unit (CTU) as illustrated in  FIG. 1D . The CTU is a block having a fixed size (e.g., 64×64) constituting a slice, and may be also referred to as a Largest Cording Unit (LCU). 
     Coded Tree Layer 
     The coded tree layer specifies a set of data to which the image decoding device  31  refers in order to decode a coded tree unit to be processed as illustrated in  FIG. 1E . The coded tree unit is partitioned by recursive quadtree partitioning. A node of a tree structure obtained by the recursive quadtree partitioning is called a Coding Tree (CT). An intermediate node of the quadtree is a coded tree and the coded tree unit itself is specified as a top CT. The CTU contains a split flag (split_flag), and is partitioned into four coded tree CT in a case that split_flag is 1. In a case that split_flag is 0, the coded tree CT is not partitioned and has one Coding Unit (CU) as a node. The coding unit CU is a terminal node of the coded tree layer and is not partitioned any further in this layer. The coding unit CU is a basic unit for coding processing. 
     In a case that a size of the coded tree unit CTU is 64×64 pixel, a size of the coding unit may be any of 64×64 pixel, 32×32 pixel, 16×16 pixel, and 8×8 pixel. 
     Coded Unit Layer 
     The coded unit layer specifies a set of data to which the image decoding device  31  refers in order to decode a coding unit to be processed, as illustrated in  FIG. 1F . Specifically, the coding unit includes a prediction tree, a transform tree, and a CU header CUH. The CU header specifies a partition mode, a division method (PU partition mode), and the like. 
     The prediction tree specifies prediction information (reference picture index, motion vector, etc.) of each of the prediction units (PU) which are obtained by partitioning the coding unit into one or multiple pieces. In other words, the prediction unittunits islare one or multiple non-overlapping areas which constitute the coding unit, The prediction tree includes one or multiple prediction units which are obtained by the above partitioning. Hereinafter, a unit of prediction obtained by further partitioning the prediction unit is called a “sub-block”. The sub-block is configured with multiple In a case that a size of the prediction unit is equal to a size of the sub-block, the number of sub-blocks in the prediction unit is one. In a case that a size of the prediction unit is larger than a size of the sub-block, the prediction unit is partitioned into the sub-blocks. For example, in a case that a size of the prediction unit is 8×8 and a size of the sub-block is 4×4, the prediction unit is partitioned horizontally into two and vertically into two to be partitioned into four sub-blocks. 
     Prediction processing may be performed for each of these prediction units (sub-blocks). 
     A type of partition for the prediction tree is roughly classified into two for a case of the intra prediction and a case of the inter prediction. The intra prediction is prediction within an identical picture, and the inter prediction is prediction processing performed between pictures different from each other (e.g., between display times, between layer images). 
     In the case of the intra prediction, a partition ethod includes method using 2N×2N (the same size as the coding unit) and N×N. 
     In the case of the inter prediction, a partition method includes coding in a PU partition mode (part mode) in the coded data, and includes methods using 2N×2N (the same size as the coding unit), 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N. Note that 2N×nU indicates that a 2N×2N coding unit are partitioned into two areas, 2N×0.5N and 2N×1.5N, in this order from the upside, 2N×nD indicates that a 2N×2N coding unit is partitioned into two areas, 2N×1.5N and 2N×0.5N, in this order from the upside. nL×2N indicates that a 2N×2N coding unit is partitioned into two areas, 0.5N×2N and 1.5N×2N, in this order from the left. nR×2N indicates that a 2N×2N coding unit is partitioned into two areas, 1.5N×2N and 0.5N×1.5N, in this order from the left. The number of partitions is any of 1, 2, and 4, and thus, the number of PUs included in the CU is 1 to 4. These PUs are expressed as PU 0 , PU 1 , PU 2 , and PU 3  in this order. 
     Each of  FIGS. 2A to 2H  specifically illustrates a boundary location of PU partitioning in the CU for each partition type. 
       FIG. 2A  illustrates a PU partition mode for 2N×2N in which the CU is not partitioned. 
       FIGS. 2B, 2C and 2D  illustrate respectively partition shapes in cases that the PU partition modes are 2N×N, 2N×nU, and 2N×nD. Hereinafter, the partitions in the cases that the PU partition modes are 2N×N, 2N×nU, and 2N×nD are collectively referred to as a horizontally-long partition. 
       FIGS. 2E, 2F and 2G  illustrate respectively partition shapes in the cases that the PU partition modes are N×2N, nL×2N, and nR×2N. Hereinafter, the partitions in the case that the PU partition types are N×2N, nL×2N, and nR×2N are collectively referred to as a vertically-long partition. 
     The horizontally-long partition and the vertically-long partition are collectively referred to as a rectangular partition. 
       FIG. 2H  illustrates a partition shape in a case that the PU partition mode is N×N. The PU partition modes in  FIGS. 2A and 2H  are also referred to as square partitioning based on their partition shapes. The PU partition modes in  FIGS. 2B to 2G  are also referred to as non-square partitioning. 
     In  FIGS. 2A to 2H , the number assigned to each partition indicates an identification number, and the partitions are processed in the order of the identification number. To be more specific, the identification number represents a scan order for partitioning. 
     In  FIGS. 2A to 2H , assume that an upper left corner is a base point (origin) of the CU. 
     In the transform tree, the coding unit is partitioned into one or multiple transform units, and a location and size of each transform unit is specified. In other words, the transform unit/units is/are one or multiple non-overlapping areas which constitute the coding unit. The transform tree includes one or multiple transform units which are obtained by the above partitioning. 
     Partitioning in the transform tree includes that performed by allocating an area having the same size as the coding unit as a transform unit, and that performed by the recursive quadtree partitioning similar to the partitioning of the CU described above. 
     Transform processing is performed for each of these transform units. 
     Prediction Parameter 
     A prediction image in the prediction unit (PU) is derived according to a prediction parameter associated with the PU. The prediction parameter includes a prediction parameter for intra prediction or a prediction parameter for inter prediction. Hereinafter, the prediction parameter for inter prediction (inter-prediction parameter) is described. The inter-prediction parameter includes prediction list utilization flags predFlagL 0  and predFlagL 1 , reference picture indices refId×L 0  and refId×L 1 , and vectors mvL 0  and mvL 1 . The prediction list utilization flags predFlagL 0  and predFlagL 1  are flags respectively indicating whether or not reference picture lists called L 0  list and L 1  list are used, and in a case that a value of each thereof is 1, the corresponding reference picture list is used. Here, assume that in a case that an expression “a flag indicating whether or not XX” is used herein, “1” corresponds to a case of XX and “0” corresponds to a case of not X X, and “1” represents true and “0” represents false in logical NOT, logical AND or the like (the same applies hereinafter). However, other values may be used as a true value or a false value in actual device or methods. A case that two reference picture lists are used, that is, a case of predFlagL 0 =1 and predFlagL 1 =1, corresponds to bi-prediction BiPred, and a case that one reference picture list is used, that is, a case of (predFlagL 0 , predFlagL 0 =(1, 0) or (predFlagL 0 , predFlagL 1 )=(0, 1), corresponds to uni-prediction UniPred. Information on the prediction list utilization flag can be also expressed by an inter-prediction identifier inter_pred_idc described below. 
     The flag biPred indicating whether bi-prediction BiPred is used or not can be derived from whether both the two prediction list utilization flags indicate one. For example, the flag can be derived according to equations below. 
       biPred=(predFlagL0==1&amp;&amp; predFlagL1==1)
 
     Examples of a syntax element for deriving the inter-prediction parameter included in the coded data include a partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter-prediction identifier interpred_idc, a reference picture index refId×LX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, and an OBMC flag obmc flag for example. 
     Example of Reference Picture List 
     Next, a description is given of an example of the reference picture list. The reference picture list is a row constituted by the reference pictures stored in a reference picture memory  306 .  FIG. 3  is a conceptual diagram illustrating an example of the reference picture list. In a reference picture list  601 , each of five rectangles horizontally aligned represents a reference picture. Signs P 1 , P 2 , P 3 , P 4 , and P 5  indicated from a left end to the right are signs representing corresponding reference pictures. A suffix indicates a picture order count POC. A downward arrow immediately under “refId×LX” represents that the reference picture index refId×LX is an index for referring to a reference picture P 3  in the reference picture memory  306 . 
     Example of Reference Pictures 
     Next, a description is given of an example of the reference pictures which is used to derive a vector.  FIG. 4  is a conceptual diagram illustrating an example of the reference pictures. In  FIG. 4 , a horizontal axis represents a display time. Four rectangles illustrated in  FIG. 4  represent respectively pictures. The second rectangle from the left among four rectangles represents a decoding target picture (target picture) and the other three rectangles represent the reference pictures. The reference picture P 1  indicated by a leftward arrow from the target picture is a previous picture. The reference picture P 2  indicated by a rightward arrow from the target picture is a future picture. In  FIG. 4 , the reference picture P 1  or P 2  is used in motion prediction in which the target picture is used as a reference. 
     Inter-prediction Identifier and Prediction List Utilization Flag 
     The inter-prediction identifier inter_pred_idc, and the prediction list utilization flags predFlagL 0  and predFlagL 1  are mutually transformable as below. Therefore, the prediction list utilization flag may be used as the inter-prediction parameter or inter-prediction identifier may he used. In the following description, in determination using the prediction list utilization flag, the inter-prediction identifier may be alternatively used. In contrast, in determination using the inter-prediction identifier, the prediction list utilization flag may be alternatively used. 
     inter_pred_idc=(predFlagL1&lt;&lt;1)+predFlagL0 
     predFlagL0=inter_pred_idc &amp; 1 
     predFlagL1=inter_pred_idc&gt;&gt;1 
     Here, &gt;&gt;represents right bit shift, &lt;&lt;represents left bit shift, and &amp; represents bitwise AND. 
     The flag biPred indicating bi-prediction 13iPred or not can be derived depending on whether an inter-prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, the flag can be derived according to equation below. 
       biPred=(inter_pred idc=3)?1:01:0 
     The above-described equation can be expressed as the following equation, 
       biPred=(inter_pred_idc==3) 
     Merge Prediction and AMVP Prediction 
     A prediction parameter decoding (coding) method includes a merge prediction (merge) mode and an Adaptive Motion Vector Prediction (AMVP) mode, and a merge flag merge_flag is a flag identifying these modes. In both the merge prediction mode and the AMVP mode, a prediction parameter for an already processed PU is used to derive a prediction parameter for a target PU. The merge prediction mode is a mode in which a prediction list utilization flag predFlagLX (or inter-prediction identifier inter_pred_idc), a reference picture index refId×LX, and a motion vector mvLX are not included in the coded data, and the prediction parameter already derived for a neighboring PU is used as it is. The AMVP mode is a mode in which the inter-prediction identifier inter pred_idc, the reference picture index rcfId×LX, and the motion vector mvLX are included in the coded data. The motion vector mvLX is coded as a prediction vector index mvp_LX_idx identifying the prediction vector mvpLX and as a difference vector mvdLX. 
     The inter-prediction identifier inter_pred_idc is data indicating types and the number of the reference pictures, and has a value Pred_L 0 , Pred_L 1 , or Pred_Bi. Pred_L 0  and Pred_L 1  indicate that the reference pictures stored in the reference picture lists called L 0  list and L 1  list, respectively, are used, and indicate that one reference picture is used (uni-prediction). The predictions using L 0  list and L 1 . list are called L 0  prediction and L 1  prediction, respectively, Pred_Bi indicates that two reference pictures are used (bi-prediction BiPred), and indicates that two reference pictures stored in L 0  list and L 1  list are used. The prediction vector index mvp_LX_idx is an index indicating a prediction vector, and the reference picture index refId×LX is an index indicating a reference picture stored in the reference picture list. “LX” is a description method used in a case that the L 0  prediction and the LI prediction are not distinguished from each other, and a parameter for L 0  list and a parameter for L 1  list are distinguished by replacing “LX” with “L 0 ” or “L 1 ”. For example, refId×L 0  is a reference picture index used for the L 0  prediction, refId×L 1  is a reference picture index used for the L 1  prediction, and refId×LX is an expression used in a case that refId×L 0  and refId×L 1  are not distinguished from each other. 
     The merge index merge_idx is an index indicating which prediction parameter is used as a prediction parameter for the decoding target CU, among prediction parameter candidates (merge candidates) derived from the PU on which the processing is completed. 
     Motion Vector 
     The motion vector invLX indicates a displacement between the blocks on two pictures which are different in times. The prediction vector and difference vector for the motion vector mvLX are called respectively a prediction vector mvpLX and a difference vector mvdLX. 
     Configuration of Image Decoding Device 
     Next, a description is given of a configuration of the image decoding device  31  according to the present embodiment.  FIG. 5  is a schematic diagram illustrating the configuration of the image decoding device  31  according to the present embodiment. The image decoding device  31  is configured to include an entropy decoding unit  301 , a prediction parameter decoding unit (prediction image generation device)  302 , a reference picture memory  306 , a prediction parameter memory  307 , a prediction image generation unit (prediction image generation device)  308 , a dequantization and inverse DCT unit  311 , and an addition unit  312 . 
     The prediction parameter decoding unit  302  is configured to include an inter-prediction parameter decoding unit  303  and an intra-prediction parameter decoding unit  304 . The prediction image generation unit  308  is configured to include an inter-prediction image generation unit  309  and an intra-prediction image generation unit  310 . 
     The entropy decoding unit  301  performs entropy decoding on the coded stream Te input from outside to demultipiex and decode individual codes (syntax elements). Examples of the demultiplexed codes include the prediction information for generating the prediction image and residual information for generating the difference image. 
     The entropy decoding unit  301  outputs some of the demultiplexed codes to the prediction parameter decoding unit  302 . Some of the demultiplexed codes are, for example, a prediction mode PredMode, partition mode part mode, merge flag merge flag, merge index merge_idx, inter-prediction identifier inter_pred_idc, reference picture index refId×LX, prediction vector index mvp_LX_idx, and difference vector mvdLX. Control on which code is to be decoded is based on an instruction from the prediction parameter decoding unit  302 . The entropy decoding unit  301  outputs quantized coefficients to the dequantization and inverse DCT unit  311 . The quantized coefficients are coefficients obtained by performing Discrete Cosine Transform (DCT) on the residual signal and quantization in the coding processing. 
     The inter-prediction parameter decoding unit  303  refers to the prediction parameter stored in the prediction parameter memory  307 , based on the code input from the entropy decoding unit  301  to decode the inter-prediction parameter. 
     The inter-prediction parameter decoding unit  303  outputs the decoded inter-prediction parameter to the prediction image generation unit  308  and stores the parameter in the prediction parameter memory  307 . The inter-prediction parameter decoding unit  303  is described in detail later. 
     The intra-prediction parameter decoding unit  304  refers to the prediction parameter stored in the prediction parameter memory  307 , based on the code input from the entropy decoding unit  301  to decode the intra-prediction parameter. The intra-prediction parameter is a parameter used for processing to predict the CU within one picture, for example, an intra-prediction mode IntraPredMode. The intra-prediction parameter decoding unit  304  outputs the decoded intra-prediction parameter to the prediction image generation unit  308  and stores the parameter in the prediction parameter memory  307 . 
     The intra-prediction parameter decoding unit  304  may derive an intra-prediction mode different in luminance and chrominance. In this case, the intra-prediction parameter decoding unit  304  decodes a luminance prediction mode IntraPredrviodeY as a prediction parameter for luminance, and a chrominance prediction mode IntraPredModeC as a prediction parameter for chrominance. The luminance prediction mode IntraPredModeY has 35 modes, which correspond to planar prediction (0), DC prediction (1), and angular predictions (2 to 34), The chrominance prediction mode IntraPredModeC uses any of the planar prediction (0), the DC prediction (1), the angular predictions (2 to 34), and LM mode (35). The intra-prediction parameter decoding unit  304  decodes a flag indicating whether or not IntraPredModeC is the same mode as the luminance mode, may assign IntraPredModeC equal to IntraPredModeY in a case that the flag indicates the same mode as the luminance mode, and may decode the planar prediction (0), the DC prediction (1), the angular predictions (2 to 34), and the LM mode (35) as IntraPredModeC in a case that the flag indicates a mode different from the luminance mode. 
     The reference picture memory  306  stores the decoded image of the CU generated by the addition unit  312  in a predefined location for each decoding target picture and CU. 
     The prediction parameter memory  307  stores the prediction parameters in a predefined location for each decoding target picture and each prediction unit (or sub-block, fixed-size block, pixel). To be more specific, the prediction parameter memory  307  stores the inter-prediction parameter decoded by the inter-prediction parameter decoding unit  303 , the intra-prediction parameter decoded by the intra-prediction parameter decoding unit  304 , and the prediction mode predMode demultiplexed by the entropy decoding unit  301 . Examples of the stored inter-prediction parameter include the prediction list utilization flag predFlagLX (inter-prediction identifier inter_pred_idc), the reference picture index refId×LX, and the motion vector mvLX. 
     Input to the prediction image generation unit  308  are the prediction mode predMode which is input from the entropy decoding unit  301  and the prediction parameters from the prediction parameter decoding unit  302 . The prediction image generation unit  308  reads out the reference picture from the reference picture memory  306 . The prediction image generation unit  308  uses the input prediction parameters and the read-out reference picture to generate a prediction image of the PU in the prediction mode indicated by the prediction mode predrviode. 
     Here, in a case that the prediction mode predMode indicates the inter-prediction mode, the inter-prediction image generation unit  309  uses the inter-prediction parameter input from the inter-prediction parameter decoding unit  303  and the read-out reference picture to generate the prediction image of the PU by the inter-prediction. 
     The inter-prediction image generation unit  309  reads out from the reference picture memory  306  a reference picture block at a location which is indicated by the motion vector mvLX with reference to the decoding target PU from the reference picture indicated by the reference picture index redfIdxLX with respect to the reference picture list having the prediction list utilization flag predFlagLX of 1 (L 0  list or L 1  list). The inter-prediction image generation unit  309  performs prediction, based on the read-out reference picture block to generate the prediction image of the PU. The inter-prediction image generation unit  309  outputs the generated prediction image of the PU to the addition unit  312 . 
     In a case that the prediction mode predMode indicates the intra-prediction mode, the intra-prediction image generation unit  310  uses the intra-prediction parameter input from the intra-prediction parameter decoding unit  304  and the read-out reference picture to perform the intra-prediction. To be more specific, the intra-prediction image generation unit  310  reads out from the reference picture memory  306  the neighboring PU in a predefined range from the decoding target PU in the already decoded PUs of the decoding target picture. The predefined range is, for example, any of the left, upper left, upper, and upper right neighboring PUs in a case that the decoding target PU sequentially moves in the order of a so-called raster scan, and depends on the intra-prediction mode. The order of the raster scan is an order of sequentially moving from a left end to a right end of each row from an upper end to a bottom end in each picture. 
     The intra-prediction image generation unit  310  performs prediction on the read-out neighboring PU in the prediction mode indicated by the intra-prediction mode IntraPredMode to generate the prediction image of the PU. The intra-prediction image generation unit  310  outputs the generated prediction image of the PU to the addition unit  312 . 
     In a case that the intra-prediction parameter decoding unit  304  derives the intra-prediction mode different in luminance and chrominance, the intra-prediction image generation unit  310  generates a luminance prediction image of the PU by any of the planar prediction (0), the DC prediction (1), and the angular predictions (2 to 34) depending on the luminance prediction mode intraPredModeY, and generates a chrominance prediction image of the PU by any of the planar prediction (0), the DC prediction (1), the angular predictions (2 to 344), and the LM mode (35) depending on the chrominance prediction mode IntraPrk.dModeC. 
     The dequantization and inverse DCT unit  311  dequantizes the quantized coefficients input from the entropy decoding unit  301  to find DCT coefficients. The dequantization and inverse DCT unit  311  performs Inverse Discrete Cosine Transform (inverse DCT) on the found DCT coefficients to compute a decoded residual signal. The dequantization and inverse DCT unit  311  outputs the computed decoded residual signal to the addition unit  312 . 
     The addition unit  312  adds the prediction image of the PU input from the inter-prediction image generation unit  309  and intra-prediction image generation unit  310  and the decoded residual signal input from the dequantization and inverse DCT unit  311  for each pixel to generate a decoded image of the PU. The addition unit  312  stores the generated decoded image of the PU in the reference picture memory  306 , and outputs, to outside, a decoded image Td in which the generated decoded image of the PUs are integrated for each picture. 
     Configuration of Inter-Prediction Parameter Decoding Unit 
     Next, a description is given of a configuration of the inter-prediction parameter decoding unit  303 . 
       FIG. 6  is a schematic diagram illustrating the configuration of the inter-prediction parameter decoding unit  303  according to the present embodiment. The inter-prediction parameter decoding unit  303  is configured to include an inter-prediction parameter decoding controller  3031 , an AMVP prediction parameter derivation unit  3032 , an addition unit  3035 , a merge prediction parameter derivation unit  3036 , and a sub-block prediction parameter derivation unit  3037 . 
     The inter-prediction parameter decoding controller  3031  instructs the entropy decoding unit  301  to decode the code (syntax element) associated with the inter-prediction to extract the code (syntax element) included in the coded data, for example, the partition mode part mode, the merge flag merge_flag, the merge index merge_idx, the inter-prediction identifier interpred_idc, the reference picture index refId×LX, the prediction vector index mvp_LX_idx, the difference vector mvdLX, the OBMC flag obmc_flag, and the sub-block prediction mode flag subPbMotionFlag. 
     The inter-prediction parameter decoding controller  3031  first extracts the merge flag. An expression that the inter-prediction parameter decoding controller  3031  extracts a certain syntax element means instructing the entropy decoding unit  301  to decode a code of a certain syntax element to read the syntax element from the coded data. Here, in a case that the merge flag indicates a value of 1, that is, the merge prediction mode, the inter-prediction parameter decoding controller  3031  extracts the merge index merge_idx as a prediction parameter related to the merge prediction. The inter-prediction parameter decoding controller  3031  outputs the extracted merge index merge_idx to the merge prediction parameter derivation unit  3036 . 
     In a case that the merge flag merge_flag is 0, that is, indicates the AMVP prediction mode, the inter-prediction parameter decoding controller  3031  uses the entropy decoding unit  301  to extract the AMVP prediction parameter from the coded data. Examples of the AMVP prediction parameter include the inter-prediction identifier inter_pred_idc, the reference picture index refId×LX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. The inter-prediction parameter decoding controller  3031  outputs the prediction list utilization flag predFlagLX derived from the extracted inter-prediction identifier inter pred idc and the reference picture index redfIdxLX to the AMVP prediction parameter derivation unit  3032  and the prediction image generation unit  308  ( FIG. 5 ), and stores the predFlagLX and refId×LX in the prediction parameter memory  307 . The inter-prediction parameter decoding controller  3031  outputs the extracted prediction vector index mvp_LX_idx to the AM VP prediction parameter derivation unit  3032 . The inter-prediction parameter decoding controller  3031  outputs the extracted difference vector mvdLX to the addition unit  3035 . 
     The sub-block prediction parameter derivation unit  3037  performs any of subblock predictions depending on the value of the subblock prediction mode flag subPbMotionFlag supplied from the inter-prediction parameter decoding controller  3031  to dereive the motion vector mvLX. Here, examples of the inter-prediction parameter include the motion vector mvLX. 
     In the sub-block prediction mode, the sub-block prediction parameter derivation unit  3037  partitions the PU into multiple sub-blocks and derives a motion vector in units of sub-block obtained by partitioning. In other words, in the sub-block prediction mode, the prediction block is predicted in a small block unit of 4×4 or 8×8. The image coding device  11  described below partitions a CU into multiple partitions (PUs with 2N×N, N×2N, N×N, or the like), and collects multiple partitions into sets to code the syntax of the prediction parameter for each of the set in the sub-block prediction mode, for a method of coding the syntax of the prediction parameter in units of partition. Therefore, motion information for many partitions can be coded with a small code amount. 
     Describing in detail, the sub-block prediction parameter derivation unit  3037  includes at least one of a spacetime sub-block prediction unit  30371  performing sub-block prediction in the sub-block prediction mode, an affine prediction unit  30372 , and a matching prediction unit  30373 . 
     Sub-Block Prediction Mode Flag 
     Here, a method of deriving a sub-block prediction mode flag subPbMotionFlag indicating whether the prediction mode for a certain PU is the sub-block prediction mode in the image coding device  11  (details are described below) will be described. The image coding device  11  derives the sub-block prediction mode flag suhPhMotionFlag, based on whether any of a space sub-block prediction SSUB described below, a time sub-block prediction TSUB, an affine prediction AFFINE, and a matching prediction MAT are used. For example, in a case that the prediction mode selected for a certain PU is N (for example, N is a label indicating a selected merge candidate), the sub-block prediction mode flag subPbMotionFlag may be derived by the following equation. 
       subPbMotionFlag=(N==TSUB)∥(N==SSUB)∥(N==AFFINE)∥(N==MAT)
 
     Here, ∥ represents a logical sum (the same applies after). 
     Moreover, according to a mode type of the sub-block prediction performed by the image coding device  11 , the above-described equation may be changed appropriately as follows. The image coding device  11  may derive the sub-block prediction mode flag subPbMotionFlag in a following manner in a case that the image coding device  11  is configured to perform the space sub-block prediction SSUB or the affine prediction AFFINE. 
       subPbMotionFlag=(N==SSUB)∥(N==AFFINE)
 
     The image coding device  11  may be configured to set subPbMotionFlag to one, in the processing of the prediction mode corresponding to each subblock prediction, in a case of performing prediction with each prediction mode (for example, spacetime sub-block prediction, affine prediction, matching prediction)) included in the sub-block prediction, 
     Moreover, for example, in a ease that the CU size is 8×8 (logarithm CU size log2CbSize=3) and that the PU is small in size such as a case where the partitioning type is other than 2N×2N, PU can be used as the sub-block with the number of partitioning being one. In this case, the sub-block prediction mode subPbMotionFlag may be derived as follows. 
       subPbMotionFlag=|(log2CbSize==3 &amp;&amp; PartMode !2N×2N)
 
     Note that |=means that subPbMotionFlag may be derived by a sum operation (OR) with another condition. In other words, subPbMotionFlag may be derived by the sum operation of the determination of the prediction mode N and the determination of the small PU size as follows (the same applies hereinafter). 
       subPbMotionFlag=(N==TSUB)∥(N==SSUB)∥(N==AFFINE)∥(N==MAT) ∥(log2CbSize==3 &amp;&amp; PartMode !=2N×2N)
 
     Furthermore, for example, a case in which the CU size is 8×8 (log2CbSize==3) and the partitioning type is any of 2N×N, N×2N, and N×N may be included in the sub-block prediction. In other words, subPbMotionFlag may be derived as follows. 
       subPbMotionFlag |=(log2CbSize==3 &amp;&amp; (PartMode==2N×N∥PartMode==N×2∥PartMode==N×N))
 
     Furthermore, for example, a case in which the CU size is 8×8 (log2CbSize==3) and the partitioning type is N×N may be included in the sub-block prediction. In other words, subPbMotionFlag may be derived as follows. 
       subPbMotionFlag |=(log2CbSize==3 &amp;&amp; PartMode==N×N)
 
     Moreover, the cases of determining as the subblock prediction may include a case where the width or the height of the PU is four. In other words, the sub-block prediction mode flag subPbMotionFiag may be derived as follows. 
       subPbMotionFlag |=(nPbW==4∥nPbH==4)
 
     Sub-Block Prediction Unit 
     Next, a sub-block prediction unit will be described. 
     Spacetime Sub-Block Prediction Unit  30371   
     The spacetime sub-block prediction unit  30371  derives the motion vector of the sub-block obtained by partitioning the target PU, from the motion vector of the PU on the reference image (for example, a picture immediately before the target PU) temporally neighboring the target PU, or the motion vector of the PU spatially neighboring the target PU. Specifically, scaling the motion vector of the PU on the reference image according to the reference picture which the target PU refers to, allows the derivation of the motion vector spMvLX [xi][yi] (xi=xPb+nSbW*i, yj=yPb+nSbH*j, i=0, 1, 2, . . . , nPbW/nSbW−1, j=0, 1, 2, . . . , nPbH/nSbH−1) of each sub-block in the target PU (time sub-block prediction). Here, (xPb, yPb) are upper left coordinates of the target PU, nPbW and nPb11 indicate the size of the target PU, and nSbW and nSbH indicate the size of the sub-block. 
     Moreover, calculating a weighted average according to the motion vector of the PU neighboring the target PU and a distance from the sub-block obtained by partitioning the target PU, may allow the derivation of the motion vector spkivLX [xi][yi] (xi=xPb+nSbW*i, yj=yPb+nSbH*j,i=0, 1, 2, . . . ,nPbW/nSbW−1, j=0, 1, 2, . . . , nPbH/nSbH−1) of each sub-block in the target PU (space sub-block prediction). 
     The time sub-block prediction candidate TSUB and the space sub-block prediction candidate SSUB that are described above are selected as one mode (merge candidate) of a merge mode. 
     Affine Prediction Unit 
     The affine prediction unit  30372  derives affine prediction parameters of the target PU. In the present embodiment, as the affine prediction parameters, motion vectors (mv 0 _x, mv 0 _y) (mv 1 _x, mv_y) of two control points (V 0 , V 1 ) of the target PU is derived. Specifically, the motion vectors of respective control points may be derived by predicting from the motion vector of the neighboring PU of the target PU, or the motion vectors of respective control points may be derived by the sum of the prediction vector derived as the motion vector of the control point and a difference vector derived from. coded data. 
       FIG. 13  is a drawing illustrating an example in which a motion vector spMvLX of each subblock constituting a target PU (nPbW×nPbH) is derived from the motion vector (mv 0 _x, mv 0 _y) of the control point V 0 , and the motion vector (mv 1   13  x, mv_y) of V 1 . As illustrate in the drawing, the motion vector spMvLX of each sub-block is derived as a motion vector for each point located at a center of each sub-block as illustrated in  FIG. 13 . 
     The affine prediction unit  30372  derives, based on the affine prediction parameters of the target PU, the motion vector spMvLX [xi][yi] (xi=xPb+nSbW*i, yj=yPb+nSbH*j, i=0, 1, 2, . . . , nPbW/nSbW−1, j=0, 1, 2, . . . , nPbH/nSbH−1) of each sub-block in the target PU, by using the following equations. 
       spMvLX [xi][yi][0]=mv 0 _x+(mv1_x−mv0_)/nPbW*(xi+nSbW/2)−mv1_y−mv0_y)/nPbH*(yi+nSbH/2)
 
       spMvLX [xi][yi][1]=mv0_y+(mv1_y−mv0_y)/nPbW*(xi+nSbW/2)+(mv 1 _x−mv0_x)/nPbH*(yi+nSbH/2)
 
     Here, xPb and yPb are upper left coordinates of the target PU, nPbW and nPbH are the width and height of the target PU, and nSbW and nSbH are the width and height of the sub-block. 
     Matching Prediction Unit  30373   
     The matching prediction unit  30373  performs any matching process of bilateral matching and template matching to derive a motion Vector spMvLX of each sub-block constituting the PU.  FIGS. 12A and 12B  are diagrams for illustrating Bilateral matching and Template matching, respectively. The matching prediction mode is selected as one merge candidate (matching candidate) of a merge mode. 
     The matching prediction unit  30373  assumes that an object performs uniform motion to derive the motion vector by matching of areas in multiple reference images. In the bilateral matching, a certain object is assumed to pass through an area of the reference image A, the target PU of the target picture Cur Pic, and an area of the reference image B by uniform motion, and the motion vector of the target PU is derived by matching between the reference images A and B. In the template matching, it is assumed that the motion vector of the neighboring area of the target PU is the same as the motion vector of the target PU, and a motion vector is derived by matching of the neighboring area of the target PU and the neighboring area of the reference block, The matching prediction unit partitions the target PU into multiple sub-blocks, and performs bilateral matching or template matching described below in units of sub-block obtained by the partitioning, to derive the motion vector spMvLX [xi][yi] (xi=xPb+nSbW*i, yj=yPb+nSbH*j, i=0, 1, 2, . . . , nPbW/nSbW−1, j=0, 1, 2, . . . , nPbH/nSbH−1) of each sub-block. 
     As illustrated in  FIG. 12A , in the bilateral matching, two reference images are referred to in order to derive the motion vector of the sub-block Cur_block in the target picture Cur_Pic. To be more specific, first, assuming that coordinates of the sub-block Cur_block are (xCur, yCur), a Block_A and a Block_B are configured, where the Block_A is an area in a reference picture (called as a reference picture A) specified by a reference picture index Ref 0  and has upper left coordinates (xPos, yPos) specified by 
       (xPos, yPos)=(xCur+MV0_x, yCur+MV0 13  y), and 
     the Block_B is an area in a reference picture (called as a reference picture B) specified by a reference picture index Ref 1  and has upper left coordinates (xPos, yPos) specified by 
       (xPos, yPos)=(xCur−MV0_x*TD1/TD0, yCur−MV0 y *TD1/TD0).
 
     In the above equation, TD0 and TD1 represent an inter-picture distance between the target picture Cur_Pic and the reference picture A, and an inter-picture distance between the target picture Cur_Pic and the reference picture B, respectively, as illustrated in  FIG. 12A . 
     Next, (MV0_x, MV 0 _y) is determined such that a matching cost for the Block_A and Block_B is minimum. (MV0_x, MV0_y) derived in this way is the motion vector provided to the sub-block. 
     On the other hand,  FIG. 12B  illustrates Template matching in the above matching process, 
     As illustrated in  FIG. 12B , in the template matching, one reference picture is referred to in order to derive a motion vector of the sub-block Cur_block in the target picture (Cur_Pic). 
     To be more specific, first, a Block_A is specified where the Block_A is an area in the reference picture (called as the reference picture A) specified by the reference picture index Ref 0  and has upper left coordinates (xPos, yPos) specified by 
       (xPos, yPos)=(xCur+MV0_x, yCur+MV0_y). 
     In the above equation, (xCur, yCur) represent upper left coordinates of the sub-block Cur_block. 
     Next, a template region Temp_Cur neighboring to the sub-block Cur_block is configured in the target picture Cur_Pic and a template region Temp_L 0  neighboring to the Block_A is configured in the reference picture A. In the example illustrated in  FIG. 12B , the template region Temp_Cur is constituted by an area neighboring to an upper side of the sub-block Cur block and an area neighboring to a left side of the sub-block Cur_block. The template region Temp_L 0  is constituted by an area neighboring to an upper side of the Block_A and an area neighboring to a left side of the Block_A. 
     Next, (MV 0 _x, MV 0 _y) minimizing the matching cost of Temp_Cur and TempL 0  is determined, and is set as a motion vector spMvLX to be given to the sub-block. 
       FIG. 7  is a schematic diagram illustrating a configuration of the merge prediction parameter derivation —  unit  3036  according to the present embodiment. The merge prediction parameter derivation unit  3036  includes a merge candidate derivation unit  30361  and a merge candidate selection unit  30362 . The merge candidate storage unit  303611  stores therein merge candidates input from the merge candidate derivation unit  30361 . The merge candidate is configured to include the prediction list utilization flag predFlagLX, the motion vector mvLX, and the reference picture index refIdxLX. The merge candidate stored in the merge candidate storage unit  303611  is assigned with an index according to a prescribed rule. 
     The merge candidate derivation unit  30361  uses, without change, a motion vector and reference picture index refIdxLX of a neighboring PU on which the decode processing has been already applied to derive the merge candidates. Affine prediction may be used as another way to derive the merge candidates. This method is described below in detail. The merge candidate derivation unit  30361  may use the affine prediction for spatial merge candidate derivation processing, temporal merging candidate derivation processing, combined merge candidate derivation processing, and zero merge candidate derivation processing which are described below. The affine prediction is performed in units of sub-blocks, and the prediction parameter is stored in the prediction parameter memory  307  for each sub-block. Alternatively, the affine prediction may be performed in units of pixels. 
     Spatial Merge Candidate Derivation Processing 
     In the spatial merge candidate derivation processing, the merge candidate derivation unit  30361  reads out the prediction parameter (prediction list utilization flag predFlagLX, motion vector mvLX, reference picture index redfIdxLX) stored by the prediction parameter memory  307  according to a prescribed rule to derive the read-out prediction parameter as a merge candidate. The read-out prediction parameters are prediction parameters related to each of the PUs in a predefined range from the decoding target PU (e.g., all or some of PUs in contact with a lower left end, upper left end, and upper right end of the decoding target PU). The merge candidate derived by the merge candidate derivation unit  30361  is stored in the merge candidate storage  303611 . 
     Temporal Merge Candidate Derivation Processing 
     In temporal merge candidate derivation processing, the merge candidate derivation unit  30361  reads out, as merge candidates, the prediction parameters for the PU in the reference image including coordinates on the lower right of the decoding target PU from the prediction parameter memory  307 . As a method of specifying the reference image, the reference picture index refIdxLX specified in the slice header may be used, or a minimum one of the reference picture indices refIxLX of the PUs neighboring to the decoding target PU may be used, for example, The merge candidate derived by the merge candidate derivation unit  30361  is stored in the merge candidate storage  303611 . 
     Combined Merge Candidate Derivation Processing 
     In the combined merging derivation processing, the merge candidate derivation unit  30361  uses vectors and reference picture indices of two different derived merge candidates which are already derived and stored in the merge candidate storage unit  303611  as vectors for LO and respectively, to combine, and thus derives a combined merge candidate. The merge candidate derived by the merge candidate derivation unit  30361  is stored in the merge candidate storage unit  303611 . 
     Zero Merge Candidate Derivation Processing 
     In the zero merge candidate derivation processing, the merge candidate derivation unit  30361  derives a merge candidate including a reference picture index refIdxLX of 0 and both an X component and Y component of 0 of a motion vector mvLX. The merge candidate derived by the merge candidate derivation unit  30361  is stored in the merge candidate storage  303611 . 
     The merge candidate selection unit  30362  selects, as an inter-prediction parameter for the target PU, a merge candidate assigned with an index corresponding to the merge index merge_idx input from the inter-prediction parameter decoding controller  3031 , among the merge candidates stored in the merge candidate storage unit  303611 . The merge candidate selection unit  30362  stores the selected merge candidate in the prediction parameter memory  307  and outputs the candidate to the prediction image generation unit  308  ( FIG. 5 ). 
       FIG. 8  is a schematic diagram illustrating a configuration of the AMVP prediction parameter derivation unit  3032  according to the present embodiment. The AMVP prediction parameter derivation unit  3032  includes the vector candidate derivation unit  3033  and the vector candidate selection unit  3034 . The vector candidate derivation unit  3033  reads out the vector stored in the prediction parameter memory  307  as the prediction vector candidate mvpLX, based on the reference picture index refldx. The read-out vector is a vector related to each of the PUs in a predefined range from the decoding target PU (e.g., all or sonic of PUs in contact with a lower left end, upper left end, and upper right end of the decoding target PU). 
     The vector candidate selection unit  3034  selects, as a prediction vector mvpLX, a vector candidate indicated by the prediction vector index mvp_LX_idx input from the inter-prediction parameter decoding controller  3031 , among the vector candidates read out by the vector candidate derivation unit  3033 . The vector candidate selection unit  3034  outputs the selected prediction vector mvpLX to the addition unit  3035 . 
     The vector candidate storage unit  30331  stores therein the vector candidate input from the vector candidate derivation unit  3033 . The vector candidate is configured to include the prediction vector mvpLX. The vector candidate stored in the vector candidate storage unit  30331  is assigned with an index according to a prescribed rule. 
       FIG. 9  is a conceptual diagram illustrating an example of the vector candidates. A prediction vector list  602  illustrated in  FIG. 9  is a list constituted by multiple vector candidates derived by the vector candidate derivation unit  3033 . In the prediction vector list  602 , each of five rectangles horizontally aligned represents a prediction vector. A downward arrow immediately under “mvp_LX_idx” located at the second rectangle from the left end, and mvpLX under the arrow indicate that the prediction vector index mvp_LX_idx is an index referring to the vector mvpLX in the prediction parameter memory  307 . 
     The vector candidates are generated based on vectors related to PUs referred to by the vector candidate selection unit  3034 . Each PU referred to by the vector candidate selection unit  3034  may be a PU on which the decoding processing is completed, the PU being in a predefined range from the decoding target PU (e.g., neighboring PU). The neighboring PU includes a PU spatially neighboring to the decoding target PU such as a left PU and an upper PU, and an area temporally neighboring to the decoding target PU such an area which includes the same location as the decoding target PU and is obtained from the prediction parameters for the PU different in a display time. 
     The addition unit  3035  adds the prediction vector mvpLX input from the AMVP prediction parameter derivation unit  3032  and the difference vector mvdLX input from the inter-prediction parameter decoding controller  3031  to compute a motion vector mvLX. The addition unit  3035  outputs the computed motion vector mvLX to the prediction image generation unit  308  ( FIG. 5 ). 
       FIG. 10  is a schematic diagram illustrating a configuration of the inter-prediction parameter decoding controller  3031  according to the present embodiment. The inter-prediction parameter decoding controller  3031  is configured to include a merge index decoding unit  30312 , a vector candidate index decoding unit  30313 , and a not illustrated partition mode decoding unit, merge flag decoding unit, inter-prediction identifier decoding unit, reference picture index decoding unit, vector difference decoding unit, and the like, The partition mode decoding unit, the merge flag decoding unit, the merge index decoding unit, the inter-prediction identifier decoding unit, the reference picture index decoding unit, the vector candidate index decoding unit  30313 , and the vector difference decoding unit decode respectively the partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter-prediction identifier inter_pred_idc, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. 
     Inter-Prediction Image Generation Unit  309   
       FIG. 11  is a schematic diagram illustrating a configuration of the inter-prediction image generation unit  309  according to the present embodiment. The inter-prediction image generation unit  309  is configured to include a motion compensation unit (prediction image generation device)  3091  and a weighted prediction unit  3094 . 
     Motion Compensation 
     The motion compensation unit  3091  reads out from the reference picture memory  306  a block which is displaced by a motion vector mvLX from a starting point at a location of the decoding target PU in the reference picture specified by the reference picture index refIdxLX, based on the inter-prediction parameters input from the inter-prediction parameter decoding unit  303  (such as the prediction list utilization flag predFiagLX, the reference picture index redfIdxLX, and the motion vector mvLX) to generate an interpolation image (a motion compensation image). Here, in a case that a precision of the motion vector invLX is not an integer precision, a motion compensation image is generated by filtering called a motion compensation filter for generating a pixel at decimal position. 
     Hereinafter, an interpolation image of the PU derived based on the inter-prediction parameters is called a PU interpolation image, and an interpolation image derived based on the inter-prediction parameters for OBMC is called an OBMC interpolation image. In a case the OBMC processing is not performed, the PU interpolation image without change is the motion compensation image of the PU. In a case the OBMC processing is performed, the motion compensation image of the PU is derived from the PU interpolation image and the OBMC interpolation image. 
     Weighted Prediction 
     The weighted prediction unit  3094  multiplies an input motion compensation image predSamplesLX by weight coefficients to generate a prediction image of the PU. The input motion compensation image predSamplesLX in the case of the residual prediction is an image on which the residual prediction is applied. In a case that one of reference list utilization flags (predFlagL 0  or predFlagL 1 ) is 1 (that is, in a case of the uni-prediction) and the weighted prediction is not used, processing by the following equation is performed to conform the input motion compensation image predSamplesLX (LX is L 0  or L 1 ) to the number of pixel bits bitDepth. 
       predSamples [X][Y]=Clip3(0, (1&lt;&lt;bitDepth)−1,(predSamplesLX [X][Y]+offset1)&gt;&gt;shift1)
 
     where shift 1 =14−bitDepth, offset1=1&lt;&lt;(shift1-1). 
     In a case that both of the reference list utilization flags (predFlagL0 or predFlagL1) are 1 (that is, in a case of the bi-prediction BiPred) and the weighted prediction is not used, processing by the following equation is performed to average the input motion compensation images predSamplesL 0  and predSamplesL 1  to be conformed to the number of pixel bits. 
       predSamples [X][Y]=Clip3(0, (1&lt;&lt;bitDepth)−1, (predSamplesL 0  [X][Y]+predSampiesL 1  [X][Y]+offset2)&gt;&gt;shift2)
 
     where shift2=15−bitDepth, offset2=1&lt;&lt;(shift2−1). Clip3 (a, b, c) a function which clips c to a value equal to a or more and equal to b or less, and is a function which returns “a” in a case of c&lt;a, “b” in a case of c&gt;b, and “c” in other cases (where, a&lt;=b). 
     Furthermore, in a case of the uni-prediction and that the weighted prediction is performed, the weighted prediction unit  3094  derives a weighted prediction coefficient w0 and an offset o 0  from the coded data and performs processing by the following equation. 
       predSamples [X][Y]=Clip3(0, (1&lt;&lt;bitDepth)−1, ((predSamplesLX [X][Y]*w0+2∧(log2WD−1))&gt;&gt;log2WD)+o 0 )
 
     where log2WD represents a variable indicating a prescribed shift amount. 
     Further, in a case of the bi-prediction BiPred and that the weighted prediction is performed, the weighted prediction unit  3094  derives weighted prediction coefficients w 0 , w 1 , o 0 , and o 1  from the coded data and performs processing by the following equation. 
       predSamples [X][Y]=Clip3 (0, (1&lt;&lt;bitDepth)−1, (predSamplesL 0  [X][Y]* w0+2∧predSampiesL1[X][Y]*w1+((o0+o1+1)&lt;&lt;log2WD))&gt;&gt;(log2WD+1))
 
     OBMC Processing 
     Outline of OBMC Processing 
     The motion compensation unit  3091  according to the present embodiment may generate the prediction image by using OBMC processing. Herein, Overlapped block motion compensation (OBMC) processing will be described. The OBMC processing is processing for generating the interpolation image (motion compensation image) of the target PU by using the interpolation image (PU interpolation image) generated using the inter-prediction parameter (hereinafter, motion parameter) added to the target PU, and the interpolation image (OBMC interpolation image) generated using a motion parameter of the neighboring PU of the target PU. Particularly, in a pixel (boundary pixel) within a target PU close to a boundary between the PUs, the OBMC interpolation image based on the motion parameter of the neighboring PU is used to perform processing for correcting the interpolation image of the target PU. 
       FIG. 14  is a diagram illustrating an example of an area for performing prediction image generation using the motion parameter of the neighboring PU according to the present embodiment. As illustrated in  FIG. 14 , in a case that the OBMC processing is applied to the prediction image generation, a pixel within a predetermined distance from the PU boundary illustrated by a solid black color is an application target of the OBMC processing. 
     Further, the shapes of the target PU and the neighboring PU are not necessarily the same, so that the OBMC processing is preferably performed in a sub-block unit obtained by partitioning the PU. The size of the sub-block can take various values from 4×4, 8×8 to PU size. At this time, in the boundary pixel of the sub-block, OBMC interpolation image generation and correction processing using a motion parameter of a neighboring sub-block are referred to as OBMC processing. 
     Interpolation Image Generation 
       FIG. 15  is a block diagram illustrating main components of a motion compensation unit  3091  included in an inter-prediction image generation unit  309  which performs the OBMC processing according to the present embodiment. As illustrated in  FIG. 15 , the motion compensation unit  3091  includes an interpolation image generation unit  3092  (PU interpolation image generation unit  30911  and OBMC interpolation image generation unit  30912 ) and an OBMC correction unit  3093 . 
     The interpolation image generation unit  3092  derives an interpolation image based on the inter-prediction parameter (prediction list utilization flag predFlagLX, reference picture index redfIdxLX, motion vector mvLX, and OBMC flag obmc flag). 
     The PU interpolation image generation unit  30911  generates a PU interpolation image Pred_C [x][y] (x=0 . . . nPbW−1, y=0 . . . nPbH−1) based on a prediction list utilization flag predFlagLX [xPb][yPb], a reference picture index retldxLX [xPb][yPb], and a motion vector mvLX [xPb][yPb] inputted from the inter-prediction parameter decoding unit  303 . The PU interpolation image generation unit  30911  transmits the generated PU interpolation image Pred_C [x][y] to the OBMC correction unit  3093 . Further, (xPb, yPb) are the upper left coordinates of the PU, and nPbW, tiPbH are widths and heights of the PU. Further, herein, a suffix C represents “current”. 
     In other words, the interpolation image is generated by applying motion information of a target prediction unit (PU) to a sub-block on a reference image corresponding to a target sub-block. 
     Moreover, the OBIVIC interpolation image generation unit  30912  generates an OBMC interpolation image Pred_N [x][y] (x=0 . . . nPbW−1, y=0 . . . nPbH−1) based on obmc_flag, a prediction list utilization flag predFlagLX [xNb][yNb], a reference picture index refIdxLXN [xNb][yNb] of a neighboring block, and a motion vector mvLXN [xNb][yNb] of the neighboring block inputted from the inter-prediction parameter decoding unit  303 . In other words, an additional interpolation image is generated by applying motion information of the neighboring sub-block which neighbors the target sub-block to the sub-block on the reference image corresponding to the target sub-block. The OBMC interpolation image generation unit  30912  transmits the generated OBMC interpolation image Pred_N [x][y] to the OBMC correction unit  3093 . Further, (xNb, b) represent positions of the neighboring sub-block of the PU. Further, herein, a suffix N represents “neighbour”. 
     Further, in the above description, the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  are distinguished. However, the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  perform processing for generating the interpolation images from the motion parameter. Therefore, one means for performing both processing is prepared, so that the means may perform these processing. 
     In a case that the motion vector mvLX or the motion vector mvLXN inputted to the interpolation image generation unit  3092  does not have integer precision, but has 1/M pixel precision (M is a natural number equal to or larger than 2), the interpolation image generation unit  3092  (PU interpolation image generation unit  30911  and OBMC interpolation image generation unit  30912 ) generates an interpolation image from a pixel value of a reference image of an integer-pixel position by an interpolation filter. 
     In a case that the motion vector mvLX does not have integer precision, the interpolation image generation unit  3092  generates the above-mentioned PU interpolation image Pred_C [x][y] or OMBC interpolation image Pred_N [x][y] from a filter coefficient mcFilter [nFrac][k] (k=0 . . . NTAP−1) of an NTAP tap corresponding to a phase nFrac, and a product-sum operation of a pixel of the reference image. 
     Specifically, the interpolation image generation unit  3092  generates the interpolation image by using, as an input parameter, the upper left coordinates (xb, yb) of a prediction block (PU or sub-block), sizes (nW, nH), the motion vector mvLX, a reference image refImg (reference picture indicated by reference picture index refIdxLXP), an interpolation filter coefficient mcFilter [], and the number of taps NTAP of the interpolation filter. 
     In derivation of the PU interpolation image Pred_C [x][y], the interpolation image generation unit  3092  uses, as an input parameter, (xb, yb)=(xPb, yPb), (nW, nH)=(nPbW, nPbH), mvLX=motion vector mvLXC of target PU (target sub-block), the reference image refImg, a motion vector precision M, and the number of taps NTAP. Further, in a case of partitioning the PU into a sub-block for processing, (xb, yb)=(xPb+nSbW*i, yPb+nSbH*j) (herein, i=0, 1, 2, . . . nPbW/nSbW−1, j=0, 1, 2, . . . nPbH/nSbH−1), (nW, nH)=(nSbW, nSbH), mvLXP=mvLX=the motion vector mvLXN of the neighboring sub-block, the reference image refImg=a reference picture indicated by the reference picture index refIdxLXN of the neighboring sub-block, the motion vector precision M, and the number of taps NTAP are used as a parameter. In derivation of the OBMC interpolation image Pred_N [x][y], the interpolation image generation unit  3092  uses, as an input parameter, (xb, yb) (xPb+nSbW*yPb+nSbH *j) (herein, i=0, 1, 2, . . . nPbW/nSbW−1, j=0, 1, 2, . . . nPbH/nSbH−1), (nW, nH)=(nSbW, nSbH), mvLXP=mvLXN, the reference image reflmg, the motion vector precision M, and the number of taps NTAP. 
     The interpolation image generation unit  3092  primarily derives integer positions (xInt, yInt) and phases (xFrac, yFrac) corresponding to coordinates (x, y) within the prediction block by the following formulas. 
       xInt=xb+(mvLX [0]&gt;&gt;(log2(M)))+x 
       xFrac=mvLX [0]&amp; (M−1)
 
       yInt=yb+(mvLX [1]&gt;&gt;(log2(114)))+y 
       yFrac mvLX [1]&amp; (M−1)
 
     Herein, x=0 . . . nW−1, y=0 . . . nH 1, and M represent precision (1/M pixel precision)) of the motion vector 
     That is, as illustrated in the above formulas, the interpolation image generation unit  3092  applies the motion information of the target prediction unit (PU) to the sub-block on the above-mentioned reference image corresponding to the target sub-block. 
     The interpolation image generation unit  3092  derives a temporary image temp [][] by performing vertical interpolation processing by using the interpolation filter with respect to the reference image refImg (following Σ is a sum related to k of k=0 . . . NTAP−1, and shift 1  is a normalization parameter for adjusting a range of a value). 
       temp [x][y] (ΣmcFilter [yFrac][k]*refImg [xInt][yInt+k−NTAP/2+1]+offset1) &gt;&gt;shift 1 
 
     Subsequently, the interpolation image generation unit  3092  derives an interpolation image Pred [][] by performing horizontal interpolation processing to the temporary image temp [][] (following Σ is a sum related to k of k=0 . . . NTAP−1, and shift2 is a normalization parameter for adjusting a range of a value). 
       Pred [x][y]=(ΣmcFilter[xFrac][k]*temp [xInt+k−NTAP/2+1][yInt]+offset2)&gt;&gt;shift2
 
     Example of Filter Coefficient 
     Next, in a motion vector precision M=4, an example of interpolation filters mailterN2, mailterN4, mcFilterN6, and mcFilterN8 corresponding to each number of taps of NTAP=2, 4, 6, and 8 is illustrated. Further, the filter coefficient is not limited to this. 
     mcFilterN8[]={{0, 0, 0, 64, 0, 0, 0, 0}, {−1, 4, −10, 58, 17, −5, 1, 0}, {0, −1, 4, −11, 40, 40, −11, 4, −1}, {0, 1, −5, 17, 58, −10, 4, −1}} 
     mcFilterN6[]={{0, 0, 64, 0, 0, 0}, {2, −8, 56, 18, −6, 2}, {2, −10, 40, 40, −10, 2}, {2, −6, 18, 56, −8, 2},} 
     mcFilterN4 []={{0, 64, 0, 0}, {−4, 54, 16, −2}, {−4, 36, 36, −4}, {−2, 16, 54, −4}} 
     mcFilterN2[]={{64, 0}, {48, 16}, {32, 32}, {16, 48}} 
     Further, in a case that the OBMC processing is not performed, only the PU interpolation image generation unit  30911  may be configured to perform processing. 
     Weighted Average 
     In a configuration for performing the OBMC processing, the above-mentioned OBMC correction unit  3093  generates or corrects a prediction image Pred_[x][y] by performing weighted average processing to the received OBMC interpolation image Pred _N [x][y] and PU interpolation image Pred _C [x][y]. To describe in detail, in a case that the OBMC flag obmcflag inputted from the inter-prediction parameter decoding unit  303  is 1 (OBMC processing is valid), the OBMC correction unit  3093  performs the weighted average processing represented by the following formula. 
       Prediction image Pred [x][y] ((w1*PU interpolation image Pred_C+w2*OBMC interpolation image Pred_N [x][y])+o)&gt;&gt;shift 
     Herein, weights w1, w2 in the weighted average processing will be described. The weights w1, w2 in the weighted average processing are determined in accordance with a distance (number of pixels) of a target pixel from the PU boundary. A shift value shift may be changed or fixed in accordance with a distance. 
     Hereinafter, description will be given on generation of the prediction image Pred_[x][y] in a case that nObmcW and nObmcH which are OBMC processing sizes are 4 pixels. 
     In a case that the shift value is changed in accordance with a distance, {w2, o, shift}={3, 1, 2, 2}, {7, 1, 4, 3}, {15, 1, 8, 4}, {31, 1, 16, 5} may be adopted, for example. In this case, the prediction image Pred_[x][y] is generated by the following formulas. 
       Pred_[x][y]=(3*Pred_C [x][y]+1*Pred_N [x][y]+2)&gt; 2 distance=0 pixels
 
       Pred_[x][y]=(7*Pred_C [x][y]+1*Pred_N [x][y]+4)&gt;&gt;3 distance=1 pixel 
       Pred_[x][y]=(15*Pred_C [x][y]++1*Pred_N [x][y]++8)&gt;&gt;4 distance=2 pixels 
       Pred_[x][y]=(31*Pred_C [x][y]++1*Pred _N [x][y]+16)&gt;&gt;=5 distance=3 pixels 
     Moreover, in a case that the shift value is fixed without being related to a distance, {w1, w2}={24, 8}, {28, 4}, {30, 2}, {31, 1}, o=16, shift=5 may be adopted, for example. In this case, the prediction image Pred_[x][y] is generated by the following formulas. 
       Pred_[x][y]=(24*Pred_C [x][y]++8*Pred_N [x][y]+16)&gt;&gt;5 distance=0 pixels 
       Pred_[x][y]=(28*Pred_C [x][y]+4*N [x][y]16)&gt;&gt;5 distance=1 pixels 
       Pred_[x][y]=(30*Pred_C; [x][y]++2*Pred_N [x][y]+16)&gt;&gt;5 distance=2 pixels 
       Pred_[x][y]=(31*Pred_C [x][y]++1*Pred_N [x][y]+16)&gt;&gt;5 distance=3 pixels 
     Further, Pred_[x][y] generated from the above-mentioned formulas in the case that the shift value is changed in accordance with a distance is equivalent to Pred_[x][y] generated from the above-mentioned formulas in the case that the shift value is fixed without being related to a distance. 
     Moreover, in a case that nObmcW and nObmcH which are OBMC processing sizes are 2 pixels, the prediction image Pred —  [x][y] is generated as follows. 
     In the case that the shift value is changed in accordance with a distance, {w1, w2, o, shift}={3, 1, 2, 2}, {7, 1, 4, 3} may be adopted, for example. In this case, the prediction image Pred_[x][y] is generated by the following formulas. 
     ti Pred_[x][y]=(3*Pred_C [x][y]+1*Pred_N [x][y]′2)&gt;&gt;2 distance=0 pixels 
       Pred_[x][y]=(7*Pred_C [x][y]+1*Pred_N [x][y]+4)&gt;&gt;3 distance=l pixel 
     Moreover, in the case that the shift value is fixed without being related to a distance, {w1, w2}32 {24, 8}, {28, 4}, o=16, shift=5 may be adopted, for example. In this case, the prediction image Pred_[X][Y] is generated by the following formulas. 
       Pred_[x][y]=(24*Pred _C [x][y]++8*Pred _N [x][y]+16)&gt;&gt;5 distance=0 pixels 
     Pred_[x][y]=(28*Pred_C [x][y]+4*Pred_N [x][y]+16)&gt;&gt;5 distance=1 pixels 
     In the OBMC processing, the prediction image is generated using a motion parameter of a plurality of neighboring PUs (PU neighboring at the above, left, bottom, and right of the target PU). Herein, an outline of a method of generating Pred_[x][y] from the motion parameter of the plurality of neighboring PUs will he described. 
     First, the OBMC correction unit  3093  generates the prediction image Pred_[x][y] by applying the PU interpolation image Pred_C [x][y] and the OBMC interpolation image Pred_N [x][y] created using the motion parameter of the PU neighboring at the above of the target PU to the above-mentioned formulas. 
     Prediction image Pred_[x][y]=((w1*prediction image Pred_C [x][y]+w2* OBMC interpolation image Pred_N [x][y]) o)&gt;=&gt;shift 
     Next, the OBMC correction unit  3093  corrects the prediction image Pred_[x][y] by using the OBMC interpolation image Pred_N [x][y] created using the motion parameter of the PU neighboring at the left of the target PU and the previously generated prediction image Pred_[x][y]. That is, the correct is performed by the following formula. 
       Prediction image Pred [x][y]=((w1*prediction image Pred_[x][y]w2*OBMC interpolation image Pred_N [x][y])+0)&gt;&gt;shift 
     Similarly, the OBMC correction unit  3093  corrects the prediction image Pred_[x][y] by using the OBMC interpolation image Pred_N [x][y] created using the motion parameter of the neighboring at the bottom and right of the target PU. The OBMC correction unit  3093  generates Pred_N [x][y] as the OBMC interpolation image created using the motion parameter of the PU neighboring at the bottom of the target PU, and corrects the prediction image Pred_[x][y] by the following formula. 
       Prediction image Pred_[x][y]=((w1*prediction image Pred_[x][y]+w2* OBMC interpolation image Pred_N [x][y])+o)&gt;&gt;shift 
     The OBMC correction unit  3093  generates Pred_N [x][y] as the OBMC interpolation image created using the motion parameter of the PU neighboring at the right of the target PU, and corrects the prediction image Pred_[x][y] by the following formula. 
       Prediction image Pred_[x][y]=((w1*prediction image Pred_[x][y] w2* OBMC interpolation image Pred_N [x][y])+o)&gt;shift 
     According to the above configuration, the motion compensation unit  3091  generates an additional interpolation image by using the motion parameter of the PU neighboring the target PU. Then, the motion compensation unit  3091  can generate the prediction image by using the generated interpolation image. Therefore, a prediction image having high prediction precision can be generated. 
     Moreover, the size of the sub-block targeted for the OBMC processing may be any size (4×4 PU size). Moreover, a partition manner of the PU including the sub-block targeted for the OBMC processing may be any partition manner such as 2N×N, N×2N, and N×N. 
     Flow of OBMC Processing 
     Next, a flow of the OBMC processing according to the present embodiment will be described. 
       FIG. 16  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment. Moreover,  FIG. 17  illustrates a pseudo-code which represents the ORMC processing. 
     The interpolation image generation unit  3092  derives the PU interpolation image Pred_C [x][y](S 1 ). Moreover, the interpolation image generation unit  3092  receives obmc_flag, and in a case that obmc_flag indicates 1, the interpolation image generation unit  3092  proceeds to a step of deriving the OBMC interpolation image Pred_N [x][y]. 
     Further, in the case that the OBMC flag obmc_flag is 0, the interpolation image generation unit  3092  does not perform the OBMC processing, and the PU interpolation image Pred_C [x][y] becomes the prediction image Pred_[x][y]. 
     Further, in a case that the target CU is partitioned into 2N×2N partition and the prediction mode is a merge mode (including a skip mode), an entropy decoding unit  301  does not decode the OBMC flag obmc_flag from coded data, and derives a value (1) indicating the OBMC is valid. That is, in a case that the target CU has 2N×2N and the merge mode, the OBMC processing is constantly turned ON. 
     The motion compensation unit  3091  receives an OBMC flag ohms flag and determines whether the OBMC flag obmc flag is 1 (S 11 ). In a case that obmc flag is 1, that is, the OBMC is turned ON (YES in S 11 ), the interpolation image generation unit  3092  and the OBMC correction unit  3093  perform loop processing in each direction dir of the above, left, bottom, and right (S 2 ). A value of a direction included in a direction set dirSet (dirSet={above, left, bottom, right}) to a loop variable dir of a direction loop is sequentially set, so that loop processing is performed (terminal end of loop is S 8 ). Further, a value of 0, 1, 2, and 3 is allocated to the above, left, bottom, and right, and then dirSet={0, 1, 2, 3} may undergo processing. Additionally, the interpolation image generation unit  3092  and the OBMC correction unit  3093  perform loop processing to each sub-block constituting the PU (S 9 ). That is, in S 9 , a sub-block performing the OBMC processing is set. Loop variables of a sub-block loop are set to coordinates (xSb, ySb), and the interpolation image generation unit  3092  and the OB MC correction unit  3093  sequentially set a coordinate of the sub-block within the PU, and perform loop processing (terminal end of loop is S 7 ). Further, in a case that OBMC is not turned ON (NO in S 11 ), processing is ended. 
     Hereinafter, in a case that the direction dir of the neighboring sub-block set by S 2  and the sub-block of the coordinate set by S 9  satisfy conditions of S 3  and S 4  during the loop, the interpolation image generation unit  3092  generates the OBMC interpolation image Pred_N [x][y] used for generation and correct of the prediction image Pred_[x][y] (S 5 ), and corrects the prediction image in the OBMC correction unit  3093  (S 6 ). 
     The sub-block loop processing will be described in detail. The OBMC interpolation image generation unit  30912  determines whether or not a prediction parameter of the neighboring sub-block positioned in the direction dir of the target sub-block is valid (S 3 ). Further, in a case that the direction dir is the above, left, bottom, and right, each of positions (xNb, yNb) of the neighboring sub-block referring to the motion parameter is set to (xSb, ySb−1), (xSb−1, ySb), (xSb, ySb+nSbH), and (xSb+nSbW, ySb). Herein, (xSb, ySb) represent the upper left coordinates of the sub-block, and nSbW, nSbH represent widths and heights of the sub-block. 
     To describe S 3  in detail, the OBMC interpolation image generation unit  30912  determines whether or not the motion parameter of the neighboring sub-block of the directions is available (valid). For example, in a case that the prediction mode of the neighboring sub-block is set to intra-prediction, the neighboring sub-block is outside the frame, or the motion parameter of the neighboring sub-block is unknown, the OBMC interpolation image generation unit  30912  determines that the motion parameter of the neighboring sub-block cannot be available. In other words, in a case that the prediction mode of the neighboring sub-blocks (xNb, yNb) is a mode other than the intra-prediction, the positions (xNb, yNb) of the neighboring sub-blocks are in the frame, and a parameter (for example, reference picture index is other than −1) indicating the motion parameter of the neighboring sub-blocks (xNb, yNb) is known, the OBMC interpolation image generation unit  30912  determines that the motion parameter of the neighboring sub-blocks can be available. Moreover, in a case that the neighboring sub-block is an intra-block copy PU, the neighboring sub-block maintains the motion parameter, but the OBMC interpolation image generation unit  30912  may determine that the motion parameter cannot be available. Herein, “valid” represents a case that the motion parameter is determined to be available. 
     The case that the motion parameter of the neighboring sub-block is unknown will be described in detail with reference to  FIG. 18 .  FIG. 18  is a diagram describing whether or not the motion parameter of the neighboring sub-block is unknown, As illustrated in  FIG. 18 , in a case where the motion parameter of each CU is derived, for example, by a Z scan order in units of the CU, the motion parameter of the PU included in a neighboring CU already processed (above and left neighboring CU) is known. However, the motion parameter of the PU included in the CU before processing (bottom and right neighboring CU) is unknown. Further, the motion parameter of the PU within the same CU is derived at the same time. Therefore, within the same CU, the motion parameter of the PU neighboring at the left, above, right, and bottom is known. in other words, in a CU boundary, the OBMC processing may be performed using only the motion parameter of the PU neighboring at the left and above. On the other hand, in a PU boundary, the OBMC processing is performed using the motion parameter of the PU neighboring at the left, above, right, and bottom. 
     Hereinafter, in the present invention, a boundary of the sub-block (PU) is distinguished into the CU boundary and the PU boundary as follows. 
     CU boundary: Of boundaries between the target sub-block and the neighboring sub-block, in a case that the CU including the target sub-block and the CU including the neighboring sub-block belong to a different CU, the boundary is referred to as the CU boundary. For example, in  FIG. 18 , the boundary between the target PU and the above neighboring CU and the boundary between the target PU and the right neighboring CU are the CU boundary. 
     PU boundary: Of boundaries between the target sub-block and the neighboring sub-block, boundaries other than the CU boundary (CU including target sub-block and CU neighboring sub-block belong to the same CU) are referred to as the PU boundary. For example, in  FIG. 18 , the boundary between the target PU and the PU on the right of the target PU is the PU boundary. 
     In a case that the neighboring sub-block is valid (Yes in S 3 ), the OBMC interpolation image generation unit  30912  determines whether or not the motion parameter of the neighboring sub-blocks (xNb, yNb) is identical to the motion parameter of the target sub-block (S 4 ). Herein, in a case that the motion parameter is different, 
     DiffMotionAvail is set to 1, and in a case that the motion parameter is identical, DiffMotionAvail is set to 0. On the contrary, in a case that the neighboring sub-block is not valid (NO in S 3 ), identity determination processing (S 4 ), the OBMC interpolation image generation (S 5 ), and prediction image correction (S 6 ) are omitted and transferred to next sub-block processing (S 7 ). 
     To describe S 4  in detail, for example, the OBMC interpolation image generation unit  30912  may use a motion vector as the moving parameter used in the identity determination. In this case, determination is made on whether or not the motion vector mvLXN of the neighboring sub-blocks (xNb, yNb) is identical to the motion vector mvLX of the target sub-block. 
     The OBMC interpolation image generation unit  30912  may also determine based on the reference picture index in addition to the motion vector as the moving parameter used in the identity determination. 
     In a case that the motion vectors of the target sub-block are (mvLX [0], mvLX [1]), the reference picture index is (refIdxLX), the motion vectors of the neighboring sub-block are (mvLXN [0], mvLXN [1]), and the reference picture index is (refIdLXN), and in a case that the motion vector or the reference picture index is different from the target sub-block and the neighboring sub-block, the OBMC interpolation image generation unit  30912  performs configuration of DiffMotionAvail=1, and the OBMC interpolation image generation unit  30912  determines that the motion parameter is different (No in S 4 ). 
     In the case that the identity determination of the motion parameter is represented by a formula, where 
       DiffMotionAvail=(mvLX [0]!=mvLXN [0]) (mvLX [1]!=mvLXN [1]) (refIdxLX!=refIdxLXN), in a case that the motion parameter is different, where DiffMotionAvail=1. 
     Moreover, in a case that the motion vector and the reference picture index are identical to the target sub-block and the neighboring sub-block, where DiffMotionAvail=0. In this case, the OBMC interpolation image generation unit  30912  determines that the motion parameter is identical (YES in S 4 ). 
     Picture Order Count (POC) may be used as the motion parameter used in the identity determination instead of the reference picture index. In this case, in a case that the motion vector or the POC is different from the target sub-block and the neighboring sub-block, the OBMC interpolation image generation unit  30912  performs configuration of DiffMotionAvail=1, and the OBMC interpolation image generation unit  30912  determines that the motion parameter is different (NO in S 4 ). 
     In the case that the identity determination of the motion parameter is represented by a formula, where 
       DiffMotionAvail=(mvLX [0]!=mvLXN [0]) ∥mvLX [1]!=mvLXN [1]) ∥ (refPOC !=refPOCN)
 
     Herein, refPOC and refPOCN are the POC of the reference image of the target sub-block and the neighboring sub-block. 
     In a case that the motion parameter of the neighboring sub-block is not identical to the motion parameter of the target sub-block (NO in S 4 ), the OBMC interpolation image generation unit  30912  generates (derives) the OBMC interpolation image Pred_N [x][y] of the target sub-block (S 5 ), the OBMC correction unit  3093  generates or corrects the prediction image Pred_[x][y] by using the OBMC interpolation image Pred N [x][y] of the target sub-block and the PU interpolation image Pred_C [x][y] (S 6 ). On the contrary, in a case that the motion parameter is identical (YES in S 4 ), generation of the OBMC interpolation image Pred_N of the target sub-block and prediction image correction using the OBMC interpolation image Pred N are omitted and transferred to next sub-block processing (S 7 ). 
     To describe S 5  in detail, the OBMC interpolation image generation unit  30912  generates (derives) the OBMC interpolation image Pred_N [x][y] by using the motion parameter of the neighboring sub-block. For example, assume that the upper left coordinates of the target sub-block are set to (xSb, ySb), and the sub-block sizes are set to nSbW, nSbH. Herein, in a case that the prediction mode is not the sub-block prediction (processing is performed without portioning PU), the OBMC interpolation image generation unit  30912  configures, to 4 pixels, nObmcW indicating a width of the OBMC processing size and nObmcli indicating a height of the OBMC processing size. Moreover, in a case that the prediction mode is the sub-block prediction, the OBMC interpolation image generation unit  30912  configures, to 2 pixel, nObmcW and nObmcH which are the OBMC processing sizes. 
     In a case of dir==above, the OBMC interpolation image generation unit  30912  refers to the motion parameter of sub-blocks (xNb, yNb)=(xSb, ySb−1) neighboring at the above of the sub-block, and derives an interpolation image of a block of sizes (nSbW, nObmcH) for setting (xSb, ySb) to the upper left coordinates. 
     Moreover, in a case of dir==left, the OBMC interpolation image generation unit  30912  refers to the motion parameter of sub-blocks (xNb, yNb)=(xSb−1, ySb) neighboring at the left of the sub-block, and derives an interpolation image of a blockof sizes (nObmcW, nSbH) for setting (xSb, ySb) to the upper left coordinates. 
     Moreover, in a case of dir bottom, the OBMC interpolation image generation unit  30912  refers to the motion parameter of sub-blocks (xNb, yNb)=(xSb, ySb nSbH)) neighboring at the bottom of the sub-block, and derives an interpolation image of a block of sizes (nSbW, nObmcH) for setting (xSb, ySb+nSbH−nObmcH) to the upper left coordinates. 
     Moreover, in a case of dir==right, the OBMC interpolation image generation unit  30912  refers to the motion parameter of sub-blocks (xNb, yNb)=(xSb+nSbW, ySb) neighboring at the right of the sub-block, and derives an interpolation image of a block of sizes (nObmcW, nSbH) for setting (xSb+nSbW−nObmcW, ySb) to the upper left coordinates. 
     The above processing can be represented in a pseudo-code as follows. In the pseudo-code, interpolation image generation processing of a reference image refPic, coordinates (xb, yb), sizes nW, nH, and a motion vector mvRef is represented by Interpolation (refPic, xb, yb, nW, nH, mvRef). Herein, the motion parameter of the coordinates (xb, yb) is referred in mvLX [x][y], and refIdxLX [x][y]. 
     nObmcW=nObmcH=(PU is not sub-block) ? 4:2 if (dir above) 
     mvRef=mvLX [xSb][ySb−1], refPic=refIdxLX [xSb][ySb−1] 
     predN=interpolation (refPic, xSb, ySb, nSbW, nObmcH, mvRef) else if (dir==left) 
     mvRef=mvLX [xSb −1][ySb], refPic=refIdxLX [xSb−1][ySb] 
     predN=Interpolation (retPic, xSb, ySb, nObmcW, nSbH, mvRef) else if (dir==bottom) 
     mvRef=mvLX [xSb][ySb+nSbH], refPic refIdxLX [xSb][ySb+nSbH] 
     predN=interpolation (refPic, xSb, ySb+nSbH nObmcH, nSbW, nObmcH, mvRef) else if (dir==right) 
     mvRef=mvLX [xSb+nSbW][ySb], refPic=refIdxLX [xSb+nSbW][ySb] 
     predN=interpolation (retPic, xSb+nSbW−nObmcW, ySb, nObmcW, nSbH, mvRef) 
     Next, the OBMC correction unit  3093  weighted average processing referring to the target sub-block OBMC interpolation image Pred_N [x][y] and the PU interpolation image Pred_C [x][y], and generates or corrects the prediction image Pred_[x][y] (S6). 
     To describe S 6  in detail, the OBMC correction unit  3093  performs weighted average processing referring to the OBMC interpolation image Pred_N [x][y] and the PU interpolation image Pred_[x][y] in accordance with a distance from a boundary between the neighboring sub-blocks. The weighted average processing is performed as follows. 
     Pred_[x][y]=Pred_C [x][y] 
     In a case of dir==above, where i=0. . . nSbNV−1,j=0. . . nObmcH−1, the OBMC correction unit  3093  drives the prediction image Pred_[x][y] from the following formulas. 
       x=xSb+i,y=ySb+j Pred_[x][y]=(w1*Pred_[x][y]+w2*Pred_N [i][j] +o)&gt;&gt;shift w1=weightObmc [j], w2=(1&lt;&lt;shift)−w1, o=(1&lt;&lt;(shift−1))
 
     Moreover, in a case of dir==left, where i=0. . . nObmcW−1, j=0. . . nSbH−1, the OBMC correction unit  3093  drives the prediction image Pred_[x][y] from the following formulas. 
       x=xSb+y=ySb+j Pred_[x][y]=(w1*Pred_[x][y]+w2*Pred_N [i][j]+o)&gt;&gt;shift w1=weightObmc [i], w2=(1&lt;&lt;shift) w1, o=(1&lt;&lt;(shift−1))
 
     Moreover, in a case of dir==bottom, where i=0. . . nSbW −1j=0. . . nObmcH−1, the OBMC correction unit  3093  drives the prediction image Pred_[x][y] from the following formulas. 
       x=xSb+i, y=ySb+nSbH−nObmcH+j Pred_[x][y]=(w1*Pred_[x][y]+w2*Pred_N [i][j]+o)&gt;&gt;shift w1=weightObmc [nObmcH−1−j], w2=(1&lt;&lt;shift)−w1, o=(1&lt;&lt;(shift−1))
 
     Moreover, in a case of dir==right, where i=0. . . nObmcW−1, j=0. . . nSbH−1, the OBMC correction unit  3093  drives the prediction image Pred_[x][y] from the following formulas. 
       x=xSb+nSbW−nObmcW+i,y=ySbH+j Pred_[x][y]=(w1*Pred_[x][y]+w2*Pred_N [i][j]+o) shift w1 weightObmc [nObtmcW−1−i], w2=(1&lt;&lt;shift)−w1, o=(1&lt;&lt;shift −1))
 
     As mentioned above, a weight is configured in accordance with a distance (number of pixels) from the boundary, and a weight table weightObmc may be set as follows. 
     weightObmc []={24, 28, 30, 31}, shift=5 w1[i]=weightObmc [i], w2=(1&lt;&lt;shift)−w1 Pred_[x][y]=(w1*Pred_[x][y]+w2*Pred_N [i][j]+o)&gt;&gt;−shift weightObmc []={8, 4, 2, 1}, shift=5 w1[i]=weightObmc [i], w2=(1&lt;&lt;shift)−w1 Pred_[x][y]=(w2*Pred_[x][y]+w1*Pred_N [i][i]+o)&gt;&gt;shift 
     Next, the motion compensation unit  3091  determines whether or not there is an unprocessed sub-block out of sub-blocks of an OBMC processing target (S 7 ). 
     In a case that there is no unprocessed sub-block in the PU (NO in S 7 ), the motion compensation unit  3091  determines whether or not the OBMC processing of S 3  to S 6  is performed using the motion parameter of the neighboring sub-block on all directions of the target PU (S 8 ). That is, determination is made on whether processing is performed on all directions included in the direction set dirSet. 
     In a case that the OBMC processing is performed using the motion parameter of the neighboring sub-block on all directions (NO in S 8 ), processing is ended. 
     Further, in a case that there is an unprocessed sub-block in the PU (YES in S 7 ), processing proceeds to S 9 , and processing of the next sub-block is continued. Moreover, in a case that the OBMC processing is not performed using the motion parameter of the neighboring sub-block on all directions (YES in S 8 ), processing proceeds to S 2 , and processing of the next direction is performed. 
     Further, in a case of obmc_flag=0, where PRED_[][]=PRED_C [][]. 
     The image decoding device  31  according to the present embodiment will be described in more details with reference to  FIGS. 19A to 37C . 
     The OBMC processing needs to perform motion interpolation of each PU (generation of a PU interpolation image), as well as, OBMC interpolation (generation of an OBMC interpolation image) by using motion information of a neighboring PU in an area neighboring the boundary of each PU. Thus, the processing uses up a large memory bandwidth for accessing image data. The configuration of the image decoding device  31  according to the following embodiment (simplification of the OBMC processing) can decrease the memory bandwidth. 
     OBMC Processing Using 
     Small Tap Filter 1 
     The image decoding device  31  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) generates a prediction image by referring to a reference image. The motion compensation unit  3091  generates a prediction image for a target sub-block. The motion compensation unit  3091  includes a PU interpolation image generation unit (interpolation image generation unit)  30911  that generates a PU interpolation image (interpolation image) by applying a motion parameter (motion information) of a target PU and filter processing to a sub-block on the reference image corresponding to the target sub-block. 
     The motion compensation unit  3091  further includes an OBMC interpolation image generation unit (additional interpolation image generation unit)  30912  that generates an OBMC interpolation image (additional interpolation image) by applying a motion parameter of a neighboring sub-block that neighbors a target sub-block and filter processing to a sub-block on a reference image corresponding to the target sub-block. 
     Furthermore, the motion compensation unit  3091  includes an OBMC correction unit (prediction unit)  3093  that generates a prediction image in a case that the OBMC processing for generating a prediction image from a PU interpolation image and an OBMC interpolation image is ON (first mode). 
     In a case that the first mode is selected, the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  perform processing, each using a filter with a smaller number of taps compared with a case that the OBMC processing OFF is selected where a prediction image is generated only by using a PU interpolation image (second mode). 
     According to the above-described configuration, in a case that the first mode is selected, the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  perform filter processing with a smaller number of taps compared with the one in a case that the second mode is selected. In this way, the memory bandwidth for accessing image data can be decreased. 
     An example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 19A to 21 . 
       FIGS. 19A and 19B  are diagrams illustrating an overview of the filter processing that the motion compensation unit  3091  of the present embodiment (the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912 ) performs, 
       FIG. 19A  illustrates filter processing for PUs in a case that the OBMC processing is OFF, while  FIG. 19B  illustrates filter processing for PUs in a case that the OBNIC processing is ON. As illustrated in  FIG. 19A , in a case that the OBMC processing is OFF, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with a normal number of taps N, such as N=8. Then, no OBMC interpolation image is generated. In other words, a prediction image is generated using only a PU interpolation image. 
     Whereas, as illustrated in  FIG. 19B , in a case that the OBNIC processing is ON, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with a smaller number of taps Nobmc than the number of taps in a case that the OBMC processing is OFF, for example, a filter of Nobmc=6, and the OBMC interpolation image generation unit  30912  generates an OBMC interpolation image by using a smaller number of taps M than the number of taps in a case that the OBMC processing is OFF (a normal number of taps). For example, a filter of M=6 is used and OBMC interpolation image is generated. 
     Note that, in a case that the OBMC processing is ON, the motion compensation unit  3091  may use filters with smaller numbers of taps, Nobmc and M, to generate a PU interpolation image and an OBMC interpolation image (Nobmc&lt;N, M&lt;N) compared with a filter with the number of taps N that is used for generating a PU interpolation image in a case that the OBMC processing is OFF, provided, however, the numbers of taps of filters used in a case that the OBMC processing is ON or OFF are not particularly limited to the above examples. 
       FIG. 20  is a flowchart illustrating the flow of the processing of the inter-prediction image generation unit  309  according to the present embodiment.  FIG. 21  is a pseudo-code indicating the processing of the inter-prediction image generation unit  309  according to the present embodiment. 
     In the flow of the processing illustrated in  FIG. 20 , steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  are indicated by different numbers from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     The motion compensation unit  3091  receives the OBMC flag obmc_flag, and determines whether the OBMC flag obmc_flag is 1 (S 11 ). In a case that obmc_flag is 1, namely, the OBMC is ON (YES at S 11 ), the PU interpolation image generation unit  30911  interpolates using a filter with the number of taps Nobmc (for example, 6) and derives a PU interpolation image Pred_C [x][y](S 12 ). Next, the processing of S 2  to S 4  will be performed. In a case that the motion vector mvLXN of a neighboring sub-block is not the same as the motion vector mvLX of a target sub-block (NO at S 4 ), the OBMC interpolation image generation unit  30912  interpolates using a filter with the number of taps M (for example, 6) and derives an OBMC interpolation image Pred_N [x][y](S 15 ). S 6  follows next. 
     In a case that obmc_flag is 0, namely, the OBMC is OFF (NO at S 11 ), the PU interpolation image generation unit  30911  interpolates using a filter with the number of taps N (for example, 8) and derives a PU interpolation image Pred _C (S 1 ). In this case, the PU interpolation image Pred_C [x][y] becomes a prediction image Pred_[x][y]. 
     OBMC Processing Using Small Tap Filter 2 
     Next, another image decoding device  31  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) generates a prediction image by referring to a reference image. The motion compensation unit  3091  generates a prediction image for a target sub-block. The motion compensation unit  3091  includes a PU interpolation image generation unit (interpolation image generation unit)  30911  that generates a PU interpolation image (interpolation image) by applying a motion parameter (motion information) of a target PU and filter processing to a sub-block on a reference image corresponding to the target sub-block. 
     The motion compensation unit  3091  further includes an OBMC interpolation image generation unit (additional interpolation image generation unit)  30912  that generates an OBMC interpolation image (additional interpolation image) by applying a motion parameter of a neighboring sub-block that neighbors a target sub-block and filter processing to a sub-block on the reference image corresponding to the target sub-block. 
     Furthermore, the motion compensation unit  3091  includes an OBMC correction unit (prediction unit)  3093  that generates a prediction image in a case that the OBMC processing for generating a prediction image from a PU interpolation image and an OBMC interpolation image is ON (first mode), In a case that the OBMC processing ON (first mode) is selected, the OBMC interpolation image generation unit  30912  configures the number of taps of a filter that is used for generating an OBMC interpolation image smaller than the number of taps of a filter used for generating a PU interpolation image. 
     According to the above-described configuration, in a case that the first mode is selected, the OBMC interpolation image generation unit  30912  configures the number of taps M of a filter that is used in the OBMC interpolation processing smaller than the number of taps N of a filter used in the PU interpolation processing. In this way, the memory bandwidth for accessing image data can be decreased. 
     An example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 22A to 24 . 
       FIGS. 22A and 22B  are diagrams illustrating an overview of the filter processing that the motion compensation unit  3091  according to the present embodiment (the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912 ) performs. 
       FIG. 22A  illustrates filter processing for PUs in a case that the OBMC processing is OFF, while  FIG. 22B  illustrates filter processing for PUs in a case that the OBMC processing is ON. As illustrated in  FIG. 22A , in a case that the OBMC processing is OFF, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps for a PU interpolation image, such as N=8. Whereas, as illustrated in  FIG. 22B , in a case that the OBMC processing is ON, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps N for a. PU interpolation image. In addition, the OBMC interpolation image generation unit  30912  generates an OBMC interpolation image by using a filter with the number of taps M for an OBMC interpolation image, which satisfies M&lt;N, such as M=6. 
     Note that, in a case that the OBMC processing is ON, the OBMC interpolation image generation unit  30912  may configure the number of taps M of a filter used for the OBMC interpolation processing smaller than the number of taps N of a filter used for the PU interpolation processing. The number of taps of a filter used for the PU interpolation processing and the number taps of a filter used for the OBMC interpolation processing are not limited to the above-described examples.  FIG. 23  is a flowchart illustrating the flow of the processing of the motion compensation unit  3091  according to the present embodiment.  FIG. 24  is a pseudo-code illustrating the processing of the motion compensation unit  3091  according to the present embodiment. 
     In the flow of the processing illustrated in  FIG. 23 , a step that differs from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  is indicated by a different number from those of  FIG. 16 . In the following paragraph, only the step that differs from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     A different step from those of  FIG. 16  is the following step. In a case that the motion vector mvLXN of a neighboring sub-block is different from the motion vector mvLX of a target sub-block or a reference image of the neighboring sub-block and a reference image of the target sub-block are different (NO at S 4 ), the OBMC interpolation image generation unit  30912  derives an OBMC interpolation image Pred_N [x][y]. At this time, the number of taps of a filter for generating an OBMC interpolation image is configured as M (for example, 6) (S 22 ). 
     Small Size OBMC Processing 
     Next, another image decoding device  31  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) generates a prediction image by referring to a reference image. The motion compensation unit  3091  generates a prediction image by performing any of inter-frame predictions of uni-prediction and bi-prediction. 
     The motion compensation unit  3091  includes an interpolation image generation unit (image generation unit)  3092  that generates a PU interpolation image (interpolation image) that is acquired by applying motion information of a target PU and filter processing to a PU on the above-described reference image corresponding to the target PU, as well as, an obmc interpolation image (additional interpolation image) that is acquired by applying motion information of a neighboring PU and filter processing to pixels in a boundary area of PUs on the above-described reference image corresponding to the target PU. 
     The motion compensation unit  3091  further includes an OBMC correction unit (prediction unit)  3093  that generates a prediction image by referring to a PU interpolation image and an OBMC interpolation image for the above-described boundary area. 
     The interpolation image generation unit  3092  configures a boundary area narrower in a case that a prediction image is generated by bi-prediction (Bipred) than in a case that a prediction image is generated by uni-prediction. 
     Note that, although in this example bi-prediction is exemplified as high load processing, high load processing is not limited to bi-prediction. Thus, the above-described configuration can he rephrased as follows. The interpolation image generation unit  3092  configures a boundary area narrower in a case that a prediction image is generated by the OBMC processing under environment where another high load processing is performed, compared with a case that a prediction image is generated by the OBMC processing under environment where high load processing is not performed. 
     According to the above-described configuration, the interpolation image generation unit  3092  configures a boundary area narrower in a case that a prediction image is generated by bi-prediction (Bipred) than in a case that a prediction image is generated by uni-prediction. In this way, the memory bandwidth for accessing image data can be decreased. 
     An example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 25A to 27 . 
       FIGS. 25A to 25C  are diagrams illustrating an overview of the processing of the motion compensation unit  3091  according to the present embodiment.  FIG. 25A  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OBMC processing is OFF.  FIG. 25B  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OBMC processing is ON and Bipred is OFF.  FIG. 25C  illustrates the size of an area where the OBMC processing is performed for PUs (a boundary area size) in a case that the OBMC processing is ON and Bipred is ON. As illustrated in  FIG. 25A , in a case that the OBMC processing is OFF, the motion compensation unit  3091  (OBNIC interpolation image generation unit  30912 ) configures the OBMC processing size nObmcW and nObmcH to 0 pixels. In other words, the OBMC processing is not performed. As illustrated in  FIG. 25B , in a case that the OBMC processing is ON and Bipred is OFF (Bipred=0), the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW and nObnicH to nObmcW0 and nObmcH0. In this example, nObmcW0 and nObmcH0 are configured to the number of pixels other than 0, for example, 4 pixels. Further, in a case that the OBMC processing is ON and Bipred is ON, the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW and nObmcH to nObmcW1 and nObmcH1. For example, nObmcW1 and nObmcH1 are configured to 2 pixels. 
     Note that the OBMC processing size that is configured for bi-prediction or uni-prediction is not particularly restricted, as long as an OBMC processing area is configured narrower in a case that a prediction image is generated by bi-prediction (Bipred), compared with a case that a prediction image is generated by uni-prediction. In other words, without restriction to the above examples, the OBMC processing size nObmcW1 and nObmcH1 in a case that Bipred is ON and the OBMC processing size nObmcW0 and nObmcH0 in a case that Bipred is OFF, may be configured to satisfy nObmcW1&lt;nObmcW0 and nObmcH1&lt;nObmcH0. 
       FIG. 26  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment.  FIG. 27  is a pseudo-code illustrating the processing of the motion compensation unit  3091  according to the present embodiment. 
     In the processing flow illustrated in  FIG. 26 , steps that differ from those in processing flow of the inter-prediction image generation unit  309  illustrated in  FIG. 16  are indicated by different numbers from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     In a case that the motion vector mvLXN of a neighboring sub-block is different from the motion vector mvLX of a target sub-block or a reference image of the neighboring sub-block and a reference image of the target sub-block are different (NO at S 4 ), the OBMC interpolation image generation unit  30912  determines whether bi-prediction is OFF (S 31 ). 
     In a case that bi-prediction is OFF (YES at S 31 ), the OBMC interpolation image generation unit  30912  configures an OBMC processing target area wider (for example, nObmcW0=nObmcH0=4 pixels) (S 32 ). Alternatively, in a case that bi-prediction is ON (NO at S 31 ), the OBMC interpolation image generation unit  30912  configures an OBMC processing target area narrower (for example, nObmcW1=nObmcH1=2 pixels) (S 33 ). 
     Note that prediction may he performed using three or more reference images. In such a case, multiple reference prediction Pred is used instead of bi-prediction BiPred. 
     One-Dimensional OBMC Processing 
     Next, another motion compensation unit  3091  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) includes an inter-prediction image generation unit (prediction image generation unit)  309  that generates a prediction image by performing any one of inter predictions of uni-prediction and bi-prediction. 
     The motion compensation unit  3091  includes a PU interpolation image generation unit (interpolation image generation unit)  30911  that generates a PU interpolation image (interpolation image) by applying motion information of a target PU and filter processing to a PU on the above-described reference image corresponding to the target PU. The motion compensation unit  3091  further includes an OBMC interpolation image generation unit (availability check unit)  30912  that checks availability of motion information, in each neighboring direction, in a PU that neighbors a target PU in the neighboring direction. 
     The OBMC interpolation image generation unit  30912  generates an OBMC interpolation image (additional interpolation image) by applying motion information that is determined as available and filter processing to a PU on the above-described reference image corresponding to the target PU. 
     Further, the inter-prediction image generation unit  309  includes an OBMC correction unit (prediction unit) 3093 that generates a prediction image by referring to a PU interpolation image and an OBMC interpolation image. 
     The OBMC interpolation image generation unit  30912  configures the number of neighboring directions smaller in a case that a prediction image is generated by bi-prediction than in a case that a prediction image is generated by uni-prediction. In other words, the OBMC interpolation image generation unit  30912  restricts the neighboring sub-blocks to be referred to. 
     According to the above-described configuration, the OBMC interpolation image generation unit  30912  configures the number of times of OBMC processing smaller in a case that a prediction image is generated by bi-prediction than in a case that a prediction image is generated by uni-prediction. In this way, the memory bandwidth for accessing image data can be decreased. 
     In the present embodiment (the one-dimensional OBMC processing), the OBMC interpolation image generation unit  30912  does not refer to a neighboring block in every direction of a PU. In other words, the OBMC interpolation image generation unit  30912  refers only to neighboring blocks in a limited portion of directions of a PU. 
       FIG. 28  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment.  FIG. 29  is a pseudo-code illustrating the processing of the motion compensation unit  3091  according to the present embodiment. 
     In the processing flow illustrated in  FIG. 28 , steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  are indicated by different numbers from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     Subsequent to S 1 , the OBMC interpolation image generation unit  30912  determines whether the bi-prediction (Bipred) is OFF (S 41 ). In a case that Bipred is ON (NO at S 41 ), the OBMC interpolation image generation unit  30912  configures itself such that neighboring blocks in two directions are referred to (S 42 ). The two directions may be left and right or up and down. 
     Subsequent to S 42 , the interpolation image generation unit  3092  and the OBMC correction unit  3093  perform loop processing for each direction ‘dir’ in up ‘above’ and down ‘bottom’ directions or ‘left’ and ‘right’ directions (S 44 ). 
     In a case that Bipred is OFF (YES at S 41 ), the ( )MC interpolation image generation unit  30912  configures itself such that neighboring blocks in four directions are referred to (S 43 ) S 2  follows next. 
     Although, a configuration where directions of neighboring sub-blocks that the OBMC interpolation image generation unit  30912  refers to are configured by referring to ON/OFF of Bipred has been described in this processing, a direction set of neighboring sub-blocks dirSet that the OBMC interpolation image generation unit  30912  refers to may be selected from dirSetH={left, right}, dirSetV={above, bottom}, and dirSetF={above, left, bottom, right} by making them correspond to arbitrary conditions A, B, and C. 
     According to the above configuration, compared with a case that neighboring sub-blocks in four directions are referred to, the number of times of the OBMC processing in a prediction image generation process can be decreased by restricting the directions of the neighboring sub-blocks to be referred to. In this way, the memory bandwidth for accessing image data can be decreased. 
     Alternatively, as will be described below, the one-dimensional OBMC processing may be performed. 
     The OBMC interpolation image generation unit  30912  selects a direction to be referred to in the one-dimensional OBMC processing by referring to the motion vector of a neighboring sub-block. For example, the OBMC interpolation image generation unit  30912  derives difference vectors of the motion vectors of first representative sub-blocks (left and up sub-blocks) and the motion vectors of second representative sub-blocks (right and down sub-blocks) (i.e., a difference vector between motion vectors of left and right sub-blocks diffrvIvHor, and a difference vector between motion vectors of up and down sub-blocks diffMvVer). In a case that a PU is divided into a plurality of sub-blocks, and a vertical difference vector diffMvVer is larger than a horizontal difference vector diffMvHor (diffMvVer diffMvHor), the OBMC interpolation image generation unit  30912  performs the OBMC processing in directions of up and down (dirSet={above, bottom}). Further, in a case that the vertical difference vector diffMvVer is smaller than the horizontal difference vector diffMvHor, the OBMC interpolation image generation unit  30912  performs the OBMC processing in directions of left and right (dirSet={left, right}). In a case that a PU is constituted by one sub-block, the directions of the OBMC processing are up, left, down, and right (dirSet={above, left, bottom, right}). 
     The above-described direction configuration can be expressed by the follow equations: 
     
       
         
           
               
               
               
             
               
                   
                   
               
             
            
               
                   
                   
                 if (subPbMotionFlag) { 
               
               
                   
                   
                  if (diffMvVer &gt; diffMvHor) 
               
               
                   
                   
                   dirSet = {above, bottom} // dirSetV 
               
               
                   
                   
                  else // (diffMvVer &lt;= diffMvHor) 
               
               
                   
                   
                   dirSet = {left, right} // dirSetH 
               
               
                   
                   
                 } 
               
               
                   
                   
                 else { 
               
               
                   
                   
                  dirSet = {above, left, bottom, right} // dirSetF 
               
               
                   
                   
                 } 
               
               
                   
                   
               
            
           
         
       
     
     Summary of OBMC Processing Simplification 
     The following will summarize the processing of the above-described OBMC processing simplification. 
     A: As described in “OBMC Processing Using Small Tap Filter 1,” processing of the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912 , using filters with a smaller number of taps in a case that the OBMC processing is ON, compared with a case that the OBMC processing is OFF (Nobmc&lt;N, M&lt;N). 
     B: As described in “OBMC Processing Using Small Tap Filter 2,” processing of the OBMC interpolation image generation unit  30912 , where, in a case that the OBMC processing is ON, the compensation filter unit  309112  configures the number of taps M of a filer for generating an OBMC interpolation image smaller than the number of taps N of a filer for generating a PU interpolation image (M&lt;N). 
     C: As described in “Small Size OBMC Processing,” processing of the OBMC interpolation image generation unit  30912 , where the OBMC processing area size nObmcW1, nObmcH1 in a case that a prediction image is generated by the OBMC processing under high load is configured narrower than the OBMC processing size nObmcW0, nObmcH0 in a case that a prediction image is generated by the OBMC processing under other circumstances (low load) (nObmcW1&lt;nObmcW0, nObmcH1&lt;nObmcH0). 
     D: As described in “One-Dimensional OBMC Processing,” processing of the OBMC interpolation image generation unit  30912  with restriction to the directions of neighboring sub-blocks to be referred to (dirSet=dirSetHor or dirSetV or dirSetF). 
     In the above example, simplification processing by A or B has been described on the premise that the OBMC is ON. The conditions for simplification processing by A or B may be, for example, performing a: prediction in sub-block units, b: bi-prediction, c: matching prediction, d: non-integer vector, or the like. 
     For example, the following processing may be performed. 
     aA: processing of the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  using filters with smaller number of taps in a case that prediction in sub-block units and the OBMC processing is ON, than otherwise. 
     aB: processing of the OBMC interpolation image generation unit  30912  where the compensation filter unit  309112  configures the number of taps M of a filter for generating an OBMC interpolation image smaller than the number of taps N of a filter for generating a PU interpolation image, in a case that prediction in sub-block units and the OBMC processing is ON. 
     bA: processing of the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  using filters with a smaller number of taps in a case that bi-prediction and the OBMC processing is ON, than otherwise. 
     bB: processing of the OBMC interpolation image generation unit  30912  where the compensation filter unit  309112  configures the number of taps M of a filter for generating an OBMC interpolation image smaller than the number of taps N of a filter for generating a PU interpolation image, in a case that bi-prediction and the OBMC processing is ON. 
     cA: processing of the PU interpolation image generation unit  30911  and the OBMC interpolation image generation unit  30912  using filters with a smaller number of taps in a case that matching prediction and the OBMC processing is ON, than otherwise. 
     cB: processing of the OBMC interpolation image generation unit  30912  where the compensation filter unit  309112  configures the number of taps M of a filter for generating an OBMC interpolation image smaller than the number of taps N of a filter for generating a PU interpolation image, in a case that matching prediction and the OBMC processing is ON. 
     Further, conditions of simplification processing by A or B may be defined as in a case that prediction in sub-block units and bi-prediction (a&amp;&amp;b) is performed, in a case that bi-prediction and matching prediction (b&amp;&amp;c) is performed, or in a case that prediction in sub-block units and matching prediction (c&amp;&amp;a) is performed. 
     In the above-described example, performing b: bi-prediction has been a condition for performing simplification by C. However, a condition for performing simplification processing by C may be performing c: matching prediction. Further, b&amp;&amp;c: bi-prediction and matching prediction may be defined as another condition. 
     Alternatively, for example, the OBMC interpolation image generation unit  30912  may perform the following processing. 
     cC: processing of the OBMC interpolation image generation unit  30912 , where the OBMC processing area size nObmcW1, nObmcH1 in a case that a prediction image is generated by the OBMC processing under high load (matching prediction) is configured narrower than the OBMC processing area size nObmcW1, nObmcH0 in a case that a prediction image is generated by the OBMC processing under other circumstances (nObmcW1&lt;nObmcW0, nObmcH1&lt;nObmcH0). 
     b&amp;&amp;cC: processing of the OBMC interpolation image generation unit  30912 , where the OBMC processing area size nObmcW1, nObmcH1 in a case that a prediction image is generated by the OBMC processing under high load (bi-prediction and matching prediction) is configured narrower than the OBMC processing area size nObmc W0, nObmcH0 under other circumstances (nObmcW1&lt;nObmcW0, nObmcH1&lt;nObmcH0). 
     In the above example, a configuration where simplification processing is performed by D in a case that prediction in sub-block units is performed has been described. The conditions of performing simplification processing by D may be performing b: bi-prediction, c: matching prediction, or the like. Other conditions of performing simplification processing by D may be defined as in a case that prediction in sub-block units and bi-prediction (a&amp;&amp;b) are performed, bi-prediction and matching prediction are performed (b&amp;&amp;c), or prediction in sub-block units and matching prediction are performed (c&amp;&amp;a). 
     Alternatively, for example, the OBMC interpolation image generation unit  30912  may perform the following processing. 
     bD: processing of the OBMC interpolation image generation unit  30912  where a set of neighboring sub-block directions dirSeti to be referred to under high load (bi-prediction) are a smaller number of directions than a set of neighboring sub-block directions dirSet 1  to be referred to under other circumstances (dirSet 1 =dirSetH or dirSetV, dirSet 0 =dirSetF). 
     cD: processing of the OBMC interpolation image generation unit  30912  where a set of neighboring sub-block directions dirSet 1  to be referred to under high load (matching prediction) are a smaller number of directions than a set of neighboring sub-block directions dirSetl to be referred to under other circumstances (dirSet 1 =dirSetH or dirSetV, dirSet 0 =dirSetF), 
     Simplification of OBMC Processing at CU Boundary 
     In the OBMC processing, motion interpolation of each PU is performed in a larger scale than the real PU size, and an OBMC interpolation image of a neighboring PU is generated simultaneously with generation of a PU interpolation image for each PU. In this case, an OBMC interpolation image that is generated in a case that a PU interpolation image of a neighboring PU is generated is required to he stored until it is utilized in the OBMC processing on a subsequent PU. This requires a memory space for storing the generated OBMC interpolation image. In addition, memory management for storing images is complicated. Thus, it is difficult to use an OBMC interpolation image generated while processing a CU in the OBMC processing on a subsequent CU. Conversely, for PUs in the same CU, an OBMC interpolation image for a subsequent PU can he generated simultaneously with generation of a PU interpolation image. Accordingly, the processing amount of generation of an OBMC interpolation image for neighboring PUs across different CUs (generation of an OBMC interpolation image at a CU boundary) is larger than the processing amount of generation of an OBMC interpolation image for PUs within the same CU (generation of an OBMC interpolation image at a PU boundary). 
     The following configuration of the image decoding device  31  according to the present embodiment (simplification of the OBMC processing at a CU boundary) aims to decrease the processing amount of the image decoding device  31 . 
     Small Tap Interpolation at CU Boundary 
     The image decoding device  31  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) generates a prediction image by referring to a reference image. The motion compensation unit  3091  includes a PU interpolation image generation unit (interpolation image generation unit)  30911  that generates a PU interpolation image (interpolation image) by applying motion information of a target PU and filter processing to a sub-block on the reference image corresponding to a target sub-block. The motion compensation unit  3091  further includes an OBMC interpolation image generation unit (additional interpolation image generation unit)  30912  that generates an OBMC interpolation image (additional interpolation image) by applying motion information of a neighboring sub-block that neighbors a target sub-block and filter processing to a pixel in a boundary area of at least one of CU and PU where a sub-block corresponding to the target sub-block exists on the reference image. 
     Furthermore, the motion compensation unit  3091  includes an OBMC correction unit (prediction unit)  3093  that generates a prediction image from a PU interpolation image and an OBMC interpolation image after filter processing. 
     The OBMC interpolation image generation unit  30912  uses a filter with a smaller number of taps for a CU boundary area than the number of taps of a filter for a PU boundary area. 
     According to the above-described configuration, the OBMC interpolation image generation unit  30912  performs tiller processing with a small number of taps for a boundary area of coding units (CUs) compared with a boundary area of prediction units (PUs). Thus, the processing amount of the OBMC processing can be decreased. 
     An example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 30A to 32C . 
       FIGS. 30A and 30B  are diagrams illustrating an overview of filter processing that the motion compensation unit  3091  of the present embodiment (PU interpolation image generation unit  30911  and OBMC interpolation image generation unit  30912 ) performs. 
       FIG. 30A  illustrates filter processing for PUs in a case that the OBMC processing is OFF, while  FIG. 30B  illustrates filter processing for PUs in a case that the OBMC processing is ON. As illustrated in  FIG. 30A , in a case that the OBMC processing is OFF, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter of the number of taps N=8. Further, as illustrated in  FIG. 30B , in a case that the OBMC processing is ON, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps N=8. The OBMC interpolation image generation unit  30912  generates an OBMC interpolation image by using a filter with the number of taps M=8 at a PU boundary and generates an OBMC interpolation image by using a filter with the number of taps Mcu (Mcu=2, 4, or 6) at a CU boundary, where Mcu&lt;M. 
       FIG. 31  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment. In the processing flow illustrated in  FIG. 31 , steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  are indicated by different numbers from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     In a case that the motion vector mvLXN of a neighboring sub-block is different from the motion vector mvLX of a target sub-block or a reference image of the neighboring sub-block and a reference image of the target sub-block are different (NO at S 4 ), the OBMC interpolation image generation unit  30912  determines whether the boundary is a CU boundary (S 52 ). At this time, the OBMC interpolation image generation unit  30912  may determine whether a target boundary is a CU boundary or a PU boundary based on the shape of the PU partition. In a case that the target boundary is a CU boundary (YES at S 52 ), the OBMC interpolation image generation unit  30912  derives an OBMC interpolation image Pred N by using a filter of the number of taps Mcu (for example, 2, 4, or 6) (S 53 ). In a case that the target boundary is a PU boundary (NO at S 52 ), the OBMC interpolation image generation unit  30912  derives an OBMC interpolation image Pred_N [x][y] by using a filter with the number of taps M (for example, 8). 
     With regard to a boundary between a target sub-block (xSb, ySb) and a neighboring sub-block (xNb, yNb), the following method may be used as the determination method of CU boundary and PU boundary. 
     puBoundFlag=((xSb&gt;&gt;log2(CUW))==(xNb&gt;&gt;log2(CUH))) &amp;&amp; ((ySb&gt;&gt;log2(CUW))==(yNb&gt;&gt;log2(CUH))) 
     Here, CUW and CUH are respectively the width and height of a CU. In the above equations, in a case that the CU coordinate of a target sub-block that is derived by right-shifting a target sub-block with a logarithm value of CUW (xSb &gt;&gt;log2(CUW), ySb &gt;&gt;log2(CUH)) and the CU coordinate of a neighboring sub-block (xNb&gt;&gt;log2(CUW), yNb&gt;&gt;log2(CUH)) are the same, a flag puBoundFlag indicating that the boundary (PU boundary) is in the same CU is configured to 1. In a case that puBoundFlag is configured to 1, the boundary is a PU boundary, and in a case that puBoundFlag is configured to 0, the boundary is a CU boundary. 
     Here, another filter processing that the motion compensation unit  3091  according to the present embodiment performs will be described below.  FIGS. 32A to 32C  are diagrams illustrating an overview of another filter processing of the motion compensation unit  3091  according to the present embodiment. 
       FIG. 32A  illustrates filter processing for PUs in a case that the OBMC processing is OFF.  FIG. 32B  illustrates filter processing for PUs in a case that the OBMC processing is ON and Bipred is OFF.  FIG. 32C  illustrates filter processing for PUs in a case that the OBMC processing is ON and Bipred is ON. As illustrated in  FIG. 32A , in a case that the OBMC processing is OFF, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps N=8. Further, as illustrated in  FIG. 32B , in a case that the OBMC processing is ON and Bipred is OFF, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps N=8. The OBMC interpolation image generation unit  30912  generates an OBMC interpolation image by using a filter with the number of taps M=8 either at a PU boundary or a CU boundary. Further, as illustrated in  FIG. 32C , in a case that the OBMC processing is ON and Bipred is ON, the PU interpolation image generation unit  30911  generates a PU interpolation image by using a filter with the number of taps N=8. The OBMC interpolation image generation unit  30912  generates an OBMC interpolation image by using a filter with the number of taps M=8 at a PU boundary and generates an OBMC interpolation image by using a filter with the number of taps Mcu=2, 4, or 6 at a CU boundary. where Mcu&lt;M. 
     Small Size OBMC Processing at CU Boundary 1 
     Another example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 33A to 36 . 
     The image decoding device  31  according to the present embodiment includes a PU interpolation image generation unit (interpolation image generation unit)  30911  that generates an interpolation image by applying the motion information of a target PU to a target sub-block. The image decoding device  31  further includes an OBMC interpolation image generation unit (additional interpolation image generation unit)  30912  that generates an OBMC interpolation image (additional interpolation image) by applying the motion information of a neighboring sub-block that neighbors a target sub-block only to a PU boundary area. The image decoding device  31  further includes an OBMC correction unit  3093  that generates a prediction image from a PU interpolation image and an OBMC interpolation image. 
     According to the above configuration, the OBMC interpolation image generation unit  30912  generates an OBMC interpolation image only in a PU boundary area. Thus, the processing amount of the OBMC processing can be decreased. 
       FIGS. 33A and 33B  are diagrams illustrating an overview of the processing of the motion compensation unit  3091  according to the present embodiment.  FIG. 33A  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OBMC processing is OFF.  FIG. 33B  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OB MC processing is ON. 
     As illustrated in  FIG. 33A , in a case that the OBMC processing is OFF, the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW and nObmcii to 0 pixels. In other words, the OBMC processing is not performed. As illustrated in  FIG. 33B , in a case that the OBMC processing is ON, the OBMC interpolation image generation unit  30912  configures the OBMC processing size at a CU boundary nObmcW and nObmcH to 0 pixels. The OBMC interpolation image generation unit  30912  configures the OBMC processing size at a PU boundary nObmcW and nObmcH to 4 pixels. In other words, the size of the boundary area is configured by the OBMC interpolation image generation unit  30912 . For example, the boundary area is configured as an area where a distance from a PU boundary is 0 to 4 pixels. 
     In other words, in a case that the OBMC processing is ON, the motion compensation unit  3091  performs the OBMC processing only on pixels at a PU boundary. 
       FIG. 34  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment. In the processing flow illustrated in  FIG. 34 , a step that differs from those in the processing flow of the inter-prediction image generation unit  309  illustrated in  FIG. 16  is indicated by a different number from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     In a case that the motion vector nivIAN of a neighboring sub-block is different from the motion vector mvLX of a target sub-block or a reference image of the neighboring sub-block and a reference image of the target sub-block are different (NO at S 4 ), the OBMC interpolation image generation unit  30912  determines whether the boundary is a CU boundary (S 62 ). Since S 62  is the same as the above-described S 52 , detailed description thereof will be omitted here. In a case that a target boundary is not a CU boundary (NO at S 62 ), namely, the boundary is a PU boundary, the processing transits to S 5  where the OBMC interpolation image generation unit  30912  derives an OBMC interpolation image. Whereas, in a case that a target boundary is a PU boundary (YES at S 62 ), the OBMC interpolation image generation unit  30912  transits to S 7  without deriving an OBMC interpolation image. 
     Small Size OBMC Processing at CU Boundary 2 
     Another example of the processing of the motion compensation unit  3091  according to the present embodiment will be described with reference to  FIGS. 35A to 37C . 
     The motion compensation unit  3091  according to the present embodiment (prediction image generation device) generates a prediction image by referring to a reference image. The motion compensation unit  3091  includes an interpolation image generation unit (image generation unit)  3092  that generates a PU interpolation image that can be acquired by applying motion information of a target PU and filter processing to a sub-block on the reference image corresponding to a target sub-block and an OBMC interpolation image that can be acquired by applying motion information of a neighboring sub-block and filter processing to a pixel in a boundary area of a sub-block on the reference image corresponding to the target sub-block. The motion compensation unit  3091  further includes an OBMC correction unit (prediction unit)  3093  that generates a prediction image by referring to a PU interpolation image and an OBMC interpolation image. The interpolation image generation unit  3092  configures a CU boundary area narrower than a PU boundary area in a sub-block on the reference image corresponding to a target sub-block. 
     According to the above-described configuration, in a case that a boundary area is a CU boundary area, the interpolation image generation unit  3092  configures the boundary area narrower than in a case that the boundary area is a PU boundary area. Thus, the processing amount of the OBMC processing can be decreased. 
       FIGS. 35A and 35B  are diagrams illustrating an overview of the processing of the motion compensation unit  3091  according to the present embodiment.  FIG. 35A  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OBMC processing is OFF.  FIG. 35B  illustrates the size of an area where the OBMC processing is performed for PUs in a case that the OBMC processing is ON. 
     As illustrated in  FIG. 35A , in a case that the OBMC processing is OFF, the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW and nObmcH to 0 pixels. In other words, the OBMC processing is not performed. As illustrated in  FIG. 35B , in a case that the OBMC processing is ON, the OBMC interpolation image generation unit  30912  configures the OBMC processing size at a CU boundary nObmcWcu and nObmcHcu to 2 pixels. The OBMC interpolation image generation unit  30912  configures the OBMC processing size at a PU boundary nObmcWpu and nObmcHpu to 4 pixels, 
     Note that, in a case that a boundary area is a CU boundary area, the interpolation image generation unit  3092  may configure the boundary area narrower compared with a case that the boundary area is a PU boundary area, and the OBMC processing size of the CU boundary nObmcWcu, nObmcHcu and the OBMC processing size of the PU boundary nObmcWpu, nObmcHpu are not limited to the above example as long as nObmcWcu&lt;nObmcWpu, nObmcHcu&lt;nObmcHpu is satisfied. 
       FIG. 36  is a flowchart illustrating a processing flow of the motion compensation unit  3091  according to the present embodiment. In the processing flow illustrated in  FIG. 36 , a step that differs from those in the processing flow of the inter-prediction image generation unit  309  illustrated in  FIG. 16  is indicated by a different number from those of  FIG. 16 . In the following paragraphs, only the steps that differ from those in the processing flow of the motion compensation unit  3091  illustrated in  FIG. 16  will be described. 
     In a case that the motion vector mv LAN of a neighboring sub-block is different from the motion vector mvLX of a target sub-block or a reference image of the neighboring sub-block and a reference image of the target sub-block are different (NO at S 4 ), the OBMC interpolation image generation unit  30912  determines whether the boundary is a CU boundary (S 71 ). Since S 71  is the same as the above-described S 52 , detailed description thereof will be omitted here. In a case that the target boundary is not a CU boundary (NO at S 71 ), namely, the boundary is a PU boundary, the OBMC interpolation image generation unit  30912  configures the target area of the OBMC processing as nObmcWcu, nObmcHcu pixels (for example, 4 pixels) from the boundary (S 72 ). In a case that the target boundary is a CU boundary (YES at S 71 ), the OBMC interpolation image generation unit  30912  configures the target area of the OBMC processing as nObmcWpu, nObmcHpu pixels (for example, 2 pixels) from the boundary (S 73 ). 
     Here, another processing that the motion compensation unit  3091  according to the present embodiment performs will be described below.  FIGS. 37A to 37C  are diagrams illustrating an overview of the processing of the motion compensation unit  3091  according to the present embodiment.  FIG. 37A  illustrates the size of an area where the OBMC processing is performed for a CU in a case that the OBMC processing is OFF.  FIG. 37B  illustrates the size of an area where the OBMC processing is performed for a CU in a case that the OBMC processing is ON and Bipred is OFF.  FIG. 37C  illustrates the size of an area where the OBMC processing is performed for a CU in a case that the OBMC processing is ON and Bipred is ON. As illustrated in  FIG. 37A , in a case that the OBMC processing is OFF, the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW to 0 pixels, in other words, the OBMC processing is not performed. As illustrated in  FIG. 37B , in a case that the OBMC processing is ON and Bipred is OFF, the OBMC interpolation image generation unit  30912  configures the OBMC processing size nObmcW at a CU boundary and a PU boundary to 4 pixels. As illustrated in  FIG. 37C , in a case that the OBMC processing is ON and Bipred is ON, the OBMC interpolation image generation unit  30912  configures the OBMC processing size at a CU boundary nObmcWcu to 2 pixels. The OBMC interpolation image generation unit  30912  configures the OBMC processing size at a PU boundary nObmcWpu to 4 pixels. 
     Summary of Simplification of OBMC Processing at CU Boundary 
     The following will summarize the processing of the above-described OBMC processing simplification at a CU boundary. 
     A 1 : As described in “Small Tap Interpolation at CU Boundary,” filter processing with a smaller number of taps at a PU boundary area compared with the one at a CU boundary area. 
     C 1 : As described in “Small Size OBMC Processing at CU Boundary 1,” application of the OBMC processing only to a PU boundary area. 
     C 2 : As described in “Small Size OBMC Processing at CU Boundary 2,” processing of configuring a CU boundary area as a target of the OBMC processing narrower than a PU boundary area as a target of the OBMC processing. 
     The processing may be performed in a case that the following conditions are met. The conditions are as follows. The boundary is cu: CU boundary and a: sub-block prediction mode (cu&amp;a). cu: CU boundary and bb: Bipred is ON (cu&amp;b); en: CU boundary and d: motion vector is not integer (cu&amp;d). u: CU boundary and a: sub-block prediction mode and b: Bipred is ON (cu&amp;a&amp;b). cu: GU boundary and b: Bipred is ON and motion vector is not integer (cu&amp;a&amp;e); cu: CU boundary and d: motion vector is not integer and a sub-block prediction mode (cu&amp;d&amp;a). Further, in a case that the above conditions are not satisfied, the OBMC processing may be performed without performing simplification of the OBMC processing even at a CU boundary. 
     Alternatively, for example, the OBMC interpolation image generation unit  30912  may perform the following processing (without limitation to the following example). 
     cu&amp;aA 1 : processing where, in OBMC interpolation image derivation for a sub-block under high load (sub-block prediction mode), the number of taps Mcu used for OBMC interpolation image derivation at a CU boundary is configured smaller than the number of taps M used for OBMC interpolation image derivation for other part (PU boundary). 
     cu&amp;aC 1 : processing where, in a sub-block under high load (sub-block prediction mode), the OBMC processing is not performed at a CU boundary and the OBMC processing is performed at other boundary (PU boundary). 
     cu&amp;aC 2 : processing where, in a sub-block under high load (sub-block prediction mode), the OBMC processing size at a CU boundary nObmcWcu, nObmcHcu is configured smaller than the OBMC processing size nObmcWpu, nObmcHpu at other part (PU boundary), and the CU boundary area as a target of the OBMC processing is configured narrower. 
     cu&amp;bA 1 : processing where, in OBMC interpolation image derivation of a sub-block under high load (bi-prediction), the number of taps Mcu used for OBMC interpolation image derivation at a CU boundary is configured smaller than the number of taps M used for OBMC interpolation image derivation for other part (PU boundary). 
     cu&amp;bC 1 : processing where, in a sub-block under high load (bi-prediction), the OBMC processing is not performed at a CU boundary and the OBMC processing is performed at other boundary (PU boundary). 
     cu&amp;bC 2 : processing where, in a sub-block under high load (bi-prediction), the OBMC processing size at a CU boundary nObmcWcu, nObmalcu is configured smaller than the OBMC processing size nObmcWpu, nObmcHpu at other part (PU boundary), and the boundary area of CUs as a target of the OBMC processing is configured narrower. 
     High Precision Weighted Average Processing 
     In the OBMC processing, conventionally, an OBMC interpolation image is derived using a motion parameter of a neighboring PU in the order of above, left, bottom, and right directions, and weighted average processing is performed for each direction. In a case that a sub-block that neighbors on left or top of a target PU is used in the OBMC processing, there is a problem that performing weighted average processing repeatedly in a plurality of directions (here, above and left) decreases the precision of a prediction image due to the lack of computing accuracy. 
     In addition, there is a problem that the result may be different depending on the application order of the directions. Further, there is a problem that repeated weighted average processing causes a decrease in the precision of a prediction image. 
     These problems are caused by the following reason. In weighted average processing using integer operations, a sum of products of weighted coefficients is divided (shifted) by a sum of weighted coefficients. The lower bits are lost by the above division (shift) processing. As such, the precision of a prediction image decreases. 
     The configuration of the image decoding device  31  according to the present embodiment (high precision weighted average processing), as will be described below, aims to suppress a decrease in precision of a prediction image. 
     The image decoding device  31  according to the present embodiment will be described below. 
     The motion compensation unit  3091  according to the present embodiment includes a PU interpolation image generation unit (interpolation image generation unit  30911 ) that generates an interpolation image by applying motion information of a target sub-block and filter processing to a sub-block on the above-described reference image corresponding to the target sub-block. 
     The motion compensation unit  3091  includes an OBMC interpolation image generation unit (availability check unit)  30912  that generates an OBMC interpolation image (additional interpolation image) by checking availability of motion information of a sub-block that neighbors a target sub-block in a neighboring direction for each neighboring direction included in a group of neighboring directions including a plurality of neighboring directions and applying motion information that has been determined as available and filter processing to the target sub-block. 
     The motion compensation unit  3091  further includes an OBMC correction unit (image correction unit)  3093  that corrects an image for correct by a linear sum of a PU interpolation image and the above-described OBMC interpolation image using coefficients of integer precision. The OBMC correction unit (image correction unit)  3093  generates a prediction image by, after updating an image for correct with regard to all the neighboring directions included in the above-described group of neighboring directions, adding the above-described two kinds of images for correct, the weigted interpolation image and the weigted additional interpolation image, and right-bit shifting the sum. 
     According to the above-described configuration, the OBMC correction unit  3093 , after updating an image for correct with regard to all the neighboring directions included in the group of neighboring directions, adds the above-described two kinds of images for correct and bit-shifts the sum. In this way, a decrease in precision of the generated prediction image can be suppressed. 
     For example, in the “weighted average processing” indicated by the following equations, pixel values are right-bit shifted each time a prediction image is corrected for each neighboring direction. Note that the initial value of the prediction image is a PU interpolation image. 
       Pred [x][y]=Pred_C [x][y]Pred [x][y]=(w1a*Pred [x][y]+w2a*Pred_above [i][j]+o)&gt;&gt;shift Pred [x][y]=(w1 1 *Pred [x][y]+w2 1 *Pred_left [i][j]+o)&gt;&gt;shift Pred [x][y]=(w1b*Pred [x][y]+w2b*Pred_bottom [i][j]+o)&gt;&gt;shift Pred [x][y]=(w1r*Pred [x][y]+w2r*Pred_right [i][j]+o)&gt;&gt;shift 
     Note that Pred_above [i][j], Pred_left [i][j], Pred_bottom [i][j], and Pred_right [i][j] indicate an OBMC interpolation image in each neighboring direction. The other part is the same as the content that has been described in above section (Weighted Average), thus, the description thereof will be omitted. 
     The weighted average processing according to the present embodiment can also be described as follows. The OBMC correction unit  3093  weights a PU interpolation image and an OBMC interpolation image that has been derived from a motion parameter of a neighboring sub-block in each direction. Then, the OBMC correction unit  3093  calculates a weighted sum of the weighted PU interpolation image and OBMC interpolation images. At this stage, normalization by right shifting is not performed for the calculated weighted sum. That is, the OBMC correction unit  3093  calculates only a weighted correction member. Then, after calculating only the weighted correction member by using a motion parameter of a neighboring sub-block in all the directions, the OBMC correction unit  3093  performs normalization on the sum of the weighted prediction image and weighted correction member. 
     Example of High Precision Weighted Average Processing 1 
     The flow of the weighted average processing performed by the OBMC correction unit according to the present embodiment  3093  will be described in detail. 
     In a case that the motion parameter of an upper neighboring sub-block of a target sub-block is available and the motion parameter of the upper neighboring sub-block of the target sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects a PU interpolation image Pred_C [x][y] and an OBMC interpolation image Pred_N [x][y] and corrects cnt [x][y] that indicates the number of times of the processing. Note that the initial values of Pred_C [x][y], Pred_N [x][y], and cnt [x][y] are 0. In the following equations, Pred_C [x][y] and Pred_N [x][y] on the left side indicates the corrected PU interpolation image Pred_C [x][y] and Pred_N [x][y], while Pred_C [x][y] and Pred_N [x][y] on the right side indicates the PU interpolation image Pred_C [x][y] before correct. Further, Pred_curr [x][y] indicates a PU interpolation image Pred_C [x][y] that has been received from the PU correction image generation unit  30911 , and Pred_curr [x][y] is not corrected by the OBMC correction unit  3093 . 
       Pred_C [x][y]=Pred_C [x][y]+w 1 a*Pred_curr [x][y]Pred_N [x][y]=Pred_N [x][y]+w 2 a*Pred_above [x][y]cnt [x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a left neighboring sub-block of the target sub-block is available and the motion parameter of the left neighboring sub-block of the target sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects the PU interpolation image Pred_C [x][y] and the OBMC interpolation image Pred_N [x][y], and corrects cnt [x][y] that indicates the number of times of the processing. 
       Pred_C [x][y]=Pred_C [x][y]+w1 1 *Pred_curr [x][y]Pred_N [x][y]=Pred_N [x][y]+w2 1 *Pred_left[x][y]cnt [x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a lower neighboring sub-block of the target sub-block is available and the motion parameter of the lower neighboring sub-block of the target sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects the PU interpolation image Pred_C [x][y] and the OBMC interpolation image Pred_N [x][y], and corrects cnt [x][y] that indicates the number of times of the processing. 
       Pred_C [x][y]=Pred_C [x][y]+w1b*Pred_curr [x][y]Pred_N [x][y]=Pred_N [x][y]+w2b*Pred_bottom [x][y]cnt[x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a right neighboring sub-block of the target sub-block is available and the motion parameter of the right neighboring sub-block of the target sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects the PU interpolation image Pred_C [x][y] and the OBMC interpolation image Pred_N [x][y], and corrects cnt [x][y] that indicates the number of times of the processing. 
       Pred_C [x][y]=Pred_C [x][y]w1r*P_curr [x][y]Pred_N [x][y]=Pred_N [x][y]+w2r*Pred_right [x][y]cnt[x][y]cnt [x][y]+1 
     Finally, the OBMC correction unit  3093  calculates a prediction image Pred [x][y] by performing processing indicated by the following equation. 
       if cnt [x][y]!=4 Pred [x][y]=(Pred_C [x][y]+Pred_N [x][y]+o)/cnt [x][y], o=(cnt [x][y]+1) &gt;&gt;1 
     Alternatively, if cnt [x][y]!=3, the following shift operation can also be established. 
     Pred [x][y]=(Pred_C [x][y]+Pred_N [x][y]+&gt;&gt;shift, o=(shift−1), shift=tog2 (cnt [x][y])+shiftW if cnt [x][y]==4 Pred [x][y]=Pred_curr [x][y] 
     Note that shiftW is a value used for normalization in weighted averaging. In a case that the precision of the weight coefficients of weighted average is 1/N, shiftW=log2(N) can be established. That is, in a case that the weight coefficients are 8/32, 4/32, 2/32, and 1/32, N is 32 and, thus, shiftW is 5. 
     Example of High Precision Weighted Average Processing 
     The flow of another weighted average processing performed by the OBMC correction unit according to the present embodiment  3093  will be described in detail. 
       Pred sum [x][y] and cnt [x][y] are configured as follows (initial configuration Pred_sum [x][y]=0, cnt [x][y]=0 
     In a case that the motion parameter of an upper neighboring sub-block of a target sub-block is available and the motion parameter of the upper neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, and corrects Pred_sum [x][y]. The OBMC correction unit  3093  corrects cnt [x][y]. 
       Pred_sum [x][y]=Pred_sum [x][y]+w 1 a*Pred_curr [x][y]+w 2 a*Pred_above [x][y] cnt [x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a left neighboring sub-block of a target sub-block is available and the motion parameter of the left neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects Pred_sum [x][y]. The OBMC correction unit  3093  corrects cnt [x][y]. 
       Pred_sum [x][y]Pred_sum [x][y]+w 1 1*Pred_curr [x][y]w 2 1*Pred_left [x][y] 
       cnt [x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a lower neighboring sub-block of a target sub-block is available and the motion parameter of the lower neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects Pred_sum [x][y]. 
       Pred_sum [x][y]=Pred_sum [x][y]+w 1 b*Pred_curr [x][y]+w 2 b* Pred_bottom [x][y]cnt [x][y]=cnt [x][y]+1 
     Next, in a case that the motion parameter of a right neighboring sub-block of a target sub-block is available and the motion parameter of the right neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, corrects Pred sum [x][y]. 
       Pred_sum [x][y]=Pred_sum [x][y]+w1r*Pred_curr [x][y]+w2r*Pred_right [x][y]cnt [x][y]=cnt [x][y]+1 
     Finally, the OBMC correction unit  3093  calculates a prediction image Pred [x][y] by performing processing indicated by the following equation. 
       if cnt [x][y]=0 
       Pred [x][y]=Pred_carr [x][y]if cnt [x][y]!0 Pred [x][y]=((Pred_c [x][y]+Pred_n [x][y])/cnt [x][y])&gt;&gt;shiftW 
     The OBMC correction unit  3093  may derive the prediction image Pred [x][y] by the following equations. 
       Pred [x][y]=(Pred_c [x][y]+Pred_n [x][y]+o)&gt;&gt;shift, o=1&lt;&lt;(shift −1),shift =log2 (cnt [x][y]+shiftW
 
     The specific example of the value of shift is as follows. In a case that the number of times of the OBMC correction processing is one, cnt=1 and shift=shiftW can be established. In a case that the number of times of the OBMC correction processing is two, cnt=2 and shift=shiftW +2 can be established. Here, shiftW is a value used for normalization in weighted averaging. In a case that the precision of the weight coefficients of weighted average is 1/N, shiftW=log2(N) can be established. That is, in a case that the weight coefficients are 8/32, 4/32, 2/32, and 1/32, N is 32 and, thus, shiftW=5. 
     Example of High Precision Weighted Average Processing 3 
     The flow of still another weighted average processing performed by the correction unit according to the present embodiment  3093  will be described in detail. 
     In this weighted average processing, for “Pred_C [x][y]=Pred_C[x][y]+w1X* Pred_curr [x][y]” (w1X is any of w1a , w11, w1b and w1r) in “Example of High Precision Weighted Average Processing 1” described above, w1X is added, a product of w1X finally added and pred_curr is calculated to right-bit shift the product. Specific description is as follows. 
     Initial Configuration 
       weight_c [x][y]=0 Pred_N [x][y]=0, cnt [x][y]=0 
     In a case that the motion parameter of an upper neighboring sub-block of a target sub-block is available and the motion parameter of the upper neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, and corrects weight_c [x][y] that is a value after adding w1X, Pred_N [x][y], and cnt [x][y]. 
       weight_c [x][y]=weight_c [x][y]w1a Pred N [x][y]=Pred_N [x][y]w2a*Pred_above [x][y]cnt [x][y]=cnt [x][y]+1 
     In a case that the motion parameter of a left neighboring sub-block of a target sub-block is available and the motion parameter of the left neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, and corrects weight_c [x][y] that is a value after adding w1X, Pred_N [x][y], and cnt [x][y]. 
       weight_c [x][y]=weight_c [x][y]+w1 1  Pred_N [x][y]=Pred_N [x][y]w2 1 *Pred_left [x][y]cnt [x][y]cnt [x][y]+1
 
     In a case that the motion parameter of a lower neighboring sub-block of a target sub-block is available and the motion parameter of the lower neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, and corrects weight_c [x][y] that is a value after adding w1X, Pred_N [x][y], and cnt [x][y]. 
       weight_c [x][y]=weight_c [x][y]w1b Pred_N [x][y]=Pred_N [x][y] w2b*Pred_bottom [x][y]cnt[x][y]=cnt [x][y]1 
     In a case that the motion parameter of a right neighboring sub-block of a target sub-block is available and the motion parameter of the right neighboring sub-block is different from the motion parameter of the target sub-block, the OBMC correction unit  3093  performs processing indicated by the following equations, and corrects weight_c [x][y] that is a value after adding w1X, Pred_N [x][y], and cnt 
       weight_c [x][y]=weight_c [x][y]w1r Pred_N [x][y]=Pred_N [x][y]w2r*Pred_right [x][y]cnt[x][y]=cnt [x][y]1 
     Finally, the OBMC correction unit  3093  calculates a prediction image Pred [x][y] by performing processing indicated by the following equation. 
       if cnt [x][y]=0 Pred [x][y]=Pred_curr [x][y]if cnt [x][y]!0 Pred [x][y]=((weight_c [x][y]*Pred_curr [x][y]+Pred_N [x][y])/cnt [x][y]) 
     The OBMC correction unit  3093  may derive Pred [x][y] by the following equations. 
       Pred [x][y]=weight_c [x][y]*Pred_curr [x][y]+Pred_N [x][y]+o)&gt;&gt;shift, o=1&lt;&lt;(shift−1), shift=log2 (cnt [x][y])+shiftW
 
     Note that shiftW is a value used for normalization in weighted averaging. In a case that the precision of the weight coefficients of weighted average is 1/N, shiftW=log2(N) is established. That is, in a case that the weight coefficients are 8/32, 4/32, 2/32, and 1/32, N is 32 and, thus, shiftW=5. 
     Summary of High Precision Weighted Average Processing 
     The following will summarize the high precision weighted average processing described above. 
     Processing described in “Example of High Precision Weighted Average Processing 1” described above, which corrects the PU interpolation image Pred_C [x][y] and the OBMC interpolation image Pred_N [x][y], and right-bit shifts the corrected image to generate the prediction image. 
     Processing described in “Example of High Precision Weighted Average Processing 2” described above, which corrects the sum total value Pred_sum [x][y] of Pred _C [x][y] and Pred_N [x][y], and right-bit shifts the corrected image for correct to generate the prediction image. 
     Processing described in “Example of High Precision Weighted Average Processing 3” described above, for “Pred_C [x][y]=Pred_C[x][y]+w1X*Pred_curr [x][y]”(w1X is any of w1a, w1, w1b and w1r) in “Example of High Precision Weighted Average Processing 1” described above, w1X is added, a product of w1X finally added and pred_curr is calculated to right-bit shift the product. 
     Processing which shifts the corrected image for correct to generate the prediction image. 
     These processes may be performed in a case that conditions described below are satisfied. The conditions are as follows. OBMC being ON. OBMC being ON, and sub-block prediction mode, OBMC being ON, and Bipred being ON. OBMC being ON, and motion vector being noninteger. OBMC being ON, and sub-block prediction unit mode, and Bipred being ON. OBMC being ON, and Bipred being ON, and motion vector being noninteger. OBMC being ON, and motion vector being noninteger, and sub-block prediction mode. 
     In a case that the prediction mode is not the sub-block prediction mode, the OBMC processing may be performed without performing the high precision weighted average processing described above. Configuration of Image Coding Device 
     Next, a configuration of the image coding device  11  according to the present embodiment will be described.  FIG. 38  is a block diagram illustrating a configuration of the image coding device  11  according to the present embodiment. The image coding device  11  is configured to include a prediction image generation unit  101 , a subtraction unit  102 , a DCT and quantization unit  103 , an entropy coding unit  104 , a dequantization and inverse DCT unit  105 , an addition unit  106 , a prediction parameter memory (prediction parameter storage unit, frame memory)  108 , a reference picture memory (reference image storage unit, frame memory)  109 , a coding parameter determination unit  110 , and a prediction parameter coding unit  111 . The prediction parameter coding unit  111  is configured to include an inter-prediction parameter coding unit  112  and an intra-prediction parameter coding unit  113 . 
     The prediction image generation unit  101  generates a prediction image P of the prediction unit PU for each coding unit CU for each picture of an image T, the CU being an area obtained by partitioning the picture. Here, the prediction image generation unit  101  reads out a reference picture block from the reference picture memory  109 , based on a prediction parameter input from the prediction parameter coding unit  111 . The prediction parameter input from the prediction parameter coding unit  111  is a motion vector, for example. The prediction image generation unit  101  reads out a block at a location indicated by a motion vector with a starting point being a coding target CU. The prediction image generation unit  101  generates the prediction image P of the PU for the read-out reference picture block by use of one prediction scheme of multiple prediction schemes. The prediction image generation unit  101  outputs the generated prediction image P of the PU to the subtraction unit  102 . 
     Note that the prediction image generation unit  101  operates in the same way as the prediction image generation unit  308  described already. For example,  FIG. 39  is a schematic diagram illustrating a configuration of the inter-prediction image generation unit  1011  according to the present embodiment. The inter-prediction image generation unit  1011  is configured to include a motion compensation unit  10111  and a weighted prediction unit  10112 . The motion compensation unit  10111  and the weighted prediction unit  10112  have the same configuration as the configuration of the motion compensation unit  3091  and the weighted prediction unit  3094  described above, respectively, and the description of these units are omitted here. The inter-prediction image generation unit  1011  may be configured to perform the OBMC processing.  FIG. 40  is a block diagram illustrating main components of the motion compensation unit  10111  in a case of performing the OBMC processing. As illustrated in  FIG. 40 , the motion compensation unit  10111  includes an interpolation image generation unit  101110  (a PU interpolation image generation unit  101111  and an OBMC interpolation image generation unit  101112 ) and an OBMC correction unit  101113 . The PU interpolation image generation unit  101111 , the OBMC interpolation image generation unit  101112 , and the OBMC correction unit  101113  have the same configuration as the configuration of the PU interpolation image generation unit  30911 , the OBMC interpolation image generation unit  30912 , and the OBMC correction unit  3093  described above, respectively, and the description of these units are omitted here. 
     The prediction image generation unit  101 , in selecting the prediction scheme, selects a prediction scheme which minimizes an error value based on a difference between a pixel value of the PU included in the image and a signal value for each corresponding pixel of the prediction image P of the PU, for example. The method of selecting the prediction scheme is not limited to the above. 
     Multiple prediction schemes include the intra-prediction, the motion prediction (including the sub-block prediction described above), and the merge prediction. The motion prediction is the prediction in a time direction among the inter-predictions described above. The merge prediction is prediction using the prediction parameter the same as for a PU which is in a predefined range from the coding target CU, the reference picture block being already coded. 
     The prediction image generation unit  101 , in a case of selecting the intra prediction, outputs a prediction mode IntraPredMode indicating the intra-prediction mode which has been used in generating the prediction image P of the PU to the prediction parameter coding unit  111 . 
     The prediction image generation unit  101 , in a case of selecting the motion prediction, stores the motion vector mvLX which has been used in generating the prediction image P of the PU in the prediction parameter memory  108 , and outputs the motion vector to the inter-prediction parameter coding unit  112 . The motion vector mvLX indicates a vector from a location of the coding target CU to a location of the reference picture block in generating the prediction image P of the PU. Information indicating the motion vector mvLX includes information indicating the reference picture (e.g., reference picture index refIdxLX, picture order count POC), and may indicate the prediction parameter. The prediction image generation unit  101  outputs the prediction mode predMode indicating the inter-prediction mode to the prediction parameter coding unit  111 . 
     The prediction image generation unit  101 , in a case of selecting the merge prediction, outputs the merge index merge idx indicating the selected PU to the inter-prediction parameter coding unit  112 . The prediction image generation unit  101  outputs the prediction mode predMode indicating the merge prediction mode to the prediction parameter coding unit  111 . 
     The subtraction unit  102  subtracts a signal value of the prediction image P of the PU input from the prediction image generation unit  101  from a pixel value of the corresponding PU of the image T to generate the residual signal. The subtraction unit  102  outputs the generated residual signal to the DCT and quantization unit  103  and the coding parameter determination unit  110 . 
     The DCT and quantization unit  103  performs DCT on the residual signal input from the subtraction unit  102  to compute DCT coefficients. The DCT and quantization unit  103  quantizes the computed DCT coefficients to find quantized coefficients. The DCT and quantization unit  103  outputs the found quantized coefficients to the entropy coding unit  104  and the dequantization and inverse DCT unit  105 . 
     To the entropy coding unit  104 , input are the quantized coefficients from the DCT and quantization unit  103  and coding parameters from the coding parameter determination unit  110 . Examples of the input coding parameters include the codes such as the reference picture index refIdxLX, the prediction vector index mvp_LX_idx, the difference vector mvdLX, the prediction mode predMode, and the merge index merge_idx. 
     The entropy coding unit  104  performs entropy coding on the input quantized coefficients and coding parameters to generate a coded stream Te, and outputs, to outside, the generated coded stream Te. 
     The dequantization and inverse DCT unit  105  dequantizes the quantized coefficients input from the DCT and quantization unit  103  to find DCT coefficients. The dequantization and inverse DCT unit  105  performs inverse DCT on the found DCT coefficients to compute a decoded residual signal. The dequantization and inverse DCT unit  105  outputs the computed decoded residual signal to the addition unit  106 . 
     The addition unit  106  adds a signal value of the prediction image P of the PU input from the prediction image generation unit  101  and a signal value of the decoded residual signal input from the dequantization and inverse DCT unit  105  for each pixel to generate a decoded image. The addition unit  106  stores the generated decoded image in the reference picture memory  109 . 
     The prediction parameter memory  108  stores the prediction parameter generated by the prediction parameter coding unit  111  in a predefined location for each coding target picture and CU. 
     The reference picture memory  109  stores the decoded image generated by the addition unit  106  in a predefined location for each coding target picture and CU. 
     The coding parameter determination unit  110  selects one set from among multiple sets of coding parameters. The coding parameters are the prediction parameters described above or parameters to be coded that are generated in association with the prediction parameters. The prediction image generation unit  101  uses each of these sets of coding parameters to generate the prediction image P of the PU. 
     The coding parameter determination unit  110  computes a cost value indicating the size of an amount of information and a coding error for each of multiple sets. The cost value is a sum of a code amount and a value obtained by multiplying a square error by a coefficient λ, for example. The code amount is an amount of information of the coded stream Te obtained by performing entropy coding on the quantization error and the coding parameters. The square error is a sum of squares of residual error values of the residual signals computed by the subtraction unit  102  for respective pixels. The coefficient λ is a preconfigured real number greater than zero. The coding parameter determination unit  110  selects a set of coding parameters for which the computed cost value is minimum. This allows the entropy coding unit  104  to output, to outside, the selected set of coding parameters as the coded stream Te and not to output the non-selected set of coding parameters. 
     The prediction parameter coding unit  111  derives a prediction parameter used for generating the prediction image, based on the parameter input from the prediction image generation unit  101  and codes the derived prediction parameter to generate a set of coding parameters. The prediction parameter coding unit  111  outputs the generated set of coding parameters to the entropy coding unit  104 . 
     The prediction parameter coding unit  111  stores the prediction parameter corresponding to the set of coding parameters selected by the coding parameter determination unit  110  among the generated set of coding parameters in the prediction parameter memory  108 . 
     In a case that the prediction mode predMode input from the prediction image generation unit  101  specifies the inter-prediction mode, the prediction parameter coding unit  111  causes the inter-prediction parameter coding unit  112  to operate. In a case that the prediction mode predMode specifies the intra-prediction mode, the prediction parameter coding unit  111  causes the intra-prediction parameter coding unit  113  to operate. 
     The inter-prediction parameter coding unit  112  derives an inter-prediction parameter, based on the prediction parameter input from the coding parameter determination unit  110 . The inter-prediction parameter coding unit  112  includes, as a configuration for deriving the inter-prediction parameter, a configuration the same as the configuration in which the inter-prediction parameter decoding unit  303  (see  FIG. 5 , or the like) derives the inter-prediction parameter. The configuration of the inter-prediction parameter coding unit  112  is described below. 
     The intra-prediction parameter coding unit  113  defines, as a set of inter-prediction parameters, the intra-prediction mode IntraPredMode which is specified by the prediction mode predMode input from the coding parameter determination unit  110 . 
     Configuration of Inter-Prediction Parameter Coding Unit 
     Next, a description is given of the configuration of the inter-prediction parameter coding unit  112 . The inter-prediction parameter coding unit  112  is means corresponding to the inter-prediction parameter decoding unit  303 . 
       FIG. 41  is a schematic diagram illustrating the configuration of the inter-prediction parameter coding unit  112  according to the present embodiment. 
     The inter-prediction parameter coding unit  112  is configured to include a merge prediction parameter derivation unit  1121 , an AMVP prediction parameter derivation unit  1122 , a subtraction unit  1123 , a sub-block prediction parameter derivation unit  1125 , and a prediction parameter integration unit  1126 . 
     The merge prediction parameter derivation unit  1121  has a configuration similar to the merge prediction parameter derivation unit  3036  described above (see  FIG. 6 ) and the AMVP prediction parameter derivation unit  1122  has a configuration similar to the AMVP prediction parameter derivation unit  3032  described above (see  FIG. 6 ). 
     In a case that the prediction mode predMode input from the prediction image generation unit  101  specifies the merge prediction mode, the merge index merge_idx is input from the coding parameter determination unit  110  to the merge prediction parameter derivation unit  1121 . The merge index merge_idx is output to the prediction parameter integration unit  1126 . The merge prediction parameter derivation unit  1121  reads out a reference picture index refIdxLX and motion vector mvLX of a merge candidate indicated by the merge index merge_idx among the merge candidates from the prediction parameter memory  108 . The merge candidate is a reference PU in a predefined range from the coding target CU to be coded (e.g., a reference P 11  in contact with a lower left end, upper left end, or upper right end of the coding target block), and is a PU on which the coding processing is completed 
     In a case that the prediction mode predMode input from the prediction image generation unit  101  specifies a matching prediction mode, a syntax pin_match_mode indicating the type of the matching mode is input from the coding parameter determination unit  110  to the sub-block prediction parameter derivation unit  1125 . The matching prediction parameter derivation unit  1125  reads out the reference picture index refIdxLX of the reference PU indicated by ptn match mode among the matching candidates from the memory  108 . The matching candidate is a reference PU in a predefined range from the coding target CU to be coded (e.g., a reference PU in contact with a lower left end, upper left end, or upper right end of the coding target CU), and is a PU on which the coding processing is completed 
     The AMVP prediction parameter derivation unit  1122  includes a configuration similar o the AMVP prediction parameter derivation unit  3032  described above (see  FIG. 6 ). 
     To be more specific, in a case that the prediction mode predMode input from the prediction image generation unit  101  specifies the inter-prediction mode, the motion vector mvLX is input from the coding parameter determination unit  110  to the AMVP prediction parameter derivation unit  1122 . The AMVP prediction parameter derivation unit  1122  derives a prediction vector mvpLX, based on the input motion vector mvLX. The AMVP prediction parameter derivation unit  1122  outputs the derived prediction vector mvpLX to the subtraction unit  1123 . The reference picture index refldx and the prediction vector index mvp_LX_idx are output to the prediction parameter integration unit  1126 . 
     The subtraction unit  1123  subtracts the prediction vector mvpLX input from the AMVP prediction parameter derivation unit  1122  from the motion vector mvLX input from the coding parameter determination unit  110  to generate a difference vector mvdLX. The difference vector mvdLX is output to the prediction parameter integration unit  1126 . 
     In a case that prediction mode predMode input from the prediction image generation unit  101  specifies the merge prediction mode, the prediction parameter integration unit  1126  outputs the merge index merge idx input from the coding parameter determination unit  110  to the entropy coding unit  104 . 
     In a case that the prediction mode predMode input from the prediction image generation unit  101  specifies the inter-prediction mode, the prediction parameter integration unit  1126  performs the processing below. 
     The prediction parameter integration unit  1126  integrates the reference picture index redfIdxLX and prediction vector index mvp_LX_idx input from the coding parameter determination unit  110 , and the difference vector mvdLX input from the subtraction unit  1123 . The prediction parameter integration unit  1126  outputs the integrated code to the entropy coding unit  104 . 
     Note that the inter-prediction parameter coding unit  112  may include an inter-prediction parameter coding controller (not illustrated) which instructs the entropy coding unit  104  to decode the code (syntax element) associated with the inter-prediction to code the code (syntax element) included in the coding data, for example, the partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter-prediction identifier inter_pred_idc, the reference picture index redfIdxLX, the prediction vector index mvp_LX_idx, the difference vector mvdLX, the OBMC flag obmc_flag, and the sub-block prediction mode flag subPbMotionFiag, 
     A part of the image coding device  11  and the image decoding device  31  in the embodiment described above, for example, the entropy decoding unit  301 , the prediction parameter decoding unit  302 , the prediction image generation unit  101 , the DCT and quantization unit  103 , the entropy coding unit  104 , the dequantization and inverse DCT unit  105 , the coding parameter determination unit  110 , the prediction parameter coding unit  111 , the entropy decoding unit  301 , the prediction parameter decoding unit  302 , the prediction image generation unit  308 , and the dequantization and inverse DCT unit  311  may be implemented by a computer. In this case, this configuration may be realized by recording a program for realizing such control functions on a computer-readable recording medium and causing a computer system to read the program recorded on the recording medium for execution. Note that it is assumed that the “computer system” herein refers to a computer system built into any of the image coding devices  11  to  11   h,  the image decoding devices  31  to  31   h,  and the computer system includes an OS and hardware components such as a peripheral device. Furthermore, the “computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, and the like, and a storage apparatus such as a hard disk built into the computer system. Moreover, the “computer-readable recording medium” may include a medium that dynamically retains a program for a short period of time, such as a communication line that is used to transmit the program over a network such as the Internet or over a communication line such as a telephone line, and may also include a medium that retains a program for a fixed period of time, such as a volatile memory within the computer system for functioning as a server or a client in such a case. 
     Furthermore, the program may be configured to realize some of the functions described above, and also may be configured to be capable of realizing the functions described above in combination with a program already recorded in the computer system. 
     The image coding device  11  and image decoding device  31  in the present embodiment described above may be partially or completely realized as an integrated circuit such as a Large Scale Integration (LSI) circuit. The functional blocks of the image coding device  11  and the image decoding device  31  may be individually realized as processors, or may he partially or completely integrated into a processor. The circuit integration technique is not limited to LSI, and the integrated circuits for the functional blocks may be realized as dedicated circuits or a multi-purpose processor. Furthermore, in a case where with advances in semiconductor technology, a circuit integration technology with which an LSI is replaced appears, an integrated circuit based on the technology may he used. 
     The embodiment of the present invention has been described in detail above referring to the drawings, but the specific configuration is not limited to the above embodiments and various amendments can be made to a design that fall within the scope that does not depart from the gist of the present invention. 
     Application Example 
     The image coding device  11  and the image decoding device  31  described above can be used in a state of being equipped on various devices for transmitting, receiving, recording, and reproducing video. The video may be a natural video imaged by a camera or the like, or an artificial video (including CG and GUI) generated by using a computer or the like. 
     First, a description is given of that the image coding device  11  and the image decoding device  31  described above can be used to transmit and receive the video with reference to  FIGS. 42A and 42B . 
       FIG. 42A  is a block diagram illustrating a configuration of a transmission device PROD_A equipped with the image coding device  11 . As illustrated in  FIG. 42A , the transmission device PROD_A includes a coding unit PROD_A 1  that codes video to acquire coded data, a modulation unit PROD_A 2  that modulates a carrier wave by using the coded data acquired by the coding unit PROD_A 1  to acquire a modulated signal, and a transmitter PROD _A 3  that transmits the modulated signal acquired by the modulation unit PROD_A 2 . The image coding device  11  described above is used as the coding unit PROD_A 1  . 
     The transmission device PROD_A may further include, as resources for supplying video to input to the coding unit PROD_A 1 , a camera PROD_A 4  that images the video, a recording medium PROD_A 5  that records video therein, an input terminal PROD_A 6  that inputs video from outside, and an image processing unit A 7  that generates or processes images.  FIG. 42A  illustrates the configuration in which the transmission device PROD_A includes all of the above components, but some of these may be omitted. 
     The recording medium PROD_A 5  may recode the video not coded, or the video coded using a coding scheme for recording different from the coding scheme for transmission. In the latter case, a decoding unit (not illustrated) which decodes the coded data read out from the recording medium PROD_A 5  in accordance with the coding scheme for recording may be provided between the recording medium PROD A5 and the coding unit PROD_A 1 . 
       FIG. 42B  is a block diagram illustrating a configuration of a reception device PROD B equipped with the image decoding device  31 . As illustrated in  FIG. 42B , the reception device PROD_B includes a receiver PROD_B 1  that receives a modulated signal, a demodulation unit PROD_B 2  that demodulate the modulated signal received by the receiver PROD_B 1  to acquire coded data, and a decoding unit PROD_B 3  that decodes the coded data acquired by the demodulation unit PROD_B 2  to acquire the video. The image decoding device  31  described above is used as the decoding unit PROD_B 3 . 
     The reception device PROD_B may further include, as supply destinations of the video output by the decoding unit PROD_B 3 , a display PROD_B 4  that displays the video, a recording medium PROD_B 5  that records the video, and an output terminal PROD_B 6  that outputs the video to outside.  FIG. 42B  illustrates the configuration in which the reception device PROD_B includes all of the above components, but some of these may he omitted. 
     The recording medium PROD_B 5  may be configured to recode the video not coded, or the video coded using a coding scheme for recording different from the coding scheme for transmission. In the latter case, a coding unit (not illustrated) which codes the video acquired from the decoding unit PROD —- B 3  in accordance with the coding scheme for recording may be provided between the decoding unit PROD_B 3  and the recording medium PROD_B 5 . 
     A transmission medium for transmitting the modulated signal may be wireless or wired. A transmission aspect of transmitting the modulated signal may be a broadcast (here, referred to a transmission aspect for which the transmission destination is not specified in advance), or a communication (here, referred to a transmission aspect for which the transmission destination is specified in advance). To be more specific, transmission of the modulated signal may be achieved by any of a radio broadcast, a cable broadcast, a radio communication, and a cable communication. 
     For example, a broadcast station (such as broadcast facilities)/receiving station (such as a TV set) of digital terrestrial broadcasting is an example of the transmission device PROD_A/reception device PROD_transmitting and/or receiving the modulated signal on the radio broadcast. A broadcast station (such as broadcast facilities)/receiving station (such as a TV set) of a cable television broadcasting is an example of the transmission device PROD_A/reception device PROD_B transmitting and/or receiving the modulated signal on the cable broadcast. 
     A server (such as a workstation)/client (such as a TV set, a personal computer, a smartphone) including a Video On Demand (VOD) service or video-sharing service using the Internet is an example of the transmission device PROD_A/reception device PROD_B transmitting and/or receiving the modulated signal on the communication (in general, a wireless or wired transmission medium is used in LAN, and a wired transmission medium is used in WAN), Here, the personal computer includes a desktop PC, laptop PC, and a tablet PC. The smartphone also includes a multifunctional mobile phone terminal. 
     The video-sharing service client has a function to decode coded data downloaded from the server to display on a display, and a function to code video imaged by a camera to upload to the sever. To be more specific, the video-sharing service client functions as both the transmission device PROD_A and the reception device PROD_B. 
     Next, a description is given of that the image coding device  11  and the image decoding device  31  described above can be used to record and reproduce the video with reference to  FIGS. 43A and 43B . 
       FIG. 43A  is a block diagram illustrating a configuration of a recording device PROD_C equipped with the image coding device  11  described above. As illustrated in  FIG. 43A , the recording device PROD_C includes a coding unit PROD_C 1  that codes video to acquire coded data, and a writing unit PROD_C 2  that writes the coded data acquired by the coding unit PROD_C 1  into a recording medium PROD_M. The image coding device  11  described above is used as the coding unit PROD_C 1 . 
     The recording medium PROD_M may be (1) of a type that is built in the recording device PROD_C such as a Hard Disk Drive (HDD) and a Solid State Drive (SSD), (2) of a type that is connected with the recording device PROD_C such as an SD memory card and a Universal Serial Bus (USB) flash memory, or (3) of a type that is loaded into a drive device (not illustrated) built in the recording device PROD_C such as a Digital Versatile Disc (DVD) and a Blu-ray Disc (registered trademark) (BD). 
     The recording device PROD_C may further include, as resources for supplying video to input to the coding unit PROD_C 1 , a camera PROD_C 3  that images video, an input terminal PROD_C 4  that inputs video from outside, a receiver PROD_C 5  that receives video, and an image processing unit C 6  that generates or processes images  FIG. 43A  illustrates the configuration in which the recording device PROD_C includes all of the above components, but some of these may be omitted. 
     The receiver PROD_C 5  may receive the video not coded, or the coded data coded using a coding scheme for transmission different from the coding scheme for recording. In the latter case, a decoding unit for transmission (not illustrated) which decodes the coded data coded by using the coding scheme for transmission may be provided between the receiver PROD_C 5  and the coding unit PROD_C 1 . 
     Examples of the recording device PROD_C like this include a DVD recorder, a BD recorder, and a Hard Disk Drive (HDD) recorder (in this case, the input terminal PROD_C 4  or the receiver PROD_C 5  is mainly the resource for supplying the video). A camcorder (in this case, the camera PROD_C 3  is mainly the resource for supplying the video), a personal computer (in this case, the receiver PROD_C 5  or the image processing unit C 6  is mainly the resource for supplying the video), and a smartphone (in this case, the camera PROD_C 3  or the receiver PROD_C 5  is mainly the resource for supplying the video) are also included in the examples of the recording device PROD_C like this. 
       FIG. 43B  is a block diagram illustrating a configuration of a reproducing device PROD_D equipped with the image decoding device  31 . As illustrated in  FIG. 43B , the reproducing device PROD_D includes a reading unit PROD DI that reads out coded data written into the recording medium PROD_M, and a decoding unit PROD_D 2  that decodes the coded data read out by the reading unit PROD_D 1  to acquire video. The image decoding device  31  described above is used as the decoding unit PROD_D 2 . 
     The recording medium PROD_M may be (1) of a type that is built in the reproducing device PROD_D such as an HDD and an SSD, (2) of a type that is connected with the reproducing device PROD_D such as an SD memory card and a USB flash memory, or (3) of a type that is loaded into a drive device (not illustrated) built in the reproducing device PROD_D such as a DVD and a BD. 
     The reproducing device PROD_D may further include, as supply destinations of the video output by the decoding unit PROD_D 2 , a display PROD_D 3  that displays the video, an output terminal PRODD 4  that outputs the video to outside, and a transmitter PROD_D 5  that transmits the video.  FIG. 43B  illustrates the configuration in which the reproducing device PROD_D includes all of the above components, but some of these may be omitted. 
     The transmitter PROD_D 5  may transmit the video not coded, or the coded data coded using a coding scheme for transmission different from the coding scheme for recording. In the latter case, a coding unit (not illustrated) which codes the video by using the coding scheme for transmission may be provided between the decoding unit PROD_D 2  and the transmitter PROD_D 5 . 
     Examples of the reproducing device PROD_D like this include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D 4  connected with a TV set or the like is mainly the supply destination of the video). A TV set (in this case, the display PROD_D 3  is mainly the supply destination of the video), a digital signage (also referred to as an electronic signage or an electronic bulletin board, and the display PROD_D 3  or the transmitter PROD_D 5  is mainly the supply destination of the video), a desktop PC (in this case, the output terminal PROD_D 4  or the transmitter PROD_D 5  is mainly the supply destination of the video), a laptop or tablet PC (in this case, the display PROD_D 3  or the transmitter PROD_D 5  is mainly the supply destination of the video), and a smartphone (in this case, the display PROD_D 3  or the transmitter PROD_D 5  is mainly the supply destination of the video) are also included in the examples of the reproducing device PROD_D like this. 
     Hardware Implementation and Software Implementation 
     The blocks in the image decoding device  31  and the image coding device  11  described above may be implemented by hardware using a logic circuit formed on an integrated circuit (IC chip), or by software using a Central Processing Unit (CPU). 
     In the latter case, the above-described devices include a CPU to execute commands of a program for achieving the functions, a Read Only Memory (ROM) to store the program, a Random Access Memory (RAM) to load the program, and a storage device (storage medium) such as a memory to store the program and various types of data. The object of the present invention can be attained by that software realizing the functions described above that is a program code of a control program for the above respective devices (executable program, intermediate code program, source program) is recoiled in a recording medium in a computer-readable manner, the recording medium is supplied to the above respective devices, and the computer (or the CPU or MPU) reads out the program code recorded in the recording medium for execution. 
     Examples of the above-described recording medium to use include tapes such as a magnetic tape and a cassette tape, disks or discs including a magnetic disk such as a floppy (registered trademark) disk/hard disk or an optical disc such as a Compact Disc Read-Only Memory (CD-ROM)/Magneto-Optical (MO) disc/Mini Disc (MD)/Digital Versatile Disc (DVD)/CD Recordable (CD-R)/Blu-ray Disc (registered trademark), cards such as an card (including a memory card)/optical card, semiconductor memories such as a mask ROM/Erasable Programmable Read-Only Memory (EPROM)/Electrically Erasable and Programmable Read-Only Memory (EEPROM: registered trademark)/flash ROM, or logic circuits such as a Programmable logic device (PLD) and a Field Programmable Gate Array (FPGA). 
     The above-described devices may be configured to be connectable with a communication network to be supplied with the above-described program code through the communication network. This communication network is not specifically limited so long as the program code can be transmitted. For example, the Internet, an intranet, an extranet, a Local Area Network (LAN), an Integrated Services Digital Network (ISDN), a Value-Added Network (VAN), a Community Antenna television/Cable Television (CATV) communication network, a Virtual Private Network, a telephone network, a mobile communication network, a satellite communication network and the like are available. Transmission media constituting this communication network are not limited to a specific configuration or type so long as the program code can be transmitted. For example, a wired medium such as Institute of Electrical and Electronic Engineers (IEEE) 1394, a USB, a power-line carrier, a cable TV line, a telephone line, and an Asymmetric Digital Subscriber Line (ADSL), or a wireless medium such as an infrared-ray including infrared Data Association (IrDA) and a remote control unit, Bluetooth (registered trademark), IEEE 802.11 wireless communication, Data Rate (HDR), Near Field Communication (NFC), Digital Living Network Alliance (registered trademark) (DLNA), a mobile telephone network, a satellite circuit, and a digital terrestrial network are also available. The present invention may also be implemented in a form of a computer data signal embedded in a carrier wave in which the above-described program code is embodied by electronic transmission. 
     The present invention is not limited to the above described embodiments, and can be variously modified within a scope of the claims. To be more specific, embodiments made by combining technical means which are adequately modified within the scope of the claims are also included in the scope of the present invention. 
     INDUSTRIAL APPLICABILITY 
     The present invention can be suitably applied to an image decoding device that decodes coded data in which an image data is coded and an image coding device that generates coded data in which an image data is coded. An embodiment of the present invention can be also suitably applied to a data structure of the coded data which is generated by the image coding device and referred to by the image decoding device. 
     Reference Signs List 
       11  image coding device (video coding device)  31  Image decoding device (video decoding device)  302  Prediction parameter decoding unit (prediction image generation device)  308  Prediction image generation unit (prediction image generation device)  309  Inter-prediction image generation unit (prediction image generation unit, prediction image generation device)  3091  Motion compensation unit (prediction image generation device)  30911  PU interpolation image generation unit (interpolation image generation unit)  30912  OBMC interpolation image generation unit (additional interpolation image generation unit, availability check unit)  3092  interpolation image generation unit (image generation unit)  3093  OBMC correction unit (prediction unit, image correction unit)