+

WO2018037919A1 - Image decoding device, image coding device, image decoding method, and image coding method - Google Patents

Image decoding device, image coding device, image decoding method, and image coding method Download PDF

Info

Publication number
WO2018037919A1
WO2018037919A1 PCT/JP2017/028891 JP2017028891W WO2018037919A1 WO 2018037919 A1 WO2018037919 A1 WO 2018037919A1 JP 2017028891 W JP2017028891 W JP 2017028891W WO 2018037919 A1 WO2018037919 A1 WO 2018037919A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
weight
weighting factor
unit
image
Prior art date
Application number
PCT/JP2017/028891
Other languages
French (fr)
Japanese (ja)
Inventor
知宏 猪飼
貴也 山本
Original Assignee
シャープ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by シャープ株式会社 filed Critical シャープ株式会社
Publication of WO2018037919A1 publication Critical patent/WO2018037919A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • Embodiments described herein relate generally to an image decoding device, an image encoding device, an image decoding method, and an image encoding method.
  • a moving image encoding device that generates encoded data by encoding the moving image, and an image that generates a decoded image by decoding the encoded data A decoding device is used.
  • the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
  • an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image).
  • a prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of the method for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
  • Non-Patent Documents 1 and 2 can be cited as recent video encoding and decoding techniques.
  • Bi-prediction is a technique for generating a predicted image predSample by the product sum (weighted average, weighted prediction) of two motion compensated images predSampleL0 and predSampleL1, as shown in the following equation.
  • predSample (w * predSampleL0 + ((1 ⁇ shiftWP)-w) * predSampleL1)
  • shiftWP shiftWP
  • w is referred to as “weighting coefficient”.
  • weightTable weightTable [weightIdx]
  • weightTable [] ⁇ -2, 2, 3, 4, 5, 6, 10 ⁇
  • weightTable is a table of weight coefficients.
  • FIG. 32 is a flowchart showing the image decoding operation in the prior art of Non-Patent Document 2.
  • the image decoding operation includes steps S101, S103, and S104.
  • step S101 the weight index weightIdx is decoded.
  • step S103 a weight coefficient w is derived from the weight coefficient table weightTable based on the decoded weightIdx.
  • step S104 weight prediction is performed based on the weight coefficient w.
  • An object of the present invention is to realize an apparatus or the like capable of encoding weighting coefficients more efficiently than in the past.
  • An object of the present invention is to realize an apparatus for deriving a weight coefficient with high prediction accuracy for the merge prediction mode.
  • an image decoding apparatus provides a block of a block used for generating a predicted image from a weight candidate list including a weight coefficient used for weight prediction or an index indicating the weight coefficient as an element.
  • a weighting factor deriving unit for deriving a weighting factor according to the feature; and a weight prediction unit for performing weight prediction using the weighting factor derived by the weighting factor deriving unit.
  • An image encoding device derives a weighting factor from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element according to a feature of a block used for generating a predicted image.
  • a weight coefficient deriving unit that performs weight prediction using the weight coefficient derived by the weight coefficient deriving unit.
  • An image decoding method derives a weighting factor from a weighting candidate list including elements of a weighting factor used for weight prediction or an index indicating the weighting factor in accordance with a feature of a block used for generating a predicted image.
  • An image encoding method derives a weighting factor from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element according to a feature of a block used for generating a predicted image.
  • a weight coefficient deriving step, and a weight prediction step of performing weight prediction using the weight coefficient derived in the weight coefficient deriving step are included in the weight coefficient deriving step.
  • FIG. 1 is a schematic diagram illustrating a configuration of an image decoding device according to Embodiment 1.
  • FIG. 1 is a schematic diagram illustrating a configuration of an image decoding device according to Embodiment 1.
  • FIG. 3 is a schematic diagram illustrating a configuration of an AMVP prediction parameter derivation unit according to Embodiment 1.
  • FIG. 6 is a flowchart illustrating an operation of motion vector decoding processing of the image decoding apparatus according to the first embodiment. It is the schematic which shows the structure of the inter prediction parameter encoding part of the image coding apparatus which concerns on Embodiment 1.
  • FIG. It is the schematic which shows the structure of the inter estimated image generation part which concerns on Embodiment 1.
  • FIG. It is the schematic which shows the structure of the inter prediction parameter decoding part which concerns on Embodiment 1.
  • FIG. It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on Embodiment 1, and the receiver which mounts an image decoding apparatus.
  • (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device.
  • (A) shows a recording device equipped with an image encoding device, and (b) shows a playback device equipped with an image decoding device.
  • FIG. 1 is a schematic diagram illustrating a configuration of an image transmission system according to a first embodiment.
  • FIG. 12 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit of a prediction parameter decoding unit of the image decoding device illustrated in FIG. 5 and an inter prediction image generation unit illustrated in FIG. 11. It is the schematic which shows the structure of the weighting coefficient derivation
  • FIG. 19 is a conceptual diagram illustrating a relationship between a reference block parameter and a reference block index in one step of the operation illustrated in FIG. 18.
  • FIG. 12 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit of a prediction parameter decoding unit of the image decoding device illustrated in FIG. 5 and an inter prediction image generation unit illustrated in FIG. 11. It is the schematic which shows the structure of the weighting coefficient derivation
  • FIG. 18 is a schematic diagram illustrating a configuration of a weighting factor deriving unit different from the weighting factor deriving unit illustrated in FIG. 17.
  • FIG. 20 is a conceptual diagram showing a correspondence relationship between a reference block parameter and a reference block index, which is different from the correspondence relationship shown in FIG. 19. It is the schematic which shows the detailed structure of the inter prediction parameter decoding part different from the inter prediction parameter decoding part shown in FIG. 16, and the inter estimated image production
  • FIG. 19 is a conceptual diagram illustrating a correspondence relationship between a reference block parameter and a predicted value of a weight coefficient in one step of the operation illustrated in FIG. 18.
  • FIG. 17 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit different from the inter prediction parameter decoding unit illustrated in FIG. 16 and an inter prediction image generation unit illustrated in FIG. 11 in the second embodiment. It is a flowchart which shows operation
  • FIG. 27 is a schematic diagram illustrating adjacent blocks used when an adjacent base weight candidate list derivation unit of the inter prediction parameter decoding unit illustrated in FIG. 26 derives a weight candidate list.
  • FIG. 27 is a schematic diagram for explaining scaling that is considered when the adjacent base weight candidate list deriving unit of the inter prediction parameter decoding unit illustrated in FIG.
  • FIG. 26 derives a weight candidate list.
  • It is the schematic which shows the detailed structure of the inter prediction parameter decoding part different from the inter prediction parameter decoding part shown in FIG. 11, and the inter prediction image generation part shown in FIG. 12 is a flowchart illustrating operations of the inter prediction parameter decoding unit of the prediction parameter decoding unit and the inter prediction image generation unit shown in FIG. 11 of the image decoding apparatus shown in FIG. 5 according to the third embodiment.
  • 10 is a flowchart showing an image decoding operation in the prior art of Non-Patent Document 2.
  • FIG. 15 is a schematic diagram showing the configuration of the image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image.
  • the image transmission system 1 includes an image encoding device 11, a network 21, an image decoding device 31, and an image display device 41.
  • the image encoding device 11 receives an image T indicating a single layer image or a plurality of layers.
  • a layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed.
  • inter-layer prediction, inter-view prediction When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
  • the network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31.
  • the network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof.
  • the network 21 is not necessarily limited to a bidirectional communication network, and may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcast and satellite broadcast.
  • the network 21 may be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
  • the image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
  • the image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31.
  • the image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.
  • X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
  • FIG. 1 is a diagram showing a hierarchical structure of data in the encoded stream Te.
  • the encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence.
  • (A) to (f) of FIG. 1 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data
  • the encoded video sequence In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 1A, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID.
  • FIG. 1 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, the type of layer and the number of layers are not dependent on this.
  • the video parameter set VPS is a set of encoding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and encoding parameters related to individual layers in a moving image composed of a plurality of layers.
  • a set is defined.
  • the sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
  • a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined.
  • a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
  • the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
  • the coded slice In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 1C, the slice S includes a slice header SH and slice data SDATA.
  • the slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice.
  • Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
  • I slice using only intra prediction at the time of encoding (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
  • the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
  • the slice data SDATA includes a coding tree unit (CTU) as shown in FIG.
  • a CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
  • Encoding tree unit As shown in (e) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode the encoding tree unit to be processed is defined.
  • the coding tree unit is divided by recursive quadtree division.
  • a tree-structured node obtained by recursive quadtree partitioning is referred to as a coding node (CN).
  • An intermediate node of the quadtree is an encoding node, and the encoding tree unit itself is defined as the highest encoding node.
  • the CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, it is split into four coding nodes CN.
  • the coding node CN is not divided and has one coding unit (CU: Coding Unit) as a node.
  • CU Coding Unit
  • the encoding unit CU is a terminal node of the encoding node and is not further divided.
  • the encoding unit CU is a basic unit of the encoding process.
  • the size of the coding tree unit CTU is 64 ⁇ 64 pixels
  • the size of the coding unit can be any of 64 ⁇ 64 pixels, 32 ⁇ 32 pixels, 16 ⁇ 16 pixels, and 8 ⁇ 8 pixels.
  • the encoding unit As shown in (f) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode an encoding unit to be processed is defined.
  • the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH.
  • the CU header defines a prediction mode, a division method (PU division mode), and the like.
  • prediction information (a reference picture index, a motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality is defined.
  • the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit.
  • the prediction tree includes one or a plurality of prediction units obtained by the above-described division.
  • a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”.
  • the sub block is composed of a plurality of pixels.
  • the number of sub-blocks in the prediction unit is one.
  • the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 ⁇ 8 and the sub-block is 4 ⁇ 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
  • the prediction process may be performed for each prediction unit (sub block).
  • Intra prediction is prediction within the same picture
  • inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
  • the division method is encoded by the PU division mode (part_mode) of encoded data, 2Nx2N (same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc.
  • 2NxN and Nx2N indicate 1: 1 symmetrical division
  • 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division.
  • the PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
  • FIG. 2 specifically illustrate the shape of the partition (the position of the boundary of the PU partition) in each PU partition mode.
  • 2A shows a 2Nx2N partition
  • FIGS. 2B, 2C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively.
  • E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition.
  • the horizontal partition and the vertical partition are collectively referred to as a rectangular partition
  • 2Nx2N and NxN are collectively referred to as a square partition.
  • the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined.
  • a transform unit is one or more non-overlapping areas that make up a coding unit.
  • the conversion tree includes one or a plurality of conversion units obtained by the above division.
  • the division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, as in the case of the CU division described above.
  • Conversion processing is performed for each conversion unit.
  • the prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1.
  • the prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used.
  • flag indicating whether or not it is XX when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • flag when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • other values can be used as true values and false values in an actual apparatus or method.
  • Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, There is a difference vector mvdLX.
  • the reference picture list is a list including reference pictures stored in the reference picture memory 306.
  • FIG. 3 is a conceptual diagram illustrating an example of a reference picture and a reference picture list.
  • a rectangle is a picture
  • an arrow is a picture reference relationship
  • a horizontal axis is time
  • I, P, and B in the rectangle are intra pictures
  • uni-predictive pictures bi-predictive pictures
  • numbers in the rectangles are decoded. Indicates the order.
  • the decoding order of pictures is I0, P1, B2, B3, and B4
  • the display order is I0, B3, B2, B4, and P1.
  • FIG. 3B shows an example of the reference picture list.
  • the reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists.
  • the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1.
  • the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements.
  • refIdxLX the reference picture index
  • the figure shows an example in which reference pictures P1 and B2 are referenced by refIdxL0 and refIdxL1.
  • the prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode.
  • the merge flag merge_flag is a flag for identifying these.
  • the merge prediction mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs.
  • the AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data.
  • the motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.
  • the inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate that reference pictures managed by the reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction).
  • PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used.
  • the prediction vector index mvp_LX_idx is an index indicating a prediction vector
  • the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list.
  • LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.
  • the merge index merge_idx is an index that indicates whether one of the prediction parameter candidates (merge candidates) derived from the processed PU is used as the prediction parameter of the decoding target PU.
  • the motion vector mvLX indicates a shift amount between blocks on two different pictures.
  • a prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
  • Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.
  • the flag biPred as to whether it is a bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.
  • the flag biPred can also be derived depending on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following formula.
  • FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment.
  • the image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely.
  • a quantization / inverse DCT unit 311 and an addition unit 312 are included.
  • the prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304.
  • the predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
  • the entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements).
  • the separated codes include prediction information for generating a prediction image and residual information for generating a difference image.
  • the entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302.
  • Some of the separated codes are, for example, a prediction mode predMode, a PU partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX.
  • Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302.
  • the entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311.
  • the quantization coefficient is a coefficient obtained by performing quantization by performing DCT (Discrete Cosine Transform) on the residual signal in the encoding process.
  • the inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301.
  • the inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.
  • the intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 on the basis of the code input from the entropy decoding unit 301 and decodes the intra prediction parameter.
  • the intra prediction parameter is a parameter used in a process of predicting a 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 it in the prediction parameter memory 307.
  • the intra prediction parameter decoding unit 304 may derive different intra prediction modes for luminance and color difference.
  • the intra prediction parameter decoding unit 304 decodes the luminance prediction mode IntraPredModeY as the luminance prediction parameter and the color difference prediction mode IntraPredModeC as the color difference prediction parameter.
  • the luminance prediction mode IntraPredModeY is a 35 mode, and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 34).
  • the color difference prediction mode IntraPredModeC uses one of the planar prediction (0), the DC prediction (1), the direction prediction (2 to 34), and the LM mode (35).
  • the intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode. If the flag indicates that the mode is the same as the luminance mode, IntraPredModeC is assigned to IntraPredModeC and the flag is If the mode is different from the mode, planar prediction (0), DC prediction (1), direction prediction (2 to 34), and LM mode (35) may be decoded as IntraPredModeC.
  • the loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.
  • the prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, 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 separated by the entropy decoding unit 301. .
  • the stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
  • the prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture (reference picture block) from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a PU or sub-block using the input prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode.
  • the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture to perform prediction of the PU by inter prediction. Is generated.
  • the inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1.
  • the reference picture block at the position indicated by mvLX is read from the reference picture memory 306.
  • the inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a 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.
  • a reference picture block is a set of pixels on a reference picture (usually called a block because it is a rectangle), and is an area that is referred to in order to generate a predicted image of a PU or sub-block.
  • reference block it is also simply referred to as “reference block”.
  • the intra predicted image generation unit 310 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded.
  • the predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode.
  • the raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
  • the intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU.
  • the intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
  • the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY.
  • Prediction image of luminance PU is generated by any of prediction (2 to 34), and planar prediction (0), DC prediction (1), direction prediction (2 to 34), LM mode according to color difference prediction mode IntraPredModeC
  • a predicted image of the color difference PU is generated by any of (35).
  • the inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficient input from the entropy decoding unit 301 to obtain a DCT coefficient.
  • the inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal.
  • the inverse quantization / inverse DCT unit 311 outputs the calculated 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 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311 for each pixel, Generate a decoded PU image.
  • the adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td in which the generated decoded image of the PU is integrated for each picture to the outside.
  • FIG. 12 is a schematic diagram illustrating a configuration of the inter prediction parameter decoding unit 303 according to the present embodiment.
  • the inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit 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 control unit 3031 instructs the entropy decoding unit 301 to decode a code (syntax element) related to inter prediction, and a code (syntax element) included in the encoded data, for example, PU partition mode part_mode , Merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and difference vector mvdLX are extracted.
  • the inter prediction parameter decoding control unit 3031 first extracts a merge flag merge_flag.
  • the inter prediction parameter decoding control unit 3031 expresses that a certain syntax element is to be extracted, it means that the entropy decoding unit 301 is instructed to decode a certain syntax element, and the corresponding syntax element is read from the encoded data. To do.
  • the inter prediction parameter decoding control unit 3031 uses the entropy decoding unit 301 to extract the AMVP prediction parameter from the encoded data.
  • AMVP prediction parameters include an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX.
  • the AMVP prediction parameter derivation unit 3032 derives a prediction vector mvpLX from the prediction vector index mvp_LX_idx. Details will be described later.
  • the inter prediction parameter decoding control unit 3031 outputs the difference vector mvdLX to the addition unit 3035.
  • the adding unit 3035 adds the prediction vector mvpLX and the difference vector mvdLX to derive a motion vector.
  • the inter prediction parameter decoding control unit 3031 extracts the merge index merge_idx as a prediction parameter related to merge prediction.
  • the inter prediction parameter decoding control unit 3031 outputs the extracted merge index merge_idx to the merge prediction parameter derivation unit 3036 (details will be described later), and outputs the sub-block prediction mode flag subPbMotionFlag to the sub-block prediction parameter derivation unit 3037.
  • the subblock prediction parameter deriving unit 3037 divides the PU into a plurality of subblocks according to the value of the subblock prediction mode flag subPbMotionFlag, and derives a motion vector in units of subblocks.
  • the prediction block is predicted in units of blocks as small as 4x4 or 8x8.
  • a sub-block prediction mode is used for a method in which a CU is divided into a plurality of partitions (PUs such as 2NxN, Nx2N, and NxN) and the syntax of prediction parameters is encoded in units of partitions. Since a plurality of sub-blocks are grouped into a set and the syntax of the prediction parameter is encoded for each set, motion information of a large number of sub-blocks can be encoded with a small amount of code.
  • FIG. 7 is a schematic diagram illustrating the configuration of the merge prediction parameter deriving unit 3036 according to the present embodiment.
  • the merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361, a merge candidate selection unit 30362, and a merge candidate storage unit 30363.
  • the merge candidate storage unit 30363 stores the merge candidates input from the merge candidate derivation unit 30361.
  • the merge candidate includes a prediction list use flag predFlagLX, a motion vector mvLX, and a reference picture index refIdxLX.
  • an index is assigned to the stored merge candidate according to a predetermined rule.
  • the merge candidate derivation unit 30361 derives a merge candidate using the motion vector of the adjacent PU that has already been decoded and the reference picture index refIdxLX as they are.
  • merge candidates may be derived using affine prediction. This method is described in detail below.
  • the merge candidate derivation unit 30361 may use affine prediction for a spatial merge candidate derivation process, a temporal merge candidate derivation process, a combined merge candidate derivation process, and a zero merge candidate derivation process described later. Affine prediction is performed in units of sub-blocks, and prediction parameters are stored in the prediction parameter memory 307 for each sub-block. Alternatively, the affine prediction may be performed on a pixel basis.
  • the merge candidate derivation unit 30361 reads and reads the prediction parameters (prediction list use flag predFlagLX, motion vector mvLX, reference picture index refIdxLX) stored in the prediction parameter memory 307 according to a predetermined rule.
  • the predicted parameters are derived as merge candidates.
  • the prediction parameter to be read is a prediction parameter related to each of the PUs within a predetermined range from the decoding target PU (for example, all or part of the PUs in contact with the lower left end, the upper left end, and the upper right end of the decoding target PU, respectively). is there.
  • the merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  • the merge candidate derivation unit 30361 reads the prediction parameter of the PU in the reference image including the lower right coordinate of the decoding target PU from the prediction parameter memory 307 and sets it as a merge candidate.
  • the reference picture designation method may be, for example, the reference picture index refIdxLX designated in the slice header, or may be designated using the smallest reference picture index refIdxLX of the PU adjacent to the decoding target PU.
  • the merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  • the merge candidate derivation unit 30361 uses two different derived merge candidate motion vectors and reference picture indexes already derived and stored in the merge candidate storage unit 30363 as the motion vectors of L0 and L1, respectively. Combined merge candidates are derived by combining them. The merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  • the merge candidate derivation unit 30361 derives a merge candidate in which the reference picture index refIdxLX is 0 and both the X component and the Y component of the motion vector mvLX are 0.
  • the merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  • the merge candidate selection unit 30362 selects, from the merge candidates stored in the merge candidate storage unit 30363, a merge candidate to which an index corresponding to the merge index merge_idx input from the inter prediction parameter decoding control unit 3031 is assigned. As an inter prediction parameter.
  • the merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs it to the prediction image generation unit 308.
  • FIG. 8 is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment.
  • the AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033, a vector candidate selection unit 3034, and a vector candidate storage unit 3035.
  • the vector candidate derivation unit 3033 reads the already processed PU motion vector mvLX stored in the prediction parameter memory 307 based on the reference picture index refIdx, derives a prediction vector candidate, and sends the prediction vector candidate to the vector candidate storage unit 3035. Store in candidate list mvpListLX [].
  • the vector candidate selection unit 3034 selects the motion vector mvpListLX [mvp_LX_idx] indicated by the prediction vector index mvp_LX_idx from the prediction vector candidates in the prediction vector candidate list mvpListLX [] as the prediction vector mvpLX.
  • the vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3035.
  • a prediction vector candidate is a PU for which decoding processing has been completed, and is derived by scaling a motion vector of a PU (for example, an adjacent PU) within a predetermined range from the decoding target PU.
  • the adjacent PU includes a PU that is spatially adjacent to the decoding target PU, for example, the left PU and the upper PU, and an area that is temporally adjacent to the decoding target PU, for example, the same position as the decoding target PU. It includes areas obtained from prediction parameters of PUs with different times.
  • 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 control unit 3031 to calculate a motion vector mvLX.
  • the adding unit 3035 outputs the calculated motion vector mvLX to the predicted image generation unit 308 and the prediction parameter memory 307.
  • FIG. 11 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 309 included in the predicted image generation unit 308 according to the present embodiment.
  • the inter prediction image generation unit 309 includes a motion compensation unit (prediction image generation device) 3091 and a weight prediction unit 3094.
  • the motion compensation unit 3091 receives the reference picture index refIdxLX from the reference picture memory 306 based on the inter prediction parameters (prediction list use flag predFlagLX, reference picture index refIdxLX, motion vector mvLX) input from the inter prediction parameter decoding unit 303.
  • an interpolation image motion compensation image
  • a motion compensation image is generated by reading out a block at a position shifted by the motion vector mvLX starting from the position of the decoding target PU.
  • a motion compensation image is generated by applying a filter for generating a pixel at a decimal position called a motion compensation filter.
  • the weight prediction unit 3094 generates a prediction image of the PU by multiplying the input motion compensation image predSamplesLX by a weight coefficient.
  • the input motion compensated image predSamplesLX (LX is L0 or L1) is represented by the number of pixel bits bitDepth The following equation is processed to match
  • predSamples [X] [Y] Clip3 (0, (1 ⁇ bitDepth)-1, (predSamplesLX [X] [Y] + offset1) >> shift1)
  • shift1 14 ⁇ bitDepth
  • offset1 1 ⁇ (shift1-1).
  • predSamples [X] [Y] Clip3 (0, (1 ⁇ bitDepth)-1, (predSamplesL0 [X] [Y] + predSamplesL1 [X] [Y] + offset2) >> shift2)
  • shift2 15-bitDepth
  • offset2 1 ⁇ (shift2-1).
  • the weight prediction unit 3094 when performing weight prediction, derives the weight prediction coefficient w0 and the offset o0 from the encoded data, and performs the processing of the following equation.
  • predSamples [X] [Y] Clip3 (0, (1 ⁇ bitDepth)-1, ((predSamplesLX [X] [Y] * w0 + 2 ⁇ (log2WD-1)) >> log2WD) + o0)
  • log2WD is a variable indicating a predetermined shift amount.
  • the weight prediction unit 3094 when performing weight prediction, derives weight prediction coefficients w0, w1, o0, o1 from the encoded data, and performs the processing of the following equation.
  • predSamples [X] [Y] Clip3 (0, (1 ⁇ bitDepth)-1, (predSamplesL0 [X] [Y] * w0 + predSamplesL1 [X] [Y] * w1 + ((o0 + o1 + 1) ⁇ log2WD)) >> (log2WD + 1)) ⁇ Motion vector decoding process> Below, with reference to FIG. 9, the motion vector decoding process which concerns on this embodiment is demonstrated concretely.
  • the motion vector decoding process includes a process of decoding syntax elements related to inter prediction (also referred to as motion syntax decoding process) and a process of deriving a motion vector ( Motion vector derivation process).
  • FIG. 9 is a flowchart illustrating a flow of inter prediction syntax decoding processing performed by the inter prediction parameter decoding control unit 3031. In the following description of FIG. 9, each process is performed by the inter prediction parameter decoding control unit 3031 unless otherwise specified.
  • merge_flag! 0 is true (Y in S102)
  • the merge index merge_idx is decoded in S103, and the motion vector derivation process (S111) in the merge prediction mode is executed.
  • inter_pred_idc is other than PRED_L1 (PRED_L0 or PRED_BI)
  • the reference picture index refIdxL0, the difference vector parameter mvdL0, and the prediction vector index mvp_L0_idx are decoded in S105, S106, and S107, respectively.
  • inter_pred_idc is other than PRED_L0 (PRED_L1 or PRED_BI)
  • the reference picture index refIdxL1 is decoded in S108, S109, and S110.
  • a motion vector derivation process (S112) in the AMVP mode is executed.
  • FIG. 4 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment.
  • the image encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory.
  • the prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
  • the predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture.
  • the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111.
  • the prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction.
  • the predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point.
  • the prediction parameter is, for example, an intra prediction mode.
  • a pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated.
  • the predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block.
  • the predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
  • FIG. 6 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 1011 included in the predicted image generation unit 101.
  • the inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112. Since the motion compensation unit 10111 and the weight prediction unit 10112 have the same configurations as the motion compensation unit 3091 and the weight prediction unit 3094 described above, description thereof is omitted here.
  • the predicted image generation unit 101 generates a predicted image P of the PU based on the pixel value of the reference picture (reference picture block) read from the reference picture memory, using the parameter input from the prediction parameter encoding unit.
  • the predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
  • the subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal.
  • the subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103.
  • the DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 and calculates a DCT coefficient.
  • the DCT / quantization unit 103 quantizes the calculated DCT coefficient to obtain a quantization coefficient.
  • the DCT / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
  • the entropy encoding unit 104 receives the quantization coefficient from the DCT / quantization unit 103 and receives the encoding parameter from the prediction parameter encoding unit 111.
  • Examples of input encoding parameters include codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.
  • the entropy encoding unit 104 generates an encoded stream Te by entropy encoding the input quantization coefficient and encoding parameter, and outputs the generated encoded stream Te to the outside.
  • the inverse quantization / inverse DCT unit 105 inversely quantizes the quantization coefficient input from the DCT / quantization unit 103 to obtain a DCT coefficient.
  • the inverse quantization / inverse DCT unit 105 performs inverse DCT on the obtained DCT coefficient to calculate a residual signal.
  • the inverse quantization / inverse DCT unit 105 outputs the calculated residual signal to the addition unit 106.
  • the addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel, and performs decoding. Generate an image.
  • the adding unit 106 stores the generated decoded image in the reference picture memory 109.
  • the loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
  • SAO sample adaptive offset
  • ALF adaptive loop filter
  • the prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
  • the encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters.
  • the encoding parameter is a parameter to be encoded that is generated in association with the above-described prediction parameter or the prediction parameter.
  • the predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
  • the encoding parameter determination unit 110 calculates a cost value indicating the amount of information and the encoding error for each of a plurality of sets.
  • the cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient ⁇ .
  • the code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter.
  • the square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102.
  • the coefficient ⁇ is a real number larger than a preset zero.
  • the encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated cost value.
  • the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters.
  • the encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
  • the prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101.
  • the parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
  • the inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110.
  • the inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters.
  • Some of the configurations are the same as the configuration to be performed. The configuration of the inter prediction parameter encoding unit 112 will be described later.
  • the intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
  • a format for example, MPM_idx, rem_intra_luma_pred_mode
  • the inter prediction parameter encoding unit 112 is a unit corresponding to the inter prediction parameter decoding unit 303 in FIG. 12, and the configuration is shown in FIG.
  • the inter prediction parameter encoding unit 112 includes an inter prediction parameter encoding control unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, a sub-block prediction parameter derivation unit 1125, and a partition mode derivation unit and a merge flag derivation unit (not shown).
  • An inter prediction identifier deriving unit, a reference picture index deriving unit, a vector difference deriving unit, etc., and a split mode deriving unit, a merge flag deriving unit, an inter prediction identifier deriving unit, a reference picture index deriving unit, and a vector difference deriving unit Respectively derive a PU partition mode part_mode, a merge flag merge_flag, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, and a difference vector mvdLX.
  • the inter prediction parameter encoding unit 112 outputs the motion vector (mvLX, subMvLX), the reference picture index refIdxLX, the PU partition mode part_mode, the inter prediction identifier inter_pred_idc, or information indicating these to the prediction image generating unit 101. Also, the inter prediction parameter encoding unit 112 entropy PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX, sub-block prediction mode flag subPbMotionFlag. The data is output to the encoding unit 104.
  • the inter prediction parameter encoding control unit 1121 includes a merge index deriving unit 11211 and a vector candidate index deriving unit 11212.
  • the merge index derivation unit 11211 compares the motion vector and reference picture index input from the encoding parameter determination unit 110 with the motion vector and reference picture index of the merge candidate PU read from the prediction parameter memory 108, and performs merge An index merge_idx is derived and output to the entropy encoding unit 104.
  • a merge candidate is a reference PU (for example, a reference PU that touches the lower left end, upper left end, and upper right end of the encoding target block) within a predetermined range from the encoding target CU to be encoded.
  • the PU has been processed.
  • the vector candidate index deriving unit 11212 derives a prediction vector index mvp_LX_idx.
  • the sub-block prediction parameter derivation unit 1125 includes any of spatial sub-block prediction, temporal sub-block prediction, affine prediction, and matching prediction according to the value of subPbMotionFlag.
  • a motion vector and a reference picture index for subblock prediction are derived. As described in the description of the image decoding apparatus, the motion vector and the reference picture index are derived by reading out the motion vector and the reference picture index such as the adjacent PU and the reference picture block from the prediction parameter memory 108.
  • the AMVP prediction parameter derivation unit 1122 has the same configuration as the AMVP prediction parameter derivation unit 3032 (see FIG. 12).
  • the motion vector mvLX is input from the encoding 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. Note that the reference picture index refIdx and the prediction vector index mvp_LX_idx are output to the entropy encoding unit 104.
  • 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 entropy encoding unit 104.
  • the weighting factor is derived according to the reference block parameter representing the feature of the reference block.
  • FIG. 16 is a schematic diagram illustrating a detailed configuration of the inter prediction parameter decoding unit 303 of the prediction parameter decoding unit 302 of the image decoding device 31 illustrated in FIG. 5 and the inter prediction image generation unit 309 illustrated in FIG.
  • the inter prediction parameter decoding unit 303 includes a weight index decoding unit 3038, a reference block parameter derivation unit 3039, and a weight coefficient derivation unit 3030.
  • the weight index decoding unit 3038 decodes the weight index weightIdx from the encoded data supplied by the entropy decoding unit 301.
  • the decoded weight index weightIdx is supplied to the weight coefficient deriving unit 3030.
  • the weight index weightIdx is an index that is referred to in order to derive a bi-prediction weight coefficient.
  • the reference block parameter deriving unit 3039 refers to the prediction parameter memory 307 and derives the reference block parameter of the reference block.
  • the reference block parameter is derived from reference block information (for example, POC (Picture Order Count) of a reference picture, a motion vector to the reference block, a quantization parameter (QP)) of the reference block. It is a parameter and is referenced to generate a predicted image. More specifically, the reference block parameter may be referred to in order to derive a weight candidate list described later.
  • reference block parameter deriving unit 3039 derives the reference block parameters Xval0 and Xval1 will be described.
  • the reference block parameter Xval0 (first reference block parameter) is a parameter determined according to the POC of a picture including a reference block L0 (first reference block) described later and the POC of a picture including the target block. Yes, it is the absolute value of the difference between the POC of the picture including the reference block L0 and the POC of the picture including the target block.
  • the reference block parameter Xval1 (second reference block parameter) is a parameter determined according to the POC of a picture including a reference block L1 (second reference block) to be described later and the POC of a picture including the target block. This is the absolute value of the difference between the POC of the picture containing L1 and the POC of the picture containing the target block.
  • the POC is a value indicating a temporal order of a picture including a reference block or a picture including a target block, and is used for deriving a parameter indicating the priority of the reference block in the present application.
  • the reference block parameter deriving unit 3039 derives a value (reference block index) fIdx indicating the characteristics of the reference block according to the reference block parameters Xval0 and Xval1.
  • the derived reference block index fIdx is supplied to the weighting factor deriving unit 3030.
  • the reference block index fIdx is an index that is referred to in order to derive a weight candidate list to be described later.
  • the weighting factor deriving unit 3030 derives the weighting factor w from the weighting index weightIdx and the reference block index fIdx.
  • the weight coefficient w is a coefficient for obtaining a value to be multiplied to the motion compensated image in the weight prediction.
  • FIG. 17 is a schematic diagram illustrating a configuration of the weight coefficient deriving unit 3030 of the inter prediction parameter decoding unit 303 illustrated in FIG.
  • the weighting factor derivation unit 3030 includes a weight candidate list derivation unit 30301 and a weighting factor selection unit 30302.
  • the weight candidate list deriving unit 30301 derives a weight candidate list weightCandList from the reference block index fIdx supplied by the reference block parameter deriving unit 3039.
  • the derived weight candidate list weightCandList is supplied to the weight coefficient selection unit 30302.
  • the weight candidate list weightCandList is a list having a plurality of weighting factors w as elements.
  • the weight coefficient selection unit 30302 derives the weight coefficient w according to the weight candidate list weightCandList and the weight index weightIdx.
  • the derived weight coefficient w is supplied to the weight prediction unit 3094.
  • FIG. 18 is a flowchart showing operations of the inter prediction parameter decoding unit 303 and the inter prediction image generation unit 309 shown in FIG. As shown in FIG. 18, the operations of the inter prediction parameter decoding unit 303 and the inter prediction image generation unit 309 include steps S1 to S4. Step S3 includes steps S31 and S32.
  • the weight index decoding unit 3038 decodes the weight index weightIdx.
  • Reference blocks that the motion compensation unit 3091 refers to when deriving the motion compensated images predSamplesL0 and predSamplesL1 are referred to as a reference block L0 and a reference block L1, respectively.
  • the reference block parameter derivation unit 3039 derives the reference block parameter Xval0 of the reference block L0 and the reference block parameter Xval1 of the reference block L1 (the derivation method is “X: derivation of reference block parameter, similarity, and priority” described later) Method ”).
  • the reference block parameter is a parameter indicating the priority of the reference block, and is derived from the POC, the motion vector, the quantization parameter, and the like.
  • the reference block parameters can also be called temporal distance, dissimilarity (similarity), and priority.
  • the reference block parameter deriving unit 3039 derives reference block parameters Xval0 and Xval1 by the following equation.
  • Xval0
  • Xval1
  • refPic1 Picture of reference block L1
  • the reference block parameter deriving unit 3039 derives a reference block index fIdx according to the reference block parameters Xval0 and Xval1 (refer to “F: Reference block index fIdx derivation method” described later for the derivation method).
  • FIG. 19 is a conceptual diagram showing a correspondence relationship between the reference block parameters Xval0 and Xval1 and the reference block index fIdx in step S2 of the operation shown in FIG.
  • the reference block parameter deriving unit 3039 derives the reference block index fIdx by the following equation using the correspondence shown in FIG.
  • the weight candidate list derivation unit 30301 derives a weight candidate list according to the reference block parameters Xval0 and Xval1 (step S31).
  • the weight coefficient selection unit 30302 derives the weight coefficient w from the weight index weightIdx decoded by the weight index decoding unit 3038 and the weight candidate list derived by the weight candidate list deriving unit 30301 (step S32).
  • the “ordered set of elements” is called a list (weight candidate list), but may be called a table (weight candidate table).
  • the weight candidate list derivation unit may be referred to as a weight candidate table derivation unit.
  • the elements of the weight candidate list are weight coefficients, and the coefficients are arranged in the order of priority (as shown in “Modified
  • the weight candidate list deriving unit 30301 may derive the weight candidate list weightCandListW by referring to the table as follows. That is, the weighting factor table weightCandListW is derived by referring to the weight candidate list table weightCandListWTable [] [] with fIdx.
  • the table can also be described as follows.
  • the weight coefficient selection unit 30302 derives the weight coefficient w by the following equation.
  • the element e of the weight candidate list is a weighting coefficient (for example, any of e ⁇ ⁇ -2,2,3,4,5,6,10 ⁇ ). May be a parameter (index) indicating a weighting factor. For example, e is any one of 0 to 6.
  • the weight candidate list deriving unit 30301 selects one of the weight candidate list tables weightCandListITable [0] to weightCandListITable [5] as the weight candidate list according to the reference block index fIdx.
  • the weight candidate list deriving unit 30301 derives a weight candidate list weightCandListI by the following equation.
  • weightCandListI weightCandListITable [fIdx]
  • the weight coefficient selection unit 30302 derives a parameter (here, posIdx) indicating the weight coefficient from the weight candidate list weightCandListI selected by the reference block parameter fIdx and the weight index weightIdx.
  • a parameter here, posIdx
  • posIdx weightCandListI [weightIdx]
  • the parameter posIdx indicating the weighting factor is the position posIdx of the weighting factor table weightTable that is a table of weighting factors.
  • the weighting factor selection unit 30302 derives the weighting factor w from the weighting factor table weightTable and the parameter posIdx by the following equation.
  • w weightTable [posIdx]
  • the weight prediction unit 3094 generates predicted images predSamples from the weighted average of the two motion compensated images predSamplesL0 and predSamplesL1 according to the weighting factor w derived by the weighting factor deriving unit 3030.
  • the weight prediction unit 3094 generates predicted images predSamples as in the following equation.
  • shiftWP is a shift value for treating the weighting coefficient as an integer.
  • shiftWP is a unit of weighting factor. For example, 5 (in this case, 1/32 unit weight coefficient) is used as shiftWP.
  • the method for calculating w0 and w1 may be as follows.
  • the right shift by shiftWP may not be performed here, but may be performed in a subsequent process.
  • the following calculation is performed.
  • predSamples [x] [y] (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset)
  • a small shift may be performed using a predetermined number M less than shiftWP, and adjustment may be performed by shifting rightward by M again in the subsequent stage. In this case, the following calculation is performed.
  • predSamples [x] [y] (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset) >> (shiftWP-M) (A1: Effect of derivation of weighting factors considering characteristics of reference block)
  • shiftWP-M (A1: Effect of derivation of weighting factors considering characteristics of reference block)
  • the above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
  • the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited.
  • a list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
  • FIG. 20 is a schematic diagram showing a configuration of a weighting factor deriving unit 3030a different from the weighting factor deriving unit 3030 shown in FIG.
  • the weighting factor deriving unit 3030a is different from the weighting factor deriving unit 3030 in that it further includes a weighting factor correcting unit 30303.
  • the weighting factor deriving unit 3030 can be replaced with a weighting factor deriving unit 3030a.
  • the weighting factor selection unit 30302 derives the weighting factor w and supplies it to the weighting factor correction unit 30303.
  • the weighting coefficient correction unit 30303 corrects the weighting coefficient w and supplies it to the weight prediction unit 3094.
  • FIG. 21 is a conceptual diagram showing the correspondence between reference block parameters Xval0 and Xval1 and the reference block index fIdx, which is different from the correspondence shown in FIG.
  • the reference block index fIdx is 0 or 1, and is determined only by the magnitude relationship between the reference block parameters Xval0 and Xval1.
  • fIdx 0
  • ⁇ including an equal sign can be used for the comparison of the magnitude relation.
  • ⁇ and ⁇ can be used. The same applies hereinafter.
  • the weight candidate list deriving unit 30301 derives a weight candidate list (weight coefficient table) weightTable.
  • the weight candidate list is derived without depending on the reference block parameters Xval0 and Xval1 and the reference block index fIdx.
  • weightTable [] ⁇ 4, 3, 5, 2, 6, -2, 10 ⁇
  • the weighting factor selection unit 30302 derives the weighting factor w from the weighting factor table weightTable and the parameter weightIdx by the following equation.
  • w weightTable [weightIdx] ⁇ Step S4 in A2>
  • the weighting factor correction unit 30303 updates the weighting factor w according to the reference block index fIdx.
  • the weight coefficient is used as it is.
  • the weight w0 first weight of the motion compensated image predSamplesL0 (first motion compensated image)
  • the weight w1 (second weight) of the motion compensated image predSamplesL1 (second motion compensated image) are swapped.
  • the value of w is updated by the following equation.
  • w (1 ⁇ shiftWP)-w
  • the weights w0 and w1 are swapped by the following equation.
  • tmp is a temporary variable used for swapping the weights w0 and w1.
  • swap is a function that takes weights w0 and w1 as arguments and returns two values obtained by swapping weights w0 and w1.
  • (w0, w1) swap (w0, w1)
  • the weighting factors w0 and w1 obtained from the weighting factor w will be referred to as weights w0 and w1.
  • the weighting factor can be derived by a normal method (a method that does not depend on the reference block parameter), and then the weighting factor can be updated according to the reference block parameter.
  • the swap is one method for updating the weighting factor.
  • the weight coefficient can be encoded with a small weight index. This produces an effect of reducing the code amount of the weight index.
  • the above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
  • the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited.
  • a list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
  • FIG. 22 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit 303b and an inter prediction image generation unit 309 different from the inter prediction parameter decoding unit 303 illustrated in FIG.
  • the inter prediction parameter decoding unit 303b is different from the inter prediction parameter decoding unit 303 in the following points.
  • Reference block parameter deriving unit 3039 is a reference block parameter deriving unit 3039b.
  • the weight coefficient deriving unit 3030 is a weight coefficient deriving unit 3030b.
  • the value that the reference block parameter deriving unit 3039b supplies to the weighting factor deriving unit 3030b is the prediction weighting factor wpIdx.
  • the inter prediction parameter decoding part 303 can be replaced with the inter prediction parameter decoding part 303b.
  • the reference block parameter deriving unit 3039b refers to the prediction parameter memory 307, derives reference block parameters Xval0 and Xval1 of the reference block, and further indicates a value (prediction weight coefficient) indicating the characteristics of the reference block according to the reference block parameters Xval0 and Xval1.
  • Derive wpIdx The derived prediction weight coefficient wpIdx is supplied to the weight coefficient deriving unit 3030b.
  • the prediction weight coefficient wpIdx is a coefficient referred to in order to derive a weight candidate list described later.
  • the weighting factor deriving unit 3030b derives the weighting factor w from the weighting index weightIdx and the prediction weighting factor wpIdx.
  • FIG. 23 is a schematic diagram illustrating a configuration of the weight coefficient deriving unit 3030b of the inter prediction parameter decoding unit 303b illustrated in FIG.
  • the weighting factor deriving unit 3030b includes a weight candidate list deriving unit 30301b and a weighting factor selecting unit 30302.
  • the weight candidate list deriving unit 30301b derives a weight candidate list weightCandList from the prediction weight coefficient wpIdx supplied by the reference block parameter deriving unit 3039b.
  • FIG. 24 is a conceptual diagram showing a correspondence relationship between the reference block parameters Xval0 and Xval1 and the predicted value of the weighting coefficient (predicted weighting coefficient) wpIdx in step S2 of the operation shown in FIG.
  • the reference block parameter deriving unit 3039b derives a prediction weight coefficient wpIdx by the following equation using the correspondence shown in FIG.
  • the weight candidate list deriving unit 30301b derives a weight candidate list weightCandListW according to the prediction weight coefficient wpIdx.
  • the weight coefficient selection unit 30302 derives the weight coefficient w from the weight candidate list weightCandListW and the weight index weightIdx as in the following equation.
  • weighting factor deriving unit 3030b may derive the weight candidate list weightCandListW by referring to the table as follows. That is, the weight candidate list weightCandListW is derived by referring to the weight candidate list table weightCandListWTable [] [] with wpIdx.
  • the reference block parameter deriving unit 3039b may derive the reference block parameters Xval0 and Xval1, and may derive the prediction weight coefficient wpIdx according to the reference block parameters Xval0 and Xval1, as in the following equation.
  • the weight candidate list deriving unit 30301b may derive a weight candidate list weightCandListI having elements of an order index representing the order of the weight coefficients, as in the following equation, according to the prediction weight coefficient wpIdx.
  • the weight coefficient selection unit 30302 derives a parameter (here, posIdx) indicating a weight coefficient from the weight candidate list weightCandListI [wpIdx] and the weight index weightIdx by the following equation.
  • posIdx weightCandListI [wpIdx] [weightIdx]
  • the weight coefficient selection unit 30302 derives the weight coefficient w from the weight coefficient table weightTable and the parameter posIdx indicating the weight coefficient by the following equation.
  • w weightTable [posIdx]
  • the prediction weight coefficient can be derived from the reference block parameter, and the weight coefficient can be derived according to the derived prediction weight coefficient. More specifically, a weight candidate list can be derived according to the derived prediction weight coefficient. Accordingly, a list in which weighting factors are arranged in descending order of selection probability can be derived according to the ratio of the temporal distance between the target picture and the reference image.
  • the above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
  • the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited.
  • a list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
  • X Reference block parameter, similarity, and priority derivation method
  • Xval0 and Xval1 a method for deriving the reference block parameters Xval0 and Xval1 will be described. Since the weight coefficient w of the weight prediction tends to decrease as the distance between the reference picture including the reference block multiplied by the weight coefficient w and the target picture increases (dissimilarity increases), the reference block and the target A parameter corresponding to the temporal distance (dissimilarity) with the block can be used to derive the weighting factor w. Further, since the weighting factor w tends to decrease as the image quality of the reference block improves, a parameter corresponding to the image quality of the reference block can be used.
  • the reference block parameter Xval0 is derived from the absolute value of the difference between the POC of the reference picture refPic0 including the reference block L0 and the POC of the picture currPic including the target block. Further, the reference block parameter Xval1 is derived from the absolute value of the difference between the POC of the reference picture refPic1 including the reference block L1 and the POC of the picture currPic.
  • Xval0
  • Xval1
  • Xval0 PicOrderCount (refPic0)-PicOrderCount (currPic)
  • Xval1 PicOrderCount (refPic1)-PicOrderCount (currPic)
  • the left side and the right side in the case of calculating the POC difference as in the following expression may be interchanged.
  • Xval0 PicOrderCount (refPic0)-PicOrderCount (currPic)
  • Xval1 PicOrderCount (currPic)-PicOrderCount (refPic1)
  • a predetermined constant D may be added to the absolute value in order to calculate the ratio between the reference block parameters Xval0 and Xval1 as a relatively small value as in the following equation.
  • Xval0
  • Xval1
  • the absolute value may be subtracted from a predetermined constant as in the following equation.
  • Xval0 D-(
  • Xval1 D-(
  • the reference block parameter Xval0 may be derived from the difference between the POC of the current picture and the POC of one reference picture
  • the reference block parameter Xval1 may be derived from the POC difference between the reference pictures.
  • Xval0 PicOrderCount (refPic0)-PicOrderCount (currPic)
  • Xval1 PicOrderCount (refPic1)-PicOrderCount (refPic0)
  • Motion vector length reference block parameter> A reference block parameter is derived from the motion vector length mvL0 that is the length of the motion vector from the target block to the reference block L0 and the motion vector length mvL1 that is the length of the motion vector from the target block to the reference block L1. At this time, it may be derived from the sum of the absolute value of the horizontal direction component (mvLX [0]) and the absolute value of the vertical direction component (mvLX [1]) as in the following equation.
  • X in mvLX [] is 0 or 1.
  • Xval0
  • Xval1
  • a predetermined constant D may be added to the sum as follows.
  • Xval0
  • Xval1
  • the sum may be subtracted from a predetermined constant D as follows.
  • Quantization coefficient reference block parameter> A reference block parameter (priority) is derived from the quantization parameter qpL0 of the reference block L0 and the quantization parameter qpL1 of the reference block L1.
  • the quantization parameter qpL1 of the reference block L1 is used as the reference block parameter Xval0 of the reference block L0.
  • a predetermined constant D may be added to the quantization parameter as in the following equation.
  • FIdx is derived by repeatedly comparing Xval0 * M and Xval1 * N based on a previously defined set of M and N. If Xval0 * M> Xval1 * N (or Xval0 * M ⁇ Xval1 * N), it can be seen that Xval0 / Xval1> N / M (or Xval0 / Xval1 ⁇ N / M).
  • FIdx is derived according to a value corresponding to Xval1 / (Xval0 + Xval1) (or Xval0 / (Xval0 + Xval1)).
  • fIdx may be derived from the value of Xval0 / (Xval0 + Xval1) using Xval0 as a numerator instead of the value of Xval1 / (Xval0 + Xval1) using Xval1 as a numerator.
  • deom / 2 may be added during division to perform a kind of rounding (round control).
  • FIdx Clip3 (0, K, (K * nume + denom / 2) / denom) [Division method b]
  • FIdx is derived according to the value corresponding to Xval1 / Xval0 (or Xval0 / Xval1).
  • the ratio of Xval0 + Xval1 is derived using Xval0 + Xval1 as the denominator, but in the division method b, the ratio of Xval0 and Xval1 is derived.
  • clipping may be performed between 0 and K as follows.
  • fIdx 0 to K can be derived.
  • fIdx Clip3 (0, K, (K * nume + denom / 2) / denom) ⁇ F2: Bi-prediction based reference block index fIdx derivation>
  • a weighting factor of 1: 1 is used regardless of the ratio of the reference block parameters. There are many cases. Therefore, it is desirable to switch the derivation method of the reference block index fIdx related to the derivation of the weighting coefficient depending on whether the direction of the reference picture is equal to or different from the direction of the target picture.
  • FIG. 25 is a schematic diagram for explaining a bi-prediction-based reference block index fIdx derivation method.
  • An arrow attached with “POC” indicates that the POC of the picture written on the direction side of the arrow is larger than the POC of the picture written on the side opposite to the direction of the arrow. That is, it can be said that the direction of the arrow is the time direction.
  • FIG. 25 (a) shows a situation in which the target picture currPic is between the two reference pictures refPic0 and refPic1 (the two reference pictures are in different time directions as viewed from the target picture).
  • the target picture currPic is at the end, that is, not between the two reference pictures refPic0 and refPic1 (the two reference pictures are the same in the time direction as viewed from the target picture). Means that.
  • fIdx is set to a predetermined value.
  • dirSame (PicOrderCount (refPic0) ⁇ PicOrderCount (currPic) && PicOrderCount (refPic1) ⁇ PicOrderCount (currPic))
  • dirSame (PicOrderCount (refPic0)-PicOrderCount (currPic)) x (PicOrderCount (refPic1)-PicOrderCount (currPic)) ⁇ 0
  • the determination may be made based on whether or not the time directions of the two reference pictures with respect to the target picture are different (! DirSame meaning negation of dirSame). !
  • Weight candidate list (1-2) having a weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 are 1: 1, ) Weighting candidate list deriving unit having a weighting coefficient when the weighting coefficient multiplied by the motion compensated image predSamplesL0 and the weighting coefficient multiplied by the motion compensated image predSamplesL1 are other than 1: 1 as a leading element.
  • the following weight candidate list table may be used.
  • shiftWP 3.
  • the weight coefficient w 4
  • weight candidate list table may be used in the modification of step S3 of the weight candidate list deriving unit 30301.
  • weightTableW for deriving a weight coefficient from a weight index that is an element e of weightCandListITable [] []
  • shiftWP 3 when the weight index is 3
  • weightTableW [] ⁇ -2,2,3,4,5,6,10 ⁇ ⁇ L2: Secondary priority table>
  • the weightCandListWTable [] [] and weightCandListITable [] [] as options include a weight candidate list that satisfies the following conditions (2-1) and (2-2).
  • the weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 is other than 1: 1 1 is set as the head element.
  • the weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 is 1: 1 is the second element from the top.
  • weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
  • w1S Weight coefficient to be multiplied by motion compensation image predSamplesL1 in the weight coefficient selected by the second element (Second) from the top of the weight candidate list
  • weightCandListITable [] [] ⁇ ⁇ 1, 2, 3, 4, 5, 0, 6 ⁇ ⁇ 2, 3, 1, 4, 5, 0, 6 ⁇ //
  • the weight of the first element is not 1: 1 and the weight of the second element is 1: 1 ⁇ 3, 2, 4, 1, 5, 0, 6 ⁇ ⁇ 3, 4, 2, 5, 1, 6, 0 ⁇ ⁇ 4, 3, 5, 2, 1, 6, 0 ⁇ //
  • the weight of the first element is not 1: 1 and the weight of the second element is 1: 1 ⁇ 5, 4, 3, 2, 1, 6, 0 ⁇ ⁇
  • the weight coefficient index is 1: 1.
  • a certain 3 is the second element.
  • weightCandListWTable [] [] and weightCandListITable [] [] preferably include the following weight candidate lists (3-1) and (3-2).
  • (3-1) A weight candidate list that satisfies the following conditions (a) and (b).
  • (A) A weighting factor with which the relationship between the weight w0 multiplied by the motion compensated image predSamplesL0 and the weight w1 multiplied by the motion compensated image predSamplesL1 is w0 ⁇ w1 is set as the leading element.
  • the weighting factor that satisfies the relationship w0 ⁇ w1 is the second element from the top.
  • weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
  • weightCandListWTable [] [] ⁇ ⁇ 2, 3, 4, 5, 6, -2, 10 ⁇ //
  • the relation derived from the first element and the relation derived from the second element are w0 ⁇ w1 (w0F ⁇ w1F && w0S ⁇ w1S ) ⁇ 3, 4, 2, 5, 6, -2, 10 ⁇ ⁇ 4, 3, 5, 2, 6, -2, 10 ⁇ ⁇ 4, 5, 3, 6, 2, 10, -2 ⁇ ⁇ 5, 4, 6, 3, 2, 10, -2 ⁇ ⁇ 6, 5, 4, 3, 2, 10, -2 ⁇ //
  • the relationship derived from the first element and the relationship derived from the second element are w0> w1 (w0F> w1F &&w0S> w1S ) ⁇
  • shiftWP 3.
  • weightCandListITable [] [] ⁇ ⁇ 1, 2, 3, 4, 5, 0, 6 ⁇ //
  • the relation derived from the first element and the relation derived from the second element are w0 ⁇ w1 ⁇ 2, 3, 1, 4, 5, 0, 6 ⁇ ⁇ 3, 2, 4, 1, 5, 0, 6 ⁇ ⁇ 3, 4, 2, 5, 1, 6, 0 ⁇ ⁇ 4, 3, 5, 2, 1, 6, 0 ⁇ ⁇ 5, 4, 3, 2, 1, 6, 0 ⁇ //
  • the relation derived from the first element and the relation derived from the second element are w0> w1 ⁇ ⁇ L4: Highest priority / secondary priority table 2>
  • weightCandListWTable [] [] and weightCandListITable [] [] [] w0F, w1F, w0S, and w1S preferably satisfy w0F ⁇ w0S ⁇ w1S ⁇ w1F.
  • Ww0F ⁇ w0S ⁇ w1S ⁇ w1F is equivalent to the configuration of “L3: Highest priority / secondary priority table 1” (w0Fw ⁇ w1F && w0S ⁇ w1S) with the addition of w0F ⁇ w1S.
  • 0w0F ⁇ w0S ⁇ w1S ⁇ w1F is equivalent to a configuration in which w0F ⁇ > w1S is added to one of the configurations (w0F> w1F && w0S> w1S) of “L3: Highest priority / secondary priority table 1”.
  • weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
  • shiftWP 3.
  • weight candidate list deriving unit 30301 derives a weight candidate list table weightCandListWTable as shown in the following equation.
  • the temporal distance Xval0 between RefPic0 and currPic is the temporal relationship between RefPic1 and currPic. More than a predetermined distance Xval1.
  • the predetermined degree is, for example, half of the temporal distance between RefPic0 and RefPic1.
  • the top element of the weight candidate lists weightCandListWTable [0] [] and weightCandListWTable [1] [] is a weighting coefficient when the weight w0 of RefPic0 is smaller than the weight w1 of RefPic1.
  • the top elements of the weight candidate lists weightCandListWTable [2] [] and weightCandListWTable [3] [] are weight coefficients when the weight w0F of RefPic0 and the weight w1F of RefPic1 are equal (1: 1). .
  • weightCandListWTable [2] [] and weightCandListWTable [3] [] is a weighting factor (4 in this case) with a weight w0S of RefPic0 of 1: 1 when Xval0> Xval1. Is smaller than 3 (here, 3), and when the relationship between Xval0 and Xval1 is Xval0 ⁇ Xval1, the weight w0S of RefPic0 is larger than the weighting factor of 1: 1 (here 4). Then 5).
  • weight candidate lists weightCandListWTable [4] [] and weightCandListWTable [5] [] when fIdx is 4 and 5, the temporal distance Xval0 between RefPic0 and currPic is the temporal distance Xval1 between RefPic1 and currPic. Smaller than the predetermined degree.
  • the top element of the weight candidate lists weightCandListWTable [4] [] and weightCandListWTable [5] [] is a weighting coefficient when the weight of RefPic0 is larger than the weight of RefPic1.
  • the weight candidate list deriving unit 30301 derives a weight candidate list weightCandListW as shown in the following equation.
  • Xval0 is larger than Xval1 by the above-mentioned predetermined degree or more.
  • the head element of the weight candidate list weightCandListW [] is a weighting coefficient when the weight of RefPic0 is smaller than the weight of RefPic1.
  • the leading element of the weight candidate list weightCandListW [] is a weighting coefficient when the weight of RefPic0 and the weight of RefPic1 are equal.
  • the head element of the weight candidate lists weightCandListW [4] [] and weightCandListW [] is a weighting coefficient when the weight of RefPic0 is larger than the weight of RefPic1.
  • the characteristics of the reference block are considered in the decoding process and the encoding process.
  • the present embodiment is different from the first embodiment in that the characteristics of adjacent blocks are considered in each process.
  • FIG. 26 is a schematic diagram illustrating a detailed configuration of the inter prediction parameter decoding unit 303c different from the inter prediction parameter decoding unit 303 illustrated in FIG. 16 and the inter prediction image generation unit 309 illustrated in FIG. 11 in the present embodiment.
  • the inter prediction parameter decoding unit 303c includes a weight index decoding unit 3038, an adjacent base weight candidate list derivation unit 30301c, and a weight coefficient selection unit 30302c.
  • the adjacent base weight candidate list deriving unit 30301c refers to the prediction parameter memory 307 and derives a weight candidate list weightCandList using the weight coefficient (or weight index) of the adjacent block.
  • the weighting coefficient selection unit 30302c derives the weighting coefficient w according to the weight candidate list weightCandList and the weight index weightIdx.
  • FIG. 27 is a flowchart showing operations of the inter prediction parameter decoding unit 303c and the inter prediction image generation unit 309 shown in FIG. As illustrated in FIG. 27, the operations of the inter prediction parameter decoding unit 303c and the inter prediction image generation unit 309 include steps S1, S12, S13, and S4.
  • the adjacent base weight candidate list deriving unit 30301c derives adjacent block weight coefficients (wIdxLXA, wIdxLXB) as adjacent block parameters.
  • FIG. 28 is a schematic diagram illustrating adjacent blocks A and B used when the adjacent base weight candidate list deriving unit 30301c of the inter prediction parameter decoding unit 303c illustrated in FIG. 26 derives the weight candidate list weightCandListW.
  • the adjacent block A is located to the left of the target block T.
  • the adjacent block B is located on the target block T.
  • the block coordinates are expressed as (x, y) in a two-dimensional plane coordinate system.
  • the x coordinate increases from the left to the right of the block.
  • the y coordinate increases from the top to the bottom of the block.
  • the position of the target block T is (xP, yP).
  • the length of the target block in the x-axis direction is nPbW.
  • the length of the target block in the y-axis direction is nPbH.
  • the adjacent block A is a block including coordinates (xP-1, yP + nPbH-1).
  • the adjacent block B is a block including coordinates (xP + nPbW-1, yP-1).
  • wpUsed [wIdx] is information for indicating whether a certain weighting factor wIdx has been stored in the weight candidate list, and wpUsed [wIdx] is true when a certain weighting factor wIdx has been stored, conversely! wpUsed [wIdx] (described later) is true when a certain weight coefficient wIdx is not stored.
  • the adjacent base weight candidate list deriving unit 30301c uses the elements in the predetermined table weightCandListWDefault as the weight candidate list weightCandListW [ ] Is added to the weight candidate list weightCandListW [] so that the number of elements becomes wN. If the element wp of the table weightCandListWDefault has already been added to the weight candidate list weightCandListW [] at the time of adding the element of the table weightCandListWDefault to the weight candidate list weightCandListW [], that element wp is not added to weightCandList [].
  • wN for example, 5
  • weightCandListWDefault [] the predetermined table weightCandListWDefault []
  • FIG. 29 is a schematic diagram for explaining scaling that is considered when the adjacent base weight candidate list deriving unit 30301c of the inter prediction parameter decoding unit 303c illustrated in FIG. 26 derives the weight candidate list weightCandListW.
  • the correspondence between the symbols and their meanings is as follows.
  • Pcurr Target picture
  • Pnref Reference picture of adjacent block
  • Pref Reference picture of the target block
  • mvLX Reference picture motion vector of adjacent block
  • mvpLX Scaled motion vector of the reference picture of the neighboring block (ie, the prediction vector of the target block)
  • the target picture and the reference picture are schematically shown as line segments.
  • the motion vector mvLX is scaled while maintaining the direction of the motion vector mvLX.
  • the motion vector mvpLX obtained by scaling the motion vector mvLX has a length according to the temporal distance between the target picture Pcurr and the reference picture Pref.
  • the weighting factor of the adjacent block cannot be used as it is as the weighting factor added to the weight candidate list weightCandListW (the weighting factor does not become an appropriate value even if it is scaled). Therefore, in this case, the weight coefficient of the adjacent block is not stored in the weight candidate list weightCandListW.
  • a default weight coefficient may be used as a weight coefficient to be added to the weight candidate list weightCandListW. In this case, the configuration may be such that the elements of the predetermined table weightCandListWDefault are stored in order.
  • the adjacent block A is available (the truth value availableFlagLXA is true (non-zero)), and the prediction vector of the adjacent block A is scaled in the prediction vector list derivation. If not (if the true / false value scaledLXA indicating that it is scaled is false (0)), the weight coefficient wIdxLXA of the adjacent block A is added to the weightCandListW. Further, 1 is set to the variable wpUsed [wIdxLXA] indicating that the weight coefficient wIdxLXA has been added.
  • the weight of the adjacent block B in the weightCandList Add coefficient wIdxLXB.
  • weightCandListW has not reached a predetermined number wN (for example, 5).
  • wN a predetermined number wN (for example, 5)
  • the elements of the predetermined table weightCandListWDefault are added to the list so that the number of elements of weightCandListW [] is wN.
  • i 0 if (availableFlagLXA &&! scaledLXA)
  • weighting candidate list weightCandList does not need to store the weighting coefficient itself, and may be a label (eg, A, B,...) Of an adjacent block that refers to the weighting coefficient.
  • An index indicating a weighting factor may be used.
  • the weight candidate list weightCandListI [] can be processed as follows. In the following, wIdxLXA and wIdxLXB are weight indexes of adjacent blocks A and B.
  • the weight coefficient selection unit 30302c derives a weight coefficient w from the derived weight candidate list weightCandListW and the weight index weightIdx.
  • w weightCandListW [weightIdx] (B1: Effect of derivation of weighting factors considering features of adjacent blocks)
  • a list in which weighting factors are arranged in descending order of selection probability can be derived according to the weighting factors of adjacent blocks.
  • the above weight candidate list derivation process can also be applied to the encoding process.
  • the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
  • step S12 and step S13 are modified as follows.
  • the adjacent base weight candidate list deriving unit 30301c derives the weight coefficient index (wIdxLXA, wIdxLXB) of the adjacent block as the adjacent block parameter.
  • the adjacent base weight candidate list deriving unit 30301c derives a weight candidate list weightCandListI from the weight indexes (wIdxLXA, wIdxLXB) of adjacent blocks.
  • i 0 if (availableFlagLXA &&! scaledLXA)
  • weightCandListI [i ++] wIdxLXA
  • wpUsed [wIdxLXA] 1 ⁇ if (availableFlagLXB &&!
  • the weight coefficient selection unit 30302c derives the position posIdx of the weight coefficient table weightTable from the derived weight candidate list weightCandListI and the weight index weightIdx, and derives the weight coefficient w from the derived weight index as follows. To do.
  • posIdx weightCandListI [weightIdx]
  • w weightTable [posIdx]
  • FIG. 30 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit 303d different from the inter prediction parameter decoding unit 303 illustrated in FIG. 16 and an inter prediction image generation unit 309 illustrated in FIG.
  • the inter prediction parameter decoding unit 303d includes a weight index decoding unit 3038, a prediction weight candidate list derivation unit 30301d, a prediction weight candidate selection unit 30302d, and a weight coefficient derivation unit 3030b.
  • the prediction weight candidate list deriving unit 30301d refers to the prediction parameter memory 307 and derives a prediction weight candidate list using the weight coefficient (or weight index) of the adjacent block.
  • the prediction weight candidate selection unit 30302d selects an element of the prediction weight candidate list derived by the prediction weight candidate list deriving unit 30301d using the prediction vector index mvp_LX_idx used in AMVP.
  • the prediction weight candidate list wpCandList [2] is created using the weight coefficients wIdxLXA and wIdxLXB of the left adjacent block A and the upper adjacent block B of the target block.
  • wpCandList [2] ⁇ wIdxLXA, wIdxLXB ⁇
  • a prediction weight coefficient wpIdx is derived.
  • wpIdx wpCandList [mvp_LX_idx]
  • mvp_LX_idx is a parameter for designating a prediction vector in a prediction vector candidate set.
  • the prediction weight candidate list deriving unit 30301d derives a 1: 1 weighting factor when the motion vector is scaled. If the motion vector is not scaled, the prediction weight candidate list derivation unit 30301d uses the weight coefficient of the adjacent block.
  • the configuration may be such that the elements of the predetermined table weightCandListWDefault are stored in order.
  • the prediction weight candidate selection unit 30302d derives the weighting factor of the adjacent block according to mvp_LX_idx, and derives a table according to the derived weighting factor (basically, the derived weighting factor is derived so that it becomes the head.
  • wpIdxL0 wpCandListL0 [mvp_L0_idx]
  • wpIdxL1 wpCandListL1 [mvp_L1_idx] [Modification]
  • a configuration in which the weighting factor is derived in consideration of the feature of the reference block as in the first embodiment and a configuration in which the weighting factor is derived in consideration of the feature of the adjacent block as in the second embodiment may be combined.
  • the present embodiment is different in that the weighting factor is derived in consideration of at least one of the feature of the reference block and the feature of the adjacent block in the merge prediction mode in the decoding process and the coding process.
  • the weighting factor w is derived by referring to the weighting factor table weightTable using the prediction weighting factor wpIdx as an index.
  • w weightTable [wpIdx]
  • a list of merge candidates that are motion compensation parameter candidates is generated, and motion compensation of the predicted image is performed using a motion vector candidate selected from the list by an index.
  • FIG. 31 is a flowchart illustrating operations of the inter prediction parameter decoding unit of the prediction parameter decoding unit and the inter prediction image generation unit illustrated in FIG. 11 of the image decoding apparatus illustrated in FIG. 5 according to the third embodiment.
  • the weight index weightIdx which is an index referred to in order to derive a bi-prediction weight coefficient, is not decoded.
  • a weighting factor derived according to the reference block parameter can be used.
  • different L0 reference pictures and L1 reference pictures are used for each merge candidate in the combined merge mode in which bi-prediction is used.
  • a reference block parameter such as a temporal distance between each of these reference pictures and the target picture, the prediction accuracy of each merged merge candidate can be further improved.
  • the merge candidate is a zero merge candidate
  • the weighting factor derived according to the reference block parameter is used.
  • bi-prediction is used as a zero merge candidate derived when the slice type is B (in the case of a B picture).
  • a different reference picture of L0 and a reference picture of L1 are used.
  • a weighting factor is derived in the same manner as in “B1L: Modification Example 1 of Deriving Weighting Factor Considering Features of Adjacent Block” described above.
  • a weighting factor is derived from the weighting factor wIdxLXA of the adjacent block A and the weighting factor wIdxLXB of the adjacent block B.
  • a candidate that is close to a weighting factor of 1: 1 is preferentially set as a weighting factor. For 5 and 4, 4 is preferentially used as the weighting factor first.
  • ) may be made as wIdxLXA ⁇ wIdxLXB.
  • the prediction weight coefficient derived according to the reference block parameter (for example, the prediction weight coefficient wpIdx obtained in “Step S2 in A3” described above) may be used.
  • the weight index weightIdx which is an index referred to in order to derive a bi-prediction weight coefficient, is not decoded.
  • the weighting factor derived according to the adjacent block can be used.
  • a suitable weighting factor according to an adjacent block can be used, and the prediction accuracy of each merge merge candidate can be further improved.
  • the weighting factor derived according to the adjacent block is used.
  • the zero merge candidate derived when the slice type is B in the case of B picture
  • a suitable weighting factor according to the adjacent block can be used, The prediction accuracy of each zero merge candidate can be further improved.
  • the image decoding device 31 described in the first to third embodiments uses a weight candidate list weightCandList whose elements are a weighting factor w used for weight prediction or an index indicating a weighting factor according to the feature of a block used for generating a predicted image.
  • a weight coefficient deriving unit 3030 for deriving a coefficient and a weight prediction unit 3094 for performing weight prediction using the weight coefficient derived by the weight coefficient deriving unit 3030 are provided.
  • the above decoding process can also be applied to the encoding process.
  • the weight prediction unit 10112 (FIG. 6) of the inter prediction image generation unit 1011 (FIG. 5) of the prediction image generation unit 101 of the image encoding device 11 (FIG. 4) in the encoding process is used as the weight in the decoding process.
  • the prediction unit 3094 can be replaced.
  • the image encoding device 11 in this case is also included in the present invention.
  • an image decoding method including a weight coefficient derivation process that is a process representing the process performed by the weight coefficient derivation unit 3030 and a weight prediction process that is a process representing the process performed by the weight prediction unit 3094 is also disclosed in the present invention. include.
  • an image encoding method including a weight coefficient deriving process that is a process representing the process performed by the weight coefficient deriving unit 3030 and a weight prediction process that is a process representing the process performed by the weight predicting unit 10112 is also provided. It is included in the present invention.
  • the image encoding device 11, the image decoding method, and the image encoding method described above have the same effects as the effects exhibited by the image decoding device 31.
  • a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse DCT.
  • the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by the computer system and executed.
  • the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices.
  • the “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system.
  • the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line,
  • a volatile memory inside a computer system that serves as a server or a client may be included that holds a program for a certain period of time.
  • the program may be a program for realizing a part of the above-described functions, or may be a program that can realize the above-described functions in combination with a program already recorded in a computer system.
  • part or all of the image encoding device 11 and the image decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor.
  • an integrated circuit based on the technology may be used.
  • the image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 13 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted.
  • the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1.
  • a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
  • the above-described image encoding device 11 is used as the encoding unit PROD_A1.
  • Transmission device PROD_A as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided.
  • FIG. 13A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
  • FIG. 13 is a block diagram illustrating a configuration of the receiving device PROD_B in which the image decoding device 31 is mounted.
  • the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator.
  • a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
  • the above-described image decoding device 31 is used as the decoding unit PROD_B3.
  • the receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided.
  • a configuration in which all of these are provided in the receiving device PROD_B is illustrated, but a part may be omitted.
  • the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
  • a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
  • a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
  • a server workstation, etc.
  • Client television receiver, personal computer, smartphone, etc.
  • VOD Video On Demand
  • video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication.
  • PROD_A / receiving device PROD_B normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multi-function mobile phone terminal.
  • the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
  • FIG. 14 is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted.
  • the recording apparatus PROD_C has an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M.
  • a writing unit PROD_C2 for writing.
  • the above-described image encoding device 11 is used as the encoding unit PROD_C1.
  • the recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • SD memory such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images
  • a unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided.
  • FIG. 14A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
  • the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). .
  • a camcorder in this case, the camera PROD_C3 is a main source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
  • a smartphone this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images
  • the like is also an example of such a recording apparatus PROD_C.
  • FIG. 14 is a block showing a configuration of a playback device PROD_D equipped with the image decoding device 31 described above.
  • the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written to the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain.
  • the above-described image decoding device 31 is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
  • the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image.
  • PROD_D5 may be further provided.
  • FIG. 14B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.
  • the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
  • Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). .
  • a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
  • a digital signage also referred to as an electronic signboard or an electronic bulletin board
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images
  • Desktop PC in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source
  • laptop or tablet PC in this case, display PROD_D3 or transmission unit PROD_D5 is video
  • a smartphone which is a main image supply destination
  • a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
  • the like are also examples of such a playback device PROD_D.
  • Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement
  • IC chip integrated circuit
  • CPU Central Processing Unit
  • each device includes a CPU that executes instructions of a program that realizes each function, a ROM (Read (Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data
  • a storage device such as a memory for storing the.
  • the object of the embodiment of the present invention is to record the program code (execution format program, intermediate code program, source program) of the control program for each device, which is software for realizing the functions described above, so as to be readable by a computer. This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc-Read-Only Memory) / MO discs (Magneto-Optical discs).
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disks
  • CD-ROMs Compact Disc-Read-Only Memory
  • MO discs Magnetic-Optical discs
  • IC cards including memory cards
  • Cards such as optical cards
  • Semiconductor memories such as flash ROM, or PLD (Programmable logic device ) Or FPGA (Field Programmable Gate Gate Array) or the like.
  • each device may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited as long as it can transmit the program code.
  • Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like.
  • the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • IEEE Institute of Electrical and Electronic Engineers 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired such as IrDA (Infrared Data Association) or remote control , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It can also be used wirelessly.
  • the embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
  • Embodiments of the present invention can be preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An image decoding device (31) is provided with: a weight coefficient derivation unit (3030) that derives a weight coefficient from a weight candidate list (weightCandList) having weight coefficients (w) used for weight prediction as elements, according to the characteristic of a block used to generate a prediction image; and a weight prediction unit (3094) that performs weight prediction according to the weight coefficient derived by the weight coefficient derivation unit.

Description

画像復号装置、画像符号化装置、画像復号方法、および画像符号化方法Image decoding apparatus, image encoding apparatus, image decoding method, and image encoding method
 本発明の実施形態は、画像復号装置、画像符号化装置、画像復号方法、および画像符号化方法に関する。 Embodiments described herein relate generally to an image decoding device, an image encoding device, an image decoding method, and an image encoding method.
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する画像復号装置が用いられている。 In order to efficiently transmit or record a moving image, a moving image encoding device that generates encoded data by encoding the moving image, and an image that generates a decoded image by decoding the encoded data A decoding device is used.
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。 Specific examples of the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。 In such a moving image coding system, an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。 In such a moving image coding method, a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image). A prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of the method for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
 また、近年の動画像符号化及び復号の技術として非特許文献1および2が挙げられる。 In addition, Non-Patent Documents 1 and 2 can be cited as recent video encoding and decoding techniques.
 (双予測)
 双予測とは、下式のように、2つの動き補償画像predSampleL0、predSampleL1の積和(重み付平均、重み予測)により、予測画像predSampleを生成する技術である。
predSample = (w * predSampleL0 + ((1<<shiftWP) - w) * predSampleL1) >> shiftWP
ここで、「>>」は右ビットシフト、「<<」は左ビットシフト、「shiftWP」はビットシフトさせるビット数である。以下では「w」を「重み係数」と呼ぶ。
(Bi prediction)
Bi-prediction is a technique for generating a predicted image predSample by the product sum (weighted average, weighted prediction) of two motion compensated images predSampleL0 and predSampleL1, as shown in the following equation.
predSample = (w * predSampleL0 + ((1 << shiftWP)-w) * predSampleL1) >> shiftWP
Here, “>>” is the right bit shift, “<<” is the left bit shift, and “shiftWP” is the number of bits to be shifted. Hereinafter, “w” is referred to as “weighting coefficient”.
 非特許文献2の従来技術では、明示的に双予測の重み係数(下式の重みインデックスweightIdx)を符号化し、次式のように重み予測の係数を導出する。
w = weightTable[weightIdx]
weightTable[] = {-2, 2, 3, 4, 5, 6, 10}
ここで、「weightTable」は、重み係数のテーブルである。
In the prior art of Non-Patent Document 2, a bi-prediction weight coefficient (weight index weightIdx in the following equation) is explicitly encoded, and a weight prediction coefficient is derived as in the following equation.
w = weightTable [weightIdx]
weightTable [] = {-2, 2, 3, 4, 5, 6, 10}
Here, “weightTable” is a table of weight coefficients.
 図32は、非特許文献2の従来技術における画像復号動作を示すフローチャートである。その画像復号動作は、ステップS101、S103、およびS104を含む。 FIG. 32 is a flowchart showing the image decoding operation in the prior art of Non-Patent Document 2. The image decoding operation includes steps S101, S103, and S104.
 ステップS101において、重みインデックスweightIdxを復号する。ステップS103において、復号されたweightIdxに基づき、重み係数テーブルweightTableから重み係数wを導出する。ステップS104において、重み係数wに基づき、重み予測を行う。 In step S101, the weight index weightIdx is decoded. In step S103, a weight coefficient w is derived from the weight coefficient table weightTable based on the decoded weightIdx. In step S104, weight prediction is performed based on the weight coefficient w.
 非特許文献1および2の従来技術では、重み係数の符号化が効率的ではない。本発明は、重み係数を従来よりも効率的に符号化可能な装置などを実現することを目的の一つとする。 In the prior arts of Non-Patent Documents 1 and 2, the encoding of the weight coefficient is not efficient. An object of the present invention is to realize an apparatus or the like capable of encoding weighting coefficients more efficiently than in the past.
 また、非特許文献1および2の従来技術では、マージ予測モードにおいて、重み係数を導出する方法が開示されていない。本発明では、マージ予測モード用に予測精度の高い重み係数を導出する装置等を実現することを目的の一つとする。 Further, in the prior arts of Non-Patent Documents 1 and 2, a method for deriving a weighting coefficient in the merge prediction mode is not disclosed. An object of the present invention is to realize an apparatus for deriving a weight coefficient with high prediction accuracy for the merge prediction mode.
 上記の課題を解決するために、本発明の一態様に係る画像復号装置は、重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出部と、前記重み係数導出部が導出した重み係数により重み予測を行う重み予測部とを備える。 In order to solve the above-described problem, an image decoding apparatus according to an aspect of the present invention provides a block of a block used for generating a predicted image from a weight candidate list including a weight coefficient used for weight prediction or an index indicating the weight coefficient as an element. A weighting factor deriving unit for deriving a weighting factor according to the feature; and a weight prediction unit for performing weight prediction using the weighting factor derived by the weighting factor deriving unit.
 本発明の一態様に係る画像符号化装置は、重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出部と、前記重み係数導出部が導出した重み係数により重み予測を行う重み予測部とを備える。 An image encoding device according to an aspect of the present invention derives a weighting factor from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element according to a feature of a block used for generating a predicted image. A weight coefficient deriving unit that performs weight prediction using the weight coefficient derived by the weight coefficient deriving unit.
 本発明の一態様に係る画像復号方法は、重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出工程と、前記重み係数導出工程において導出された重み係数により重み予測を行う重み予測工程とを含む。 An image decoding method according to an aspect of the present invention derives a weighting factor from a weighting candidate list including elements of a weighting factor used for weight prediction or an index indicating the weighting factor in accordance with a feature of a block used for generating a predicted image. A weight coefficient deriving step, and a weight prediction step of performing weight prediction using the weight coefficient derived in the weight coefficient deriving step.
 本発明の一態様に係る画像符号化方法は、重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出工程と、前記重み係数導出工程において導出された重み係数により重み予測を行う重み予測工程とを含む。 An image encoding method according to an aspect of the present invention derives a weighting factor from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element according to a feature of a block used for generating a predicted image. A weight coefficient deriving step, and a weight prediction step of performing weight prediction using the weight coefficient derived in the weight coefficient deriving step.
 本発明の各態様によれば、重みインデックスの符号量を低減する効果を奏する。 According to each aspect of the present invention, there is an effect of reducing the code amount of the weight index.
実施形態1に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on Embodiment 1. FIG. PU分割モードのパターンを示す図である。(a)~(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNの場合のパーティション形状について示している。It is a figure which shows the pattern of PU division | segmentation mode. (A) to (h) respectively show the partition shapes when the PU partitioning modes are 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 実施形態1に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on Embodiment 1. FIG. 実施形態1に係る画像復号装置の構成を示す概略図である。1 is a schematic diagram illustrating a configuration of an image decoding device according to Embodiment 1. FIG. 実施形態1に係る画像符号化装置のインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus which concerns on Embodiment 1. FIG. 実施形態1に係るマージ予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the merge prediction parameter derivation | leading-out part which concerns on Embodiment 1. FIG. 実施形態1に係るAMVP予測パラメータ導出部の構成を示す概略図である。3 is a schematic diagram illustrating a configuration of an AMVP prediction parameter derivation unit according to Embodiment 1. FIG. 実施形態1に係る画像復号装置の動きベクトル復号処理の動作を示すフローチャートである。6 is a flowchart illustrating an operation of motion vector decoding processing of the image decoding apparatus according to the first embodiment. 実施形態1に係る画像符号化装置のインター予測パラメータ符号化部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter encoding part of the image coding apparatus which concerns on Embodiment 1. FIG. 実施形態1に係るインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part which concerns on Embodiment 1. FIG. 実施形態1に係るインター予測パラメータ復号部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter decoding part which concerns on Embodiment 1. FIG. 実施形態1に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on Embodiment 1, and the receiver which mounts an image decoding apparatus. (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device. 実施形態1に係る画像符号化装置を搭載した記録装置、および、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure shown about the structure of the recording device carrying the image coding apparatus which concerns on Embodiment 1, and the reproducing | regenerating apparatus carrying an image decoding apparatus. (A) shows a recording device equipped with an image encoding device, and (b) shows a playback device equipped with an image decoding device. 実施形態1に係る画像伝送システムの構成を示す概略図である。1 is a schematic diagram illustrating a configuration of an image transmission system according to a first embodiment. 図5に示す画像復号装置の予測パラメータ復号部のインター予測パラメータ復号部、および図11に示すインター予測画像生成部の詳細構成を示す概略図である。FIG. 12 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit of a prediction parameter decoding unit of the image decoding device illustrated in FIG. 5 and an inter prediction image generation unit illustrated in FIG. 11. 図16に示すインター予測パラメータ復号部の重み係数導出部の構成を示す概略図である。It is the schematic which shows the structure of the weighting coefficient derivation | leading-out part of the inter prediction parameter decoding part shown in FIG. 図16に示すインター予測パラメータ復号部およびインター予測画像生成部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the inter prediction parameter decoding part and inter prediction image generation part which are shown in FIG. 図18に示す動作の一ステップにおける、参照ブロックパラメータと、参照ブロックインデックスとの関係を示す概念図である。FIG. 19 is a conceptual diagram illustrating a relationship between a reference block parameter and a reference block index in one step of the operation illustrated in FIG. 18. 図17に示す重み係数導出部とは異なる重み係数導出部の構成を示す概略図である。FIG. 18 is a schematic diagram illustrating a configuration of a weighting factor deriving unit different from the weighting factor deriving unit illustrated in FIG. 17. 図19に示す対応関係とは異なる、参照ブロックパラメータと、参照ブロックインデックスとの対応関係を示す概念図である。FIG. 20 is a conceptual diagram showing a correspondence relationship between a reference block parameter and a reference block index, which is different from the correspondence relationship shown in FIG. 19. 図16に示すインター予測パラメータ復号部とは異なるインター予測パラメータ復号部、およびインター予測画像生成部の詳細構成を示す概略図である。It is the schematic which shows the detailed structure of the inter prediction parameter decoding part different from the inter prediction parameter decoding part shown in FIG. 16, and the inter estimated image production | generation part. 図22に示すインター予測パラメータ復号部の重み係数導出部の構成を示す概略図である。It is the schematic which shows the structure of the weighting coefficient derivation | leading-out part of the inter prediction parameter decoding part shown in FIG. 図18に示す動作の一ステップにおける、参照ブロックパラメータと、重み係数の予測値との対応関係を示す概念図である。FIG. 19 is a conceptual diagram illustrating a correspondence relationship between a reference block parameter and a predicted value of a weight coefficient in one step of the operation illustrated in FIG. 18. 双予測ベースの参照ブロックインデックス導出方法を説明するための模式図である。It is a schematic diagram for demonstrating the bi-prediction based reference block index derivation method. 実施形態2における、図16に示すインター予測パラメータ復号部とは異なるインター予測パラメータ復号部、および図11に示すインター予測画像生成部の詳細構成を示す概略図である。FIG. 17 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit different from the inter prediction parameter decoding unit illustrated in FIG. 16 and an inter prediction image generation unit illustrated in FIG. 11 in the second embodiment. 図26に示すインター予測パラメータ復号部およびインター予測画像生成部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the inter prediction parameter decoding part and inter prediction image generation part which are shown in FIG. 図26に示すインター予測パラメータ復号部の隣接ベース重み候補リスト導出部が重み候補リストを導出する場合に用いる隣接ブロックを示す模式図である。FIG. 27 is a schematic diagram illustrating adjacent blocks used when an adjacent base weight candidate list derivation unit of the inter prediction parameter decoding unit illustrated in FIG. 26 derives a weight candidate list. 図26に示すインター予測パラメータ復号部の隣接ベース重み候補リスト導出部が重み候補リストを導出する場合に考慮するスケーリングを説明するための模式図である。FIG. 27 is a schematic diagram for explaining scaling that is considered when the adjacent base weight candidate list deriving unit of the inter prediction parameter decoding unit illustrated in FIG. 26 derives a weight candidate list. 図11に示すインター予測パラメータ復号部とは異なるインター予測パラメータ復号部、および図11に示すインター予測画像生成部の詳細構成を示す概略図である。It is the schematic which shows the detailed structure of the inter prediction parameter decoding part different from the inter prediction parameter decoding part shown in FIG. 11, and the inter prediction image generation part shown in FIG. 実施形態3における、図5に示す画像復号装置の予測パラメータ復号部のインター予測パラメータ復号部、および図11に示すインター予測画像生成部の動作を示すフローチャートである。12 is a flowchart illustrating operations of the inter prediction parameter decoding unit of the prediction parameter decoding unit and the inter prediction image generation unit shown in FIG. 11 of the image decoding apparatus shown in FIG. 5 according to the third embodiment. 非特許文献2の従来技術における、画像復号動作を示すフローチャートである。10 is a flowchart showing an image decoding operation in the prior art of Non-Patent Document 2.
 〔実施形態1〕
 以下、図面を参照しながら本発明の実施形態について説明する。
Embodiment 1
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 図15は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 FIG. 15 is a schematic diagram showing the configuration of the image transmission system 1 according to the present embodiment.
 画像伝送システム1は、符号化対象画像を符号化した符号を伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、画像符号化装置11、ネットワーク21、画像復号装置31及び画像表示装置41を含んで構成される。 The image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image. The image transmission system 1 includes an image encoding device 11, a network 21, an image decoding device 31, and an image display device 41.
 画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。 The image encoding device 11 receives an image T indicating a single layer image or a plurality of layers. A layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed. When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
 ネットワーク21は、画像符号化装置11が生成した符号化ストリームTeを画像復号装置31に伝送する。ネットワーク21は、インターネット(internet)、広域ネットワーク(WAN:Wide Area Network)、小規模ネットワーク(LAN:Local Area Network)またはこれらの組み合わせである。ネットワーク21は、必ずしも双方向の通信網に限らず、地上デジタル放送、衛星放送等の放送波を伝送する一方向の通信網であってもよい。また、ネットワーク21は、DVD(Digital Versatile Disc)、BD(Blue-ray Disc)等の符号化ストリームTeを記録した記憶媒体で代替されてもよい。 The network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31. The network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof. The network 21 is not necessarily limited to a bidirectional communication network, and may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcast and satellite broadcast. The network 21 may be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
 画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。 The image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
 画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化、SNRスケーラブル符号化では、画像復号装置31、画像表示装置41が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。 The image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31. The image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. In addition, in the spatial scalable coding and SNR scalable coding, when the image decoding device 31 and the image display device 41 have a high processing capability, a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.
 <演算子>
 本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used in this specification are described below.
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=は別の条件との和演算(OR)である。 >> is right bit shift, << is left bit shift, & is bitwise AND, | is bitwise OR, | = is sum operation (OR) with another condition.
 x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。 X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
 Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。 Clip3 (a, b, c) is a function that clips c to a value between a and b, but returns a if c <a, returns b if c> b, otherwise Is a function that returns c (where a <= b).
  <符号化ストリームTeの構造>
 本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of encoded stream Te>
Prior to detailed description of the image encoding device 11 and the image decoding device 31 according to the present embodiment, a data structure of an encoded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described. .
 図1は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図1の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。 FIG. 1 is a diagram showing a hierarchical structure of data in the encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (A) to (f) of FIG. 1 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data It is a figure which shows the coding unit (Coding | unit: CU) contained in the coding tree unit contained in data and coding slice data, and a coding tree unit.
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図1では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類およびレイヤの数はこれによらない。
(Encoded video sequence)
In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 1A, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID. Although FIG. 1 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, the type of layer and the number of layers are not dependent on this.
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。 The video parameter set VPS is a set of encoding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and encoding parameters related to individual layers in a moving image composed of a plurality of layers. A set is defined.
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。 The sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。 In the picture parameter set PPS, a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined. For example, a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included. There may be a plurality of PPSs. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図1の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Encoded picture)
In the coded picture, a set of data referred to by the image decoding device 31 in order to decode the picture PICT to be processed is defined. As shown in FIG. 1B, the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 In the following description, if it is not necessary to distinguish each of the slices S0 to SNS-1 , the subscripts may be omitted. The same applies to data included in an encoded stream Te described below and to which other subscripts are attached.
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
(Encoded slice)
In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 1C, the slice S includes a slice header SH and slice data SDATA.
 スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 The slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice. Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。 As slice types that can be specified by the slice type specification information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
 なお、スライスヘッダSHには、前記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいてもよい。 Note that the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
  (符号化スライスデータ)
 符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図1の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
(Encoded slice data)
In the encoded slice data, a set of data referred to by the image decoding device 31 for decoding the slice data SDATA to be processed is defined. The slice data SDATA includes a coding tree unit (CTU) as shown in FIG. A CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
  (符号化ツリーユニット)
 図1の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割により分割される。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。CTUは、分割フラグ(cu_split_flag)を含み、cu_split_flagが1の場合には、4つの符号化ノードCNに分割される。cu_split_flagが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニット(CU:Coding Unit)をノードとして持つ。符号化ユニットCUは符号化ノードの末端ノードであり、これ以上分割されない。符号化ユニットCUは、符号化処理の基本的な単位となる。
(Encoding tree unit)
As shown in (e) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode the encoding tree unit to be processed is defined. The coding tree unit is divided by recursive quadtree division. A tree-structured node obtained by recursive quadtree partitioning is referred to as a coding node (CN). An intermediate node of the quadtree is an encoding node, and the encoding tree unit itself is defined as the highest encoding node. The CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, it is split into four coding nodes CN. When cu_split_flag is 0, the coding node CN is not divided and has one coding unit (CU: Coding Unit) as a node. The encoding unit CU is a terminal node of the encoding node and is not further divided. The encoding unit CU is a basic unit of the encoding process.
 また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、32x32画素、16x16画素、および、8x8画素の何れかをとり得る。 In addition, when the size of the coding tree unit CTU is 64 × 64 pixels, the size of the coding unit can be any of 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, and 8 × 8 pixels.
  (符号化ユニット)
 図1の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
(Encoding unit)
As shown in (f) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode an encoding unit to be processed is defined. Specifically, the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH. The CU header defines a prediction mode, a division method (PU division mode), and the like.
 予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測情報(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。 In the prediction tree, prediction information (a reference picture index, a motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality is defined. In other words, the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit. The prediction tree includes one or a plurality of prediction units obtained by the above-described division. Hereinafter, a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”. The sub block is composed of a plurality of pixels. When the sizes of the prediction unit and the sub-block are equal, the number of sub-blocks in the prediction unit is one. If the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 × 8 and the sub-block is 4 × 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
 予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。 The prediction process may be performed for each prediction unit (sub block).
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。 There are roughly two types of division in the prediction tree: intra prediction and inter prediction. Intra prediction is prediction within the same picture, and inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
 イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。 In the case of intra prediction, there are 2Nx2N (the same size as the encoding unit) and NxN division methods.
 また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、2NxnU、2NxnDおよびnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順にPU0、PU1、PU2、PU3と表現する。 Also, in the case of inter prediction, the division method is encoded by the PU division mode (part_mode) of encoded data, 2Nx2N (same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc. 2NxN and Nx2N indicate 1: 1 symmetrical division, and 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division. The PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
 図2の(a)~(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図2の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、および、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。 (A) to (h) of FIG. 2 specifically illustrate the shape of the partition (the position of the boundary of the PU partition) in each PU partition mode. 2A shows a 2Nx2N partition, and FIGS. 2B, 2C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively. (E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition. The horizontal partition and the vertical partition are collectively referred to as a rectangular partition, and 2Nx2N and NxN are collectively referred to as a square partition.
 また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。 Also, in the conversion tree, the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined. In other words, a transform unit is one or more non-overlapping areas that make up a coding unit. The conversion tree includes one or a plurality of conversion units obtained by the above division.
 変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。 The division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, as in the case of the CU division described above.
 変換処理は、この変換ユニットごとに行われる。 Conversion processing is performed for each conversion unit.
  (予測パラメータ)
 予測ユニット(PU:Prediction Unit)の予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。以下、インター予測の予測パラメータ(インター予測パラメータ)について説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
(Prediction parameter)
A prediction image of a prediction unit (PU: Prediction Unit) is derived from a prediction parameter associated with the PU. The prediction parameters include a prediction parameter for intra prediction or a prediction parameter for inter prediction. Hereinafter, prediction parameters for inter prediction (inter prediction parameters) will be described. The inter prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. The prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used. In this specification, when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter). However, other values can be used as true values and false values in an actual apparatus or method.
 符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。 Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, There is a difference vector mvdLX.
  (参照ピクチャリスト)
 参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図3は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。図3(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図3(b)に、参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0およびL1リストRefPicList1の2つの参照ピクチャリストを持つ。対象ピクチャがB3の場合の参照ピクチャは、I0、P1、B2であり、参照ピクチャはこれらのピクチャを要素として持つ。個々の予測ユニットでは、参照ピクチャリストRefPicListX中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0およびrefIdxL1により参照ピクチャP1とB2が参照される例を示す。
(Reference picture list)
The reference picture list is a list including reference pictures stored in the reference picture memory 306. FIG. 3 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. In FIG. 3A, a rectangle is a picture, an arrow is a picture reference relationship, a horizontal axis is time, I, P, and B in the rectangle are intra pictures, uni-predictive pictures, bi-predictive pictures, and numbers in the rectangles are decoded. Indicates the order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 3B shows an example of the reference picture list. The reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists. In the illustrated example, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. When the target picture is B3, the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements. In each prediction unit, which picture in the reference picture list RefPicListX is actually referred to is specified by the reference picture index refIdxLX. The figure shows an example in which reference pictures P1 and B2 are referenced by refIdxL0 and refIdxL1.
  (マージ予測とAMVP予測)
 予測パラメータの復号(符号化)方法には、マージ予測(merge)モードとAMVP(Adaptive Motion Vector Prediction、適応動きベクトル予測)モードがある、マージフラグmerge_flagは、これらを識別するためのフラグである。マージ予測モードは、予測リスト利用フラグpredFlagLX(またはインター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍PUの予測パラメータから導出する用いるモードであり、AMVPモードは、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めるモードである。なお、動きベクトルmvLXは、予測ベクトルmvpLXを識別する予測ベクトルインデックスmvp_LX_idxと差分ベクトルmvdLXとして符号化される。
(Merge prediction and AMVP prediction)
The prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode. The merge flag merge_flag is a flag for identifying these. The merge prediction mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs. The AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data. The motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.
 インター予測識別子inter_pred_idcは、参照ピクチャの種類および数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストの参照ピクチャリストで管理された参照ピクチャを用いることを示し、1枚の参照ピクチャを用いること(単予測)を示す。PRED_BIは2枚の参照ピクチャを用いること(双予測BiPred)を示し、L0リストとL1リストで管理された参照ピクチャを用いる。予測ベクトルインデックスmvp_LX_idxは予測ベクトルを示すインデックスであり、参照ピクチャインデックスrefIdxLXは、参照ピクチャリストで管理された参照ピクチャを示すインデックスである。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。 The inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate that reference pictures managed by the reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction). PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used. The prediction vector index mvp_LX_idx is an index indicating a prediction vector, and the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list. Note that LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.
 マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれかの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。 The merge index merge_idx is an index that indicates whether one of the prediction parameter candidates (merge candidates) derived from the processed PU is used as the prediction parameter of the decoding target PU.
  (動きベクトル)
 動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
(Motion vector)
The motion vector mvLX indicates a shift amount between blocks on two different pictures. A prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
 (インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
 インター予測識別子inter_pred_idcと、予測リスト利用フラグpredFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
(Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX)
The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.
 inter_pred_idc = (predFlagL1<<1) + predFlagL0
 predFlagL0 = inter_pred_idc & 1
 predFlagL1 = inter_pred_idc >> 1
 なお、インター予測パラメータは、予測リスト利用フラグを用いてもよいし、インター予測識別子を用いてもよい。また、予測リスト利用フラグを用いた判定は、インター予測識別子を用いた判定に置き替えてもよい。逆に、インター予測識別子を用いた判定は、予測リスト利用フラグを用いた判定に置き替えてもよい。
inter_pred_idc = (predFlagL1 << 1) + predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
Note that a prediction list use flag or an inter prediction identifier may be used as the inter prediction parameter. Further, the determination using the prediction list use flag may be replaced with the determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with the determination using the prediction list use flag.
 (双予測biPredの判定)
 双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
(Determination of bi-prediction biPred)
The flag biPred as to whether it is a bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.
 biPred = (predFlagL0 == 1 && predFlagL1 == 1)
 フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
biPred = (predFlagL0 == 1 && predFlagL1 == 1)
The flag biPred can also be derived depending on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following formula.
 biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
前記式は、以下の式でも表現できる。
biPred = (inter_pred_idc == PRED_BI)? 1: 0
The above formula can also be expressed by the following formula.
 biPred = (inter_pred_idc == PRED_BI)
 なお、PRED_BIはたとえば3の値を用いることができる。
biPred = (inter_pred_idc == PRED_BI)
For example, a value of 3 can be used for PRED_BI.
  (画像復号装置の構成)
 次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
(Configuration of image decoding device)
Next, the configuration of the image decoding device 31 according to the present embodiment will be described. FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment. The image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely. A quantization / inverse DCT unit 311 and an addition unit 312 are included.
 また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。 The prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304. The predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測情報および、差分画像を生成するための残差情報などがある。 The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements). The separated codes include prediction information for generating a prediction image and residual information for generating a difference image.
 エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆DCT部311に出力する。この量子化係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)を行い量子化して得られる係数である。 The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. Some of the separated codes are, for example, a prediction mode predMode, a PU partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX. Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311. The quantization coefficient is a coefficient obtained by performing quantization by performing DCT (Discrete Cosine Transform) on the residual signal in the encoding process.
 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。 The inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301.
 インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。インター予測パラメータ復号部303の詳細については後述する。 The inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.
 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。 The intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 on the basis of the code input from the entropy decoding unit 301 and decodes the intra prediction parameter. The intra prediction parameter is a parameter used in a process of predicting a 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 it in the prediction parameter memory 307.
 イントラ予測パラメータ復号部304は、輝度と色差で異なるイントラ予測モードを導出してもよい。この場合、イントラ予測パラメータ復号部304は、輝度の予測パラメータとして輝度予測モードIntraPredModeY、色差の予測パラメータとして、色差予測モードIntraPredModeCを復号する。輝度予測モードIntraPredModeYは、35モードであり、プレーナ予測(0)、DC予測(1)、方向予測(2~34)が対応する。色差予測モードIntraPredModeCは、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)の何れかを用いるものである。イントラ予測パラメータ復号部304は、IntraPredModeCは輝度モードと同じモードであるか否かを示すフラグを復号し、フラグが輝度モードと同じモードであることを示せば、IntraPredModeCにIntraPredModeYを割り当て、フラグが輝度モードと異なるモードであることを示せば、IntraPredModeCとして、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)を復号してもよい。 The intra prediction parameter decoding unit 304 may derive different intra prediction modes for luminance and color difference. In this case, the intra prediction parameter decoding unit 304 decodes the luminance prediction mode IntraPredModeY as the luminance prediction parameter and the color difference prediction mode IntraPredModeC as the color difference prediction parameter. The luminance prediction mode IntraPredModeY is a 35 mode, and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 34). The color difference prediction mode IntraPredModeC uses one of the planar prediction (0), the DC prediction (1), the direction prediction (2 to 34), and the LM mode (35). The intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode. If the flag indicates that the mode is the same as the luminance mode, IntraPredModeC is assigned to IntraPredModeC and the flag is If the mode is different from the mode, planar prediction (0), DC prediction (1), direction prediction (2 to 34), and LM mode (35) may be decoded as IntraPredModeC.
 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。 The loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.
 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。 The prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, 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 separated by the entropy decoding unit 301. . The stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
 予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャ(参照ピクチャブロック)を読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてPUもしくはサブブロックの予測画像を生成する。 The prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture (reference picture block) from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a PU or sub-block using the input prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode.
 ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャを用いてインター予測によりPUの予測画像を生成する。 Here, when 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 reference picture to perform prediction of the PU by inter prediction. Is generated.
 インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、PUもしくはサブブロックの予測画像を生成するために参照する領域である。以下、単に「参照ブロック」とも呼ぶ。 The inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1. The reference picture block at the position indicated by mvLX is read from the reference picture memory 306. The inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a 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. Here, a reference picture block is a set of pixels on a reference picture (usually called a block because it is a rectangle), and is an area that is referred to in order to generate a predicted image of a PU or sub-block. Hereinafter, it is also simply referred to as “reference block”.
 予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照ピクチャを用いてイントラ予測を行う。具体的には、イントラ予測画像生成部310は、復号対象のピクチャであって、既に復号されたPUのうち、復号対象PUから予め定めた範囲にある隣接PUを参照ピクチャメモリ306から読み出す。予め定めた範囲とは、復号対象PUがいわゆるラスタースキャンの順序で順次移動する場合、例えば、左、左上、上、右上の隣接PUのうちのいずれかであり、イントラ予測モードによって異なる。ラスタースキャンの順序とは、各ピクチャにおいて、上端から下端まで各行について、順次左端から右端まで移動させる順序である。 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded. The predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode. The raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
 イントラ予測画像生成部310は、読み出した隣接PUについてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。 The intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU. The intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
 イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~34)の何れかによって輝度のPUの予測画像を生成し、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)の何れかによって色差のPUの予測画像を生成する。 When the intra prediction parameter decoding unit 304 derives an intra prediction mode different in luminance and color difference, the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY. Prediction image of luminance PU is generated by any of prediction (2 to 34), and planar prediction (0), DC prediction (1), direction prediction (2 to 34), LM mode according to color difference prediction mode IntraPredModeC A predicted image of the color difference PU is generated by any of (35).
 逆量子化・逆DCT部311は、エントロピー復号部301から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部311は、求めたDCT係数について逆DCT(Inverse Discrete Cosine Transform、逆離散コサイン変換)を行い、残差信号を算出する。逆量子化・逆DCT部311は、算出した残差信号を加算部312に出力する。 The inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficient input from the entropy decoding unit 301 to obtain a DCT coefficient. The inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal. The inverse quantization / inverse DCT unit 311 outputs the calculated residual signal to the addition unit 312.
 加算部312は、インター予測画像生成部309またはイントラ予測画像生成部310から入力されたPUの予測画像と逆量子化・逆DCT部311から入力された残差信号を画素毎に加算して、PUの復号画像を生成する。加算部312は、生成したPUの復号画像を参照ピクチャメモリ306に記憶し、生成したPUの復号画像をピクチャ毎に統合した復号画像Tdを外部に出力する。 The addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311 for each pixel, Generate a decoded PU image. The adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td in which the generated decoded image of the PU is integrated for each picture to the outside.
  (インター予測パラメータ復号部の構成)
 次に、インター予測パラメータ復号部303の構成について説明する。
(Configuration of inter prediction parameter decoding unit)
Next, the configuration of the inter prediction parameter decoding unit 303 will be described.
 図12は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、インター予測パラメータ復号制御部3031、AMVP予測パラメータ導出部3032、加算部3035、マージ予測パラメータ導出部3036およびサブブロック予測パラメータ導出部3037を含んで構成される。 FIG. 12 is a schematic diagram illustrating a configuration of the inter prediction parameter decoding unit 303 according to the present embodiment. The inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit 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.
 インター予測パラメータ復号制御部3031は、インター予測に関連する符号(シンタックス要素)の復号をエントロピー復号部301に指示し、符号化データに含まれる符号(シンタックス要素)、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXを抽出する。 The inter prediction parameter decoding control unit 3031 instructs the entropy decoding unit 301 to decode a code (syntax element) related to inter prediction, and a code (syntax element) included in the encoded data, for example, PU partition mode part_mode , Merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, and difference vector mvdLX are extracted.
 インター予測パラメータ復号制御部3031は、まず、マージフラグmerge_flagを抽出する。インター予測パラメータ復号制御部3031が、あるシンタックス要素を抽出すると表現する場合は、あるシンタックス要素の復号をエントロピー復号部301に指示し、該当のシンタックス要素を符号化データから読み出すことを意味する。 The inter prediction parameter decoding control unit 3031 first extracts a merge flag merge_flag. When the inter prediction parameter decoding control unit 3031 expresses that a certain syntax element is to be extracted, it means that the entropy decoding unit 301 is instructed to decode a certain syntax element, and the corresponding syntax element is read from the encoded data. To do.
 マージフラグmerge_flagが0、すなわち、AMVP予測モードを示す場合、インター予測パラメータ復号制御部3031は、エントロピー復号部301を用いて符号化データからAMVP予測パラメータを抽出する。AMVP予測パラメータとして、例えば、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。AMVP予測パラメータ導出部3032は予測ベクトルインデックスmvp_LX_idxから予測ベクトルmvpLXを導出する。詳細は後述する。インター予測パラメータ復号制御部3031は、差分ベクトルmvdLXを加算部3035に出力する。加算部3035では、予測ベクトルmvpLXと差分ベクトルmvdLXを加算し、動きベクトルを導出する。 When the merge flag merge_flag is 0, that is, indicates the AMVP prediction mode, the inter prediction parameter decoding control unit 3031 uses the entropy decoding unit 301 to extract the AMVP prediction parameter from the encoded data. Examples of AMVP prediction parameters include an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX. The AMVP prediction parameter derivation unit 3032 derives a prediction vector mvpLX from the prediction vector index mvp_LX_idx. Details will be described later. The inter prediction parameter decoding control unit 3031 outputs the difference vector mvdLX to the addition unit 3035. The adding unit 3035 adds the prediction vector mvpLX and the difference vector mvdLX to derive a motion vector.
 マージフラグmerge_flagが1、すなわち、マージ予測モードを示す場合、インター予測パラメータ復号制御部3031は、マージ予測に係る予測パラメータとして、マージインデックスmerge_idxを抽出する。インター予測パラメータ復号制御部3031は、抽出したマージインデックスmerge_idxをマージ予測パラメータ導出部3036(詳細は後述する)に出力し、サブブロック予測モードフラグsubPbMotionFlagをサブブロック予測パラメータ導出部3037に出力する。サブブロック予測パラメータ導出部3037は、サブブロック予測モードフラグsubPbMotionFlagの値に応じて、PUを複数のサブブロックに分割し、サブブロック単位で動きベクトルを導出する。すなわち、サブブロック予測モードでは、予測ブロックは4x4もしくは8x8という小さいブロック単位で予測される。後述の画像符号化装置11においては、CUを複数のパーティション(2NxN、Nx2N、NxNなどのPU)に分割し、パーティション単位で予測パラメータのシンタックスを符号化する方法に対して、サブブロック予測モードでは複数のサブブロックを集合(セット)にまとめ、当該集合毎に予測パラメータのシンタックスを符号化するため、少ない符号量で多くのサブブロックの動き情報を符号化することができる。 When the merge flag merge_flag is 1, that is, indicates the merge prediction mode, the inter prediction parameter decoding control unit 3031 extracts the merge index merge_idx as a prediction parameter related to merge prediction. The inter prediction parameter decoding control unit 3031 outputs the extracted merge index merge_idx to the merge prediction parameter derivation unit 3036 (details will be described later), and outputs the sub-block prediction mode flag subPbMotionFlag to the sub-block prediction parameter derivation unit 3037. The subblock prediction parameter deriving unit 3037 divides the PU into a plurality of subblocks according to the value of the subblock prediction mode flag subPbMotionFlag, and derives a motion vector in units of subblocks. That is, in the sub-block prediction mode, the prediction block is predicted in units of blocks as small as 4x4 or 8x8. In the image encoding device 11 to be described later, a sub-block prediction mode is used for a method in which a CU is divided into a plurality of partitions (PUs such as 2NxN, Nx2N, and NxN) and the syntax of prediction parameters is encoded in units of partitions. Since a plurality of sub-blocks are grouped into a set and the syntax of the prediction parameter is encoded for each set, motion information of a large number of sub-blocks can be encoded with a small amount of code.
 図7は、本実施形態に係るマージ予測パラメータ導出部3036の構成を示す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361とマージ候補選択部30362、マージ候補格納部30363を備える。マージ候補格納部30363は、マージ候補導出部30361から入力されたマージ候補を格納する。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成されている。マージ候補格納部30363において、格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。 FIG. 7 is a schematic diagram illustrating the configuration of the merge prediction parameter deriving unit 3036 according to the present embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361, a merge candidate selection unit 30362, and a merge candidate storage unit 30363. The merge candidate storage unit 30363 stores the merge candidates input from the merge candidate derivation unit 30361. The merge candidate includes a prediction list use flag predFlagLX, a motion vector mvLX, and a reference picture index refIdxLX. In the merge candidate storage unit 30363, an index is assigned to the stored merge candidate according to a predetermined rule.
 マージ候補導出部30361は、すでに復号処理が行われた隣接PUの動きベクトルと参照ピクチャインデックスrefIdxLXをそのまま用いてマージ候補を導出する。それ以外にアフィン予測を用いてマージ候補を導出してもよい。この方法を以下で詳細に説明する。マージ候補導出部30361は、アフィン予測を、後述する空間マージ候補導出処理、時間マージ候補導出処理、結合マージ候補導出処理、およびゼロマージ候補導出処理に用いてもよい。なお、アフィン予測はサブブロック単位で行われ、予測パラメータはサブブロック毎に予測パラメータメモリ307に格納されている。あるいは、アフィン予測は画素単位で行われてもよい。 The merge candidate derivation unit 30361 derives a merge candidate using the motion vector of the adjacent PU that has already been decoded and the reference picture index refIdxLX as they are. In addition, merge candidates may be derived using affine prediction. This method is described in detail below. The merge candidate derivation unit 30361 may use affine prediction for a spatial merge candidate derivation process, a temporal merge candidate derivation process, a combined merge candidate derivation process, and a zero merge candidate derivation process described later. Affine prediction is performed in units of sub-blocks, and prediction parameters are stored in the prediction parameter memory 307 for each sub-block. Alternatively, the affine prediction may be performed on a pixel basis.
  (空間マージ候補導出処理)
 空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータ(予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLX)を読み出し、読み出した予測パラメータをマージ候補として導出する。読み出される予測パラメータは、復号対象PUから予め定めた範囲内にあるPU(例えば、復号対象PUの左下端、左上端、右上端にそれぞれ接するPUの全部または一部)のそれぞれに係る予測パラメータである。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Spatial merge candidate derivation process)
As the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads and reads the prediction parameters (prediction list use flag predFlagLX, motion vector mvLX, reference picture index refIdxLX) stored in the prediction parameter memory 307 according to a predetermined rule. The predicted parameters are derived as merge candidates. The prediction parameter to be read is a prediction parameter related to each of the PUs within a predetermined range from the decoding target PU (for example, all or part of the PUs in contact with the lower left end, the upper left end, and the upper right end of the decoding target PU, respectively). is there. The merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  (時間マージ候補導出処理)
 時間マージ導出処理として、マージ候補導出部30361は、復号対象PUの右下の座標を含む参照画像中のPUの予測パラメータを予測パラメータメモリ307から読みだしマージ候補とする。参照画像の指定方法は、例えば、スライスヘッダにおいて指定された参照ピクチャインデックスrefIdxLXでもよいし、復号対象PUに隣接するPUの参照ピクチャインデックスrefIdxLXのうち最小のものを用いて指定してもよい。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Time merge candidate derivation process)
As the temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameter of the PU in the reference image including the lower right coordinate of the decoding target PU from the prediction parameter memory 307 and sets it as a merge candidate. The reference picture designation method may be, for example, the reference picture index refIdxLX designated in the slice header, or may be designated using the smallest reference picture index refIdxLX of the PU adjacent to the decoding target PU. The merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  (結合マージ候補導出処理)
 結合マージ導出処理として、マージ候補導出部30361は、既に導出され、マージ候補格納部30363に格納された2つの異なる導出済マージ候補の動きベクトルと参照ピクチャインデックスを、それぞれL0、L1の動きベクトルとして組み合わせることで結合マージ候補を導出する。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Join merge candidate derivation process)
As the merge merge derivation process, the merge candidate derivation unit 30361 uses two different derived merge candidate motion vectors and reference picture indexes already derived and stored in the merge candidate storage unit 30363 as the motion vectors of L0 and L1, respectively. Combined merge candidates are derived by combining them. The merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
  (ゼロマージ候補導出処理)
 ゼロマージ候補導出処理として、マージ候補導出部30361は、参照ピクチャインデックスrefIdxLXが0であり、動きベクトルmvLXのX成分、Y成分が共に0であるマージ候補を導出する。マージ候補導出部30361によって導出されたマージ候補はマージ候補格納部30363に格納される。
(Zero merge candidate derivation process)
As the zero merge candidate derivation process, the merge candidate derivation unit 30361 derives a merge candidate in which the reference picture index refIdxLX is 0 and both the X component and the Y component of the motion vector mvLX are 0. The merge candidates derived by the merge candidate deriving unit 30361 are stored in the merge candidate storage unit 30363.
 マージ候補選択部30362は、マージ候補格納部30363に格納されているマージ候補のうち、インター予測パラメータ復号制御部3031から入力されたマージインデックスmerge_idxに対応するインデックスが割り当てられたマージ候補を、対象PUのインター予測パラメータとして選択する。マージ候補選択部30362は選択したマージ候補を予測パラメータメモリ307に記憶するとともに、予測画像生成部308に出力する。 The merge candidate selection unit 30362 selects, from the merge candidates stored in the merge candidate storage unit 30363, a merge candidate to which an index corresponding to the merge index merge_idx input from the inter prediction parameter decoding control unit 3031 is assigned. As an inter prediction parameter. The merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs it to the prediction image generation unit 308.
 図8は、本実施形態に係るAMVP予測パラメータ導出部3032の構成を示す概略図である。AMVP予測パラメータ導出部3032は、ベクトル候補導出部3033とベクトル候補選択部3034、およびベクトル候補格納部3035を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する既に処理済みのPUの動きベクトルmvLXを読み出し、予測ベクトル候補を導出し、ベクトル候補格納部3035に対し、予測ベクトル候補リストmvpListLX[]に格納する。 FIG. 8 is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033, a vector candidate selection unit 3034, and a vector candidate storage unit 3035. The vector candidate derivation unit 3033 reads the already processed PU motion vector mvLX stored in the prediction parameter memory 307 based on the reference picture index refIdx, derives a prediction vector candidate, and sends the prediction vector candidate to the vector candidate storage unit 3035. Store in candidate list mvpListLX [].
 ベクトル候補選択部3034は、予測ベクトル候補リストmvpListLX[]の予測ベクトル候補のうち予測ベクトルインデックスmvp_LX_idxが示す動きベクトルmvpListLX[mvp_LX_idx]を予測ベクトルmvpLXとして選択する。ベクトル候補選択部3034は、選択した予測ベクトルmvpLXを加算部3035に出力する。 The vector candidate selection unit 3034 selects the motion vector mvpListLX [mvp_LX_idx] indicated by the prediction vector index mvp_LX_idx from the prediction vector candidates in the prediction vector candidate list mvpListLX [] as the prediction vector mvpLX. The vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3035.
 なお、予測ベクトル候補は、復号処理が完了したPUであって、復号対象PUから予め定めた範囲のPU(例えば、隣接PU)の動きベクトルをスケーリングすることで導出する。なお、隣接PUは、復号対象PUに空間的に隣接するPU、例えば、左PU、上PUの他、復号対象PUに時間的に隣接する領域、例えば、復号対象PUと同じ位置を含み、表示時刻が異なるPUの予測パラメータから得られた領域を含む。 Note that a prediction vector candidate is a PU for which decoding processing has been completed, and is derived by scaling a motion vector of a PU (for example, an adjacent PU) within a predetermined range from the decoding target PU. The adjacent PU includes a PU that is spatially adjacent to the decoding target PU, for example, the left PU and the upper PU, and an area that is temporally adjacent to the decoding target PU, for example, the same position as the decoding target PU. It includes areas obtained from prediction parameters of PUs with different times.
 加算部3035は、AMVP予測パラメータ導出部3032から入力された予測ベクトルmvpLXとインター予測パラメータ復号制御部3031から入力された差分ベクトルmvdLXを加算して動きベクトルmvLXを算出する。加算部3035は、算出した動きベクトルmvLXを予測画像生成部308および予測パラメータメモリ307に出力する。 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 control unit 3031 to calculate a motion vector mvLX. The adding unit 3035 outputs the calculated motion vector mvLX to the predicted image generation unit 308 and the prediction parameter memory 307.
  (インター予測画像生成部309)
 図11は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、重み予測部3094を含んで構成される。
(Inter prediction image generation unit 309)
FIG. 11 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 309 included in the predicted image generation unit 308 according to the present embodiment. The inter prediction image generation unit 309 includes a motion compensation unit (prediction image generation device) 3091 and a weight prediction unit 3094.
  (動き補償)
 動き補償部3091は、インター予測パラメータ復号部303から入力された、インター予測パラメータ(予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLX)に基づいて、参照ピクチャメモリ306から、参照ピクチャインデックスrefIdxLXで指定された参照ピクチャにおいて、復号対象PUの位置を起点として、動きベクトルmvLXだけずれた位置にあるブロックを読み出すことによって補間画像(動き補償画像)を生成する。ここで、動きベクトルmvLXの精度が整数精度でない場合には、動き補償フィルタと呼ばれる小数位置の画素を生成するためのフィルタを施して、動き補償画像を生成する。
(Motion compensation)
The motion compensation unit 3091 receives the reference picture index refIdxLX from the reference picture memory 306 based on the inter prediction parameters (prediction list use flag predFlagLX, reference picture index refIdxLX, motion vector mvLX) input from the inter prediction parameter decoding unit 303. In the reference picture specified in (2), an interpolation image (motion compensation image) is generated by reading out a block at a position shifted by the motion vector mvLX starting from the position of the decoding target PU. Here, when the accuracy of the motion vector mvLX is not integer accuracy, a motion compensation image is generated by applying a filter for generating a pixel at a decimal position called a motion compensation filter.
  (重み予測)
 重み予測部3094は、入力される動き補償画像predSamplesLXに重み係数を乗算することによりPUの予測画像を生成する。予測リスト利用フラグの一方(predFlagL0もしくはpredFlagL1)が1の場合(単予測の場合)で、重み予測を用いない場合には入力された動き補償画像predSamplesLX(LXはL0もしくはL1)を画素ビット数bitDepthに合わせる以下の式の処理を行う。
(Weight prediction)
The weight prediction unit 3094 generates a prediction image of the PU by multiplying the input motion compensation image predSamplesLX by a weight coefficient. When one of the prediction list use flags (predFlagL0 or predFlagL1) is 1 (in the case of single prediction) and the weight prediction is not used, the input motion compensated image predSamplesLX (LX is L0 or L1) is represented by the number of pixel bits bitDepth The following equation is processed to match
predSamples[X][Y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesLX[X][Y] + offset1 ) >> shift1 )
 ここで、shift1 = 14 - bitDepth、offset1=1<<(shift1-1)である。
また、参照リスト利用フラグの両者(predFlagL0とpredFlagL1)が1の場合(双予測BiPredの場合)で、重み予測を用いない場合には、入力された動き補償画像predSamplesL0、predSamplesL1を平均し画素ビット数に合わせる以下の式の処理を行う。
predSamples [X] [Y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesLX [X] [Y] + offset1) >> shift1)
Here, shift1 = 14−bitDepth, offset1 = 1 << (shift1-1).
When both of the reference list use flags (predFlagL0 and predFlagL1) are 1 (in the case of bi-prediction BiPred) and weight prediction is not used, the input motion compensation images predSamplesL0 and predSamplesL1 are averaged and the number of pixel bits The following equation is processed to match
predSamples[X][Y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0[X][Y] + predSamplesL1[X][Y] + offset2 ) >> shift2 )
ここで、shift2=15-bitDepth、offset2=1<<(shift2-1)である。
predSamples [X] [Y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesL0 [X] [Y] + predSamplesL1 [X] [Y] + offset2) >> shift2)
Here, shift2 = 15-bitDepth, offset2 = 1 << (shift2-1).
 さらに、単予測の場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0とオフセットo0を符号化データから導出し、以下の式の処理を行う。 Furthermore, in the case of single prediction, when performing weight prediction, the weight prediction unit 3094 derives the weight prediction coefficient w0 and the offset o0 from the encoded data, and performs the processing of the following equation.
predSamples[X][Y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( (predSamplesLX[X][Y] * w0 + 2^(log2WD - 1)) >> log2WD ) + o0 )
 ここで、log2WDは所定のシフト量を示す変数である。
predSamples [X] [Y] = Clip3 (0, (1 << bitDepth)-1, ((predSamplesLX [X] [Y] * w0 + 2 ^ (log2WD-1)) >> log2WD) + o0)
Here, log2WD is a variable indicating a predetermined shift amount.
 さらに、双予測BiPredの場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0、w1、o0、o1を符号化データから導出し、以下の式の処理を行う。 Furthermore, in the case of bi-prediction BiPred, when performing weight prediction, the weight prediction unit 3094 derives weight prediction coefficients w0, w1, o0, o1 from the encoded data, and performs the processing of the following equation.
predSamples[X][Y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0 [X][Y] * w0 + predSamplesL1[X][Y] * w1 + ((o0 + o1 + 1) << log2WD) ) >> (log2WD + 1) )
 <動きベクトル復号処理>
 以下では、図9を参照して、本実施形態に係る動きベクトル復号処理について具体的に説明する。
predSamples [X] [Y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesL0 [X] [Y] * w0 + predSamplesL1 [X] [Y] * w1 + ((o0 + o1 + 1) << log2WD)) >> (log2WD + 1))
<Motion vector decoding process>
Below, with reference to FIG. 9, the motion vector decoding process which concerns on this embodiment is demonstrated concretely.
 上述の説明から明らかなように、本実施形態に係る動きベクトル復号処理は、インター予測に関連するシンタックス要素を復号する処理(動きシンタックス復号処理とも呼ぶ)と、動きベクトルを導出する処理(動きベクトル導出処理)とを含んでいる。 As is clear from the above description, the motion vector decoding process according to the present embodiment includes a process of decoding syntax elements related to inter prediction (also referred to as motion syntax decoding process) and a process of deriving a motion vector ( Motion vector derivation process).
  (動きシンタックス復号処理)
 図9は、インター予測パラメータ復号制御部3031によって行われるインター予測シンタックス復号処理の流れを示すフローチャートである。図9の説明における以下の説明において、特に明示のない場合、各処理はインター予測パラメータ復号制御部3031によって行われる。
(Motion syntax decoding process)
FIG. 9 is a flowchart illustrating a flow of inter prediction syntax decoding processing performed by the inter prediction parameter decoding control unit 3031. In the following description of FIG. 9, each process is performed by the inter prediction parameter decoding control unit 3031 unless otherwise specified.
 まず、ステップS101において、マージフラグmerge_flagが復号され、ステップS102において、
 merge_flag != 0(merge_flagが0でないか)
が判断される。
First, in step S101, the merge flag merge_flag is decoded, and in step S102,
merge_flag! = 0 (whether merge_flag is not 0)
Is judged.
 merge_flag !=0 が真(S102でY)の場合、S103においてマージインデックスmerge_idxが復号され、マージ予測モードにおける動きベクトル導出処理(S111)を実行する。 If merge_flag! = 0 is true (Y in S102), the merge index merge_idx is decoded in S103, and the motion vector derivation process (S111) in the merge prediction mode is executed.
 merge_flag!=0 が偽(S102でN)の場合、S104においてインター予測識別子inter_pred_idcを復号する。 When merge_flag! = 0 is false (N in S102), the inter prediction identifier inter_pred_idc is decoded in S104.
 inter_pred_idcがPRED_L1以外(PRED_L0もしくはPRED_BI)の場合、S105、S106、S107において、参照ピクチャインデックスrefIdxL0、差分ベクトルのパラメータmvdL0、予測ベクトルインデックスmvp_L0_idxが各々復号される。 When inter_pred_idc is other than PRED_L1 (PRED_L0 or PRED_BI), the reference picture index refIdxL0, the difference vector parameter mvdL0, and the prediction vector index mvp_L0_idx are decoded in S105, S106, and S107, respectively.
 inter_pred_idcがPRED_L0以外(PRED_L1もしくはPRED_BI)の場合、S108、S109、S110において、参照ピクチャインデックスrefIdxL1、差分ベクトルのパラメータmvdL1、予測ベクトルインデックスmvp_L1_idxが復号される。続いて、AMVPモードにおける動きベクトル導出処理(S112)を実行する。 When inter_pred_idc is other than PRED_L0 (PRED_L1 or PRED_BI), the reference picture index refIdxL1, the difference vector parameter mvdL1, and the prediction vector index mvp_L1_idx are decoded in S108, S109, and S110. Subsequently, a motion vector derivation process (S112) in the AMVP mode is executed.
  (画像符号化装置の構成)
 次に、本実施形態に係る画像符号化装置11の構成について説明する。図4は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
(Configuration of image encoding device)
Next, the configuration of the image encoding device 11 according to the present embodiment will be described. FIG. 4 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment. The image encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory. (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, encoding parameter determination unit 110, and prediction parameter encoding unit 111. The prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
 予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象PUを起点として動きベクトルが示す参照画像上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接PUの画素値を参照ピクチャメモリ109から読み出し、PUの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。 The predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture. Here, the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111. The prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction. The predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point. In the case of intra prediction, the prediction parameter is, for example, an intra prediction mode. A pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated. The predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block. The predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
 なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。例えば、図6は、予測画像生成部101に含まれるインター予測画像生成部1011の構成を示す概略図である。インター予測画像生成部1011は、動き補償部10111、重み予測部10112を含んで構成される。動き補償部10111および重み予測部10112については、上述の動き補償部3091、重み予測部3094のそれぞれと同様の構成であるためここでの説明を省略する。 Note that the predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 already described. For example, FIG. 6 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 1011 included in the predicted image generation unit 101. The inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112. Since the motion compensation unit 10111 and the weight prediction unit 10112 have the same configurations as the motion compensation unit 3091 and the weight prediction unit 3094 described above, description thereof is omitted here.
 予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ピクチャ(参照ピクチャブロック)の画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。 The predicted image generation unit 101 generates a predicted image P of the PU based on the pixel value of the reference picture (reference picture block) read from the reference picture memory, using the parameter input from the prediction parameter encoding unit. The predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
 減算部102は、予測画像生成部101から入力されたPUの予測画像Pの信号値を、画像Tの対応するPUの画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号をDCT・量子化部103に出力する。 The subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal. The subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103.
 DCT・量子化部103は、減算部102から入力された残差信号についてDCTを行い、DCT係数を算出する。DCT・量子化部103は、算出したDCT係数を量子化して量子化係数を求める。DCT・量子化部103は、求めた量子化係数をエントロピー符号化部104及び逆量子化・逆DCT部105に出力する。 The DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 and calculates a DCT coefficient. The DCT / quantization unit 103 quantizes the calculated DCT coefficient to obtain a quantization coefficient. The DCT / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
 エントロピー符号化部104には、DCT・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から符号化パラメータが入力される。入力される符号化パラメータには、例えば、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpredMode、及びマージインデックスmerge_idx等の符号がある。 The entropy encoding unit 104 receives the quantization coefficient from the DCT / quantization unit 103 and receives the encoding parameter from the prediction parameter encoding unit 111. Examples of input encoding parameters include codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.
 エントロピー符号化部104は、入力された量子化係数と符号化パラメータをエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。 The entropy encoding unit 104 generates an encoded stream Te by entropy encoding the input quantization coefficient and encoding parameter, and outputs the generated encoded stream Te to the outside.
 逆量子化・逆DCT部105は、DCT・量子化部103から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部105は、求めたDCT係数について逆DCTを行い、残差信号を算出する。逆量子化・逆DCT部105は、算出した残差信号を加算部106に出力する。 The inverse quantization / inverse DCT unit 105 inversely quantizes the quantization coefficient input from the DCT / quantization unit 103 to obtain a DCT coefficient. The inverse quantization / inverse DCT unit 105 performs inverse DCT on the obtained DCT coefficient to calculate a residual signal. The inverse quantization / inverse DCT unit 105 outputs the calculated residual signal to the addition unit 106.
 加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆DCT部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。 The addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel, and performs decoding. Generate an image. The adding unit 106 stores the generated decoded image in the reference picture memory 109.
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。 The loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述した予測パラメータやこの予測パラメータに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。 The encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters. The encoding parameter is a parameter to be encoded that is generated in association with the above-described prediction parameter or the prediction parameter. The predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すコスト値を算出する。コスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。 The encoding parameter determination unit 110 calculates a cost value indicating the amount of information and the encoding error for each of a plurality of sets. The cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient λ. The code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter. The square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102. The coefficient λ is a real number larger than a preset zero. The encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated cost value. As a result, the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters. The encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
 予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。 The prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101. The parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。 The inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110. The inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters. Some of the configurations are the same as the configuration to be performed. The configuration of the inter prediction parameter encoding unit 112 will be described later.
 イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。 The intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
  (インター予測パラメータ符号化部の構成)
 次に、インター予測パラメータ符号化部112の構成について説明する。インター予測パラメータ符号化部112は、図12のインター予測パラメータ復号部303に対応する手段であり、図10に構成を示す。
(Configuration of inter prediction parameter encoding unit)
Next, the configuration of the inter prediction parameter encoding unit 112 will be described. The inter prediction parameter encoding unit 112 is a unit corresponding to the inter prediction parameter decoding unit 303 in FIG. 12, and the configuration is shown in FIG.
 インター予測パラメータ符号化部112は、インター予測パラメータ符号化制御部1121、AMVP予測パラメータ導出部1122、減算部1123、サブブロック予測パラメータ導出部1125、及び図示しない、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部などを含んで構成され、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部は各々、PU分割モードpart_mode、マージフラグmerge_flag、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、差分ベクトルmvdLXを導出する。インター予測パラメータ符号化部112は、動きベクトル(mvLX、subMvLX)と参照ピクチャインデックスrefIdxLX、PU分割モードpart_mode、インター予測識別子inter_pred_idc、あるいはこれらを示す情報を予測画像生成部101に出力する。またインター予測パラメータ符号化部112は、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、サブブロック予測モードフラグsubPbMotionFlagをエントロピー符号化部104に出力する。 The inter prediction parameter encoding unit 112 includes an inter prediction parameter encoding control unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, a sub-block prediction parameter derivation unit 1125, and a partition mode derivation unit and a merge flag derivation unit (not shown). , An inter prediction identifier deriving unit, a reference picture index deriving unit, a vector difference deriving unit, etc., and a split mode deriving unit, a merge flag deriving unit, an inter prediction identifier deriving unit, a reference picture index deriving unit, and a vector difference deriving unit Respectively derive a PU partition mode part_mode, a merge flag merge_flag, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, and a difference vector mvdLX. The inter prediction parameter encoding unit 112 outputs the motion vector (mvLX, subMvLX), the reference picture index refIdxLX, the PU partition mode part_mode, the inter prediction identifier inter_pred_idc, or information indicating these to the prediction image generating unit 101. Also, the inter prediction parameter encoding unit 112 entropy PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, difference vector mvdLX, sub-block prediction mode flag subPbMotionFlag. The data is output to the encoding unit 104.
 インター予測パラメータ符号化制御部1121は、マージインデックス導出部11211とベクトル候補インデックス導出部11212を含む。マージインデックス導出部11211は、符号化パラメータ決定部110から入力された動きベクトルと参照ピクチャインデックスを、予測パラメータメモリ108から読み出したマージ候補のPUが持つ動きベクトルと参照ピクチャインデックスと比較して、マージインデックスmerge_idxを導出し、エントロピー符号化部104に出力する。マージ候補とは、符号化対象となる符号化対象CUから予め定めた範囲にある参照PU(例えば、符号化対象ブロックの左下端、左上端、右上端に接する参照PU)であって、符号化処理が完了したPUである。ベクトル候補インデックス導出部11212は予測ベクトルインデックスmvp_LX_idxを導出する。 The inter prediction parameter encoding control unit 1121 includes a merge index deriving unit 11211 and a vector candidate index deriving unit 11212. The merge index derivation unit 11211 compares the motion vector and reference picture index input from the encoding parameter determination unit 110 with the motion vector and reference picture index of the merge candidate PU read from the prediction parameter memory 108, and performs merge An index merge_idx is derived and output to the entropy encoding unit 104. A merge candidate is a reference PU (for example, a reference PU that touches the lower left end, upper left end, and upper right end of the encoding target block) within a predetermined range from the encoding target CU to be encoded. The PU has been processed. The vector candidate index deriving unit 11212 derives a prediction vector index mvp_LX_idx.
 サブブロック予測パラメータ導出部1125には、符号化パラメータ決定部110がサブブロック予測モードの使用を決定した場合、subPbMotionFlagの値に従って、空間サブブロック予測、時間サブブロック予測、アフィン予測、マッチング予測のいずれかのサブブロック予測の動きベクトルと参照ピクチャインデックスを導出する。動きベクトルと参照ピクチャインデックスは、画像復号装置の説明で述べたように、隣接PU、参照ピクチャブロック等の動きベクトルや参照ピクチャインデックスを予測パラメータメモリ108から読み出し、導出する。 When the encoding parameter determination unit 110 determines to use the sub-block prediction mode, the sub-block prediction parameter derivation unit 1125 includes any of spatial sub-block prediction, temporal sub-block prediction, affine prediction, and matching prediction according to the value of subPbMotionFlag. A motion vector and a reference picture index for subblock prediction are derived. As described in the description of the image decoding apparatus, the motion vector and the reference picture index are derived by reading out the motion vector and the reference picture index such as the adjacent PU and the reference picture block from the prediction parameter memory 108.
 AMVP予測パラメータ導出部1122は、上述のAMVP予測パラメータ導出部3032(図12参照)と同様な構成を有する。 The AMVP prediction parameter derivation unit 1122 has the same configuration as the AMVP prediction parameter derivation unit 3032 (see FIG. 12).
 すなわち、予測モードpredModeがインター予測モードを示す場合、AMVP予測パラメータ導出部1122には符号化パラメータ決定部110から動きベクトルmvLXが入力される。AMVP予測パラメータ導出部1122は、入力された動きベクトルmvLXに基づいて予測ベクトルmvpLXを導出する。AMVP予測パラメータ導出部1122は、導出した予測ベクトルmvpLXを減算部1123に出力する。なお、参照ピクチャインデックスrefIdx及び予測ベクトルインデックスmvp_LX_idxは、エントロピー符号化部104に出力される。 That is, when the prediction mode predMode indicates the inter prediction mode, the motion vector mvLX is input from the encoding 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. Note that the reference picture index refIdx and the prediction vector index mvp_LX_idx are output to the entropy encoding unit 104.
 減算部1123は、符号化パラメータ決定部110から入力された動きベクトルmvLXから、AMVP予測パラメータ導出部1122から入力された予測ベクトルmvpLXを減算して差分ベクトルmvdLXを生成する。差分ベクトルmvdLXはエントロピー符号化部104に出力される。 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 entropy encoding unit 104.
 説明の便宜上、上述した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。 For convenience of explanation, members having the same functions as those described above will be given the same reference numerals and explanation thereof will be omitted.
 (A1:参照ブロックの特徴を考慮した重み係数を導出する構成)
 非特許文献2に記載の従来技術では、重み係数の導出において、参照ブロックの特徴が考慮されていないため、符号化効率に改善の余地がある。そこで、本実施形態では、参照ブロックの特徴を表す参照ブロックパラメータに応じて重み係数を導出する。
(A1: Configuration for deriving weighting factors in consideration of features of reference blocks)
In the prior art described in Non-Patent Document 2, there is room for improvement in coding efficiency because the characteristics of the reference block are not taken into account in the derivation of the weighting coefficient. Therefore, in the present embodiment, the weighting factor is derived according to the reference block parameter representing the feature of the reference block.
 図16は、図5に示す画像復号装置31の予測パラメータ復号部302のインター予測パラメータ復号部303、および図11に示すインター予測画像生成部309の詳細構成を示す概略図である。 FIG. 16 is a schematic diagram illustrating a detailed configuration of the inter prediction parameter decoding unit 303 of the prediction parameter decoding unit 302 of the image decoding device 31 illustrated in FIG. 5 and the inter prediction image generation unit 309 illustrated in FIG.
 図16に示すように、インター予測パラメータ復号部303は、重みインデックス復号部3038と、参照ブロックパラメータ導出部3039と、重み係数導出部3030とを含んで構成される。 16, the inter prediction parameter decoding unit 303 includes a weight index decoding unit 3038, a reference block parameter derivation unit 3039, and a weight coefficient derivation unit 3030.
  <重みインデックス復号部3038>
 重みインデックス復号部3038は、エントロピー復号部301が供給する符号化データから、重みインデックスweightIdxを復号する。復号された重みインデックスweightIdxは、重み係数導出部3030に供給される。ここで、重みインデックスweightIdxとは、双予測の重み係数を導出するために参照されるインデックスである。
<Weight Index Decoding Unit 3038>
The weight index decoding unit 3038 decodes the weight index weightIdx from the encoded data supplied by the entropy decoding unit 301. The decoded weight index weightIdx is supplied to the weight coefficient deriving unit 3030. Here, the weight index weightIdx is an index that is referred to in order to derive a bi-prediction weight coefficient.
  <参照ブロックパラメータ導出部3039>
 参照ブロックパラメータ導出部3039は、予測パラメータメモリ307を参照し、参照ブロックの参照ブロックパラメータを導出する。ここで、参照ブロックパラメータとは、参照ブロックの情報(例えば、参照ピクチャのPOC(Picture Order Count)、参照ブロックへの動きベクトル、参照ブロックの量子化パラメータ(QP;Quantization Parameter))から導出されるパラメータであり、予測画像を生成するために参照される。より具体的には、参照ブロックパラメータは、後述する重み候補リストを導出するために参照されてもよい。以下では、参照ブロックパラメータ導出部3039が、参照ブロックパラメータXval0およびXval1を導出する構成について説明する。
<Reference block parameter deriving unit 3039>
The reference block parameter deriving unit 3039 refers to the prediction parameter memory 307 and derives the reference block parameter of the reference block. Here, the reference block parameter is derived from reference block information (for example, POC (Picture Order Count) of a reference picture, a motion vector to the reference block, a quantization parameter (QP)) of the reference block. It is a parameter and is referenced to generate a predicted image. More specifically, the reference block parameter may be referred to in order to derive a weight candidate list described later. Hereinafter, a configuration in which the reference block parameter deriving unit 3039 derives the reference block parameters Xval0 and Xval1 will be described.
 より具体的には、参照ブロックパラメータXval0(第1参照ブロックパラメータ)は、後述する参照ブロックL0(第1参照ブロック)を含むピクチャのPOCと対象ブロックを含むピクチャのPOCとに応じて定めるパラメータであり、参照ブロックL0を含むピクチャのPOCと対象ブロックを含むピクチャのPOCとの差の絶対値である。また、参照ブロックパラメータXval1(第2参照ブロックパラメータ)は、後述する参照ブロックL1(第2参照ブロック)を含むピクチャのPOCと対象ブロックを含むピクチャのPOCとに応じて定めるパラメータであり、参照ブロックL1を含むピクチャのPOCと対象ブロックを含むピクチャのPOCとの差の絶対値である。POCとは、参照ブロックを含むピクチャまたは対象ブロックを含むピクチャの時間的な順序を示す値であり、本願では参照ブロックの優先度を示すパラメータの導出に用いる。 More specifically, the reference block parameter Xval0 (first reference block parameter) is a parameter determined according to the POC of a picture including a reference block L0 (first reference block) described later and the POC of a picture including the target block. Yes, it is the absolute value of the difference between the POC of the picture including the reference block L0 and the POC of the picture including the target block. The reference block parameter Xval1 (second reference block parameter) is a parameter determined according to the POC of a picture including a reference block L1 (second reference block) to be described later and the POC of a picture including the target block. This is the absolute value of the difference between the POC of the picture containing L1 and the POC of the picture containing the target block. The POC is a value indicating a temporal order of a picture including a reference block or a picture including a target block, and is used for deriving a parameter indicating the priority of the reference block in the present application.
 さらに、参照ブロックパラメータ導出部3039は、参照ブロックパラメータXval0およびXval1に応じた参照ブロックの特徴を示す値(参照ブロックインデックス)fIdxを導出する。導出された参照ブロックインデックスfIdxは、重み係数導出部3030に供給される。ここで、参照ブロックインデックスfIdxとは、後述する重み候補リストを導出するために参照されるインデックスである。 Furthermore, the reference block parameter deriving unit 3039 derives a value (reference block index) fIdx indicating the characteristics of the reference block according to the reference block parameters Xval0 and Xval1. The derived reference block index fIdx is supplied to the weighting factor deriving unit 3030. Here, the reference block index fIdx is an index that is referred to in order to derive a weight candidate list to be described later.
  <重み係数導出部3030>
 重み係数導出部3030は、重みインデックスweightIdxと、参照ブロックインデックスfIdxとから、重み係数wを導出する。ここで、重み係数wとは、重み予測において動き補償画像に乗算する値を求めるための係数である。
<Weighting factor deriving unit 3030>
The weighting factor deriving unit 3030 derives the weighting factor w from the weighting index weightIdx and the reference block index fIdx. Here, the weight coefficient w is a coefficient for obtaining a value to be multiplied to the motion compensated image in the weight prediction.
 図17は、図16に示すインター予測パラメータ復号部303の重み係数導出部3030の構成を示す概略図である。図17に示すように、重み係数導出部3030は、重み候補リスト導出部30301と、重み係数選択部30302とを含んで構成される。 FIG. 17 is a schematic diagram illustrating a configuration of the weight coefficient deriving unit 3030 of the inter prediction parameter decoding unit 303 illustrated in FIG. As shown in FIG. 17, the weighting factor derivation unit 3030 includes a weight candidate list derivation unit 30301 and a weighting factor selection unit 30302.
 重み候補リスト導出部30301は、参照ブロックパラメータ導出部3039が供給する参照ブロックインデックスfIdxから、重み候補リストweightCandListを導出する。導出された重み候補リストweightCandListは、重み係数選択部30302に供給される。ここで、重み候補リストweightCandListは、複数の重み係数wを要素とするリストである。 The weight candidate list deriving unit 30301 derives a weight candidate list weightCandList from the reference block index fIdx supplied by the reference block parameter deriving unit 3039. The derived weight candidate list weightCandList is supplied to the weight coefficient selection unit 30302. Here, the weight candidate list weightCandList is a list having a plurality of weighting factors w as elements.
 重み係数選択部30302は、重み候補リストweightCandListと、重みインデックスweightIdxとに応じて、重み係数wを導出する。導出された重み係数wは、重み予測部3094に供給される。 The weight coefficient selection unit 30302 derives the weight coefficient w according to the weight candidate list weightCandList and the weight index weightIdx. The derived weight coefficient w is supplied to the weight prediction unit 3094.
 (A1:参照ブロックの特徴を考慮した重み係数を導出する動作)
 図18は、図16に示すインター予測パラメータ復号部303およびインター予測画像生成部309の動作を示すフローチャートである。図18に示すように、インター予測パラメータ復号部303およびインター予測画像生成部309の動作は、ステップS1~S4を含む。ステップS3は、ステップS31およびS32を含む。
(A1: Operation for deriving a weighting factor considering the characteristics of the reference block)
FIG. 18 is a flowchart showing operations of the inter prediction parameter decoding unit 303 and the inter prediction image generation unit 309 shown in FIG. As shown in FIG. 18, the operations of the inter prediction parameter decoding unit 303 and the inter prediction image generation unit 309 include steps S1 to S4. Step S3 includes steps S31 and S32.
  <ステップS1>
 重みインデックス復号部3038は、重みインデックスweightIdxを復号する。
<Step S1>
The weight index decoding unit 3038 decodes the weight index weightIdx.
  <ステップS2>
 動き補償部3091が、動き補償画像predSamplesL0およびpredSamplesL1を導出する際に参照する参照ブロックを、各々、参照ブロックL0および参照ブロックL1と呼ぶ。
<Step S2>
Reference blocks that the motion compensation unit 3091 refers to when deriving the motion compensated images predSamplesL0 and predSamplesL1 are referred to as a reference block L0 and a reference block L1, respectively.
 参照ブロックパラメータ導出部3039は、参照ブロックL0の参照ブロックパラメータXval0、および参照ブロックL1の参照ブロックパラメータXval1を導出する(導出方法は後述の「X:参照ブロックパラメータ、類似度、および優先度の導出方法」参照)。 The reference block parameter derivation unit 3039 derives the reference block parameter Xval0 of the reference block L0 and the reference block parameter Xval1 of the reference block L1 (the derivation method is “X: derivation of reference block parameter, similarity, and priority” described later) Method ”).
 なお、参照ブロックパラメータは、参照ブロックの優先度を示すパラメータであり、POC、動きベクトル、および量子化パラメータなどから導出される。参照ブロックパラメータは、時間的な距離、非類似度(類似度)、優先度と呼ぶこともできる。 Note that the reference block parameter is a parameter indicating the priority of the reference block, and is derived from the POC, the motion vector, the quantization parameter, and the like. The reference block parameters can also be called temporal distance, dissimilarity (similarity), and priority.
 参照ブロックパラメータ導出部3039は、次式によって参照ブロックパラメータXval0およびXval1を導出する。
Xval0 = |PicOrderCount(refPic0) - PicOrderCount(currPic)|
Xval1 = |PicOrderCount(refPic1) - PicOrderCount(currPic)|
refPic0:参照ブロックL0のピクチャ
refPic1:参照ブロックL1のピクチャ
currPic:対象ピクチャ
PicOrderCount(pic):ピクチャpicのPOCを返す関数。単にPOC(pic)とも記載する。
The reference block parameter deriving unit 3039 derives reference block parameters Xval0 and Xval1 by the following equation.
Xval0 = | PicOrderCount (refPic0)-PicOrderCount (currPic) |
Xval1 = | PicOrderCount (refPic1)-PicOrderCount (currPic) |
refPic0: Picture of reference block L0
refPic1: Picture of reference block L1
currPic: Target picture
PicOrderCount (pic): A function that returns the POC of the picture pic. Also simply described as POC (pic).
 さらに、参照ブロックパラメータ導出部3039は、参照ブロックパラメータXval0およびXval1に応じて参照ブロックインデックスfIdxを導出する(導出方法は後述の「F:参照ブロックインデックスfIdx導出方法」参照)。 Furthermore, the reference block parameter deriving unit 3039 derives a reference block index fIdx according to the reference block parameters Xval0 and Xval1 (refer to “F: Reference block index fIdx derivation method” described later for the derivation method).
 図19は、図18に示す動作のステップS2における、参照ブロックパラメータXval0およびXval1と、参照ブロックインデックスfIdxとの対応関係を示す概念図である。参照ブロックパラメータ導出部3039は、図19に示す対応関係を用い、次式によって参照ブロックインデックスfIdxを導出する。
if (Xval0 * 2 > Xval1 * 6) fIdx = 0
else if (Xval0 * 3 > Xval1 * 5) fIdx = 1
else if (Xval0 * 4 > Xval1 * 4) fIdx = 2
else if (Xval0 * 5 > Xval1 * 3) fIdx = 3
else if (Xval0 * 6 > Xval1 * 2) fIdx = 4
else fIdx = 5
  <ステップS3>
 重み候補リスト導出部30301は、参照ブロックパラメータXval0およびXval1に応じて重み候補リストを導出する(ステップS31)。そして、重み係数選択部30302は、重みインデックス復号部3038が復号した重みインデックスweightIdxと、重み候補リスト導出部30301が導出した重み候補リストとから、重み係数wを導出する(ステップS32)。なお、以下では「要素の順序付集合」をリスト(重み候補リスト)と呼んでいるが、テーブル(重み候補テーブル)と呼んでもよい。同様に、以下、重み候補リスト導出部を、重み候補テーブル導出部と呼んでもよい。
FIG. 19 is a conceptual diagram showing a correspondence relationship between the reference block parameters Xval0 and Xval1 and the reference block index fIdx in step S2 of the operation shown in FIG. The reference block parameter deriving unit 3039 derives the reference block index fIdx by the following equation using the correspondence shown in FIG.
if (Xval0 * 2> Xval1 * 6) fIdx = 0
else if (Xval0 * 3> Xval1 * 5) fIdx = 1
else if (Xval0 * 4> Xval1 * 4) fIdx = 2
else if (Xval0 * 5> Xval1 * 3) fIdx = 3
else if (Xval0 * 6> Xval1 * 2) fIdx = 4
else fIdx = 5
<Step S3>
The weight candidate list derivation unit 30301 derives a weight candidate list according to the reference block parameters Xval0 and Xval1 (step S31). Then, the weight coefficient selection unit 30302 derives the weight coefficient w from the weight index weightIdx decoded by the weight index decoding unit 3038 and the weight candidate list derived by the weight candidate list deriving unit 30301 (step S32). Hereinafter, the “ordered set of elements” is called a list (weight candidate list), but may be called a table (weight candidate table). Similarly, hereinafter, the weight candidate list derivation unit may be referred to as a weight candidate table derivation unit.
 ここでは、重み候補リスト導出部30301は、参照ブロックインデックスfIdxに応じて、重み候補リストweightCandListWを導出する。
if (fIdx == 0) weightCandListW[] = {2, 3, 4, 5, 6, -2, 10}
else if (fIdx == 1) weightCandListW[] = {3, 4, 2, 5, 6, -2, 10}
else if (fIdx == 2) weightCandListW[] = {4, 3, 5, 2, 6, -2, 10}
else if (fIdx == 3) weightCandListW[] = {4, 5, 3, 6, 2, 10, -2}
else if (fIdx == 4) weightCandListW[] = {5, 4, 6, 3, 2, 10, -2}
else if (fIdx == 5) weightCandListW[] = {6, 5, 4, 3, 2, 10, -2}
 なお、重み候補リストの要素は重み係数であり、各係数は優先度順に並べられている(後述する「ステップS3の変形例」に示すように、別の形態の重み候補リストでもよい)。また、重み候補リスト導出部30301は、以下のようにテーブル参照により、重み候補リストweightCandListWを導出してもよい。すなわち、重み候補リストテーブルweightCandListWTable[][]をfIdxで参照することで重み係数テーブルweightCandListWを導出する。
weightCandListW = weightCandListWTable[fIdx]
weightCandListWTable[][] =
{
 {2, 3, 4, 5, 6, -2, 10},
 {3, 4, 2, 5, 6, -2, 10},
 {4, 3, 5, 2, 6, -2, 10},
 {4, 5, 3, 6, 2, 10, -2},
 {5, 4, 6, 3, 2, 10, -2},
 {6, 5, 4, 3, 2, 10, -2}
}
 上記テーブルは、以下のように記載も可能である。
weightCandListWTable[0][] = {2, 3, 4, 5, 6, -2, 10}
weightCandListWTable[1][] = {3, 4, 2, 5, 6, -2, 10}
weightCandListWTable[2][] = {4, 3, 5, 2, 6, -2, 10}
weightCandListWTable[3][] = {4, 5, 3, 6, 2, 10, -2}
weightCandListWTable[4][] = {5, 4, 6, 3, 2, 10, -2}
weightCandListWTable[5][] = {6, 5, 4, 3, 2, 10, -2}
 重み係数選択部30302は、次式によって重み係数wを導出する。
w = weightCandListW[weightIdx]
  <ステップS3の変形例>
 前記ステップS3では、重み候補リストの要素eは、重み係数(例えば、e∈{-2,2,3,4,5,6,10}のいずれか)であったが、重み候補リストの要素は、重み係数を示すパラメータ(インデックス)でもよい。例えば、eは、0~6のいずれかである。この場合、重み候補リスト導出部30301は、参照ブロックインデックスfIdxに応じて、重み候補リストテーブルweightCandListITable[0]~weightCandListITable[5]のいずれかを重み候補リストとして選択する。重み候補リスト導出部30301は、次式によって重み候補リストweightCandListIを導出する。
Here, the weight candidate list deriving unit 30301 derives the weight candidate list weightCandListW according to the reference block index fIdx.
if (fIdx == 0) weightCandListW [] = {2, 3, 4, 5, 6, -2, 10}
else if (fIdx == 1) weightCandListW [] = {3, 4, 2, 5, 6, -2, 10}
else if (fIdx == 2) weightCandListW [] = {4, 3, 5, 2, 6, -2, 10}
else if (fIdx == 3) weightCandListW [] = {4, 5, 3, 6, 2, 10, -2}
else if (fIdx == 4) weightCandListW [] = {5, 4, 6, 3, 2, 10, -2}
else if (fIdx == 5) weightCandListW [] = {6, 5, 4, 3, 2, 10, -2}
The elements of the weight candidate list are weight coefficients, and the coefficients are arranged in the order of priority (as shown in “Modified example of step S3” described later, another form of weight candidate list may be used). Further, the weight candidate list deriving unit 30301 may derive the weight candidate list weightCandListW by referring to the table as follows. That is, the weighting factor table weightCandListW is derived by referring to the weight candidate list table weightCandListWTable [] [] with fIdx.
weightCandListW = weightCandListWTable [fIdx]
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10},
{3, 4, 2, 5, 6, -2, 10},
{4, 3, 5, 2, 6, -2, 10},
{4, 5, 3, 6, 2, 10, -2},
{5, 4, 6, 3, 2, 10, -2},
{6, 5, 4, 3, 2, 10, -2}
}
The table can also be described as follows.
weightCandListWTable [0] [] = {2, 3, 4, 5, 6, -2, 10}
weightCandListWTable [1] [] = {3, 4, 2, 5, 6, -2, 10}
weightCandListWTable [2] [] = {4, 3, 5, 2, 6, -2, 10}
weightCandListWTable [3] [] = {4, 5, 3, 6, 2, 10, -2}
weightCandListWTable [4] [] = {5, 4, 6, 3, 2, 10, -2}
weightCandListWTable [5] [] = {6, 5, 4, 3, 2, 10, -2}
The weight coefficient selection unit 30302 derives the weight coefficient w by the following equation.
w = weightCandListW [weightIdx]
<Modification of Step S3>
In step S3, the element e of the weight candidate list is a weighting coefficient (for example, any of e∈ {-2,2,3,4,5,6,10}). May be a parameter (index) indicating a weighting factor. For example, e is any one of 0 to 6. In this case, the weight candidate list deriving unit 30301 selects one of the weight candidate list tables weightCandListITable [0] to weightCandListITable [5] as the weight candidate list according to the reference block index fIdx. The weight candidate list deriving unit 30301 derives a weight candidate list weightCandListI by the following equation.
 weightCandListI = weightCandListITable[fIdx]
 なお、重み候補リストweightCandListIは例えば以下を用いることができる。
weightCandListITable[0][] = {1, 2, 3, 4, 5, 0, 6}
weightCandListITable[1][] = {2, 3, 1, 4, 5, 0, 6}
weightCandListITable[2][] = {3, 2, 4, 1, 5, 0, 6}
weightCandListITable[3][] = {3, 4, 2, 5, 1, 6, 0}
weightCandListITable[4][] = {4, 3, 5, 2, 1, 6, 0}
weightCandListITable[5][] = {5, 4, 3, 2, 1, 6, 0}
 そして、重み係数選択部30302は、参照ブロックパラメータfIdxにより選択された重み候補リストweightCandListIと、重みインデックスweightIdxとから、重み係数を示すパラメータ(ここではposIdx)を導出する。
weightCandListI = weightCandListITable [fIdx]
For example, the following can be used as the weight candidate list weightCandListI.
weightCandListITable [0] [] = {1, 2, 3, 4, 5, 0, 6}
weightCandListITable [1] [] = {2, 3, 1, 4, 5, 0, 6}
weightCandListITable [2] [] = {3, 2, 4, 1, 5, 0, 6}
weightCandListITable [3] [] = {3, 4, 2, 5, 1, 6, 0}
weightCandListITable [4] [] = {4, 3, 5, 2, 1, 6, 0}
weightCandListITable [5] [] = {5, 4, 3, 2, 1, 6, 0}
Then, the weight coefficient selection unit 30302 derives a parameter (here, posIdx) indicating the weight coefficient from the weight candidate list weightCandListI selected by the reference block parameter fIdx and the weight index weightIdx.
 posIdx = weightCandListI[weightIdx]
 ここで、重み係数を示すパラメータposIdxは、重み係数のテーブルである重み係数テーブルweightTableの位置posIdxである。
posIdx = weightCandListI [weightIdx]
Here, the parameter posIdx indicating the weighting factor is the position posIdx of the weighting factor table weightTable that is a table of weighting factors.
 重み係数選択部30302は、次式によって、重み係数テーブルweightTableとパラメータposIdxとから、重み係数wを導出する。
w = weightTable[posIdx]
 ここで、例えば、重み係数テーブルweightTableは、weightTable[] = {-2,2,3,4,5,6,10}とする。
The weighting factor selection unit 30302 derives the weighting factor w from the weighting factor table weightTable and the parameter posIdx by the following equation.
w = weightTable [posIdx]
Here, for example, the weight coefficient table weightTable is weightTable [] = {− 2,2,3,4,5,6,10}.
  <ステップS4>
 重み予測部3094は、重み係数導出部3030が導出した重み係数wに応じて、2つの動き補償画像predSamplesL0およびpredSamplesL1の重み付平均から予測画像predSamplesを生成する。重み予測部3094は、次式のように予測画像predSamplesを生成する。
w0 = w
w1 = (1<<shiftWP)-w0
offset = 1<<( shiftWP-1)
predSamples[x][y] = (w0 * predSamplesL0[x][y] + w1 * predSamplesL1[x][y] + offset) >> shiftWP
 なお、shiftWPは、重み係数を整数として扱うためのシフト値である。(1/2)shiftWPは、重み係数の単位となる。例えば、shiftWPとして5(この場合1/32単位の重み係数)などを用いる。また、予測画像の生成において、必ずしもoffsetを加算する必要はない。なお、w0、w1の算出方法は下記でもよい。
w0 = (1<<shiftWP)-w1
w1 = w
 なお、予測画像の生成において、shiftWPによる右シフトは、ここでは行わず、後段の処理で行ってもよい。この場合、以下の演算を行う。
predSamples[x][y] = (w0 * predSamplesL0[x][y] + w1 * predSamplesL1[x][y] + offset)
 また、予測画像の生成において、shiftWP未満の所定の数Mを用いて小さ目のシフトを行っておき、後段になって再度Mだけ右シフトして調整してもよい。この場合、以下の演算を行う。
predSamples[x][y] = (w0 * predSamplesL0[x][y] + w1 * predSamplesL1[x][y] + offset) >> (shiftWP - M)
 (A1:参照ブロックの特徴を考慮した重み係数の導出による効果)
 以上のように、参照ブロックパラメータから重み候補リストを導出し、重み候補リストに応じて重み係数を導出することにより、対象ピクチャと参照画像との時間的な距離の比率に応じて、選択確率が高い順に重み係数を並べたリストを導出できる。
<Step S4>
The weight prediction unit 3094 generates predicted images predSamples from the weighted average of the two motion compensated images predSamplesL0 and predSamplesL1 according to the weighting factor w derived by the weighting factor deriving unit 3030. The weight prediction unit 3094 generates predicted images predSamples as in the following equation.
w0 = w
w1 = (1 << shiftWP) -w0
offset = 1 << (shiftWP-1)
predSamples [x] [y] = (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset) >> shiftWP
ShiftWP is a shift value for treating the weighting coefficient as an integer. (1/2) shiftWP is a unit of weighting factor. For example, 5 (in this case, 1/32 unit weight coefficient) is used as shiftWP. Moreover, it is not always necessary to add offset in the generation of a predicted image. The method for calculating w0 and w1 may be as follows.
w0 = (1 << shiftWP) -w1
w1 = w
Note that in the generation of a predicted image, the right shift by shiftWP may not be performed here, but may be performed in a subsequent process. In this case, the following calculation is performed.
predSamples [x] [y] = (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset)
Further, in the generation of the predicted image, a small shift may be performed using a predetermined number M less than shiftWP, and adjustment may be performed by shifting rightward by M again in the subsequent stage. In this case, the following calculation is performed.
predSamples [x] [y] = (w0 * predSamplesL0 [x] [y] + w1 * predSamplesL1 [x] [y] + offset) >> (shiftWP-M)
(A1: Effect of derivation of weighting factors considering characteristics of reference block)
As described above, by deriving the weight candidate list from the reference block parameter and deriving the weighting factor according to the weight candidate list, the selection probability is increased according to the ratio of the temporal distance between the target picture and the reference image. A list in which weighting factors are arranged in descending order can be derived.
 以上の復号処理は、符号化処理においても適用できる。そして、符号化処理において、以上のように導出された重み係数を符号化することにより、従来よりも小さな重みインデックスで重み係数が符号化できるようになる。そのため、重みインデックスの符号量を低減する効果を奏する。 The above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
 なお、以上の構成は、対象ピクチャと参照画像との時間的な距離の比率に応じて、前記重み係数を並べたリストを導出する構成には限定されず、参照画像の方向、動きベクトルの大きさの比率、または量子化パラメータの大小に応じて、前記重み係数を並べたリストを導出してもよい。この場合にも、重みインデックスの符号量を低減する効果を奏する。 Note that the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited. A list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
 (A2:参照ブロックの特徴を考慮した重み係数を導出する構成および動作)
 図20は、図17に示す重み係数導出部3030とは異なる重み係数導出部3030aの構成を示す概略図である。図20に示すように、重み係数導出部3030aは、重み係数修正部30303をさらに備える点が、重み係数導出部3030とは異なる。図16に示すインター予測パラメータ復号部303において、重み係数導出部3030を重み係数導出部3030aに置き換えることができる。
(A2: Configuration and operation for deriving weighting factors considering the characteristics of reference blocks)
FIG. 20 is a schematic diagram showing a configuration of a weighting factor deriving unit 3030a different from the weighting factor deriving unit 3030 shown in FIG. As shown in FIG. 20, the weighting factor deriving unit 3030a is different from the weighting factor deriving unit 3030 in that it further includes a weighting factor correcting unit 30303. In the inter prediction parameter decoding unit 303 shown in FIG. 16, the weighting factor deriving unit 3030 can be replaced with a weighting factor deriving unit 3030a.
 重み係数選択部30302は、重み係数wを導出し、重み係数修正部30303に供給する。重み係数修正部30303は、重み係数wを修正し、重み予測部3094に供給する。 The weighting factor selection unit 30302 derives the weighting factor w and supplies it to the weighting factor correction unit 30303. The weighting coefficient correction unit 30303 corrects the weighting coefficient w and supplies it to the weight prediction unit 3094.
 <A2におけるステップS2>
 図21は、図19に示す対応関係とは異なる、参照ブロックパラメータXval0およびXval1と、参照ブロックインデックスfIdxとの対応関係を示す概念図である。図21において、参照ブロックインデックスfIdxは、0または1であり、参照ブロックパラメータXval0およびXval1の大小関係のみによって定まる。
<Step S2 in A2>
FIG. 21 is a conceptual diagram showing the correspondence between reference block parameters Xval0 and Xval1 and the reference block index fIdx, which is different from the correspondence shown in FIG. In FIG. 21, the reference block index fIdx is 0 or 1, and is determined only by the magnitude relationship between the reference block parameters Xval0 and Xval1.
 参照ブロックパラメータ導出部3039は、図21に示す対応関係を用い、次式によって参照ブロックインデックスfIdxを導出する。
if (Xval0 > Xval1) fIdx = 0
else fIdx = 1
 なお、大小関係の比較には不等号(>)に限らず、等号を含んだ≧を用いることもできる。また、<、≦を用いることもできる。以下同様である。
The reference block parameter deriving unit 3039 derives the reference block index fIdx by the following equation using the correspondence shown in FIG.
if (Xval0> Xval1) fIdx = 0
else fIdx = 1
In addition, not only an inequality sign (>) but also ≧ including an equal sign can be used for the comparison of the magnitude relation. Also, <and ≦ can be used. The same applies hereinafter.
 <A2におけるステップS3>
 重み候補リスト導出部30301は、重み候補リスト(重み係数テーブル)weightTableを導出する。本構成では、重み候補リストは、参照ブロックパラメータXval0, Xval1および参照ブロックインデックスfIdxに応じずに導出される。
weightTable[] = {4, 3, 5, 2, 6, -2, 10}
 重み係数選択部30302は、次式によって重み係数テーブルweightTableとパラメータweightIdxとから、重み係数wを導出する。
w = weightTable[weightIdx]
 <A2におけるステップS4>
 次に、重み係数修正部30303は、参照ブロックインデックスfIdxに応じて、前記重み係数wを更新する。具体的には、参照ブロックインデックスfIdxが所定の値(例えば、Xval0 > Xval1を示すfIdx == 0)の場合には前記重み係数をそのまま用いる。逆に、参照ブロックインデックスfIdxが所定の値以外(例えば、Xval0 ≦ Xval1を示す値fIdx == 1)の場合には、動き補償画像predSamplesL0(第1の動き補償画像)の重みw0(第1重み)と動き補償画像predSamplesL1(第2の動き補償画像)の重みw1(第2重み)とをスワップするように、wの値を更新する。
<Step S3 in A2>
The weight candidate list deriving unit 30301 derives a weight candidate list (weight coefficient table) weightTable. In this configuration, the weight candidate list is derived without depending on the reference block parameters Xval0 and Xval1 and the reference block index fIdx.
weightTable [] = {4, 3, 5, 2, 6, -2, 10}
The weighting factor selection unit 30302 derives the weighting factor w from the weighting factor table weightTable and the parameter weightIdx by the following equation.
w = weightTable [weightIdx]
<Step S4 in A2>
Next, the weighting factor correction unit 30303 updates the weighting factor w according to the reference block index fIdx. Specifically, when the reference block index fIdx is a predetermined value (for example, fIdx = X 0 indicating Xval0> Xval1), the weight coefficient is used as it is. Conversely, when the reference block index fIdx is other than a predetermined value (for example, a value fIdx indicating Xval0 ≦ Xval1 == 1), the weight w0 (first weight) of the motion compensated image predSamplesL0 (first motion compensated image) ) And the weight w1 (second weight) of the motion compensated image predSamplesL1 (second motion compensated image) are swapped.
 このとき、次式により、wの値を更新する。
w = (1<<shiftWP) - w
 もしくは、次式により、重みw0とw1とをスワップする。次式において、tmpは、重みw0とw1とのスワップに用いる一時的な変数である。
tmp = w0
w0 = w1
w1 = tmp
 つまり、前記スワップは、次式のように記載できる。次式において、swapは、重みw0とw1とを引数にとり、重みw0とw1とをスワップして得られる2つの値を返す関数である。
(w0 , w1) = swap(w0, w1)
 以下では、重み係数wから求められる重み係数w0およびw1を、重みw0およびw1と記載する。
At this time, the value of w is updated by the following equation.
w = (1 << shiftWP)-w
Alternatively, the weights w0 and w1 are swapped by the following equation. In the following equation, tmp is a temporary variable used for swapping the weights w0 and w1.
tmp = w0
w0 = w1
w1 = tmp
That is, the swap can be described as: In the following equation, swap is a function that takes weights w0 and w1 as arguments and returns two values obtained by swapping weights w0 and w1.
(w0, w1) = swap (w0, w1)
Hereinafter, the weighting factors w0 and w1 obtained from the weighting factor w will be referred to as weights w0 and w1.
 (A2:参照ブロックの特徴を考慮した重み係数の導出による効果)
 以上のように、通常の方法(参照ブロックパラメータに依存しない方法)で重み係数を導出し、その後、参照ブロックパラメータに応じて重み係数を更新できる。なお、前記スワップは、重み係数の更新方法の1つである。このように、対象ピクチャと参照画像との時間的な距離の比率に応じて、同じ重み係数テーブルを用いた場合にも、小さな重みインデックスで重み係数が符号化できるようになる。これにより、重みインデックスの符号量を低減する効果を奏する。
(A2: Effect of derivation of weighting factors considering characteristics of reference block)
As described above, the weighting factor can be derived by a normal method (a method that does not depend on the reference block parameter), and then the weighting factor can be updated according to the reference block parameter. The swap is one method for updating the weighting factor. As described above, even when the same weight coefficient table is used according to the ratio of the temporal distance between the target picture and the reference image, the weight coefficient can be encoded with a small weight index. This produces an effect of reducing the code amount of the weight index.
 以上の復号処理は、符号化処理においても適用できる。そして、符号化処理において、以上のように導出された重み係数を符号化することにより、従来よりも小さな重みインデックスで重み係数が符号化できるようになる。そのため、重みインデックスの符号量を低減する効果を奏する。 The above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
 なお、以上の構成は、対象ピクチャと参照画像との時間的な距離の比率に応じて、前記重み係数を並べたリストを導出する構成には限定されず、参照画像の方向、動きベクトルの大きさの比率、または量子化パラメータの大小に応じて、前記重み係数を並べたリストを導出してもよい。この場合にも、重みインデックスの符号量を低減する効果を奏する。 Note that the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited. A list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
 (A3:参照ブロックの特徴を考慮した重み係数を導出する構成)
 図22は、図16に示すインター予測パラメータ復号部303とは異なるインター予測パラメータ復号部303b、およびインター予測画像生成部309の詳細構成を示す概略図である。
(A3: Configuration for deriving a weighting factor considering the characteristics of the reference block)
FIG. 22 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit 303b and an inter prediction image generation unit 309 different from the inter prediction parameter decoding unit 303 illustrated in FIG.
 インター予測パラメータ復号部303bは、以下の点がインター予測パラメータ復号部303とは異なる。
・参照ブロックパラメータ導出部3039が、参照ブロックパラメータ導出部3039bである点。
・重み係数導出部3030が、重み係数導出部3030bである点。
・参照ブロックパラメータ導出部3039bが重み係数導出部3030bに供給する値が、予測重み係数wpIdxである点。
The inter prediction parameter decoding unit 303b is different from the inter prediction parameter decoding unit 303 in the following points.
Reference block parameter deriving unit 3039 is a reference block parameter deriving unit 3039b.
The weight coefficient deriving unit 3030 is a weight coefficient deriving unit 3030b.
The value that the reference block parameter deriving unit 3039b supplies to the weighting factor deriving unit 3030b is the prediction weighting factor wpIdx.
 そして、図5において、インター予測パラメータ復号部303は、インター予測パラメータ復号部303bに置き換えることができる。 And in FIG. 5, the inter prediction parameter decoding part 303 can be replaced with the inter prediction parameter decoding part 303b.
  <参照ブロックパラメータ導出部3039b>
 参照ブロックパラメータ導出部3039bは、予測パラメータメモリ307を参照し、参照ブロックの参照ブロックパラメータXval0およびXval1を導出し、さらに参照ブロックパラメータXval0およびXval1に応じた参照ブロックの特徴を示す値(予測重み係数)wpIdxを導出する。導出された予測重み係数wpIdxは、重み係数導出部3030bに供給される。ここで、予測重み係数wpIdxは、後述する重み候補リストを導出するために参照される係数である。
<Reference block parameter deriving unit 3039b>
The reference block parameter deriving unit 3039b refers to the prediction parameter memory 307, derives reference block parameters Xval0 and Xval1 of the reference block, and further indicates a value (prediction weight coefficient) indicating the characteristics of the reference block according to the reference block parameters Xval0 and Xval1. ) Derive wpIdx. The derived prediction weight coefficient wpIdx is supplied to the weight coefficient deriving unit 3030b. Here, the prediction weight coefficient wpIdx is a coefficient referred to in order to derive a weight candidate list described later.
  <重み係数導出部3030b>
 重み係数導出部3030bは、重みインデックスweightIdxと、予測重み係数wpIdxとから、重み係数wを導出する。
<Weighting factor deriving unit 3030b>
The weighting factor deriving unit 3030b derives the weighting factor w from the weighting index weightIdx and the prediction weighting factor wpIdx.
 図23は、図22に示すインター予測パラメータ復号部303bの重み係数導出部3030bの構成を示す概略図である。図23に示すように、重み係数導出部3030bは、重み候補リスト導出部30301bと、重み係数選択部30302とを含んで構成される。重み候補リスト導出部30301bは、参照ブロックパラメータ導出部3039bが供給する予測重み係数wpIdxから、重み候補リストweightCandListを導出する。 FIG. 23 is a schematic diagram illustrating a configuration of the weight coefficient deriving unit 3030b of the inter prediction parameter decoding unit 303b illustrated in FIG. As shown in FIG. 23, the weighting factor deriving unit 3030b includes a weight candidate list deriving unit 30301b and a weighting factor selecting unit 30302. The weight candidate list deriving unit 30301b derives a weight candidate list weightCandList from the prediction weight coefficient wpIdx supplied by the reference block parameter deriving unit 3039b.
 (A3:参照ブロックの特徴を考慮した重み係数を導出する動作)
  <A3におけるステップS2>
 図24は、図18に示す動作のステップS2における、参照ブロックパラメータXval0およびXval1と、重み係数の予測値(予測重み係数)wpIdxとの対応関係を示す概念図である。参照ブロックパラメータ導出部3039bは、図24に示す対応関係を用い、次式によって予測重み係数wpIdxを導出する。
if (Xval0 * 2 > Xval1 * 6) wpIdx = 2
else if (Xval0 * 3 > Xval1 * 5) wpIdx = 3
else if (Xval0 * 5 > Xval1 * 3) wpIdx = 4
else if (Xval0 * 6 > Xval1 * 2) wpIdx = 5
else wpIdx = 6
  <A3におけるステップS3>
 重み候補リスト導出部30301bは、予測重み係数wpIdxに応じて重み候補リストweightCandListWを導出する。ここでは、予測重み係数wpIdxの優先度が最も高くなるように、次式によって予測重み係数wpIdxを先頭の要素とする重み候補リストweightCandListWを導出する。
if (wpIdx == 2) weightCandListW[] = {2, 3, 4, 5, 6, -2, 10}
else if (wpIdx == 3) weightCandListW[] = {3, 4, 2, 5, 6, -2, 10}
else if (wpIdx == 4) weightCandListW[] = {4, 3, 5, 2, 6, -2, 10}
else if (wpIdx == 5) weightCandListW[] = {5, 4, 6, 3, 2, 10, -2}
else if (wpIdx == 6) weightCandListW[] = {6, 5, 4, 3, 2, 10, -2}
 重み係数選択部30302は、重み候補リストweightCandListWと、重みインデックスweightIdxとから、次式のように重み係数wを導出する。
w = weightCandListW[weightIdx]
 なお、重み係数導出部3030b(重み候補リスト導出部30301b)は、以下のようにテーブル参照により、重み候補リストweightCandListWを導出してもよい。すなわち、重み候補リストテーブルweightCandListWTable[][]をwpIdxで参照することで重み候補リストweightCandListWを導出する。
weightCandListW = weightCandListWTable[wpIdx - 2]
weightCandListWTable[][] =
{
 {2, 3, 4, 5, 6, -2, 10},
 {3, 4, 2, 5, 6, -2, 10},
 {4, 3, 5, 2, 6, -2, 10},
 {5, 4, 6, 3, 2, 10, -2},
 {6, 5, 4, 3, 2, 10, -2}
}
  <A3におけるステップS2の変形例>
 参照ブロックパラメータ導出部3039bは、参照ブロックパラメータXval0およびXval1を導出し、参照ブロックパラメータXval0およびXval1に応じて、次式のように、予測重み係数wpIdxを導出してもよい。
if (Xval0 * 2 > Xval1 * 6) wpIdx = 1
else if (Xval0 * 3 > Xval1 * 5) wpIdx = 2
else if (Xval0 * 5 > Xval1 * 3) wpIdx = 3
else if (Xval0 * 6 > Xval1 * 2) wpIdx = 4
else wpIdx = 5
  <A3におけるステップS3の変形例>
 重み候補リスト導出部30301bは、予測重み係数wpIdxに応じて、次式のように、重み係数の順序を表す順序インデックス、を要素とする重み候補リストweightCandListIを導出してもよい。ここで、重み候補リストweightCandListI[]は、予測重み係数wpIdxとなる順序インデックスが最も優先度が高くなるように、順序インデックスの予測値を先頭の要素としている。
if (wpIdx == 1)
 weightCandListI[] = {1, 2, 3, 4, 5, 0, 6}
else if (wpIdx == 2)
 weightCandListI[] = {2, 3, 1, 4, 5, 0, 6}
else if (wpIdx == 3)
 weightCandListI[] = {3, 2, 4, 1, 5, 0, 6}
else if (wpIdx == 4)
 weightCandListI[] = {4, 3, 5, 2, 1, 6, 0}
else if (wpIdx == 5)
 weightCandListI[] = {5, 4, 3, 2, 1, 6, 0}
 もしくは、重み候補リスト導出部30301bは、以下のようにテーブル参照により、重み候補リストweightCandListIを導出してもよい。
weightCandListI = weightCandListITable[wpIdx - 1]
weightCandListITable[] =
{
 {1, 2, 3, 4, 5, 0, 6}
 {2, 3, 1, 4, 5, 0, 6},
 {3, 2, 4, 1, 5, 0, 6},
 {4, 3, 5, 2, 1, 6, 0},
 {5, 4, 3, 2, 1, 6, 0}
}
 重み係数選択部30302は、次式によって重み候補リストweightCandListI[wpIdx]と、重みインデックスweightIdxとから、重み係数を示すパラメータ(ここではposIdx)を導出する。
posIdx = weightCandListI[wpIdx][weightIdx]
 そして、重み係数選択部30302は、次式によって、重み係数テーブルweightTableと、重み係数を示すパラメータposIdxとから、重み係数wを導出する。
w = weightTable[posIdx]
 ここで、例えば、重み係数テーブルweightTableは、weightTable[] = {-2,2,3,4,5,6,10}とする。
(A3: Operation for deriving a weighting factor considering the characteristics of the reference block)
<Step S2 in A3>
FIG. 24 is a conceptual diagram showing a correspondence relationship between the reference block parameters Xval0 and Xval1 and the predicted value of the weighting coefficient (predicted weighting coefficient) wpIdx in step S2 of the operation shown in FIG. The reference block parameter deriving unit 3039b derives a prediction weight coefficient wpIdx by the following equation using the correspondence shown in FIG.
if (Xval0 * 2> Xval1 * 6) wpIdx = 2
else if (Xval0 * 3> Xval1 * 5) wpIdx = 3
else if (Xval0 * 5> Xval1 * 3) wpIdx = 4
else if (Xval0 * 6> Xval1 * 2) wpIdx = 5
else wpIdx = 6
<Step S3 in A3>
The weight candidate list deriving unit 30301b derives a weight candidate list weightCandListW according to the prediction weight coefficient wpIdx. Here, a weight candidate list weightCandListW having the prediction weight coefficient wpIdx as the head element is derived by the following equation so that the priority of the prediction weight coefficient wpIdx is the highest.
if (wpIdx == 2) weightCandListW [] = {2, 3, 4, 5, 6, -2, 10}
else if (wpIdx == 3) weightCandListW [] = {3, 4, 2, 5, 6, -2, 10}
else if (wpIdx == 4) weightCandListW [] = {4, 3, 5, 2, 6, -2, 10}
else if (wpIdx == 5) weightCandListW [] = {5, 4, 6, 3, 2, 10, -2}
else if (wpIdx == 6) weightCandListW [] = {6, 5, 4, 3, 2, 10, -2}
The weight coefficient selection unit 30302 derives the weight coefficient w from the weight candidate list weightCandListW and the weight index weightIdx as in the following equation.
w = weightCandListW [weightIdx]
The weighting factor deriving unit 3030b (weight candidate list deriving unit 30301b) may derive the weight candidate list weightCandListW by referring to the table as follows. That is, the weight candidate list weightCandListW is derived by referring to the weight candidate list table weightCandListWTable [] [] with wpIdx.
weightCandListW = weightCandListWTable [wpIdx-2]
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10},
{3, 4, 2, 5, 6, -2, 10},
{4, 3, 5, 2, 6, -2, 10},
{5, 4, 6, 3, 2, 10, -2},
{6, 5, 4, 3, 2, 10, -2}
}
<Modification of step S2 in A3>
The reference block parameter deriving unit 3039b may derive the reference block parameters Xval0 and Xval1, and may derive the prediction weight coefficient wpIdx according to the reference block parameters Xval0 and Xval1, as in the following equation.
if (Xval0 * 2> Xval1 * 6) wpIdx = 1
else if (Xval0 * 3> Xval1 * 5) wpIdx = 2
else if (Xval0 * 5> Xval1 * 3) wpIdx = 3
else if (Xval0 * 6> Xval1 * 2) wpIdx = 4
else wpIdx = 5
<Modification of Step S3 in A3>
The weight candidate list deriving unit 30301b may derive a weight candidate list weightCandListI having elements of an order index representing the order of the weight coefficients, as in the following equation, according to the prediction weight coefficient wpIdx. Here, the weight candidate list weightCandListI [] has the predicted value of the order index as the top element so that the order index that becomes the prediction weight coefficient wpIdx has the highest priority.
if (wpIdx == 1)
weightCandListI [] = {1, 2, 3, 4, 5, 0, 6}
else if (wpIdx == 2)
weightCandListI [] = {2, 3, 1, 4, 5, 0, 6}
else if (wpIdx == 3)
weightCandListI [] = {3, 2, 4, 1, 5, 0, 6}
else if (wpIdx == 4)
weightCandListI [] = {4, 3, 5, 2, 1, 6, 0}
else if (wpIdx == 5)
weightCandListI [] = {5, 4, 3, 2, 1, 6, 0}
Alternatively, the weight candidate list deriving unit 30301b may derive the weight candidate list weightCandListI by referring to the table as follows.
weightCandListI = weightCandListITable [wpIdx-1]
weightCandListITable [] =
{
{1, 2, 3, 4, 5, 0, 6}
{2, 3, 1, 4, 5, 0, 6},
{3, 2, 4, 1, 5, 0, 6},
{4, 3, 5, 2, 1, 6, 0},
{5, 4, 3, 2, 1, 6, 0}
}
The weight coefficient selection unit 30302 derives a parameter (here, posIdx) indicating a weight coefficient from the weight candidate list weightCandListI [wpIdx] and the weight index weightIdx by the following equation.
posIdx = weightCandListI [wpIdx] [weightIdx]
The weight coefficient selection unit 30302 derives the weight coefficient w from the weight coefficient table weightTable and the parameter posIdx indicating the weight coefficient by the following equation.
w = weightTable [posIdx]
Here, for example, the weight coefficient table weightTable is weightTable [] = {− 2,2,3,4,5,6,10}.
 (A3:参照ブロックの特徴を考慮した重み係数の導出による効果)
 以上のように、参照ブロックパラメータから予測重み係数を導出し、導出された予測重み係数に応じて重み係数を導出できる。より具体的には、導出された予測重み係数に応じて、重み候補リストを導出できる。これにより、対象ピクチャと参照画像との時間的な距離の比率に応じて、選択確率が高い順に重み係数を並べたリストを導出できる。
(A3: Effect of deriving weighting factors considering the characteristics of the reference block)
As described above, the prediction weight coefficient can be derived from the reference block parameter, and the weight coefficient can be derived according to the derived prediction weight coefficient. More specifically, a weight candidate list can be derived according to the derived prediction weight coefficient. Accordingly, a list in which weighting factors are arranged in descending order of selection probability can be derived according to the ratio of the temporal distance between the target picture and the reference image.
 以上の復号処理は、符号化処理においても適用できる。そして、符号化処理において、以上のように導出された重み係数を符号化することにより、従来よりも小さな重みインデックスで重み係数が符号化できるようになる。そのため、重みインデックスの符号量を低減する効果を奏する。 The above decoding process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
 なお、以上の構成は、対象ピクチャと参照画像との時間的な距離の比率に応じて、前記重み係数を並べたリストを導出する構成には限定されず、参照画像の方向、動きベクトルの大きさの比率、または量子化パラメータの大小に応じて、前記重み係数を並べたリストを導出してもよい。この場合にも、重みインデックスの符号量を低減する効果を奏する。 Note that the above configuration is not limited to a configuration in which a list in which the weighting coefficients are arranged is derived according to the ratio of the temporal distance between the target picture and the reference image, and the direction of the reference image and the magnitude of the motion vector are not limited. A list in which the weighting factors are arranged may be derived according to the ratio of the length or the size of the quantization parameter. Also in this case, there is an effect of reducing the code amount of the weight index.
 (X:参照ブロックパラメータ、類似度、および優先度の導出方法)
 以下、参照ブロックパラメータXval0およびXval1の導出方法について説明する。重み予測の重み係数wは、重み係数wを乗算する参照ブロックを含む参照ピクチャと、対象ピクチャとの距離が大きく(非類似度が大きく)なるほど、小さくなる傾向があることから、参照ブロックと対象ブロックとの時間的な距離(非類似度)に対応するパラメータを、重み係数wを導出するために用いることができる。また、重み係数wは、参照ブロックの画質が良くなるほど、小さくなる傾向にあることから、参照ブロックの画質に対応するパラメータを用いることができる。
(X: Reference block parameter, similarity, and priority derivation method)
Hereinafter, a method for deriving the reference block parameters Xval0 and Xval1 will be described. Since the weight coefficient w of the weight prediction tends to decrease as the distance between the reference picture including the reference block multiplied by the weight coefficient w and the target picture increases (dissimilarity increases), the reference block and the target A parameter corresponding to the temporal distance (dissimilarity) with the block can be used to derive the weighting factor w. Further, since the weighting factor w tends to decrease as the image quality of the reference block improves, a parameter corresponding to the image quality of the reference block can be used.
  <X1:時間参照ブロックパラメータおよび時間差>
 参照ブロックL0を含む参照ピクチャrefPic0のPOCと、対象ブロックを含むピクチャcurrPicのPOCとの差分の絶対値から、参照ブロックパラメータXval0を導出する。また、参照ブロックL1を含む参照ピクチャrefPic1のPOCと、ピクチャcurrPicのPOCとの差分の絶対値から、参照ブロックパラメータXval1を導出する。
Xval0 = |PicOrderCount(refPic0) - PicOrderCount(currPic)|
Xval1 = |PicOrderCount(refPic1) - PicOrderCount(currPic)|
 なお、次式のように、前記絶対値をとらない差分を参照ブロックパラメータXval0およびXval1として用いてもよい。
Xval0 = PicOrderCount(refPic0) - PicOrderCount(currPic)
Xval1 = PicOrderCount(refPic1) - PicOrderCount(currPic)
 また、次式のようにPOCの差分をとる場合の左辺と右辺は入れ替えてもよい。
Xval0 = PicOrderCount(refPic0) - PicOrderCount(currPic)
Xval1 = PicOrderCount(currPic) - PicOrderCount(refPic1)
 また、次式のように、参照ブロックパラメータXval0とXval1との比を、比較的小さな値として算出するために、前記絶対値に所定の定数Dを加算してもよい。
Xval0 = |PicOrderCount(refPic0) - PicOrderCount(currPic)| + D
Xval1 = |PicOrderCount(refPic1) - PicOrderCount(currPic)| + D
 また、次式のように、所定の定数から前記絶対値を減算してもよい。
Xval0 = D - (|PicOrderCount(refPic0) - PicOrderCount(currPic)|)
Xval1 = D - (|PicOrderCount(refPic1) - PicOrderCount(currPic)|)
 また、次式のように、対象ピクチャのPOCと一方の参照ピクチャのPOCとの差分から参照ブロックパラメータXval0を導出するとともに、参照ピクチャ間のPOC差分から参照ブロックパラメータXval1を導出してもよい。
Xval0 = PicOrderCount(refPic0) - PicOrderCount(currPic)
Xval1 = PicOrderCount(refPic1) - PicOrderCount(refPic0)
  <X2: 動きベクトル長参照ブロックパラメータ>
 対象ブロックから参照ブロックL0への動きベクトルの長さである動きベクトル長mvL0と、対象ブロックから参照ブロックL1への動きベクトルの長さである動きベクトル長mvL1とから、参照ブロックパラメータを導出する。このとき、次式のように、動きベクトルの水平方向成分(mvLX[0])の絶対値と、垂直方向成分(mvLX[1])の絶対値との和から導出してもよい。なお、mvLX[]のXは、0または1である。
Xval0 = |mvL0[0]| + |mvL0[1]|
Xval1 = |mvL1[0]| + |mvL1[1]|
 また、以下のように、前記和に所定の定数Dを加算してもよい。
Xval0 = |mvL0[0]| + |mvL0[1]| + D
Xval1 = |mvL1[0]| + |mvL1[1]| + D
 また、以下のように、所定の定数Dから前記和を減算してもよい。
Xval0 = D - (|mvL0[0]| + |mvL0[1]|)
Xval1 = D - (|mvL1[0]| + |mvL1[1]|)
  <X3: 量子化係数参照ブロックパラメータ>
 参照ブロックL0の量子化パラメータqpL0と、参照ブロックL1の量子化パラメータqpL1とから、参照ブロックパラメータ(優先度)を導出する。
Xval0 = qpL1
Xval1 = qpL0
 ここでは、参照ブロックL0の参照ブロックパラメータXval0として、参照ブロックL1の量子化パラメータqpL1を用いている。これは、参照ブロックL1の量子化パラメータqpL1の値が小さいほど、参照ブロックL1の画質が高いと考えられるため、参照ブロックL1の重み係数を大きくするためである。参照ブロックパラメータXval0の値が大きいほど相対的に参照ブロックL0の重み係数が小さく(参照ブロックL1の重みが大きく)なる。なお、構成によっては、以下でもよい。
Xval0 = qpL0
Xval1 = qpL1
 また、次式のように、前記量子化パラメータに所定の定数Dを加算してもよい。
Xval0 = qpL1 + D
Xval1 = qpL0 + D
 (F:参照ブロックインデックスfIdx導出方法)
  <F1:参照ブロックパラメータ比ベースの参照ブロックインデックスfIdx導出>
   [比較法a]
 予め定義されたMとNとからなる組に基づいて、繰り返し、Xval0 * Mと、Xval1 * Nとを比較することにより、fIdxを導出する。Xval0 * M > Xval1 * N(もしくはXval0 * M ≧Xval1 * N)であれば、Xval0/Xval1 > N/M(もしくはXval0/Xval1 ≧ N/M)であることが分かる。
<X1: Time reference block parameter and time difference>
The reference block parameter Xval0 is derived from the absolute value of the difference between the POC of the reference picture refPic0 including the reference block L0 and the POC of the picture currPic including the target block. Further, the reference block parameter Xval1 is derived from the absolute value of the difference between the POC of the reference picture refPic1 including the reference block L1 and the POC of the picture currPic.
Xval0 = | PicOrderCount (refPic0)-PicOrderCount (currPic) |
Xval1 = | PicOrderCount (refPic1)-PicOrderCount (currPic) |
Note that a difference that does not take the absolute value may be used as the reference block parameters Xval0 and Xval1 as in the following equation.
Xval0 = PicOrderCount (refPic0)-PicOrderCount (currPic)
Xval1 = PicOrderCount (refPic1)-PicOrderCount (currPic)
Further, the left side and the right side in the case of calculating the POC difference as in the following expression may be interchanged.
Xval0 = PicOrderCount (refPic0)-PicOrderCount (currPic)
Xval1 = PicOrderCount (currPic)-PicOrderCount (refPic1)
Further, a predetermined constant D may be added to the absolute value in order to calculate the ratio between the reference block parameters Xval0 and Xval1 as a relatively small value as in the following equation.
Xval0 = | PicOrderCount (refPic0)-PicOrderCount (currPic) | + D
Xval1 = | PicOrderCount (refPic1)-PicOrderCount (currPic) | + D
Further, the absolute value may be subtracted from a predetermined constant as in the following equation.
Xval0 = D-(| PicOrderCount (refPic0)-PicOrderCount (currPic) |)
Xval1 = D-(| PicOrderCount (refPic1)-PicOrderCount (currPic) |)
Further, as shown in the following equation, the reference block parameter Xval0 may be derived from the difference between the POC of the current picture and the POC of one reference picture, and the reference block parameter Xval1 may be derived from the POC difference between the reference pictures.
Xval0 = PicOrderCount (refPic0)-PicOrderCount (currPic)
Xval1 = PicOrderCount (refPic1)-PicOrderCount (refPic0)
<X2: Motion vector length reference block parameter>
A reference block parameter is derived from the motion vector length mvL0 that is the length of the motion vector from the target block to the reference block L0 and the motion vector length mvL1 that is the length of the motion vector from the target block to the reference block L1. At this time, it may be derived from the sum of the absolute value of the horizontal direction component (mvLX [0]) and the absolute value of the vertical direction component (mvLX [1]) as in the following equation. Note that X in mvLX [] is 0 or 1.
Xval0 = | mvL0 [0] | + | mvL0 [1] |
Xval1 = | mvL1 [0] | + | mvL1 [1] |
Further, a predetermined constant D may be added to the sum as follows.
Xval0 = | mvL0 [0] | + | mvL0 [1] | + D
Xval1 = | mvL1 [0] | + | mvL1 [1] | + D
Further, the sum may be subtracted from a predetermined constant D as follows.
Xval0 = D-(| mvL0 [0] | + | mvL0 [1] |)
Xval1 = D-(| mvL1 [0] | + | mvL1 [1] |)
<X3: Quantization coefficient reference block parameter>
A reference block parameter (priority) is derived from the quantization parameter qpL0 of the reference block L0 and the quantization parameter qpL1 of the reference block L1.
Xval0 = qpL1
Xval1 = qpL0
Here, the quantization parameter qpL1 of the reference block L1 is used as the reference block parameter Xval0 of the reference block L0. This is because the smaller the value of the quantization parameter qpL1 of the reference block L1, the higher the image quality of the reference block L1, so that the weighting factor of the reference block L1 is increased. As the value of the reference block parameter Xval0 is larger, the weight coefficient of the reference block L0 is relatively smaller (the weight of the reference block L1 is larger). Depending on the configuration, the following may be used.
Xval0 = qpL0
Xval1 = qpL1
Further, a predetermined constant D may be added to the quantization parameter as in the following equation.
Xval0 = qpL1 + D
Xval1 = qpL0 + D
(F: Reference block index fIdx derivation method)
<F1: Derivation of reference block index fIdx based on reference block parameter ratio>
[Comparison method a]
FIdx is derived by repeatedly comparing Xval0 * M and Xval1 * N based on a previously defined set of M and N. If Xval0 * M> Xval1 * N (or Xval0 * M ≧ Xval1 * N), it can be seen that Xval0 / Xval1> N / M (or Xval0 / Xval1 ≧ N / M).
 具体的にはi = 1~n-1までの{Mi, Ni}において、以下の比較を行うことでfIdx = 0~n-1を導出する。
if (Xval0 * M1 > Xval1 * N1) fIdx = 0
else if (Xval0 * M2 > Xval1 * N2) fIdx = 1
else if (Xval0 * M3 > Xval1 * N3) fIdx = 2
else if (Xval0 * M4 > Xval1 * N4) fIdx = 3

else if (Xval0 * Mn-1 > Xval1 * Nn-1) fIdx = n-2
else fIdx = n-1
 たとえば、(Mi, Ni) = (2, 6), (3, 5), (4, 4), (5, 3) ,(6, 2)を用いる場合の具体例を以下に示す。
if (Xval0 * 2 > Xval1 * 6) fIdx = 0
else if (Xval0 * 3 > Xval1 * 5) fIdx = 1
else if (Xval0 * 4 > Xval1 * 4) fIdx = 2
else if (Xval0 * 5 > Xval1 * 3) fIdx = 3
else if (Xval0 * 6 > Xval1 * 2) fIdx = 4
else fIdx = 5
   [比較法b]
 なお、Xval0の整数倍(Xval0 * Mi)とXval1の整数倍(Xval1 * Ni)とを繰り返し比較する場合において、MiとNiとの大小に応じてXval0とXval1との比較処理を変更してもよい。例えば、Mi < Niの場合にXval0 * Mi > Xval1 * Niの比較を行い、Mi> Niの場合にXval0 * Mi < Xval1 * Niの比較を行ってもよい。なお、Mi = Niの場合には、どちらの比較を用いてもよい。例えば、以下の処理でもよい。
if (Xval0 * M1 > Xval1 * N1) fIdx = 0
else if (Xval0 * M2 > Xval1 * N2) fIdx = 1
else if (Xval0 * M3 > Xval1 * N3) fIdx = 2

else if (Xval0 * Mm > Xval1 * Nm) fIdx = m-1
else if (Xval0 * Mn-1 < Xval1 * Nn-1) fIdx = n-1
else if (Xval0 * Mn-2 < Xval1 * Nn-2) fIdx = n-2

else if (Xval0 * Mm+1 < Xval1 * Nm+1) fIdx = m+1
else fIdx = m
 ここで、m = n / 2である。n = 9かつm = 4である場合には、以下となる。
if (Xval0 * M1 > Xval1 * N1) fIdx = 0
else if (Xval0 * M2 > Xval1 * N2) fIdx = 1
else if (Xval0 * M3 > Xval1 * N3) fIdx = 2
else if (Xval0 * M4 > Xval1 * N4) fIdx = 3 (= m-1)
else if (Xval0 * M8 < Xval1 * N8) fIdx = 8 (= n-1)
else if (Xval0 * M7 < Xval1 * N7) fIdx = 7
else if (Xval0 * M6 < Xval1 * N6) fIdx = 6
else if (Xval0 * M5 < Xval1 * N5) fIdx = 5
else fIdx = 4 (= m)
 さらに、(Mi, Ni) = (1, 4), (1, 3), (1, 2), (2, 3), (3, 2), (2, 1), (3, 1), (4, 1)の場合には、以下となる。
if (Xval0 > Xval1 * 4) fIdx = 0
else if (Xval0 > Xval1 * 3) fIdx = 1
else if (Xval0 > Xval1 * 2) fIdx = 2
else if (Xval0 * 2 > Xval1 * 3) fIdx = 3
else if (Xval0 * 4 < Xval1) fIdx = 8
else if (Xval0 * 3 < Xval1) fIdx = 7
else if (Xval0 * 2 < Xval1) fIdx = 6
else if (Xval0 * 3 < Xval1 * 2) fIdx = 5
else fIdx = 4
   [比較法c]
 Xval0とXval1との大小に応じて、Xval0とXval1とを並び替えた後、Xval0の整数倍とXval1の整数倍とを繰り返し比較する。ここではXval0>=Xval1となるように値をスワップした後に、大小比較を行う例を示す。最後にスワップしたかに応じてインデックスを修正する(大小の順序を揃えた分、比較回数が減る)。
m = n / 2
if (Xval1 > Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0 * M1 > Xval1 * N1) fIdx = 0
else if (Xval0 * M2 > Xval1 * N2) fIdx = 1

else if (Xval0 * Mm > Xval1 * Nm) fIdx = m-1
else fIdx = m
if (swap) fIdx = n -1 - fIdx
 (Mi, Ni) = (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)の場合n=6なので、次式のようになる。
m = 6 / 2 = 3
if (Xval1 > Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0 * 2 > Xval1 * 6) fIdx = 0
else if (Xval0 * 3 > Xval1 * 5) fIdx = 1
else fIdx = 2
if (swap) fIdx = 5 - fIdx
 (Mi, Ni) = (1, 4), (1, 3), (1, 2), (2, 3), (3, 2), (2, 1), (3, 1), (4, 1)の場合n=9なので、次式のようになる。
if (Xval1 > Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0 > Xval1 * 4) fIdx = 0
else if (Xval0 > Xval1 * 3) fIdx = 1
else if (Xval0 > Xval1 * 2) fIdx = 2
else if (Xval0 * 2 > Xval1 * 3) fIdx = 3
else fIdx = 4
if (swap) fIdx = 8 - fIdx
   [除算法a]
 Xval1 / (Xval0 + Xval1)(もしくはXval0 / (Xval0 + Xval1))に対応する値に応じて、fIdxを導出する。なお、KはfIdxを整数値として導出するための定数である。そして、fIdxを導出する前に、クリップ処理を行ってよい、またはテーブル参照を行ってもよい。次式において「nume」はnumeratorを意味する。また「denom」はdenominatorを意味する。
nume = Xval1
denom = Xval0 + Xval1
fIdx = Clip3(0, K-1, (K*nume) / denom)
 以上により、fIdx=0~K-1が導出できる。ここで、K=8の場合、次式のように、fIdx=0,1,2,3,4,5,6,7に応じて、所定の定数Dを加算して分子と分母とを導出してもよい。
nume = Xval1 + D
denom = Xval0 + Xval1 + D
fIdx = Clip3(0, 7, (8*nume) / denom)
 また、Xval1を分子とするXval1/(Xval0+Xval1)の値ではなく、Xval0を分子とするXval0/(Xval0+Xval1)の値からfIdxを導出してもよい。
nume = Xval0 + D
denom = Xval0 + Xval1 + D
 また、次式のように、除算時にdenom/2を加算して一種の四捨五入(ラウンド制御)を行ってもよい。なお、ラウンド制御用に加算する値は、denom/2に限定されず、denom/2+1、denom/3またはdenom/4としてもよい。
nume = Xval1
denom = Xval0 + Xval1
fIdx = Clip3(0, K-1, (K*nume+denom/2) / denom)
 なお、四捨五入のようなラウンド制御を行う場合には、下記のように0からKの間でクリップしてもよい。この場合、当然、fIdx=0~Kが導出できる。
fIdx = Clip3(0, K, (K*nume+denom/2) / denom)
   [除算法b]
 Xval1 / Xval0(もしくはXval0 / Xval1)に対応する値に応じて、fIdxを導出する。除算法aでは、Xval0+Xval1を分母としXval0+Xval1との比を導出していたが、除算法bではXval0とXval1との比を導出する。整数演算で導出するためK*Xval0とした後に除算を行う。K*Xval0 / Xval1を導出後、クリップを行ってもよい。具体的には、次式のように、fIdx = 0~K-1を導出する。
nume = Xval1
denom = Xval0
fIdx = Clip3(0, K-1, (K*nume + round) / denom)
 なお、roundはラウンド制御用の変数であり、例えば、round = 0, denom/2, denom/2+1, denom/3, denom/4のいずれかである。また、ラウンド制御を行う場合(round>0の場合)には、下記のように0からKの間でクリップしてもよい。この場合、fIdx=0~Kが導出できる。
fIdx = Clip3(0, K, (K*nume+denom/2) / denom)
  <F2:双予測ベースの参照ブロックインデックスfIdx導出>
 対象ブロックを含むピクチャ(対象ピクチャ)に対し、参照ブロックを含む2枚のピクチャ(参照ピクチャ)が同じ方向にある場合には、参照ブロックパラメータの比率によらず1:1の重み係数が用いられることが多い。したがって、参照ピクチャの方向と対象ピクチャの方向とが等しいか異なるかに応じて重み係数の導出にかかわる参照ブロックインデックスfIdxの導出方法を切り替えることが望ましい。
Specifically, fIdx = 0 to n−1 is derived by performing the following comparison in {M i , N i } from i = 1 to n−1.
if (Xval0 * M 1 > Xval1 * N 1 ) fIdx = 0
else if (Xval0 * M 2 > Xval1 * N 2 ) fIdx = 1
else if (Xval0 * M 3 > Xval1 * N 3 ) fIdx = 2
else if (Xval0 * M 4 > Xval1 * N 4 ) fIdx = 3
...
else if (Xval0 * M n-1 > Xval1 * N n-1 ) fIdx = n-2
else fIdx = n-1
For example, a specific example in the case of using (M i , N i ) = (2, 6), (3, 5), (4, 4), (5, 3), (6, 2) is shown below.
if (Xval0 * 2> Xval1 * 6) fIdx = 0
else if (Xval0 * 3> Xval1 * 5) fIdx = 1
else if (Xval0 * 4> Xval1 * 4) fIdx = 2
else if (Xval0 * 5> Xval1 * 3) fIdx = 3
else if (Xval0 * 6> Xval1 * 2) fIdx = 4
else fIdx = 5
[Comparison b]
In addition, when repeatedly comparing an integer multiple of Xval0 (Xval0 * M i ) and an integer multiple of Xval1 (Xval1 * N i ), comparison processing of Xval0 and Xval1 is performed according to the magnitude of M i and N i. It may be changed. For example, when M i <N i , Xval 0 * M i > Xval 1 * N i may be compared, and when M i > N i , Xval 0 * M i <Xval 1 * N i may be compared. In the case of M i = N i , either comparison may be used. For example, the following processing may be performed.
if (Xval0 * M 1 > Xval1 * N 1 ) fIdx = 0
else if (Xval0 * M 2 > Xval1 * N 2 ) fIdx = 1
else if (Xval0 * M 3 > Xval1 * N 3 ) fIdx = 2
...
else if (Xval0 * M m> Xval1 * N m) fIdx = m-1
else if (Xval0 * M n-1 <Xval1 * N n-1 ) fIdx = n-1
else if (Xval0 * M n-2 <Xval1 * N n-2 ) fIdx = n-2
...
else if (Xval0 * M m + 1 <Xval1 * N m + 1 ) fIdx = m + 1
else fIdx = m
Here, m = n / 2. When n = 9 and m = 4:
if (Xval0 * M 1 > Xval1 * N 1 ) fIdx = 0
else if (Xval0 * M 2 > Xval1 * N 2 ) fIdx = 1
else if (Xval0 * M 3 > Xval1 * N 3 ) fIdx = 2
else if (Xval0 * M 4 > Xval1 * N 4 ) fIdx = 3 (= m-1)
else if (Xval0 * M 8 <Xval1 * N 8 ) fIdx = 8 (= n-1)
else if (Xval0 * M 7 <Xval1 * N 7 ) fIdx = 7
else if (Xval0 * M 6 <Xval1 * N 6 ) fIdx = 6
else if (Xval0 * M 5 < Xval1 * N 5) fIdx = 5
else fIdx = 4 (= m)
Furthermore, (M i , N i ) = (1, 4), (1, 3), (1, 2), (2, 3), (3, 2), (2, 1), (3, 1 ), (4, 1):
if (Xval0> Xval1 * 4) fIdx = 0
else if (Xval0> Xval1 * 3) fIdx = 1
else if (Xval0> Xval1 * 2) fIdx = 2
else if (Xval0 * 2> Xval1 * 3) fIdx = 3
else if (Xval0 * 4 <Xval1) fIdx = 8
else if (Xval0 * 3 <Xval1) fIdx = 7
else if (Xval0 * 2 <Xval1) fIdx = 6
else if (Xval0 * 3 <Xval1 * 2) fIdx = 5
else fIdx = 4
[Comparison method c]
After Xval0 and Xval1 are rearranged according to the magnitude of Xval0 and Xval1, the integer multiple of Xval0 and the integer multiple of Xval1 are repeatedly compared. Here, an example is shown in which magnitude comparison is performed after swapping values so that Xval0> = Xval1. The index is modified according to whether it was last swapped (the number of comparisons is reduced by aligning the large and small orders).
m = n / 2
if (Xval1> Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0 * M 1 > Xval1 * N 1 ) fIdx = 0
else if (Xval0 * M 2 > Xval1 * N 2 ) fIdx = 1
...
else if (Xval0 * M m > Xval1 * N m ) fIdx = m-1
else fIdx = m
if (swap) fIdx = n -1-fIdx
When (M i , N i ) = (2, 6), (3, 5), (4, 4), (5, 3), (6, 2), n = 6, so .
m = 6/2 = 3
if (Xval1> Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0 * 2> Xval1 * 6) fIdx = 0
else if (Xval0 * 3> Xval1 * 5) fIdx = 1
else fIdx = 2
if (swap) fIdx = 5-fIdx
(M i , N i ) = (1, 4), (1, 3), (1, 2), (2, 3), (3, 2), (2, 1), (3, 1), In the case of (4, 1), since n = 9, the following equation is obtained.
if (Xval1> Xval0) {tmp = Xval0; Xval0 = Xval1; Xval1 = tmp; swap = 1}
if (Xval0> Xval1 * 4) fIdx = 0
else if (Xval0> Xval1 * 3) fIdx = 1
else if (Xval0> Xval1 * 2) fIdx = 2
else if (Xval0 * 2> Xval1 * 3) fIdx = 3
else fIdx = 4
if (swap) fIdx = 8-fIdx
[Division method a]
FIdx is derived according to a value corresponding to Xval1 / (Xval0 + Xval1) (or Xval0 / (Xval0 + Xval1)). K is a constant for deriving fIdx as an integer value. Then, before fIdx is derived, clip processing may be performed, or table reference may be performed. In the following formula, “nume” means a number. “Denom” means denominator.
nume = Xval1
denom = Xval0 + Xval1
fIdx = Clip3 (0, K-1, (K * nume) / denom)
From the above, fIdx = 0 to K−1 can be derived. Here, when K = 8, the numerator and denominator are derived by adding a predetermined constant D according to fIdx = 0,1,2,3,4,5,6,7 as shown in the following equation. May be.
nume = Xval1 + D
denom = Xval0 + Xval1 + D
fIdx = Clip3 (0, 7, (8 * nume) / denom)
Further, fIdx may be derived from the value of Xval0 / (Xval0 + Xval1) using Xval0 as a numerator instead of the value of Xval1 / (Xval0 + Xval1) using Xval1 as a numerator.
nume = Xval0 + D
denom = Xval0 + Xval1 + D
Further, as shown in the following equation, deom / 2 may be added during division to perform a kind of rounding (round control). Note that the value added for round control is not limited to denom / 2, but may be denom / 2 + 1, denom / 3, or denom / 4.
nume = Xval1
denom = Xval0 + Xval1
fIdx = Clip3 (0, K-1, (K * nume + denom / 2) / denom)
When round control such as rounding is performed, clipping may be performed between 0 and K as follows. In this case, naturally, fIdx = 0 to K can be derived.
fIdx = Clip3 (0, K, (K * nume + denom / 2) / denom)
[Division method b]
FIdx is derived according to the value corresponding to Xval1 / Xval0 (or Xval0 / Xval1). In the division method a, the ratio of Xval0 + Xval1 is derived using Xval0 + Xval1 as the denominator, but in the division method b, the ratio of Xval0 and Xval1 is derived. Divide after K * Xval0 to derive by integer arithmetic. Clipping may be performed after deriving K * Xval0 / Xval1. Specifically, fIdx = 0 to K−1 is derived as in the following equation.
nume = Xval1
denom = Xval0
fIdx = Clip3 (0, K-1, (K * nume + round) / denom)
Note that round is a variable for round control and is, for example, any of round = 0, denom / 2, denom / 2 + 1, denom / 3, and denom / 4. When round control is performed (when round> 0), clipping may be performed between 0 and K as follows. In this case, fIdx = 0 to K can be derived.
fIdx = Clip3 (0, K, (K * nume + denom / 2) / denom)
<F2: Bi-prediction based reference block index fIdx derivation>
When two pictures including a reference block (reference picture) are in the same direction with respect to a picture including the target block (target picture), a weighting factor of 1: 1 is used regardless of the ratio of the reference block parameters. There are many cases. Therefore, it is desirable to switch the derivation method of the reference block index fIdx related to the derivation of the weighting coefficient depending on whether the direction of the reference picture is equal to or different from the direction of the target picture.
 なお、1:1の重み係数とは、重み予測において、第1の動き補償画像に乗算する第1重みと、第2の動き補償画像に乗算する第2重みとについて、第1重みと第2重みが等しい場合の重み係数を意味する。例えば、shiftWP = 3において、重み係数w = 4の場合は、第1重みは4、第2重みは1<<shiftWP - w = 4となるので、1:1の重み係数といえる。 The weighting factor of 1: 1 is the first weight and the second weight for the first weight multiplied by the first motion compensated image and the second weight multiplied by the second motion compensated image in the weight prediction. It means the weighting factor when the weights are equal. For example, when shiftWP = 3 and weighting factor w = 4, the first weight is 4, and the second weight is 1 << shiftWP − w = 4.
 図25は、双予測ベースの参照ブロックインデックスfIdx導出方法を説明するための模式図である。「POC」と付記した矢印は、矢印の方向側に記載されたピクチャのPOCが、矢印の方向とは反対方向側に記載されたピクチャのPOCよりも、大きいことを示す。つまり、矢印の方向は、時間方向であるといえる。 FIG. 25 is a schematic diagram for explaining a bi-prediction-based reference block index fIdx derivation method. An arrow attached with “POC” indicates that the POC of the picture written on the direction side of the arrow is larger than the POC of the picture written on the side opposite to the direction of the arrow. That is, it can be said that the direction of the arrow is the time direction.
 図25の(a)は、対象ピクチャcurrPicが、2つの参照ピクチャrefPic0およびrefPic1の間(対象ピクチャから見て2つの参照ピクチャは異なる時間方向)にある状況を示す。図25の(b)(c)は、対象ピクチャcurrPicが、端にある、つまり2つの参照ピクチャrefPic0およびrefPic1の間にはない(対象ピクチャから見て2つの参照ピクチャは同じ時間方向)にあることを意味する。 FIG. 25 (a) shows a situation in which the target picture currPic is between the two reference pictures refPic0 and refPic1 (the two reference pictures are in different time directions as viewed from the target picture). In FIGS. 25B and 25C, the target picture currPic is at the end, that is, not between the two reference pictures refPic0 and refPic1 (the two reference pictures are the same in the time direction as viewed from the target picture). Means that.
 具体的には、図25の(b)(c)に示すように、対象ピクチャに対する2つの参照ピクチャの時間方向が等しい(後述の真偽値dirSameが真である)場合には、fIdxを所定の値とする。図25の(a)に示すように、対象ピクチャに対する2つの参照ピクチャの時間方向が異なる(後述の真偽値dirSameが偽である)場合には、fIdxを上述の比較法a~cならびに除算法aおよびbのいずれかの方法で導出する。 Specifically, as shown in FIGS. 25B and 25C, when the time directions of two reference pictures with respect to the target picture are equal (a true value dirSame described later is true), fIdx is set to a predetermined value. The value of As shown in (a) of FIG. 25, when the time directions of the two reference pictures for the target picture are different (a true value dirSame described later is false), fIdx is compared with the above-described comparison methods a to c and division. Derived by any of the methods a and b.
 なお、dirSameが真である場合は、2つある参照ピクチャのどちらもが対象ピクチャより時間的に前である場合、もしくは参照ピクチャのどちらもが対象ピクチャより時間的に後である場合(POC0, PIC1 < currPOC or curPOC < POC0, PIC1)を意味するので、次式のように導出できる。
dirSame =
(PicOrderCount(refPic0) < PicOrderCount(currPic) && 
PicOrderCount(refPic1) < PicOrderCount(currPic)) ||
(PicOrderCount(refPic0) > PicOrderCount(currPic) && 
PicOrderCount(refPic1) > PicOrderCount(currPic))
 また、dirSameは、次式のように導出することもできる。
dirSame = (PicOrderCount(refPic0) - PicOrderCount(currPic))×(PicOrderCount(refPic1) - PicOrderCount(currPic))>0
 また、次式のように、参照ピクチャのPOCと対象ピクチャのPOCとが等しい場合を、対象ピクチャに対する2つの参照ピクチャの時間方向が等しい場合に含めてもよい。
dirSame = (PicOrderCount(refPic0) - PicOrderCount(currPic))×(PicOrderCount(refPic1) - PicOrderCount(currPic))≧0
 勿論、対象ピクチャに対する2つの参照ピクチャの時間方向が異なるか否か(dirSameの否定を意味する!dirSame)で判定してもよい。
!dirSame = (PicOrderCount(refPic0) - PicOrderCount(currPic))×(PicOrderCount(refPic1) - PicOrderCount(currPic))<0
 (L:リスト・テーブル形式構成)
  <L1:最優先テーブル>
 次式のように、重み候補リスト導出部30301において、選択肢となる重み候補リストテーブルweightCandListWTable[][]、weightCandListITable[][]は、下記(1-1)(1-2)の重み候補リストを含むことが好ましい。
(1-1)動き補償画像predSamplesL0に乗算される重み係数と動き補償画像predSamplesL1に乗算される重み係数とが1:1となるときの重み係数を、先頭要素とする重み候補リスト
(1-2)動き補償画像predSamplesL0に乗算される重み係数と動き補償画像predSamplesL1に乗算される重み係数とが1:1以外となるときの重み係数を、先頭要素とする重み候補リスト
 例えば、重み候補リスト導出部30301のステップS3では、以下の重み候補リストテーブルを用いてもよい。
weightCandListWTable[][] = 
{
 {2, 3, 4, 5, 6, -2, 10} // 先頭要素の重みが1:1以外(w0F != w1F)
 {3, 4, 2, 5, 6, -2, 10} // 先頭要素の重みが1:1以外(w0F != w1F)
 {4, 3, 5, 2, 6, -2, 10} // 先頭要素の重みが1:1(w0F == w1F)
 {4, 5, 3, 6, 2, 10, -2} // 先頭要素の重みが1:1(w0F == w1F)
 {5, 4, 6, 3, 2, 10, -2} // 先頭要素の重みが1:1以外(w0F != w1F)
 {6, 5, 4, 3, 2, 10, -2} // 先頭要素の重みが1:1以外(w0F != w1F)
}
w0F:重み候補リストの先頭要素(First)により選択される重み係数において、動き補償画像predSamplesL0に乗算される重み係数、もしくは、そのインデックス
w1F:重み候補リストの先頭要素(First)により選択される重み係数において、動き補償画像predSamplesL1に乗算される重み係数、もしくは、そのインデックス
 ここで、shiftWP=3とする。この場合において、重み係数wが4の場合、第1の動き補償画像に乗算する第1重みw0と、第2の動き補償画像に乗算する第2重みw1は、各々、w0=w=4、w1=(1<<shiftWP)-w=8-4=4となり、等しくなる。
When dirSame is true, both of the two reference pictures are temporally before the target picture, or when both of the reference pictures are temporally after the target picture (POC0, PIC1 <currPOC or curPOC <POC0, PIC1), so it can be derived as:
dirSame =
(PicOrderCount (refPic0) <PicOrderCount (currPic) &&
PicOrderCount (refPic1) <PicOrderCount (currPic)) ||
(PicOrderCount (refPic0)> PicOrderCount (currPic) &&
PicOrderCount (refPic1)> PicOrderCount (currPic))
DirSame can also be derived as follows:
dirSame = (PicOrderCount (refPic0)-PicOrderCount (currPic)) x (PicOrderCount (refPic1)-PicOrderCount (currPic))> 0
Further, as in the following equation, the case where the POC of the reference picture is equal to the POC of the target picture may be included when the time directions of the two reference pictures with respect to the target picture are equal.
dirSame = (PicOrderCount (refPic0)-PicOrderCount (currPic)) x (PicOrderCount (refPic1)-PicOrderCount (currPic)) ≥ 0
Of course, the determination may be made based on whether or not the time directions of the two reference pictures with respect to the target picture are different (! DirSame meaning negation of dirSame).
! dirSame = (PicOrderCount (refPic0)-PicOrderCount (currPic)) x (PicOrderCount (refPic1)-PicOrderCount (currPic)) <0
(L: List / table format configuration)
<L1: Highest priority table>
In the weight candidate list derivation unit 30301, the weight candidate list tables weightCandListWTable [] [] and weightCandListITable [] [], which are options, are represented by the weight candidate lists of the following (1-1) and (1-2) as shown in the following equation. It is preferable to include.
(1-1) Weight candidate list (1-2) having a weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 are 1: 1, ) Weighting candidate list deriving unit having a weighting coefficient when the weighting coefficient multiplied by the motion compensated image predSamplesL0 and the weighting coefficient multiplied by the motion compensated image predSamplesL1 are other than 1: 1 as a leading element. In step S3 of 30301, the following weight candidate list table may be used.
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10} // The weight of the first element is not 1: 1 (w0F! = W1F)
{3, 4, 2, 5, 6, -2, 10} // The weight of the first element is not 1: 1 (w0F! = W1F)
{4, 3, 5, 2, 6, -2, 10} // The weight of the first element is 1: 1 (w0F == w1F)
{4, 5, 3, 6, 2, 10, -2} // The weight of the first element is 1: 1 (w0F == w1F)
{5, 4, 6, 3, 2, 10, -2} // The weight of the first element is not 1: 1 (w0F! = W1F)
{6, 5, 4, 3, 2, 10, -2} // The weight of the first element is not 1: 1 (w0F! = W1F)
}
w0F: Weight coefficient to be multiplied by the motion compensation image predSamplesL0 or its index in the weight coefficient selected by the first element (First) of the weight candidate list
w1F: Weight coefficient to be multiplied by the motion compensation image predSamplesL1 in the weight coefficient selected by the first element (First) of the weight candidate list, or its index. Here, shiftWP = 3. In this case, when the weight coefficient w is 4, the first weight w0 multiplied by the first motion compensated image and the second weight w1 multiplied by the second motion compensated image are respectively w0 = w = 4, w1 = (1 << shiftWP) -w = 8-4 = 4, which is equal.
 例えば、重み候補リスト導出部30301のステップS3の変形例では以下の重み候補リストテーブルを用いてもよい。
weightCandListITable[][] = 
{
 {1, 2, 3, 4, 5, 0, 6} // 先頭要素の重みが1:1以外(w0F != w1F)
 {2, 3, 1, 4, 5, 0, 6} // 先頭要素の重みが1:1以外(w0F != w1F)
 {3, 2, 4, 1, 5, 0, 6} // 先頭要素の重みが1:1(w0F == w1F)
 {3, 4, 2, 5, 1, 6, 0} // 先頭要素の重みが1:1(w0F == w1F)
 {4, 3, 5, 2, 1, 6, 0} // 先頭要素の重みが1:1以外(w0F != w1F)
 {5, 4, 3, 2, 1, 6, 0} // 先頭要素の重みが1:1以外(w0F != w1F)
}
 ここで、重みインデックスが3の場合に1:1の重みとする。例えば、weightCandListITable[][]の要素eである重みインデックスから重み係数を導出する重み係数テーブルweightTableWを下記のテーブル、shiftWP = 3とすれば、重みインデックスが3の場合にw = weightTableW[3] = 4、w1 = w = 4、w2 = (1<<shiftWP) - w = 4となり、上記第1重みw0と第2重みw1は等しくなる。
weightTableW[] = {-2,2,3,4,5,6,10}
  <L2:セカンダリ優先テーブル>
 次式のように、選択肢となるweightCandListWTable[][]およびweightCandListITable[][]は、下記(2-1)(2-2)の条件を満たす重み候補リストを含むことが好ましい。(2-1)動き補償画像predSamplesL0に乗算される重み係数と動き補償画像predSamplesL1に乗算される重み係数とが1:1以外となるときの重み係数を、先頭要素とする。
(2-2)動き補償画像predSamplesL0に乗算される重み係数と動き補償画像predSamplesL1に乗算される重み係数とが1:1となるときの重み係数を、先頭から2番目の要素とする。
For example, the following weight candidate list table may be used in the modification of step S3 of the weight candidate list deriving unit 30301.
weightCandListITable [] [] =
{
{1, 2, 3, 4, 5, 0, 6} // The weight of the first element is not 1: 1 (w0F! = W1F)
{2, 3, 1, 4, 5, 0, 6} // The weight of the first element is not 1: 1 (w0F! = W1F)
{3, 2, 4, 1, 5, 0, 6} // The weight of the first element is 1: 1 (w0F == w1F)
{3, 4, 2, 5, 1, 6, 0} // The weight of the first element is 1: 1 (w0F == w1F)
{4, 3, 5, 2, 1, 6, 0} // The weight of the first element is not 1: 1 (w0F! = W1F)
{5, 4, 3, 2, 1, 6, 0} // The weight of the first element is not 1: 1 (w0F! = W1F)
}
Here, when the weight index is 3, the weight is 1: 1. For example, if a weight coefficient table weightTableW for deriving a weight coefficient from a weight index that is an element e of weightCandListITable [] [] is the following table, shiftWP = 3, when the weight index is 3, w = weightTableW [3] = 4, w1 = w = 4, w2 = (1 << shiftWP) −w = 4, and the first weight w0 and the second weight w1 are equal.
weightTableW [] = {-2,2,3,4,5,6,10}
<L2: Secondary priority table>
As shown in the following equation, it is preferable that the weightCandListWTable [] [] and weightCandListITable [] [] as options include a weight candidate list that satisfies the following conditions (2-1) and (2-2). (2-1) The weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 is other than 1: 1 is set as the head element.
(2-2) The weighting factor when the weighting factor multiplied by the motion compensated image predSamplesL0 and the weighting factor multiplied by the motion compensated image predSamplesL1 is 1: 1 is the second element from the top.
 例えば、重み候補リスト導出部30301のステップS3では、以下の重み候補リストテーブルを用いてもよい。
weightCandListWTable[][] = 
{
 {2, 3, 4, 5, 6, -2, 10}
 {3, 4, 2, 5, 6, -2, 10} // 先頭要素の重みが1:1以外で2番目要素の重みが1:1(w0F != w1F && w0S == w1S)
 {4, 3, 5, 2, 6, -2, 10}
 {4, 5, 3, 6, 2, 10, -2}
 {5, 4, 6, 3, 2, 10, -2} // 先頭要素の重みが1:1以外で2番目要素の重みが1:1(w0F != w1F && w0S == w1S)
 {6, 5, 4, 3, 2, 10, -2}
}
w0S:重み候補リストの先頭から2番目の要素(Second)により選択される重み係数において、動き補償画像predSamplesL0に乗算される重み係数
w1S:重み候補リストの先頭から2番目の要素(Second)により選択される重み係数において、動き補償画像predSamplesL1に乗算される重み係数
 例えば、fIdx = 2では、weightCandListW[fIdx][] = {3, 4, 2, 5, 6, -2, 10}が選択され、この場合、1:1となる重み係数である4が、2番目の要素となる。上記の例の場合、重み候補リスト導出部30301のステップS3の変形例では、以下の重み候補リストテーブルを用いてもよい。
weightCandListITable[][] = 
{
 {1, 2, 3, 4, 5, 0, 6}
 {2, 3, 1, 4, 5, 0, 6} // 先頭要素の重みが1:1以外で2番目要素の重みが1:1
 {3, 2, 4, 1, 5, 0, 6}
 {3, 4, 2, 5, 1, 6, 0}
 {4, 3, 5, 2, 1, 6, 0} // 先頭要素の重みが1:1以外で2番目要素の重みが1:1
 {5, 4, 3, 2, 1, 6, 0}
}
 上記の例の場合、fIdx = 2では、weightCandListI[fIdx][] = {2, 3, 1, 4, 5, 0, 6}が選択され、この場合、1:1となる重み係数のインデックスである3が、2番目の要素となる。
For example, the following weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10}
{3, 4, 2, 5, 6, -2, 10} // The weight of the first element is not 1: 1 and the weight of the second element is 1: 1 (w0F! = W1F && w0S == w1S)
{4, 3, 5, 2, 6, -2, 10}
{4, 5, 3, 6, 2, 10, -2}
{5, 4, 6, 3, 2, 10, -2} // The weight of the first element is not 1: 1 and the weight of the second element is 1: 1 (w0F! = W1F && w0S == w1S)
{6, 5, 4, 3, 2, 10, -2}
}
w0S: Weighting coefficient to be multiplied by the motion compensation image predSamplesL0 in the weighting coefficient selected by the second element (Second) from the top of the weight candidate list
w1S: Weight coefficient to be multiplied by motion compensation image predSamplesL1 in the weight coefficient selected by the second element (Second) from the top of the weight candidate list For example, when fIdx = 2, weightCandListW [fIdx] [] = {3, 4, 2, 5, 6, -2, 10} is selected. In this case, 4 which is a weighting factor of 1: 1 is the second element. In the case of the above example, the following weight candidate list table may be used in the modification of step S3 of the weight candidate list deriving unit 30301.
weightCandListITable [] [] =
{
{1, 2, 3, 4, 5, 0, 6}
{2, 3, 1, 4, 5, 0, 6} // The weight of the first element is not 1: 1 and the weight of the second element is 1: 1
{3, 2, 4, 1, 5, 0, 6}
{3, 4, 2, 5, 1, 6, 0}
{4, 3, 5, 2, 1, 6, 0} // The weight of the first element is not 1: 1 and the weight of the second element is 1: 1
{5, 4, 3, 2, 1, 6, 0}
}
In the case of the above example, when fIdx = 2, weightCandListI [fIdx] [] = {2, 3, 1, 4, 5, 0, 6} is selected. In this case, the weight coefficient index is 1: 1. A certain 3 is the second element.
  <L3:最優先・セカンダリ優先テーブル1>
 次式のように、weightCandListWTable[][]およびweightCandListITable[][]は、下記(3-1)(3-2)の重み候補リストを含むことが好ましい。
(3-1)下記(a)(b)の条件を満たす重み候補リスト。
・(a)動き補償画像predSamplesL0に乗算される重みw0と動き補償画像predSamplesL1に乗算される重みw1との関係がw0<w1となる重み係数を、先頭要素とする。
・(b)前記関係がw0<w1となる重み係数を、先頭から2番目の要素とする。
(3-2)下記(c)(d)の条件を満たす重み候補リスト。
・(c)前記関係がw0>w1となる重み係数を、先頭要素とする。
・(d)前記関係がw0>w1となる重み係数を、先頭から2番目の要素とする。
<L3: Highest priority / secondary priority table 1>
As in the following equation, weightCandListWTable [] [] and weightCandListITable [] [] preferably include the following weight candidate lists (3-1) and (3-2).
(3-1) A weight candidate list that satisfies the following conditions (a) and (b).
(A) A weighting factor with which the relationship between the weight w0 multiplied by the motion compensated image predSamplesL0 and the weight w1 multiplied by the motion compensated image predSamplesL1 is w0 <w1 is set as the leading element.
(B) The weighting factor that satisfies the relationship w0 <w1 is the second element from the top.
(3-2) A weight candidate list that satisfies the following conditions (c) and (d).
(C) A weighting factor with which the relationship is w0> w1 is set as a head element.
(D) A weighting factor that satisfies the relationship w0> w1 is the second element from the top.
 例えば、重み候補リスト導出部30301のステップS3では、以下の重み候補リストテーブルを用いてもよい。
weightCandListWTable[][] =
{
 {2, 3, 4, 5, 6, -2, 10} // 先頭要素から導出される前記関係、および2番目要素から導出される前記関係が、w0<w1 (w0F < w1F && w0S < w1S)
 {3, 4, 2, 5, 6, -2, 10}
 {4, 3, 5, 2, 6, -2, 10}
 {4, 5, 3, 6, 2, 10, -2}
 {5, 4, 6, 3, 2, 10, -2}
 {6, 5, 4, 3, 2, 10, -2} // 先頭要素から導出される前記関係、および2番目要素から導出される前記関係が、w0>w1 (w0F > w1F && w0S > w1S)
}
 ここでshiftWP = 3である。上記の例の場合、fIdx = 0では、weightCandListITable[0][] = {2, 3, 4, 5, 6, -2, 10}が選択され、この場合、先頭要素では(w1, w2)=(2, 6),2番目の要素の(w1, w2)は(3, 5)であり、両者ともw1 < w2を満たす。同様に、fIdx = 5では、先頭要素では(w1, w2)=(6, 2), 2番目の要素の(w1, w2)は(5, 3)であり、両者ともw1 > w2を満たす。
For example, the following weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10} // The relation derived from the first element and the relation derived from the second element are w0 <w1 (w0F <w1F && w0S <w1S )
{3, 4, 2, 5, 6, -2, 10}
{4, 3, 5, 2, 6, -2, 10}
{4, 5, 3, 6, 2, 10, -2}
{5, 4, 6, 3, 2, 10, -2}
{6, 5, 4, 3, 2, 10, -2} // The relationship derived from the first element and the relationship derived from the second element are w0> w1 (w0F> w1F &&w0S> w1S )
}
Here shiftWP = 3. In the above example, when fIdx = 0, weightCandListITable [0] [] = {2, 3, 4, 5, 6, -2, 10} is selected. In this case, (w1, w2) = (2, 6), (w1, w2) of the second element is (3, 5), both satisfy w1 <w2. Similarly, when fIdx = 5, (w1, w2) = (6, 2) in the first element, (w1, w2) in the second element is (5, 3), and both satisfy w1> w2.
 例えば、重み候補リスト導出部30301のステップS3の変形例では、以下の重み候補リストテーブルを用いてもよい。
weightCandListITable[][] = 
{
 {1, 2, 3, 4, 5, 0, 6} // 先頭要素から導出される前記関係、および2番目要素から導出される前記関係が、w0<w1
 {2, 3, 1, 4, 5, 0, 6}
 {3, 2, 4, 1, 5, 0, 6}
 {3, 4, 2, 5, 1, 6, 0}
 {4, 3, 5, 2, 1, 6, 0}
 {5, 4, 3, 2, 1, 6, 0} // 先頭要素から導出される前記関係、および2番目要素から導出される前記関係が、w0>w1
}
  <L4:最優先・セカンダリ優先テーブル2>
 上述のweightCandListWTable[][]およびweightCandListITable[][]は、w0Fと、w1Fと、w0Sと、w1Sとが、w0F < w0S < w1S < w1Fを満たすことが好ましい。
For example, in the modified example of step S3 of the weight candidate list deriving unit 30301, the following weight candidate list table may be used.
weightCandListITable [] [] =
{
{1, 2, 3, 4, 5, 0, 6} // The relation derived from the first element and the relation derived from the second element are w0 <w1
{2, 3, 1, 4, 5, 0, 6}
{3, 2, 4, 1, 5, 0, 6}
{3, 4, 2, 5, 1, 6, 0}
{4, 3, 5, 2, 1, 6, 0}
{5, 4, 3, 2, 1, 6, 0} // The relation derived from the first element and the relation derived from the second element are w0> w1
}
<L4: Highest priority / secondary priority table 2>
In the above weightCandListWTable [] [] and weightCandListITable [] [], w0F, w1F, w0S, and w1S preferably satisfy w0F <w0S <w1S <w1F.
 w0F < w0S < w1S < w1Fは、「L3:最優先・セカンダリ優先テーブル1」の構成(w0F < w1F && w0S < w1S)の一つに、w0F < w1Sの制限を追加した構成に等しい。 Ww0F <w0S <w1S <w1F is equivalent to the configuration of “L3: Highest priority / secondary priority table 1” (w0Fw <w1F && w0S <w1S) with the addition of w0F <w1S.
 w0F < w0S < w1S < w1Fは、「L3:最優先・セカンダリ優先テーブル1」の構成(w0F > w1F && w0S > w1S) の一つに、w0F > w1Sの制限を追加した構成に等しい。 0w0F <w0S <w1S <w1F is equivalent to a configuration in which w0F 最> w1S is added to one of the configurations (w0F> w1F && w0S> w1S) of “L3: Highest priority / secondary priority table 1”.
 例えば、重み候補リスト導出部30301のステップS3では、以下の重み候補リストテーブルを用いてもよい。
weightCandListWTable[][] = 
{
 {2, 3, 4, 5, 6, -2, 10} // w0F(=2) < w0S(=3) < w1S(=5) < w1F(=6)
 {3, 4, 2, 5, 6, -2, 10}
 {4, 3, 5, 2, 6, -2, 10}
 {4, 5, 3, 6, 2, 10, -2}
 {5, 4, 6, 3, 2, 10, -2}
 {6, 5, 4, 3, 2, 10, -2} // w0F(=6) > w0S(=5) > w1S(=3) > w1F(=2)
}
 ここで、shiftWP = 3である。
For example, the following weight candidate list table may be used in step S3 of the weight candidate list deriving unit 30301.
weightCandListWTable [] [] =
{
{2, 3, 4, 5, 6, -2, 10} // w0F (= 2) <w0S (= 3) <w1S (= 5) <w1F (= 6)
{3, 4, 2, 5, 6, -2, 10}
{4, 3, 5, 2, 6, -2, 10}
{4, 5, 3, 6, 2, 10, -2}
{5, 4, 6, 3, 2, 10, -2}
{6, 5, 4, 3, 2, 10, -2} // w0F (= 6)> w0S (= 5)> w1S (= 3)> w1F (= 2)
}
Here, shiftWP = 3.
 (A1L:参照ブロックパラメータと重み候補リストの関係)
 上述の「A1:参照ブロックの特徴を考慮した重み係数を導出する動作」において、重み候補リスト導出部30301は、次式のように、重み候補リストテーブルweightCandListWTableを導出している。
weightCandListWTable[0][] = {2, 3, 4, 5, 6, -2, 10}
weightCandListWTable[1][] = {3, 4, 2, 5, 6, -2, 10}
weightCandListWTable[2][] = {4, 3, 5, 2, 6, -2, 10}
weightCandListWTable[3][] = {4, 5, 3, 6, 2, 10, -2}
weightCandListWTable[4][] = {5, 4, 6, 3, 2, 10, -2}
weightCandListWTable[5][] = {6, 5, 4, 3, 2, 10, -2}
w = weightCandListWTable[fIdx][weightIdx]
 図19においてfIdxが0および1であるときの、重み候補リストweightCandListWTable[0][]およびweightCandListWTable[1][]では、RefPic0とcurrPicとの時間的な距離Xval0が、RefPic1とcurrPicとの時間的な距離Xval1よりも、所定の程度以上大きい。ここで、所定の程度とは、例えば、RefPic0とRefPic1との時間的な距離の半分である。このとき、重み候補リストweightCandListWTable[0][]およびweightCandListWTable[1][]の先頭要素は、RefPic0の重みw0がRefPic1の重みw1よりも小さくなるときの重み係数となっている。
(A1L: Relationship between reference block parameter and weight candidate list)
In the above-mentioned “A1: Operation for deriving a weighting factor considering the characteristics of the reference block”, the weight candidate list deriving unit 30301 derives a weight candidate list table weightCandListWTable as shown in the following equation.
weightCandListWTable [0] [] = {2, 3, 4, 5, 6, -2, 10}
weightCandListWTable [1] [] = {3, 4, 2, 5, 6, -2, 10}
weightCandListWTable [2] [] = {4, 3, 5, 2, 6, -2, 10}
weightCandListWTable [3] [] = {4, 5, 3, 6, 2, 10, -2}
weightCandListWTable [4] [] = {5, 4, 6, 3, 2, 10, -2}
weightCandListWTable [5] [] = {6, 5, 4, 3, 2, 10, -2}
w = weightCandListWTable [fIdx] [weightIdx]
In FIG. 19, in the weight candidate lists weightCandListWTable [0] [] and weightCandListWTable [1] [] when fIdx is 0 and 1, the temporal distance Xval0 between RefPic0 and currPic is the temporal relationship between RefPic1 and currPic. More than a predetermined distance Xval1. Here, the predetermined degree is, for example, half of the temporal distance between RefPic0 and RefPic1. At this time, the top element of the weight candidate lists weightCandListWTable [0] [] and weightCandListWTable [1] [] is a weighting coefficient when the weight w0 of RefPic0 is smaller than the weight w1 of RefPic1.
 fIdxが2および3であるときの、重み候補リストweightCandListWTable[2][]およびweightCandListWTable[3][]では、RefPic0とcurrPicとの時間的な距離Xval0と、RefPic1とcurrPicとの時間的な距離Xval1とが、同程度(正確にXval0とXval1とが一致していなくてよい)となっている。このとき、重み候補リストweightCandListWTable[2][]およびweightCandListWTable[3][]の先頭要素は、RefPic0の重みw0FとRefPic1の重みw1Fとが等しくなる(1:1)ときの重み係数となっている。また、重み候補リストweightCandListWTable[2][]およびweightCandListWTable[3][]の先頭から2番目の要素は、Xval0 > Xval1の場合にRefPic0の重みw0Sが1:1の重み係数(ここでは4)よりも小さい重み係数(ここでは3)となり、Xval0とXval1との大小関係が逆にXval0 < Xval1の場合にRefPic0の重みw0Sが1:1の重み係数(ここでは4)よりも大きな重み係数(ここでは5)となる。 In the weight candidate lists weightCandListWTable [2] [] and weightCandListWTable [3] [] when fIdx is 2 and 3, the temporal distance Xval0 between RefPic0 and currPic and the temporal distance Xval1 between RefPic1 and currPic Are comparable (Xval0 and Xval1 do not have to match exactly). At this time, the top elements of the weight candidate lists weightCandListWTable [2] [] and weightCandListWTable [3] [] are weight coefficients when the weight w0F of RefPic0 and the weight w1F of RefPic1 are equal (1: 1). . The second element from the top of the weight candidate lists weightCandListWTable [2] [] and weightCandListWTable [3] [] is a weighting factor (4 in this case) with a weight w0S of RefPic0 of 1: 1 when Xval0> Xval1. Is smaller than 3 (here, 3), and when the relationship between Xval0 and Xval1 is Xval0 <Xval1, the weight w0S of RefPic0 is larger than the weighting factor of 1: 1 (here 4). Then 5).
 fIdxが4および5であるときの、重み候補リストweightCandListWTable[4][]およびweightCandListWTable[5][]では、RefPic0とcurrPicとの時間的な距離Xval0が、RefPic1とcurrPicとの時間的な距離Xval1よりも、前記所定の程度以上小さい。このとき、重み候補リストweightCandListWTable[4][]およびweightCandListWTable[5][]の先頭要素は、RefPic0の重みがRefPic1の重みよりも大きくなるときの重み係数となっている。 In the weight candidate lists weightCandListWTable [4] [] and weightCandListWTable [5] [] when fIdx is 4 and 5, the temporal distance Xval0 between RefPic0 and currPic is the temporal distance Xval1 between RefPic1 and currPic. Smaller than the predetermined degree. At this time, the top element of the weight candidate lists weightCandListWTable [4] [] and weightCandListWTable [5] [] is a weighting coefficient when the weight of RefPic0 is larger than the weight of RefPic1.
 以上のとおり、Xval0 > Xval1となるほど、RefPic0を参照して導出される動き補償画像predSamplesL0の重みが小さくなるような(小さい重みがリストの先頭付近になるような)重み候補リストを導出する構成も、本発明に含まれる。 As described above, there is also a configuration for deriving a weight candidate list such that the weight of motion compensated image predSamplesL0 derived by referring to RefPic0 becomes smaller as Xval0> Xval1 (the smaller weight is near the top of the list) Are included in the present invention.
 (A3L:参照ブロックパラメータと予測重み係数の関係)
 上述の「A1:参照ブロックの特徴を考慮した重み係数を導出する動作」において、重み候補リスト導出部30301は、次式のように、重み候補リストweightCandListWを導出している。
if (wpIdx == 2) weightCandListW[] = {2, 3, 4, 5, 6, -2, 10}
else if (wpIdx == 3) weightCandListW[] = {3, 4, 2, 5, 6, -2, 10}
else if (wpIdx == 4) weightCandListW[] = {4, 3, 5, 2, 6, -2, 10}
else if (wpIdx == 5) weightCandListW[] = {5, 4, 6, 3, 2, 10, -2}
else if (wpIdx == 6) weightCandListW[] = {6, 5, 4, 3, 2, 10, -2}
w = weightCandListW[weightIdx]
 図24においてwpIdxが2および3であるときの、重み候補リストweightCandListW[]では、Xval0が、Xval1よりも、上述の所定の程度以上大きい。このとき、重み候補リストweightCandListW[]の先頭要素は、RefPic0の重みがRefPic1の重みよりも小さくなるときの重み係数となっている。
(A3L: Relationship between reference block parameter and prediction weight coefficient)
In the above-described “A1: Operation for deriving a weighting factor considering the characteristics of the reference block”, the weight candidate list deriving unit 30301 derives a weight candidate list weightCandListW as shown in the following equation.
if (wpIdx == 2) weightCandListW [] = {2, 3, 4, 5, 6, -2, 10}
else if (wpIdx == 3) weightCandListW [] = {3, 4, 2, 5, 6, -2, 10}
else if (wpIdx == 4) weightCandListW [] = {4, 3, 5, 2, 6, -2, 10}
else if (wpIdx == 5) weightCandListW [] = {5, 4, 6, 3, 2, 10, -2}
else if (wpIdx == 6) weightCandListW [] = {6, 5, 4, 3, 2, 10, -2}
w = weightCandListW [weightIdx]
In the weight candidate list weightCandListW [] when wpIdx is 2 and 3 in FIG. 24, Xval0 is larger than Xval1 by the above-mentioned predetermined degree or more. At this time, the head element of the weight candidate list weightCandListW [] is a weighting coefficient when the weight of RefPic0 is smaller than the weight of RefPic1.
 wpIdxが4であるときの重み候補リストweightCandListW[]では、Xval0と、Xval1とが、同程度(正確にXval0とXval1とが一致していなくてよい)となっている。このとき、重み候補リストweightCandListW[]の先頭要素は、RefPic0の重みとRefPic1の重みとが等しくなるときの重み係数となっている。 In the weight candidate list weightCandListW [] when wpIdx is 4, Xval0 and Xval1 are the same level (Xval0 and Xval1 do not have to match exactly). At this time, the leading element of the weight candidate list weightCandListW [] is a weighting coefficient when the weight of RefPic0 and the weight of RefPic1 are equal.
 また、wpIdxが5および6であるときの、重み候補リストweightCandListW[]では、RefPic0とcurrPicとの時間的な距離Xval0が、RefPic1とcurrPicとの時間的な距離Xval1よりも、前記所定の程度以上小さい。このとき、重み候補リストweightCandListW[4][]およびweightCandListW[]の先頭要素は、RefPic0の重みがRefPic1の重みよりも大きくなるときの重み係数となっている。 In addition, in the weight candidate list weightCandListW [] when wpIdx is 5 and 6, the temporal distance Xval0 between RefPic0 and currPic is greater than the predetermined degree than the temporal distance Xval1 between RefPic1 and currPic. small. At this time, the head element of the weight candidate lists weightCandListW [4] [] and weightCandListW [] is a weighting coefficient when the weight of RefPic0 is larger than the weight of RefPic1.
 以上のとおり、Xval0 > Xval1となるほど、RefPic0を参照して導出される動き補償画像predSamplesL0の重みが小さくなるような(小さい重みがリストの先頭付近になるような)重み候補リストを導出する構成も、本発明に含まれる。 As described above, there is also a configuration for deriving a weight candidate list such that the weight of motion compensated image predSamplesL0 derived by referring to RefPic0 becomes smaller as Xval0> Xval1 (the smaller weight is near the top of the list) Are included in the present invention.
 〔実施形態2〕
 実施形態1では、復号処理および符号化処理において、参照ブロックの特徴を考慮した。本実施形態は、各処理において、隣接ブロックの特徴を考慮する点が、実施形態1とは異なる。
[Embodiment 2]
In the first embodiment, the characteristics of the reference block are considered in the decoding process and the encoding process. The present embodiment is different from the first embodiment in that the characteristics of adjacent blocks are considered in each process.
 (B1:隣接ブロックの特徴を考慮した重み係数を導出する構成)
 図26は、本実施形態における、図16に示すインター予測パラメータ復号部303とは異なるインター予測パラメータ復号部303c、および図11に示すインター予測画像生成部309の詳細構成を示す概略図である。
(B1: Configuration for deriving weighting factors in consideration of features of adjacent blocks)
FIG. 26 is a schematic diagram illustrating a detailed configuration of the inter prediction parameter decoding unit 303c different from the inter prediction parameter decoding unit 303 illustrated in FIG. 16 and the inter prediction image generation unit 309 illustrated in FIG. 11 in the present embodiment.
 図26に示すように、インター予測パラメータ復号部303cは、重みインデックス復号部3038と、隣接ベース重み候補リスト導出部30301cと、重み係数選択部30302cとを含んで構成される。 26, the inter prediction parameter decoding unit 303c includes a weight index decoding unit 3038, an adjacent base weight candidate list derivation unit 30301c, and a weight coefficient selection unit 30302c.
  <隣接ベース重み候補リスト導出部30301c>
 隣接ベース重み候補リスト導出部30301cは、予測パラメータメモリ307を参照し、隣接ブロックの重み係数(もしくは重みインデックス)を用いて重み候補リストweightCandListを導出する。
<Adjacent Base Weight Candidate List Deriving Unit 30301c>
The adjacent base weight candidate list deriving unit 30301c refers to the prediction parameter memory 307 and derives a weight candidate list weightCandList using the weight coefficient (or weight index) of the adjacent block.
  <重み係数選択部30302c>
 重み係数選択部30302cは、重み候補リストweightCandListと、重みインデックスweightIdxとに応じて、重み係数wを導出する。
<Weighting coefficient selection unit 30302c>
The weighting coefficient selection unit 30302c derives the weighting coefficient w according to the weight candidate list weightCandList and the weight index weightIdx.
 (B1:隣接ブロックの特徴を考慮した重み係数を導出する動作)
 図27は、図26に示すインター予測パラメータ復号部303cおよびインター予測画像生成部309の動作を示すフローチャートである。図27に示すように、インター予測パラメータ復号部303cおよびインター予測画像生成部309の動作は、ステップS1、S12、S13、およびS4を含む。
(B1: Operation for deriving weighting factors in consideration of features of adjacent blocks)
FIG. 27 is a flowchart showing operations of the inter prediction parameter decoding unit 303c and the inter prediction image generation unit 309 shown in FIG. As illustrated in FIG. 27, the operations of the inter prediction parameter decoding unit 303c and the inter prediction image generation unit 309 include steps S1, S12, S13, and S4.
  <ステップS12>
 隣接ベース重み候補リスト導出部30301cは、隣接ブロックパラメータとして、隣接ブロックの重み係数(wIdxLXA、wIdxLXB)を導出する。
<Step S12>
The adjacent base weight candidate list deriving unit 30301c derives adjacent block weight coefficients (wIdxLXA, wIdxLXB) as adjacent block parameters.
  <ステップS13>
 隣接ベース重み候補リスト導出部30301cは、導出した隣接ブロックの重み係数(wIdxLXA、wIdxLXB)から、重み候補リストweightCandListWを導出する。図28は、図26に示すインター予測パラメータ復号部303cの隣接ベース重み候補リスト導出部30301cが重み候補リストweightCandListWを導出する場合に用いる隣接ブロックAおよびBを示す模式図である。図28において、隣接ブロックAは、対象ブロックTの左に位置している。また、隣接ブロックBは、対象ブロックTの上に位置している。
<Step S13>
The adjacent base weight candidate list deriving unit 30301c derives a weight candidate list weightCandListW from the derived adjacent block weight coefficients (wIdxLXA, wIdxLXB). FIG. 28 is a schematic diagram illustrating adjacent blocks A and B used when the adjacent base weight candidate list deriving unit 30301c of the inter prediction parameter decoding unit 303c illustrated in FIG. 26 derives the weight candidate list weightCandListW. In FIG. 28, the adjacent block A is located to the left of the target block T. The adjacent block B is located on the target block T.
 ブロックの座標は、二次元の平面座標系により(x, y)のように表す。x座標は、ブロックの左から右へ向かうほど増加する。y座標は、ブロックの上から下へ向かうほど増加する。 The block coordinates are expressed as (x, y) in a two-dimensional plane coordinate system. The x coordinate increases from the left to the right of the block. The y coordinate increases from the top to the bottom of the block.
 対象ブロックTの位置を(xP, yP)とする。対象ブロックのx軸方向の長さをnPbWとする。対象ブロックのy軸方向の長さをnPbHとする。このとき、隣接ブロックAは、座標(xP-1, yP+nPbH-1)を含むブロックである。また、隣接ブロックBは、座標(xP+nPbW-1, yP-1) を含むブロックである。 Suppose that the position of the target block T is (xP, yP). The length of the target block in the x-axis direction is nPbW. The length of the target block in the y-axis direction is nPbH. At this time, the adjacent block A is a block including coordinates (xP-1, yP + nPbH-1). The adjacent block B is a block including coordinates (xP + nPbW-1, yP-1).
 隣接ベース重み候補リスト導出部30301cは、隣接ブロックAの重み係数wIdxLXAが利用可能(availableFlagLXA=1)であれば、重み候補リストweightCandListW[]に追加する。さらに、隣接ブロックBの重み係数wIdxLXBが利用可能(availableFlagLXB=1)であれば、重み候補リストweightCandListW[]に追加する。
i = 0
if (availableFlagLXA) {
 weightCandListW[i++] = wIdxLXA; wpUsed[wIdxLXA] = 1
}
if (availableFlagLXB) {
 weightCandListW[i++] = wIdxLXB; wpUsed[wIdxLXB] = 1
}
 ここでwpUsed[wIdx]は、ある重み係数wIdxを重み候補リストに格納済みかを示すための情報であり、wpUsed[wIdx]はある重み係数wIdxが格納済みの場合に真となり、逆に、!wpUsed[wIdx](後述)は、ある重み係数wIdxが格納されていない場合に真となる。
If the weight coefficient wIdxLXA of the adjacent block A is available (availableFlagLXA = 1), the adjacent base weight candidate list derivation unit 30301c adds the weight to the weight candidate list weightCandListW []. Furthermore, if the weight coefficient wIdxLXB of the adjacent block B is available (availableFlagLXB = 1), it is added to the weight candidate list weightCandListW [].
i = 0
if (availableFlagLXA) {
weightCandListW [i ++] = wIdxLXA; wpUsed [wIdxLXA] = 1
}
if (availableFlagLXB) {
weightCandListW [i ++] = wIdxLXB; wpUsed [wIdxLXB] = 1
}
Here, wpUsed [wIdx] is information for indicating whether a certain weighting factor wIdx has been stored in the weight candidate list, and wpUsed [wIdx] is true when a certain weighting factor wIdx has been stored, conversely! wpUsed [wIdx] (described later) is true when a certain weight coefficient wIdx is not stored.
 続いて、隣接ベース重み候補リスト導出部30301cは導出した重み候補リストweightCandListW[]の要素数が所定数wN(例えば5)に達していなければ、所定のテーブルweightCandListWDefaultの要素を、重み候補リストweightCandListW[]の要素数がwNとなるように、重み候補リストweightCandListW[]に追加する。なお、テーブルweightCandListWDefaultの要素を重み候補リストweightCandListW[]に追加する時点において、テーブルweightCandListWDefaultの要素wpが、既に重み候補リストweightCandListW[]に追加されていたら(wpUsed[wp] == 1)、その要素wpは、weightCandList[]に追加されない。
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListW); j++) {
  wpIdx = weightCandListWDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListW[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 所定のテーブルweightCandListWDefault[]としては、例えば以下を用いる。
weightCandListWDefault[] = {4, 3, 5, 2, 6, -2, 10}
 なお、所定のテーブルweightCandListWDefaultの要素を重み候補リストweightCandListW[]に追加する時点において、所定のテーブルweightCandListWDefaultの要素wpが、既に重み候補リストweightCandListW[]に追加されていたら(wpUsed[wp] == 1)、その要素wpは、weightCandListW[]に追加されない。
Subsequently, if the number of elements in the derived weight candidate list weightCandListW [] does not reach a predetermined number wN (for example, 5), the adjacent base weight candidate list deriving unit 30301c uses the elements in the predetermined table weightCandListWDefault as the weight candidate list weightCandListW [ ] Is added to the weight candidate list weightCandListW [] so that the number of elements becomes wN. If the element wp of the table weightCandListWDefault has already been added to the weight candidate list weightCandListW [] at the time of adding the element of the table weightCandListWDefault to the weight candidate list weightCandListW [], that element wp is not added to weightCandList [].
while (i <wN) {
for (j = 0; j <sizeof (weightCandListW); j ++) {
wpIdx = weightCandListWDefault [j]
if (! wpUsed [wpIdx]) {weightCandListW [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
As the predetermined table weightCandListWDefault [], for example, the following is used.
weightCandListWDefault [] = {4, 3, 5, 2, 6, -2, 10}
If an element wp of the predetermined table weightCandListWDefault has already been added to the weight candidate list weightCandListW [] at the time of adding an element of the predetermined table weightCandListWDefault to the weight candidate list weightCandListW [] (wpUsed [wp] == 1 ), The element wp is not added to weightCandListW [].
  <ステップS13におけるスケーリングの考慮>
 図29は、図26に示すインター予測パラメータ復号部303cの隣接ベース重み候補リスト導出部30301cが重み候補リストweightCandListWを導出する場合に考慮するスケーリングを説明するための模式図である。図29において、符号とその意味との対応は次のとおりである。
Pcurr:対象ピクチャ
Pnref:隣接ブロックの参照ピクチャ
Pref:対象ブロックの参照ピクチャ
mvLX:隣接ブロックの参照ピクチャの動きベクトル
mvpLX:隣接ブロックの参照ピクチャのスケーリングされた動きベクトル(すなわち、対象ブロックの予測ベクトル)
 図29では、対象ピクチャおよび参照ピクチャを、模式的に線分として示している。予測動きベクトル導出では、隣接ブロックの参照ピクチャPnrefが、対象ピクチャPcurrの参照ピクチャPrefと異なる場合には、動きベクトルmvLXの方向を維持したまま、動きベクトルmvLXのスケーリングを行う。動きベクトルmvLXをスケーリングして得られる動きベクトルmvpLXは、対象ピクチャPcurrと参照ピクチャPrefとの時間的な距離に合わせた長さを有する。
<Consideration of Scaling in Step S13>
FIG. 29 is a schematic diagram for explaining scaling that is considered when the adjacent base weight candidate list deriving unit 30301c of the inter prediction parameter decoding unit 303c illustrated in FIG. 26 derives the weight candidate list weightCandListW. In FIG. 29, the correspondence between the symbols and their meanings is as follows.
Pcurr: Target picture
Pnref: Reference picture of adjacent block
Pref: Reference picture of the target block
mvLX: Reference picture motion vector of adjacent block
mvpLX: Scaled motion vector of the reference picture of the neighboring block (ie, the prediction vector of the target block)
In FIG. 29, the target picture and the reference picture are schematically shown as line segments. In the prediction motion vector derivation, when the reference picture Pnref of the adjacent block is different from the reference picture Pref of the target picture Pcurr, the motion vector mvLX is scaled while maintaining the direction of the motion vector mvLX. The motion vector mvpLX obtained by scaling the motion vector mvLX has a length according to the temporal distance between the target picture Pcurr and the reference picture Pref.
 動きベクトルmvLXがスケーリングされる場合には、重み候補リストweightCandListWに追加する重み係数に、隣接ブロックの重み係数をそのまま用いることができない(重み係数をスケーリングしても適当な値にならない)。ゆえに、この場合には、重み候補リストweightCandListWには、隣接ブロックの重み係数を格納しない。なお、動きベクトルmvLXがスケーリングされる場合に、重み候補リストweightCandListWに追加する重み係数として、デフォルト重み係数を用いてもよい。この場合、所定のテーブルweightCandListWDefaultの要素を順に格納する構成でもよい。 When the motion vector mvLX is scaled, the weighting factor of the adjacent block cannot be used as it is as the weighting factor added to the weight candidate list weightCandListW (the weighting factor does not become an appropriate value even if it is scaled). Therefore, in this case, the weight coefficient of the adjacent block is not stored in the weight candidate list weightCandListW. When the motion vector mvLX is scaled, a default weight coefficient may be used as a weight coefficient to be added to the weight candidate list weightCandListW. In this case, the configuration may be such that the elements of the predetermined table weightCandListWDefault are stored in order.
 換言するならば、動きベクトルmvLXがスケーリングされる場合とは、Pref!=Pnrefである場合と言える。あるいは、動きベクトルmvLXがスケーリングされる場合とは、POC(Pref)!=POC(Pnref)である場合と言える。 In other words, the case where the motion vector mvLX is scaled can be said to be the case where Pref! = Pnref. Alternatively, the case where the motion vector mvLX is scaled can be said to be a case where POC (Pref)! = POC (Pnref).
 具体的には、重み候補リストweightCandListWは、以下のように、隣接ブロックAが利用可能(真偽値availableFlagLXAが真(非0))で、予測ベクトルリスト導出において隣接ブロックAの予測ベクトルがスケーリングされていなければ(スケーリングされていることを示す真偽値scaledLXAが偽(0)であれば)、weightCandListWに隣接ブロックAの重み係数wIdxLXAを追加する。さらに、重み係数wIdxLXAが追加されたことを示す変数wpUsed[wIdxLXA]に1を設定する。 Specifically, in the weight candidate list weightCandListW, as shown below, the adjacent block A is available (the truth value availableFlagLXA is true (non-zero)), and the prediction vector of the adjacent block A is scaled in the prediction vector list derivation. If not (if the true / false value scaledLXA indicating that it is scaled is false (0)), the weight coefficient wIdxLXA of the adjacent block A is added to the weightCandListW. Further, 1 is set to the variable wpUsed [wIdxLXA] indicating that the weight coefficient wIdxLXA has been added.
 同様に、予測ベクトルリスト導出において、隣接ブロックBの予測ベクトルがスケーリングされていなければ(スケーリングされていることを示す真偽値scaledLXBが偽(0)であれば)、weightCandListに隣接ブロックBの重み係数wIdxLXBを追加する。 Similarly, in the prediction vector list derivation, if the prediction vector of the adjacent block B is not scaled (if the true / false value scaledLXB indicating that it is scaled is false (0)), the weight of the adjacent block B in the weightCandList Add coefficient wIdxLXB.
 最後に、導出されたweightCandListWが所定数wN(例えば5)に達していなければ、所定のテーブルweightCandListWDefaultの要素をweightCandListW[]の要素数がwNとなるようにリストに追加する。
i = 0
if (availableFlagLXA && !scaledLXA) {
 weightCandListW[i++] = wIdxLXA
 wpUsed[wIdxLXA] = 1
}
if (availableFlagLXB && !scaledLXB) {
 weightCandListW[i++] = wIdxLXB
 wpUsed[wIdxLXB] = 1
}
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListW); j++) {
  wpIdx = weightCandListWDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListW[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 なお、重み候補リストweightCandListには、重み係数自体を格納する必要はなく、重み係数を参照する隣接ブロックのラベル(例A、B、…など)などでもよい。また、重み係数を示すインデックスでもよい。重み係数を示すインデックスの場合、つまり、重み候補リストweightCandListI[]についても、以下のとおり処理できる。下記ではwIdxLXA、wIdxLXBは隣接ブロックA、Bの重みインデックスである。
i = 0
if(availableFlagLXA && !scaledLXA) {
 weightCandListI[i++] = wIdxLXA
 wpUsed[wIdxLXA] =1 
}
if( availableFlagLXB && !scaledLXB) {
 weightCandListI[i++] = wIdxLXB
 wpUsed[wIdxLXB] = 1
}
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListI); j++) {
  wpIdx = weightCandListIDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListI[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 そして、重み係数選択部30302cは、導出された重み候補リストweightCandListWと、重みインデックスweightIdxとから、重み係数wを導出する。
w = weightCandListW[weightIdx]
 (B1:隣接ブロックの特徴を考慮した重み係数の導出による効果)
 以上のように、隣接ブロックの重み係数に応じて、選択確率が高い順に重み係数を並べたリストを導出できる。以上の重み候補リスト導出処理は、符号化処理においても適用できる。そして、符号化処理において、以上のように導出された重み係数を符号化することにより、従来よりも小さな重みインデックスで重み係数が符号化できるようになる。そのため、重みインデックスの符号量を低減する効果を奏する。
Finally, if the derived weightCandListW has not reached a predetermined number wN (for example, 5), the elements of the predetermined table weightCandListWDefault are added to the list so that the number of elements of weightCandListW [] is wN.
i = 0
if (availableFlagLXA &&! scaledLXA) {
weightCandListW [i ++] = wIdxLXA
wpUsed [wIdxLXA] = 1
}
if (availableFlagLXB &&! scaledLXB) {
weightCandListW [i ++] = wIdxLXB
wpUsed [wIdxLXB] = 1
}
while (i <wN) {
for (j = 0; j <sizeof (weightCandListW); j ++) {
wpIdx = weightCandListWDefault [j]
if (! wpUsed [wpIdx]) {weightCandListW [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
The weighting candidate list weightCandList does not need to store the weighting coefficient itself, and may be a label (eg, A, B,...) Of an adjacent block that refers to the weighting coefficient. An index indicating a weighting factor may be used. In the case of an index indicating a weight coefficient, that is, the weight candidate list weightCandListI [] can be processed as follows. In the following, wIdxLXA and wIdxLXB are weight indexes of adjacent blocks A and B.
i = 0
if (availableFlagLXA &&! scaledLXA) {
weightCandListI [i ++] = wIdxLXA
wpUsed [wIdxLXA] = 1
}
if (availableFlagLXB &&! scaledLXB) {
weightCandListI [i ++] = wIdxLXB
wpUsed [wIdxLXB] = 1
}
while (i <wN) {
for (j = 0; j <sizeof (weightCandListI); j ++) {
wpIdx = weightCandListIDefault [j]
if (! wpUsed [wpIdx]) {weightCandListI [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
Then, the weight coefficient selection unit 30302c derives a weight coefficient w from the derived weight candidate list weightCandListW and the weight index weightIdx.
w = weightCandListW [weightIdx]
(B1: Effect of derivation of weighting factors considering features of adjacent blocks)
As described above, a list in which weighting factors are arranged in descending order of selection probability can be derived according to the weighting factors of adjacent blocks. The above weight candidate list derivation process can also be applied to the encoding process. Then, in the encoding process, by encoding the weighting coefficient derived as described above, the weighting coefficient can be encoded with a smaller weight index than in the conventional case. Therefore, the effect of reducing the code amount of the weight index is achieved.
 (B1L:隣接ブロックの特徴を考慮した重み係数の導出の変形例1)
 以下のとおりに、重み係数を導出する。
(1)隣接ブロックAの重み係数wIdxLXAと、隣接ブロックBの重み係数wIdxLXBとにより、重み候補リストを導出する。このとき、1:1の重み係数wEqに近い(この場合wEq = wIdx = 4に近い)候補を、先に重み候補リストへ追加する)。各隣接ブロックの重み係数wIdxLXA, wIdxLXBと1:1の重み係数wEqの差の絶対値|wIdxLXA - wEq|、|wIdxLXB - wEq|を比較し、隣接ブロックAの重み係数wIdxLXAとwEqとの絶対値との差のほうが小さければ、隣接ブロックAの重み係数wIdxLXAを重み候補リストに追加し、そうでなければ、隣接ブロックBの重み係数wIdxLXBを重み候補リストに、先に追加する。
(2)候補リストに空きがあれば(i < wN)、所定のテーブルweightCandListWDefaultの重み係数を追加する。
wEq = 4
i = 0
if (availableFlagLXA && availableFlagLXB) {
 if (|wIdxLXA - wEq| < |wIdxLXB - wEq|) {
  weightCandListW[i++] = wIdxLXA; wpUsed[wIdxLXA] = 1
  weightCandListW[i++] = wIdxLXB; wpUsed[wIdxLXB] = 1
 } else {
  weightCandListW[i++] = wIdxLXB; wpUsed[wIdxLXB] = 1
  weightCandListW[i++] = wIdxLXA; wpUsed[wIdxLXA] = 1
 }
} else if (availableFlagLXA) {
 weightCandListW[i++] = wIdxLXA; wpUsed[wIdxLXA] = 1
} else if (availableFlagLXB) {
 weightCandListW[i++] = wIdxLXB; wpUsed[wIdxLXB] = 1
}
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListW); j++) {
  wpIdx = weightCandListWDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListW[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 以下に、上述したものとは別の例を示す。
i = 0
scaledLXA = (POC(Pref)!=POC(PnAref)) //PnAref 隣接ブロックAの参照画像
if (availableFlagLXA && !scaledLXA) {
 weightCandListW[i++] = wIdxLXA
 wpUsed[wIdxLXA] = 1
}
scaledLXB = (POC(Pref)!=POC(PnBref)) //PnBref 隣接ブロックBの参照画像
if (availableFlagLXB && !scaledLXB) {
 weightCandListW[i++] = wIdxLXB
 wpUsed[wIdxLXB] = 1
}
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListW); j++) {
  wpIdx = weightCandListWDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListW[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 なお、(|wIdxLXA - wEq| < |wIdxLXB - wEq|)の判定は、wIdxLXA < wIdxLXBとしてもよい。
(B1L: Modification Example 1 for Deriving Weighting Factors Considering Features of Adjacent Blocks)
A weighting factor is derived as follows.
(1) A weight candidate list is derived from the weight coefficient wIdxLXA of the adjacent block A and the weight coefficient wIdxLXB of the adjacent block B. At this time, candidates close to the weighting factor wEq of 1: 1 (in this case, close to wEq = wIdx = 4) are added to the weight candidate list first). The absolute value of the difference between the weighting factors wIdxLXA and wIdxLXB of each adjacent block and the weighting factor wEq of 1: 1 | wIdxLXA-wEq | and | wIdxLXB-wEq | If the difference between and is smaller, the weight coefficient wIdxLXA of the adjacent block A is added to the weight candidate list, and if not, the weight coefficient wIdxLXB of the adjacent block B is added to the weight candidate list first.
(2) If there is a vacancy in the candidate list (i <wN), a weighting factor of a predetermined table weightCandListWDefault is added.
wEq = 4
i = 0
if (availableFlagLXA && availableFlagLXB) {
if (| wIdxLXA-wEq | <| wIdxLXB-wEq |) {
weightCandListW [i ++] = wIdxLXA; wpUsed [wIdxLXA] = 1
weightCandListW [i ++] = wIdxLXB; wpUsed [wIdxLXB] = 1
} else {
weightCandListW [i ++] = wIdxLXB; wpUsed [wIdxLXB] = 1
weightCandListW [i ++] = wIdxLXA; wpUsed [wIdxLXA] = 1
}
} else if (availableFlagLXA) {
weightCandListW [i ++] = wIdxLXA; wpUsed [wIdxLXA] = 1
} else if (availableFlagLXB) {
weightCandListW [i ++] = wIdxLXB; wpUsed [wIdxLXB] = 1
}
while (i <wN) {
for (j = 0; j <sizeof (weightCandListW); j ++) {
wpIdx = weightCandListWDefault [j]
if (! wpUsed [wpIdx]) {weightCandListW [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
In the following, an example different from that described above is shown.
i = 0
scaledLXA = (POC (Pref)! = POC (PnAref)) // PnAref Reference image of adjacent block A
if (availableFlagLXA &&! scaledLXA) {
weightCandListW [i ++] = wIdxLXA
wpUsed [wIdxLXA] = 1
}
scaledLXB = (POC (Pref)! = POC (PnBref)) // PnBref Reference image of adjacent block B
if (availableFlagLXB &&! scaledLXB) {
weightCandListW [i ++] = wIdxLXB
wpUsed [wIdxLXB] = 1
}
while (i <wN) {
for (j = 0; j <sizeof (weightCandListW); j ++) {
wpIdx = weightCandListWDefault [j]
if (! wpUsed [wpIdx]) {weightCandListW [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
The determination of (| wIdxLXA−wEq | <| wIdxLXB−wEq |) may be made as wIdxLXA <wIdxLXB.
 (B1b:隣接ブロックの特徴を考慮した重み係数の導出の変形例2)
 本項目の重み係数の導出は、隣接ブロックの重み係数の代わりに、隣接ブロックの重み係数を示すインデックスを参照して、重み候補リストを導出する点が、上述の重み係数の導出とは異なる。具体的には、ステップS12、ステップS13を下記のように変形する。
(B1b: Modified example 2 of derivation of weighting factors considering features of adjacent blocks)
The derivation of the weighting factor of this item is different from the above-described derivation of the weighting factor in that the weight candidate list is derived by referring to the index indicating the weighting factor of the adjacent block instead of the weighting factor of the adjacent block. Specifically, step S12 and step S13 are modified as follows.
  <ステップS12の変形例>
 隣接ベース重み候補リスト導出部30301cは、隣接ブロックパラメータとして、隣接ブロックの重み係数インデックス(wIdxLXA、wIdxLXB)を導出する。
<Modification of Step S12>
The adjacent base weight candidate list deriving unit 30301c derives the weight coefficient index (wIdxLXA, wIdxLXB) of the adjacent block as the adjacent block parameter.
  <ステップS13の変形例>
 隣接ベース重み候補リスト導出部30301cは、隣接ブロックの重みインデックス(wIdxLXA、wIdxLXB)から、重み候補リストweightCandListIを導出する。
i = 0
if(availableFlagLXA && !scaledLXA) {
 weightCandListI[i++] = wIdxLXA
 wpUsed[wIdxLXA] =1 
}
if( availableFlagLXB && !scaledLXB) {
 weightCandListI[i++] = wIdxLXB
 wpUsed[wIdxLXB] = 1 
}
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListI); j++) {
  wpIdx = weightCandListIDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListI[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 導出されたweightCandListIが所定数wNに達していなければ、所定のテーブルweightCandListIDefaultの要素で埋める。このとき、すでにweightCandListIDefaultの要素wpIdxが、weightCandListIに格納されていたら(wpUsed[wpIdx] == 1)、wpIdxをテーブルに格納しない。
while (i < wN) {
 for (j = 0; j < sizeof(weightCandListI); j++) {
  wpIdx = weightCandListIDefault[j]
  if (!wpUsed[wpIdx]) {weightCandListI[i++] = wpIdx; wpUsed[wpIdx] = 1}
}}
 さらに、重み係数選択部30302cは、導出された重み候補リストweightCandListIと、重みインデックスweightIdxとから、重み係数テーブルweightTableの位置posIdxを導出し、導出した重みインデックスから以下のように、重み係数wを導出する。
<Modification of Step S13>
The adjacent base weight candidate list deriving unit 30301c derives a weight candidate list weightCandListI from the weight indexes (wIdxLXA, wIdxLXB) of adjacent blocks.
i = 0
if (availableFlagLXA &&! scaledLXA) {
weightCandListI [i ++] = wIdxLXA
wpUsed [wIdxLXA] = 1
}
if (availableFlagLXB &&! scaledLXB) {
weightCandListI [i ++] = wIdxLXB
wpUsed [wIdxLXB] = 1
}
while (i <wN) {
for (j = 0; j <sizeof (weightCandListI); j ++) {
wpIdx = weightCandListIDefault [j]
if (! wpUsed [wpIdx]) {weightCandListI [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
If the derived weightCandListI does not reach the predetermined number wN, it is filled with elements of the predetermined table weightCandListIDefault. At this time, if the element wpIdx of weightCandListIDefault has already been stored in weightCandListI (wpUsed [wpIdx] == 1), wpIdx is not stored in the table.
while (i <wN) {
for (j = 0; j <sizeof (weightCandListI); j ++) {
wpIdx = weightCandListIDefault [j]
if (! wpUsed [wpIdx]) {weightCandListI [i ++] = wpIdx; wpUsed [wpIdx] = 1}
}}
Further, the weight coefficient selection unit 30302c derives the position posIdx of the weight coefficient table weightTable from the derived weight candidate list weightCandListI and the weight index weightIdx, and derives the weight coefficient w from the derived weight index as follows. To do.
 posIdx = weightCandListI[weightIdx]
 w = weightTable[posIdx]
 ここで、例えば、重み係数テーブルは、weightTable [] = {-2,2,3,4,5,6,10}とする。
posIdx = weightCandListI [weightIdx]
w = weightTable [posIdx]
Here, for example, the weighting coefficient table is weightTable [] = {− 2,2,3,4,5,6,10}.
 (B2:隣接ブロックの特徴を考慮した重み係数を導出する構成)
 図30は、図16に示すインター予測パラメータ復号部303とは異なるインター予測パラメータ復号部303d、および図11に示すインター予測画像生成部309の詳細構成を示す概略図である。
(B2: Configuration for deriving weighting factors in consideration of features of adjacent blocks)
30 is a schematic diagram illustrating a detailed configuration of an inter prediction parameter decoding unit 303d different from the inter prediction parameter decoding unit 303 illustrated in FIG. 16 and an inter prediction image generation unit 309 illustrated in FIG.
 図30に示すように、インター予測パラメータ復号部303dは、重みインデックス復号部3038と、予測重み候補リスト導出部30301dと、予測重み候補選択部30302dと、重み係数導出部3030bとを含んで構成される。 As illustrated in FIG. 30, the inter prediction parameter decoding unit 303d includes a weight index decoding unit 3038, a prediction weight candidate list derivation unit 30301d, a prediction weight candidate selection unit 30302d, and a weight coefficient derivation unit 3030b. The
  <予測重み候補リスト導出部30301d>
 予測重み候補リスト導出部30301dは、予測パラメータメモリ307を参照し、隣接ブロックの重み係数(もしくは重みインデックス)を用いて予測重み候補リストを導出する。
<Prediction weight candidate list derivation unit 30301d>
The prediction weight candidate list deriving unit 30301d refers to the prediction parameter memory 307 and derives a prediction weight candidate list using the weight coefficient (or weight index) of the adjacent block.
  <予測重み候補選択部30302d>
 予測重み候補選択部30302dは、AMVPで用いた予測ベクトルインデックスmvp_LX_idxを用いて、予測重み候補リスト導出部30301dが導出した予測重み候補リストの要素を選択する。
<Prediction weight candidate selection unit 30302d>
The prediction weight candidate selection unit 30302d selects an element of the prediction weight candidate list derived by the prediction weight candidate list deriving unit 30301d using the prediction vector index mvp_LX_idx used in AMVP.
 具体的には、図28に示すように、対象ブロックの左隣接ブロックAと上隣接ブロックBの重み係数wIdxLXAとwIdxLXBを用いて、予測重み候補リストwpCandList[2]を作成する。 Specifically, as shown in FIG. 28, the prediction weight candidate list wpCandList [2] is created using the weight coefficients wIdxLXA and wIdxLXB of the left adjacent block A and the upper adjacent block B of the target block.
  wpCandList[2]={wIdxLXA,wIdxLXB}
 次に予測重み係数wpIdxを導出する。
wpCandList [2] = {wIdxLXA, wIdxLXB}
Next, a prediction weight coefficient wpIdx is derived.
  wpIdx=wpCandList[mvp_LX_idx]
ここで、mvp_LX_idxは予測ベクトル候補セット中の予測ベクトルを指定するためのパラメータである。
wpIdx = wpCandList [mvp_LX_idx]
Here, mvp_LX_idx is a parameter for designating a prediction vector in a prediction vector candidate set.
  <B2におけるステップS13>
 予測重み候補リスト導出部30301dは、動きベクトルがスケールされていたら、1:1の重み係数を導出する。予測重み候補リスト導出部30301dは、動きベクトルがスケールされていなかったら、隣接ブロックの重み係数を用いる。動きベクトルmvLXがスケーリングされる場合には、予測重み候補リストwpCandListLXに追加する重み係数として、デフォルト重み係数w_default(w_default=(1<<shiftWP)>>1、shiftWP = 3であればw_default=4)を用いてもよい。この場合、所定のテーブルweightCandListWDefaultの要素を順に格納する構成でもよい。
i = 0, j = 0
if (availableFlagLXA) {
 mvpListLX[i++] = mvLXA
 scaledLXA = (POC(Pref)!=POC(PnAref)) //PnAref 隣接ブロックAの参照画像
 wpCandListLX[j++] = !scaledLXA ? wIdxLXA : w_default
 if (availableFlagLXB && (mvLXA != mvLXB)) {
  mvpListLX[i++] = mvLXB
  scaledLXB = (POC(Pref)!=POC(PnBref)) //PnBref 隣接ブロックBの参照画像
  wpCandListLX[j++] = !scaledLXB ? wIdxLXB : w_default
 }
} else if (availableFlagLXB) {
 mvpListLX[i++] = mvLXB
 wpCandListLX[j++] = !scaledLXB ? wIdxLXB : w_default
}
if (i < 2 && availableFlagLXCol) {
 mvpListLX[i++] = mvLXCol
 wpCandListLX[j++] = w_default
}
while (i < 2) {
 mvpListLX[i][0] = 0
 mvpListLX[i][1] = 0
 wpCandListLX[j++] = w_default
 i++
}
 予測重み候補選択部30302dは、mvp_LX_idxに応じて隣接ブロックの重み係数を導出し、導出した重み係数に応じてテーブルを導出する(基本的には導出された重み係数が先頭になるように導出する)。
wpIdxL0 = wpCandListL0[mvp_L0_idx]
wpIdxL1 = wpCandListL1[mvp_L1_idx]
 〔変形例〕
 実施形態1のように参照ブロックの特徴を考慮して重み係数を導出する構成と、実施形態2のように隣接ブロックの特徴を考慮して重み係数を導出する構成とを組み合わせてもよい。
<Step S13 in B2>
The prediction weight candidate list deriving unit 30301d derives a 1: 1 weighting factor when the motion vector is scaled. If the motion vector is not scaled, the prediction weight candidate list derivation unit 30301d uses the weight coefficient of the adjacent block. When the motion vector mvLX is scaled, a default weight coefficient w_default (w_default = (1 << shiftWP) >> 1, w_default = 4 if shiftWP = 3) is added as a weight coefficient to be added to the prediction weight candidate list wpCandListLX. May be used. In this case, the configuration may be such that the elements of the predetermined table weightCandListWDefault are stored in order.
i = 0, j = 0
if (availableFlagLXA) {
mvpListLX [i ++] = mvLXA
scaledLXA = (POC (Pref)! = POC (PnAref)) // PnAref Reference image of adjacent block A wpCandListLX [j ++] =! scaledLXA? wIdxLXA: w_default
if (availableFlagLXB && (mvLXA! = mvLXB)) {
mvpListLX [i ++] = mvLXB
scaledLXB = (POC (Pref)! = POC (PnBref)) // PnBref Reference image of adjacent block B wpCandListLX [j ++] =! scaledLXB? wIdxLXB: w_default
}
} else if (availableFlagLXB) {
mvpListLX [i ++] = mvLXB
wpCandListLX [j ++] =! scaledLXB? wIdxLXB: w_default
}
if (i <2 && availableFlagLXCol) {
mvpListLX [i ++] = mvLXCol
wpCandListLX [j ++] = w_default
}
while (i <2) {
mvpListLX [i] [0] = 0
mvpListLX [i] [1] = 0
wpCandListLX [j ++] = w_default
i ++
}
The prediction weight candidate selection unit 30302d derives the weighting factor of the adjacent block according to mvp_LX_idx, and derives a table according to the derived weighting factor (basically, the derived weighting factor is derived so that it becomes the head. ).
wpIdxL0 = wpCandListL0 [mvp_L0_idx]
wpIdxL1 = wpCandListL1 [mvp_L1_idx]
[Modification]
A configuration in which the weighting factor is derived in consideration of the feature of the reference block as in the first embodiment and a configuration in which the weighting factor is derived in consideration of the feature of the adjacent block as in the second embodiment may be combined.
 〔実施形態3〕
 本実施形態は、復号処理および符号化処理において、マージ予測モードの場合に、参照ブロックの特徴および隣接ブロックの特徴の少なくともいずれかを考慮して重み係数を導出する点が異なる。
[Embodiment 3]
The present embodiment is different in that the weighting factor is derived in consideration of at least one of the feature of the reference block and the feature of the adjacent block in the merge prediction mode in the decoding process and the coding process.
 (C1:参照ブロックパラメータに依存する重み係数を導出する構成および効果)
 上述の「A3におけるステップS2の変形例」と同様に、予測重み係数wpIdxを導出する。
if (Xval0 * 2 > Xval1 * 6) wpIdx = 1
else if (Xval0 * 3 > Xval1 * 5) wpIdx = 2
else if (Xval0 * 5 > Xval1 * 3) wpIdx = 3
else if (Xval0 * 6 > Xval1 * 2) wpIdx = 4
else wpIdx = 5
 この場合に、マージ予測モードの重み係数として、前記予測重み係数wpIdxを用いて重み係数wを導出する。
w = wpIdx
 もしくは、予測重み係数wpIdxをインデックスとして、重み係数テーブルweightTableを参照して重み係数wを導出する。
w = weightTable[wpIdx]
 マージ予測モードにおいては、動き補償パラメータ候補であるマージ候補のリストを生成し、リストからインデックスで選択される動きベクトル候補を用いて、予測画像の動き補償を行う。
(C1: Configuration and effect for deriving weighting coefficient depending on reference block parameter)
The prediction weight coefficient wpIdx is derived in the same manner as the above-described “modified example of step S2 in A3”.
if (Xval0 * 2> Xval1 * 6) wpIdx = 1
else if (Xval0 * 3> Xval1 * 5) wpIdx = 2
else if (Xval0 * 5> Xval1 * 3) wpIdx = 3
else if (Xval0 * 6> Xval1 * 2) wpIdx = 4
else wpIdx = 5
In this case, the weighting coefficient w is derived using the prediction weighting coefficient wpIdx as the weighting coefficient in the merge prediction mode.
w = wpIdx
Alternatively, the weighting factor w is derived by referring to the weighting factor table weightTable using the prediction weighting factor wpIdx as an index.
w = weightTable [wpIdx]
In the merge prediction mode, a list of merge candidates that are motion compensation parameter candidates is generated, and motion compensation of the predicted image is performed using a motion vector candidate selected from the list by an index.
 図31は、実施形態3における、図5に示す画像復号装置の予測パラメータ復号部のインター予測パラメータ復号部、および図11に示すインター予測画像生成部の動作を示すフローチャートである。 FIG. 31 is a flowchart illustrating operations of the inter prediction parameter decoding unit of the prediction parameter decoding unit and the inter prediction image generation unit illustrated in FIG. 11 of the image decoding apparatus illustrated in FIG. 5 according to the third embodiment.
 図31の(a)に示すように、マージ予測モードであるので、双予測の重み係数を導出するために参照されるインデックスである重みインデックスweightIdxは、復号しない。 As shown in (a) of FIG. 31, since it is a merge prediction mode, the weight index weightIdx, which is an index referred to in order to derive a bi-prediction weight coefficient, is not decoded.
 そして、マージ候補が、結合マージ候補の場合に、参照ブロックパラメータに応じて導出された重み係数を用いることができる。これにより、双予測が用いられる結合マージモードの各マージ候補では、異なるL0の参照ピクチャとL1の参照ピクチャが用いられる。これらの各参照ピクチャと対象ピクチャの時間的な距離などの参照ブロックパラメータを利用することにより、各結合マージ候補の予測精度をさらに向上させることができる。 Then, when the merge candidate is a join merge candidate, a weighting factor derived according to the reference block parameter can be used. As a result, different L0 reference pictures and L1 reference pictures are used for each merge candidate in the combined merge mode in which bi-prediction is used. By using a reference block parameter such as a temporal distance between each of these reference pictures and the target picture, the prediction accuracy of each merged merge candidate can be further improved.
 また、マージ候補が、ゼロマージ候補の場合に、参照ブロックパラメータに応じて導出された重み係数を用いる。これにより、スライスタイプがBの場合(Bピクチャの場合)に導出されるゼロマージ候補として双予測が用いられるが、各ゼロマージ候補では、異なるL0の参照ピクチャとL1の参照ピクチャが用いられる。これらの各参照ピクチャと対象ピクチャの時間的な距離などの参照ブロックパラメータを利用することにより、各ゼロマージ候補の予測精度をさらに向上させることができる。 Also, when the merge candidate is a zero merge candidate, the weighting factor derived according to the reference block parameter is used. As a result, bi-prediction is used as a zero merge candidate derived when the slice type is B (in the case of a B picture). In each zero merge candidate, a different reference picture of L0 and a reference picture of L1 are used. By using reference block parameters such as the temporal distance between each reference picture and the target picture, the prediction accuracy of each zero merge candidate can be further improved.
 (C2:隣接ブロックパラメータに依存する重み係数を導出する構成および効果)
 上述の「B1L:隣接ブロックの特徴を考慮した重み係数の導出の変形例1」と同様に、重み係数を導出する。
(1)隣接ブロックAの重み係数wIdxLXAと、隣接ブロックBの重み係数wIdxLXBとにより、重み係数を導出する。このとき、1:1の重み係数に近い(この場合wIdxLXA、wIdxLXBのうちに近い)候補を、優先的に重み係数とする。5と4なら4を先に優先的に重み係数とする。
(2)隣接ブロックAが利用可能でなく、かつ隣接ブロックBが利用可能である場合には、デフォルトリストの重み係数を導出する。
if (availableFlagLXA && availableFlagLXB) {
 wpIdx = (|wIdxLXA - wEq| < |wIdxLXB - wEq|) ? wIdxLXA : wIdxLXB
} else if (availableFlagLXA) {
 wpIdx = wIdxLXA;
} else if (availableFlagLXB) {
 wpIdx = wIdxLXB;
} else {
 wpIdx = wpIdxDefault
}
 なお、(|wIdxLXA - wEq| < |wIdxLXB - wEq|)の判定は、wIdxLXA < wIdxLXBとしてもよい。
(C2: Configuration and effect for deriving weighting factors depending on adjacent block parameters)
A weighting factor is derived in the same manner as in “B1L: Modification Example 1 of Deriving Weighting Factor Considering Features of Adjacent Block” described above.
(1) A weighting factor is derived from the weighting factor wIdxLXA of the adjacent block A and the weighting factor wIdxLXB of the adjacent block B. At this time, a candidate that is close to a weighting factor of 1: 1 (in this case, close to wIdxLXA and wIdxLXB) is preferentially set as a weighting factor. For 5 and 4, 4 is preferentially used as the weighting factor first.
(2) When the adjacent block A is not available and the adjacent block B is available, the default list weight coefficient is derived.
if (availableFlagLXA && availableFlagLXB) {
wpIdx = (| wIdxLXA-wEq | <| wIdxLXB-wEq |)? wIdxLXA: wIdxLXB
} else if (availableFlagLXA) {
wpIdx = wIdxLXA;
} else if (availableFlagLXB) {
wpIdx = wIdxLXB;
} else {
wpIdx = wpIdxDefault
}
The determination of (| wIdxLXA−wEq | <| wIdxLXB−wEq |) may be made as wIdxLXA <wIdxLXB.
 また、wpIdxDefaultとして、参照ブロックパラメータに応じて導出された予測重み係数(例えば、上述の「A3におけるステップS2」において求められた予測重み係数wpIdx)を用いてもよい。 Further, as wpIdxDefault, the prediction weight coefficient derived according to the reference block parameter (for example, the prediction weight coefficient wpIdx obtained in “Step S2 in A3” described above) may be used.
 また、図31の(b)に示すように、マージ予測モードであるので、双予測の重み係数を導出するために参照されるインデックスである重みインデックスweightIdxは、復号しない。 Also, as shown in FIG. 31 (b), since it is a merge prediction mode, the weight index weightIdx, which is an index referred to in order to derive a bi-prediction weight coefficient, is not decoded.
 そして、マージ候補が結合マージ候補の場合に、隣接ブロックに応じて導出された重み係数を用いることができる。これにより、双予測が用いられる結合マージモードの各マージ候補において、隣接ブロックに応じた好適な重み係数を用いることができ、各結合マージ候補の予測精度をさらに向上させることができる。 Then, when the merge candidate is a join merge candidate, the weighting factor derived according to the adjacent block can be used. Thereby, in each merge candidate of the merge merge mode in which bi-prediction is used, a suitable weighting factor according to an adjacent block can be used, and the prediction accuracy of each merge merge candidate can be further improved.
 また、マージ候補が、ゼロマージ候補の場合に、隣接ブロックに応じて導出された重み係数を用いる。これにより、スライスタイプがBの場合(Bピクチャの場合)に導出されるゼロマージ候補が双予測に用いられるが、この各ゼロマージ候補において、隣接ブロックに応じた好適な重み係数を用いることができ、各ゼロマージ候補の予測精度をさらに向上させることができる。 Also, when the merge candidate is a zero merge candidate, the weighting factor derived according to the adjacent block is used. Thereby, the zero merge candidate derived when the slice type is B (in the case of B picture) is used for bi-prediction, and in each zero merge candidate, a suitable weighting factor according to the adjacent block can be used, The prediction accuracy of each zero merge candidate can be further improved.
 〔実施形態4〕
 (画像復号装置に対応する、画像符号化装置、画像復号方法、および画像符号化方法)
 実施形態1~3に記載の画像復号装置31は、重み予測に用いる重み係数wまたは重み係数を示すインデックスを要素とする重み候補リストweightCandListから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出部3030と、重み係数導出部3030が導出した重み係数により重み予測を行う重み予測部3094とを備えるものである。
[Embodiment 4]
(Image Coding Device, Image Decoding Method, and Image Coding Method Corresponding to Image Decoding Device)
The image decoding device 31 described in the first to third embodiments uses a weight candidate list weightCandList whose elements are a weighting factor w used for weight prediction or an index indicating a weighting factor according to the feature of a block used for generating a predicted image. A weight coefficient deriving unit 3030 for deriving a coefficient and a weight prediction unit 3094 for performing weight prediction using the weight coefficient derived by the weight coefficient deriving unit 3030 are provided.
 上述のとおり、以上の復号処理は、符号化処理においても適用できる。具体的には、符号化処理における画像符号化装置11(図4)の予測画像生成部101のインター予測画像生成部1011(図5)の重み予測部10112(図6)を、復号処理における重み予測部3094に置き換えることができる。この場合の画像符号化装置11も、本発明に含まれる。 As described above, the above decoding process can also be applied to the encoding process. Specifically, the weight prediction unit 10112 (FIG. 6) of the inter prediction image generation unit 1011 (FIG. 5) of the prediction image generation unit 101 of the image encoding device 11 (FIG. 4) in the encoding process is used as the weight in the decoding process. The prediction unit 3094 can be replaced. The image encoding device 11 in this case is also included in the present invention.
 また、復号処理において、重み係数導出部3030が行う処理を表す工程である重み係数導出工程と、重み予測部3094が行う処理を表す工程である重み予測工程とを含む画像復号方法も、本発明に含まれる。 In addition, in the decoding process, an image decoding method including a weight coefficient derivation process that is a process representing the process performed by the weight coefficient derivation unit 3030 and a weight prediction process that is a process representing the process performed by the weight prediction unit 3094 is also disclosed in the present invention. include.
 また、符号化処理において、重み係数導出部3030が行う処理を表す工程である重み係数導出工程と、重み予測部10112が行う処理を表す工程である重み予測工程とを含む画像符号化方法も、本発明に含まれる。 Also, in the encoding process, an image encoding method including a weight coefficient deriving process that is a process representing the process performed by the weight coefficient deriving unit 3030 and a weight prediction process that is a process representing the process performed by the weight predicting unit 10112 is also provided. It is included in the present invention.
 以上の、画像符号化装置11、画像復号方法、および画像符号化方法は、画像復号装置31が奏する効果と同様の効果を奏する。 The image encoding device 11, the image decoding method, and the image encoding method described above have the same effects as the effects exhibited by the image decoding device 31.
 〔その他〕
 なお、上述した実施形態における画像符号化装置11、画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆DCT部311、加算部312、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111、および各部が含むブロックをコンピュータで実現するようにしてもよい。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、画像符号化装置11、画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また前記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
[Others]
Note that a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment, for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse DCT. Unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, DCT / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse DCT unit 105, loop filter 107, encoding parameter determination unit 110, You may make it implement | achieve the prediction parameter encoding part 111 and the block which each part contains with a computer. In that case, the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by the computer system and executed. Here, the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices. The “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system. Furthermore, the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, In this case, a volatile memory inside a computer system that serves as a server or a client may be included that holds a program for a certain period of time. The program may be a program for realizing a part of the above-described functions, or may be a program that can realize the above-described functions in combination with a program already recorded in a computer system.
 また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化してもよいし、一部、または全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。 Further, part or all of the image encoding device 11 and the image decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to the advancement of semiconductor technology, an integrated circuit based on the technology may be used.
 以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to
 (応用例)
 上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
(Application examples)
The image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images. The moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
 まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図13を参照して説明する。 First, it will be described with reference to FIG. 13 that the above-described image encoding device 11 and image decoding device 31 can be used for transmission and reception of moving images.
 図13の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図13の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。 (A) of FIG. 13 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted. As illustrated in FIG. 13A, the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1. Thus, a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided. The above-described image encoding device 11 is used as the encoding unit PROD_A1.
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図13の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。 Transmission device PROD_A, as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided. FIG. 13A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。 Note that the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
 図13の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図13の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。 (B) of FIG. 13 is a block diagram illustrating a configuration of the receiving device PROD_B in which the image decoding device 31 is mounted. As illustrated in FIG. 13B, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator. A decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2. The above-described image decoding device 31 is used as the decoding unit PROD_B3.
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図13の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。 The receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided. In FIG. 13B, a configuration in which all of these are provided in the receiving device PROD_B is illustrated, but a part may be omitted.
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。 Note that the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。 Note that the transmission medium for transmitting the modulation signal may be wireless or wired. Further, the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。 For example, a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting. A broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。 In addition, a server (workstation, etc.) / Client (television receiver, personal computer, smartphone, etc.) such as a VOD (Video On Demand) service or a video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication. This is an example of PROD_A / receiving device PROD_B (normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN). Here, the personal computer includes a desktop PC, a laptop PC, and a tablet PC. The smartphone also includes a multi-function mobile phone terminal.
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。 In addition to the function of decoding the encoded data downloaded from the server and displaying it on the display, the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
 次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図14を参照して説明する。 Next, the fact that the above-described image encoding device 11 and image decoding device 31 can be used for recording and reproduction of moving images will be described with reference to FIG.
 図14の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図14の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。 (A) of FIG. 14 is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted. As shown in FIG. 14 (a), the recording apparatus PROD_C has an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M. A writing unit PROD_C2 for writing. The above-described image encoding device 11 is used as the encoding unit PROD_C1.
 なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図14の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images A unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided. FIG. 14A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。 The receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4または受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5または画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3または受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。 Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). . In addition, a camcorder (in this case, the camera PROD_C3 is a main source of moving images), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images), a smartphone (this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images), and the like is also an example of such a recording apparatus PROD_C.
 図14の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図14の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。 (B) of FIG. 14 is a block showing a configuration of a playback device PROD_D equipped with the image decoding device 31 described above. As shown in FIG. 14B, the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written to the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain. The above-described image decoding device 31 is used as the decoding unit PROD_D2.
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図14の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image. PROD_D5 may be further provided. FIG. 14B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。 The transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
 このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4または送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型またはタブレット型PC(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。 Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). . In addition, a television receiver (in this case, the display PROD_D3 is a main supply destination of moving images), a digital signage (also referred to as an electronic signboard or an electronic bulletin board), and the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images Desktop PC (in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source), laptop or tablet PC (in this case, display PROD_D3 or transmission unit PROD_D5 is video) A smartphone (which is a main image supply destination), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination), and the like are also examples of such a playback device PROD_D.
  (ハードウェア的実現およびソフトウェア的実現)
 また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware implementation and software implementation)
Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement | achieve by software using.
 後者の場合、前記各装置は、各機能を実現するプログラムの命令を実行するCPU、前記プログラムを格納したROM(Read Only Memory)、前記プログラムを展開するRAM(RandomAccess Memory)、前記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである前記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、前記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。 In the latter case, each device includes a CPU that executes instructions of a program that realizes each function, a ROM (Read (Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data A storage device (recording medium) such as a memory for storing the. The object of the embodiment of the present invention is to record the program code (execution format program, intermediate code program, source program) of the control program for each device, which is software for realizing the functions described above, so as to be readable by a computer. This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
 前記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。 Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc-Read-Only Memory) / MO discs (Magneto-Optical discs). ) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray Disc: registered trademark) and other optical disks, IC cards (including memory cards) / Cards such as optical cards, Mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) / Semiconductor memories such as flash ROM, or PLD (Programmable logic device ) Or FPGA (Field Programmable Gate Gate Array) or the like.
 また、前記各装置を通信ネットワークと接続可能に構成し、前記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/Cable Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance:登録商標)、携帯電話網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、前記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。 Further, each device may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like. The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired such as IrDA (Infrared Data Association) or remote control , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It can also be used wirelessly. The embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
 〔付記事項〕
 本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
(関連出願の相互参照)
 本出願は、2016年8月26日に出願された日本国特許出願:特願2016-166317に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
[Additional Notes]
The embodiments of the present invention are not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. That is, embodiments obtained by combining technical means appropriately modified within the scope of the claims are also included in the technical scope of the present invention.
(Cross-reference of related applications)
This application claims the benefit of priority to the Japanese patent application filed on Aug. 26, 2016: Japanese Patent Application No. 2016-166317. Included in this document.
 本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。 Embodiments of the present invention can be preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.
1 画像伝送システム
11 画像符号化装置
31 画像復号装置
41 画像表示装置
101、308 予測画像生成部
303、303b、303c、303d インター予測パラメータ復号部
309、1011 インター予測画像生成部
3030、3030a、3030b 重み係数導出部
3038 重みインデックス復号部
3039、3039b 参照ブロックパラメータ導出部
3094、10112 重み予測部
30301、30301b 重み候補リスト導出部
30301c 隣接ベース重み候補リスト導出部
30301d 予測重み候補リスト導出部
30302、30302c 重み係数選択部
30302d 予測重み候補選択部
30303 重み係数修正部
DESCRIPTION OF SYMBOLS 1 Image transmission system 11 Image coding apparatus 31 Image decoding apparatus 41 Image display apparatus 101,308 Predictive image generation part 303,303b, 303c, 303d Inter prediction parameter decoding part 309,1011 Inter prediction image generation part 3030,3030a, 3030b Weight Coefficient derivation unit 3038 Weight index decoding unit 3039, 3039b Reference block parameter derivation unit 3094, 10112 Weight prediction unit 30301, 30301b Weight candidate list derivation unit 30301c Adjacent base weight candidate list derivation unit 30301d Prediction weight candidate list derivation unit 30302, 30302c Weight coefficient Selection unit 30302d Prediction weight candidate selection unit 30303 Weight coefficient correction unit

Claims (18)

  1.  重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出部と、
     前記重み係数導出部が導出した重み係数により重み予測を行う重み予測部と、
    を備えることを特徴とする画像復号装置。
    A weighting factor deriving unit for deriving a weighting factor according to a feature of a block used for generation of a predicted image, from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element;
    A weight prediction unit that performs weight prediction using the weighting factor derived by the weighting factor deriving unit;
    An image decoding apparatus comprising:
  2.  予測画像を生成するために参照される参照ブロックの特徴を表す参照ブロックパラメータを導出する参照ブロックパラメータ導出部をさらに備え、
     前記重み係数導出部は、前記参照ブロックパラメータに応じて前記重み係数を導出することを特徴とする請求項1に記載の画像復号装置。
    A reference block parameter deriving unit for deriving a reference block parameter representing a feature of the reference block referred to for generating a predicted image;
    The image decoding apparatus according to claim 1, wherein the weighting factor deriving unit derives the weighting factor according to the reference block parameter.
  3.  前記重み係数導出部は、
      重み係数を要素とする複数の前記重み候補リストから、前記参照ブロックパラメータ導出部が導出した参照ブロックパラメータに応じて重み候補リストを選択し、
      選択した前記重み候補リストから重み係数を導出することを特徴とする請求項2に記載の画像復号装置。
    The weighting factor derivation unit includes:
    From the plurality of weight candidate lists having a weighting factor as an element, select a weight candidate list according to the reference block parameter derived by the reference block parameter deriving unit,
    The image decoding apparatus according to claim 2, wherein a weight coefficient is derived from the selected weight candidate list.
  4.  前記重み係数導出部は、
      重み係数を示すインデックスを要素とする複数の前記重み候補リストから、前記参照ブロックパラメータ導出部が導出した参照ブロックパラメータに応じて重み候補リストを選択し、
      選択した前記重み候補リストからインデックスを導出することにより、重み係数を導出することを特徴とする請求項2に記載の画像復号装置。
    The weighting factor derivation unit includes:
    A weight candidate list is selected from a plurality of weight candidate lists having an index indicating a weighting factor as an element according to a reference block parameter derived by the reference block parameter deriving unit,
    The image decoding apparatus according to claim 2, wherein a weighting factor is derived by deriving an index from the selected weight candidate list.
  5.  前記参照ブロックパラメータ導出部は、
      第1参照ブロックの参照ブロックパラメータである第1参照ブロックパラメータと、
      第2参照ブロックの参照ブロックパラメータである第2参照ブロックパラメータと、を導出し、
     前記重み係数導出部は、前記第1参照ブロックパラメータと前記第2参照ブロックパラメータとの差の絶対値が大きいほど、前記重み候補リストの要素を小さくすることを特徴とする請求項3または4に記載の画像復号装置。
    The reference block parameter derivation unit includes:
    A first reference block parameter that is a reference block parameter of the first reference block;
    Deriving a second reference block parameter that is a reference block parameter of the second reference block;
    The weighting factor deriving unit reduces the elements of the weight candidate list as the absolute value of the difference between the first reference block parameter and the second reference block parameter is larger. The image decoding device described.
  6.  前記重み係数導出部は、前記参照ブロックパラメータ導出部が導出した参照ブロックパラメータに応じて前記重み候補リストの要素をスワップすることを特徴とする請求項2に記載の画像復号装置。 3. The image decoding apparatus according to claim 2, wherein the weighting factor deriving unit swaps elements of the weight candidate list according to the reference block parameter derived by the reference block parameter deriving unit.
  7.  前記重み係数導出部は、
      前記参照ブロックパラメータ導出部が導出した参照ブロックパラメータから、前記重み係数の予測値である予測重み係数を導出し、
      前記予測重み係数に応じて前記重み候補リストを導出し、
      導出した前記重み候補リストから重み係数を導出することを特徴とする請求項2に記載の画像復号装置。
    The weighting factor derivation unit includes:
    From the reference block parameter derived by the reference block parameter deriving unit, a prediction weight coefficient that is a predicted value of the weight coefficient is derived,
    Deriving the weight candidate list according to the prediction weight coefficient,
    The image decoding apparatus according to claim 2, wherein a weighting factor is derived from the derived weight candidate list.
  8.  前記参照ブロックパラメータ導出部は、
      第1参照ブロックの参照ブロックパラメータである第1参照ブロックパラメータと、
      第2参照ブロックの参照ブロックパラメータである第2参照ブロックパラメータと、を導出し、
     前記重み係数導出部は、前記第1参照ブロックパラメータと前記第2参照ブロックパラメータとの差の絶対値が大きいほど、前記予測重み係数を小さくすることを特徴とする請求項7に記載の画像復号装置。
    The reference block parameter derivation unit includes:
    A first reference block parameter that is a reference block parameter of the first reference block;
    Deriving a second reference block parameter that is a reference block parameter of the second reference block;
    The image decoding according to claim 7, wherein the weighting factor deriving unit decreases the prediction weighting factor as the absolute value of the difference between the first reference block parameter and the second reference block parameter increases. apparatus.
  9.  前記重み係数導出部は、予測画像を生成する対象である対象ブロックに隣接する隣接ブロックの重み予測に用いる重み係数に応じて前記重み係数を導出することを特徴とする請求項1または2に記載の画像復号装置。 The weighting factor deriving unit derives the weighting factor according to a weighting factor used for weight prediction of an adjacent block adjacent to a target block that is a target for generating a predicted image. Image decoding apparatus.
  10.  前記重み係数導出部は、前記隣接ブロックの重み係数を、前記重み候補リストに追加し、前記重み候補リストから重み係数を導出することを特徴とする請求項9に記載の画像復号装置。 The image decoding device according to claim 9, wherein the weighting factor deriving unit adds the weighting factor of the adjacent block to the weighting candidate list and derives the weighting factor from the weighting candidate list.
  11.  前記重み係数導出部は、前記隣接ブロックの重み係数の順序を示すインデックスを前記重み候補リストに追加し、前記重み候補リストから前記インデックスを導出することにより、前記重み係数を導出することを特徴とする請求項9に記載の画像復号装置。 The weighting factor deriving unit derives the weighting factor by adding an index indicating the order of the weighting factors of the adjacent blocks to the weighting candidate list and deriving the index from the weighting candidate list. The image decoding apparatus according to claim 9.
  12.  前記重み候補リストの先頭要素は、重み予測において、第1の動き補償画像に乗算する第1重みと、第2の動き補償画像に乗算する第2重みとについて、同一の値となる第1および第2重みを求めることができる要素であることを特徴とする請求項10または11に記載の画像復号装置。 The first element of the weight candidate list includes first and second weights that have the same value for the first weight multiplied by the first motion compensated image and the second weight multiplied by the second motion compensated image in weight prediction. The image decoding device according to claim 10 or 11, wherein the image decoding device is an element capable of obtaining the second weight.
  13.  前記重み係数導出部は、参照ピクチャの動きベクトルがスケーリングされていない場合に、前記重み係数を導出することを特徴とする請求項9から11のいずれか一項に記載の画像復号装置。 12. The image decoding device according to claim 9, wherein the weighting factor deriving unit derives the weighting factor when a motion vector of a reference picture is not scaled.
  14.  前記重み係数導出部は、動きベクトルの予測として、予測ベクトル候補リストが使われている場合に、予測ベクトル候補リストのインデックスに応じて、前記重み候補リストから重み係数を導出することを特徴とする請求項9に記載の画像復号装置。 The weighting factor deriving unit derives a weighting factor from the weighting candidate list according to an index of the prediction vector candidate list when a prediction vector candidate list is used for motion vector prediction. The image decoding device according to claim 9.
  15.  前記重み係数導出部は、上記重み予測の予測モードが、マージ予測モードである場合に、重み係数を導出することを特徴とする請求項1、2または9に記載の画像復号装置。 10. The image decoding apparatus according to claim 1, wherein the weighting factor deriving unit derives a weighting factor when the prediction mode of the weight prediction is a merge prediction mode.
  16.  重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出部と、
     前記重み係数導出部が導出した重み係数により重み予測を行う重み予測部と、
    を備えることを特徴とする画像符号化装置。
    A weighting factor deriving unit for deriving a weighting factor according to a feature of a block used for generation of a predicted image, from a weighting candidate list including a weighting factor used for weight prediction or an index indicating the weighting factor as an element;
    A weight prediction unit that performs weight prediction using the weighting factor derived by the weighting factor deriving unit;
    An image encoding device comprising:
  17.  重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出工程と、
     前記重み係数導出工程において導出された重み係数により重み予測を行う重み予測工程と、
    を含むことを特徴とする画像復号方法。
    A weighting factor deriving step for deriving a weighting factor according to the feature of the block used for generation of the predicted image from the weighting candidate list including the weighting factor used for weight prediction or the index indicating the weighting factor as an element;
    A weight prediction step of performing weight prediction using the weighting factor derived in the weighting factor derivation step;
    An image decoding method comprising:
  18.  重み予測に用いる重み係数または重み係数を示すインデックスを要素とする重み候補リストから、予測画像の生成に用いるブロックの特徴に応じて重み係数を導出する重み係数導出工程と、
     前記重み係数導出工程において導出された重み係数により重み予測を行う重み予測工程と、
    を含むことを特徴とする画像符号化方法。
    A weighting factor deriving step for deriving a weighting factor according to the feature of the block used for generation of the predicted image from the weighting candidate list including the weighting factor used for weight prediction or the index indicating the weighting factor as an element;
    A weight prediction step of performing weight prediction using the weighting factor derived in the weighting factor derivation step;
    An image encoding method comprising:
PCT/JP2017/028891 2016-08-26 2017-08-09 Image decoding device, image coding device, image decoding method, and image coding method WO2018037919A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016166317 2016-08-26
JP2016-166317 2016-08-26

Publications (1)

Publication Number Publication Date
WO2018037919A1 true WO2018037919A1 (en) 2018-03-01

Family

ID=61246519

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/028891 WO2018037919A1 (en) 2016-08-26 2017-08-09 Image decoding device, image coding device, image decoding method, and image coding method

Country Status (1)

Country Link
WO (1) WO2018037919A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020088482A1 (en) * 2018-10-29 2020-05-07 华为技术有限公司 Affine prediction mode-based inter-frame prediction method and related apparatus
CN114128261A (en) * 2019-06-26 2022-03-01 高通股份有限公司 Combined inter and intra prediction modes for video coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009041215A1 (en) * 2007-09-25 2009-04-02 Sharp Kabushiki Kaisha Moving image encoder and moving image decoder
US20130259130A1 (en) * 2012-04-03 2013-10-03 Qualcomm Incorporated Weighted prediction parameter coding
JP2013251759A (en) * 2012-05-31 2013-12-12 Toshiba Corp Electronic apparatus and decoding method
WO2014002217A1 (en) * 2012-06-27 2014-01-03 株式会社東芝 Encoding method, decoding method, encoding device, and decoding device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009041215A1 (en) * 2007-09-25 2009-04-02 Sharp Kabushiki Kaisha Moving image encoder and moving image decoder
US20130259130A1 (en) * 2012-04-03 2013-10-03 Qualcomm Incorporated Weighted prediction parameter coding
JP2013251759A (en) * 2012-05-31 2013-12-12 Toshiba Corp Electronic apparatus and decoding method
WO2014002217A1 (en) * 2012-06-27 2014-01-03 株式会社東芝 Encoding method, decoding method, encoding device, and decoding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHUN-CHI CHEN ET AL.: "Generalized bi-prediction for inter coding, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11", JVET-C0047_RL, May 2016 (2016-05-01), Geneva, CH, pages 1 - 4, XP030150142 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020088482A1 (en) * 2018-10-29 2020-05-07 华为技术有限公司 Affine prediction mode-based inter-frame prediction method and related apparatus
CN114128261A (en) * 2019-06-26 2022-03-01 高通股份有限公司 Combined inter and intra prediction modes for video coding

Similar Documents

Publication Publication Date Title
JP7421586B2 (en) Decoding device and encoding device
US11722690B2 (en) Motion vector generation device, a prediction image generation device, a video decoding device and a video coding device
US12034951B2 (en) Video decoding apparatus
WO2018061563A1 (en) Affine motion vector derivation device, prediction image generation device, moving image decoding device, and moving image coding device
WO2017195554A1 (en) Predicted image generation device, video decoding device and video encoding device
WO2018110203A1 (en) Moving image decoding apparatus and moving image encoding apparatus
WO2018230493A1 (en) Video decoding device, video encoding device, prediction image generation device and motion vector derivation device
WO2017195608A1 (en) Moving image decoding device
WO2018110462A1 (en) Image decoding device and image encoding device
JP7555328B2 (en) Video decoding device, video encoding device, and video decoding method
WO2018173895A1 (en) Predicted-image generation device, video decoding device, and video coding device
WO2017135151A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
JP2019201256A (en) Image filter device
WO2018110180A1 (en) Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device
WO2018173432A1 (en) Prediction image generation device, moving image decoding device, and moving image encoding device
WO2018037919A1 (en) Image decoding device, image coding device, image decoding method, and image coding method
JPWO2018037723A1 (en) Image decoding apparatus and image encoding apparatus
JP2020108012A (en) Image decoding device and image encoding device
JP2020145650A (en) Image decoding device and image coding device
JP2020036101A (en) Image decoder, and image encoder
US11044490B2 (en) Motion compensation filter apparatus, image decoding apparatus, and video coding apparatus
JP2019205036A (en) Video encoding device and video decoding device
JP2020005200A (en) Image decoding device and image encoding device
JP2019213018A (en) Image decoding apparatus and image encoding apparatus
JP2021180344A (en) Predictive image generation device, moving image decoding device, and moving image coding device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17843404

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 17843404

Country of ref document: EP

Kind code of ref document: A1

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载