[go: up one dir, main page]

WO2018110180A1 - Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device - Google Patents

Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device Download PDF

Info

Publication number
WO2018110180A1
WO2018110180A1 PCT/JP2017/040838 JP2017040838W WO2018110180A1 WO 2018110180 A1 WO2018110180 A1 WO 2018110180A1 JP 2017040838 W JP2017040838 W JP 2017040838W WO 2018110180 A1 WO2018110180 A1 WO 2018110180A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
matching
unit
prediction
search
Prior art date
Application number
PCT/JP2017/040838
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 WO2018110180A1 publication Critical patent/WO2018110180A1/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/533Motion estimation using multistep search, e.g. 2D-log search or one-at-a-time search [OTS]

Definitions

  • the present invention relates to a motion vector generation device, a predicted image generation device, a moving image decoding device, and a moving image encoding device.
  • a moving image encoding device that generates encoded data by encoding the moving image, and a moving image that generates a decoded image by decoding the encoded data
  • An image 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 Document 1 using a matching technique (template matching and bilateral matching) for deriving a motion vector on the decoder side can be cited as a moving picture encoding and decoding technique in recent years.
  • Non-Patent Document 2 describes bilateral template matching as a new matching technique.
  • the matching technique disclosed in Non-Patent Document 1 and Non-Patent Document 2 has a first problem that a predicted image with sufficient prediction accuracy cannot be generated. Further, the matching technique disclosed in Non-Patent Document 1 has a second problem that the amount of processing for motion vector search necessary for predictive image generation increases.
  • the present invention provides a motion vector generation device, a predicted image generation device, a moving image decoding device, and a moving image encoding device capable of solving at least one of the first and second problems. is there.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a merge processing unit that derives a motion vector for each prediction block by merge processing and a prediction block generated from the motion vector derived by the merge processing unit as a template and matching using bilateral template matching (BTM)
  • BTM bilateral template matching
  • a BTM processing unit that executes processing and corrects the motion vector, and the BTM processing unit performs the matching processing by performing the bilateral template matching a plurality of times.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • the first motion vector search unit for searching for a motion vector for each prediction block by the first matching process and the motion vector selected by the first motion vector search unit are referred to in the prediction block.
  • a second motion vector search unit that searches for a motion vector by a second matching process for each of the plurality of sub-blocks included, and the first motion vector search unit performs an initial vector search for a prediction block. And the second motion vector is searched for a motion vector by performing a local search.
  • the search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block, and the motion vector searched by the first motion vector search unit, or A BTM processor that corrects the motion vector by executing a third matching process using bilateral template matching (BTM) using a prediction block generated from the motion vector searched by the second motion vector search unit as a template.
  • BTM bilateral template matching
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search.
  • a motion vector is searched by performing a local search after performing an initial vector search for a block.
  • the first motion vector search unit is obtained by template matching when bilateral matching is performed.
  • the initial vector search is performed by adding the motion vector to the initial vector candidate in the bilateral matching.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search.
  • a motion vector is searched by performing a local search, and the second motion vector search unit is adjacent to the top or left of the target sub-block.
  • the initial vector search is performed by adding the motion vector of the existing sub-block to the initial vector candidate.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search.
  • a motion vector is searched by performing a local search after performing an initial vector search for a block.
  • the first motion vector search unit and the second motion vector search unit perform template matching.
  • the configuration is such that the matching process with another reference picture is executed using a prediction block created from the result of the matching process with one of the reference pictures as a template.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search.
  • a motion vector is searched by performing a local search after performing an initial vector search for a block.
  • the first motion vector search unit and the second motion vector search unit perform template matching. When executed, only the matching process with one reference picture is executed.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search.
  • the first motion vector search unit and the second motion vector search unit search for a motion vector by performing a local search after performing an initial vector search for a block.
  • the matching process is executed using template matching or bilateral matching according to the shape of the image.
  • a motion vector generation device generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image.
  • a first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block.
  • a second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search.
  • the second motion vector search unit searches for a motion vector by performing a general search. After performing an initial vector search for a block, a motion vector is searched by performing a local search.
  • the first motion vector search unit and the second motion vector search unit include template matching and The initial vector search and the local search are executed in accordance with which of the bilateral matching is used.
  • FIG. 1 It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on this embodiment. It is a figure which shows the pattern of PU division
  • FIG. It is a figure for demonstrating the acquisition method of the template in other embodiment, (a) is a figure which shows the acquisition method of the template in Embodiment 1, (b) shows the acquisition method of the template in this embodiment.
  • FIG. It is a figure which shows the flow of the template matching process in other embodiment. It is a figure for demonstrating the process which determines the matching mode in embodiment, (a) is a table which shows the relationship between a parameter and a matching mode, (b) is a part of flowchart which shows the flow of a process. . It is a flowchart which shows the flow of the process in other embodiment. It is a flowchart which shows the flow of a process of the process example in other embodiment.
  • FIG. 43 is a schematic diagram showing a 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 (moving image encoding device, predicted image generating device) 11, a network 21, an image decoding device (moving image decoding device, predicted image generating device) 31, and an image display device 41. Composed.
  • 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 unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
  • 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 additional extension. Information SEI (Supplemental Enhancement Information) is included. 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 SNS-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: Coding Tree Unit) 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. Specifically, the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH. In the CU header, a prediction mode, a division method (PU division mode), and the like are defined.
  • 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, similar to the above-described CU division.
  • 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 reference relationship of the picture
  • a horizontal axis is time
  • I, P, and B in the rectangle are an intra picture
  • a single prediction picture a bi-prediction picture
  • numbers in the rectangle are Indicates the decoding 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 depending on 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 luminance. 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 from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the input prediction parameter and the read reference picture 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.
  • 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 (InverseDiscrete 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 (merge processing unit) 3036, a sub-block prediction parameter derivation unit 3037, and a BTM process. A portion 3038 is included.
  • 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.
  • the sub-block prediction parameter derivation unit 3037 performs sub-block prediction in the sub-block prediction mode, and performs a spatio-temporal sub-block prediction unit 30371, an affine prediction unit 30372, a matching prediction unit (first motion vector search unit) , A second motion vector search unit) 30373.
  • the matching prediction unit 30373 may not be configured as an element of the sub-block prediction parameter derivation unit 3037, but may be configured as an element of the merge prediction parameter derivation unit 3036.
  • Subblock prediction mode flag a method for deriving a sub-block prediction mode flag subPbMotionFlag indicating whether or not a prediction mode of a certain PU is a sub-block prediction mode in the image encoding device 11 (details will be described later) will be described.
  • the image encoding device 11 derives a sub-block prediction mode flag subPbMotionFlag based on which one of spatial sub-block prediction SSUB, temporal sub-block prediction TSUB, affine prediction AFFINE, and matching prediction MAT described later is used. For example, when the prediction mode selected by a certain PU is N (for example, N is a label indicating the selected merge candidate), the sub-block prediction mode flag subPbMotionFlag may be derived by the following equation.
  • the above equation may be appropriately changed according to the type of sub-block prediction mode performed by the image encoding device 11. That is, when the image encoding device 11 is configured to perform spatial subblock prediction SSUB and affine prediction AFFINE, the subblock prediction mode flag subPbMotionFlag may be derived as follows.
  • subPbMotionFlag is included in the prediction mode processing corresponding to each subblock prediction. May be set to 1.
  • the sub-block prediction mode subPbMotionFlag may be derived as follows.
  • means that subPbMotionFlag may be derived by a sum operation (OR) with another condition. That is, subPbMotionFlag may be derived by the sum operation of determination of prediction mode N and small PU size determination as follows (the same applies hereinafter).
  • CU size is 8x8
  • the division type is NxN
  • subPbMotionFlag may be derived as follows.
  • a case where the PU width or height is 4 may be included as a case of determining sub-block prediction. That is, the sub-block prediction mode flag subPbMotionFlag may be derived as follows.
  • the sub-block prediction parameter deriving unit 3037 of the image decoding device 31 derives a sub-block prediction mode from the subPbMotionFlag by a method reverse to that described above.
  • the spatio-temporal sub-block prediction unit 30371 calculates the target PU from the motion vector of the PU on the reference image temporally adjacent to the target PU (for example, the immediately preceding picture) or the motion vector of the PU spatially adjacent to the target PU.
  • the motion vector of the sub-block obtained by dividing is derived.
  • (xPb, yPb) is the upper left coordinate of the target PU
  • nPbW, nPbH are the size of the target PU
  • nSbW, nSbH are the sizes of the sub-blocks.
  • the above-described temporal sub-block prediction candidate TSUB and spatial sub-block prediction candidate SSUB are selected as one mode (merge candidate) of the merge mode.
  • the affine prediction unit 30372 derives the affine prediction parameters of the target PU.
  • motion vectors (mv0_x, mv0_y) (mv1_x, mv1_y) of two control points (V0, V1) of the target PU are derived as affine prediction parameters.
  • the motion vector of each control point may be derived by prediction from the motion vector of the adjacent PU of the target PU, and further, the prediction vector and the encoded data derived as the motion vector of the control point
  • the motion vector of each control point may be derived from the sum of the difference vectors derived from.
  • FIG. 13 shows an example of deriving the motion vector spMvLX of each sub-block constituting the target PU (nPbW ⁇ nPbH) from the motion vector (mv0_x, mv0_y) of the control point V0 and the motion vector (mv1_x, mv1_y) of V1.
  • the motion vector spMvLX of each subblock is derived as a motion vector for each point located at the center of each subblock, as shown in FIG.
  • xPb and yPb are the upper left coordinates of the target PU
  • nPbW and nPbH are the width and height of the target PU
  • nSbW and nSbH are the width and height of the sub-block.
  • the matching prediction unit 30373 derives a motion vector spMvLX of a sub-block constituting the PU by performing a matching process of either bilateral matching (Bilateralmatching, BM) or template matching (Templatematching, TM).
  • FIG. 14 is a diagram for explaining (a) bilateral matching and (b) template matching.
  • the matching prediction mode is selected as one merge candidate (matching candidate) in the merge mode.
  • the matching prediction unit 30373 derives a motion vector by matching regions (comparison of proximity of regions, derivation of differences) on a plurality of reference images, assuming that the object moves at a constant velocity.
  • Bilateral matching is a matching between reference images A and B, assuming that an object passes through a certain region of reference image A, a target PU of target picture Cur_Pic, and a certain region of reference image B with a uniform motion.
  • a motion vector is derived by matching an adjacent area Temp_Cur of the target PU with an adjacent area Temp_LX of the reference block on the reference picture, assuming that the adjacent vector of the target PU and the motion vector of the target PU are equal.
  • (MV0_x, MV0_y) is determined so that the matching cost between Block_A and Block_B is minimized.
  • the (MV0_x, MV0_y) derived in this way is a motion vector assigned to the sub-block.
  • (b) of FIG. 14 is a figure for demonstrating template matching (Templatematching) among the said matching processes.
  • one reference picture is referred to in order to derive a motion vector of the sub-block Cur_block in the target picture Cur_Pic.
  • the reference block Block_A having the upper left coordinates (xPos, yPos) specified by is specified.
  • (xCur, yCur) is the upper left coordinate of the sub-block Cur_block.
  • a template region Temp_Cur (template) adjacent to the sub-block Cur_block in the target picture Cur_Pic and a template region Temp_L0 adjacent to Block_A in the reference picture A are set.
  • the template region Temp_Cur is composed of a region adjacent to the upper side of the sub-block Cur_block and a region adjacent to the left side of the sub-block Cur_block.
  • the template area Temp_L0 is composed of an area adjacent to the upper side of Block_A and an area adjacent to the left side of Block_A.
  • the template plays a role of a teacher image (teacher block) in matching (comparison between images).
  • a candidate block pointed to by a motion vector candidate is compared with a template that is a teacher, and a motion vector candidate pointing to a candidate block closest to the teacher is derived as a motion vector.
  • 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 3039.
  • 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 3039. 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.
  • the motion vector derived by the merge prediction parameter deriving unit 3036 or the motion vector derived by the matching prediction unit 30373 is not directly output to the inter prediction image generation unit 309 but is output via the BTM processing unit 3038. May be.
  • the BTM processing unit 3038 uses the prediction image generated by using the motion vector derived by the merge prediction parameter deriving unit 3036 or the matching prediction unit 30373 as a template, and executes bilateral template matching (BTM) processing. A highly accurate motion vector is derived. Details of the BTM processing will be described later.
  • BTM bilateral template matching
  • 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 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)
  • merge index merge_idx is decoded in S103, and the motion vector derivation process (S111) in the merge 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. 15 is a flowchart showing an outline of the motion prediction mode determination flow.
  • the motion prediction mode determination flow is executed by the inter prediction parameter decoding unit 303.
  • the motion prediction mode is a mode for determining a method for deriving a motion vector used for motion compensation prediction.
  • mvLX pmvCand [mvp_LX_idx] + mvdLX
  • TM template matching
  • S1404b template matching
  • BM bilateral matching
  • step S1404 when the fruc_mode_idx is MODE_BM (for example, 1), the pattern prediction vector is derived by bilateral matching when the fruc_mode_idx is MODE_BM (for example, 1), and when the fruc_mode_idx is MODE_TM (for example 2), the pattern matching vector is derived by template matching.
  • the fruc_mode_idx is MODE_BM (for example, 1)
  • the pattern matching vector is derived by template matching.
  • the BTM processing unit 3038 determines whether or not to perform bilateral template matching (BTM) processing (S1413), and determines that BTM processing is performed (YES in S1413). , BTM processing is executed (S1414).
  • BTM bilateral template matching
  • Whether or not to perform BTM processing is determined to perform BTM processing if a motion vector is derived by bi-directional prediction in the merge mode, and is determined not to perform BTM processing unless bi-directional prediction is performed. .
  • the BTM process is not performed even in bidirectional prediction.
  • FIG. 16A is a diagram showing a relationship between a reference image and a template in BTM processing
  • FIG. 16B is a diagram showing a processing flow.
  • FIG. 17 is a diagram for explaining the details of the template in the BTM processing.
  • FIG. 18 is a diagram for explaining a local search in BTM processing (search for a motion vector in a local region near a certain initial vector). In the following, when searching for a local vector centered on an initial vector, the initial vector does not necessarily have to be completely centered in the search space. That is, you may search for some directions largely.
  • the BTM processing unit 3038 first generates a prediction block from a plurality of motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter deriving unit 3036.
  • the predicted block of the Cur block is assumed to be a template (hereinafter simply referred to as a predicted block by the Cur block).
  • the motion compensation image predSamplesL0 derived from mvL0 and the weight prediction image predSamples [] [] derived from the motion compensation image predSamplesL1 derived from mvL1 are predicted blocks.
  • predSamples [X] [Y] Clip3 (0, (1 ⁇ bitDepth)-1, (predSamplesL0 [X] [Y] + predSamplesL1 [X] [Y] + offset2) >> shift2)
  • the BTM processing unit 3038 sets motion vector candidates in a range centered on mvL0 or mvL1 (initial vector), and matches the predicted image in the motion vector candidate with the template. Deriving the cost. Then, the motion vector is updated to the vectors mvL0 ′ and mvL1 ′ that minimize the matching cost.
  • the BTM processing unit 3038 first acquires a template (S501).
  • the template is acquired by generating a prediction block from a plurality of motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter deriving unit 3036 and using the prediction block as a template.
  • the BTM processing unit 3038 performs a local search (S502). As shown in FIG. 16B, the local search may be performed by repeating a plurality of different accuracy searches.
  • the local search is performed in the order of M pixel accuracy search L0 processing (S511), N pixel accuracy search L0 processing (S512), M pixel accuracy search L1 processing (S513), and N pixel accuracy search L1 processing (S514).
  • M and N need only have a higher accuracy of N than M.
  • the M pixel accuracy search L0 process performs a search process centered on the coordinates indicated by mvL0.
  • the N pixel accuracy search L0 process performs a search process centered on the coordinates where the matching cost is minimized in the M pixel accuracy search L0 process.
  • the M pixel accuracy search L1 process performs a search process centered on the coordinates indicated by mvL1. Then, the N pixel accuracy search L1 process performs a search process centered on the coordinates at which the matching cost is minimized in the M pixel accuracy search L1 process.
  • searchOffsetSquare [8] ⁇ (-1,1) , (0,1), (1,1), (1,0), (1, -1), (0, -1), (-1, -1), (-1,0) ⁇ 8 points to be searched are searched for.
  • searchOffsetSquare [8] ⁇ (-1,1) , (0,1), (1,1), (1,0), (1, -1), (0, -1), (-1, -1), (-1,0) ⁇ 8 points to be searched are searched for.
  • the starting point of the initial vector startMV is indicated by a white diamond
  • the search candidate point is indicated by a black circle
  • the end point of the optimal vector bestMV is indicated by a square.
  • the optimal vector bestMV is a point that evaluates the matching cost with each search target and becomes the search target with the lowest matching cost.
  • the BTM processing unit 3038 searches for 8 points at a distance of 1/2 pixel using the point selected as the end point of the optimal vector bestMV in the one-pixel accuracy search as the starting point of the initial vector startMV in this search. , Evaluate matching costs.
  • the eight points to be searched are the same as the positional relationship between the initial vector startMV and the search candidate point in the one-image accuracy search, and the distance is only 1 ⁇ 2 pixel.
  • FIGS. 19A and 19B are diagrams showing an outline of template matching.
  • L0 matching processing S801 and L1 matching processing (S802) are performed.
  • S811, S821) and S812, S822 are performed. Details of the block search and sub-block search will be described later.
  • FIG. 20A and 20B are diagrams showing an outline of bilateral matching.
  • L0 / L1 matching processing S901
  • S91 block search
  • S912 sub-block search
  • FIG. 21 is a flowchart showing the flow of motion vector derivation processing in the matching mode (template matching, bilateral matching).
  • FIG. 22 is a diagram for explaining the motion vector deriving process in the matching mode.
  • the processing shown in FIG. 21 is executed by the matching prediction unit 30373.
  • steps S1051 to S1054 are block searches executed at the block level. That is, a motion vector is derived for the entire block (CU or PU) using pattern matching. Specifically, as shown in FIG. 22A, motion vectors in the entire target block are derived. In other words, a motion vector is derived for each target block.
  • steps S1055 to S1060 are a sub-block search executed at the sub-block level. That is, using a pattern match, a motion vector is derived for each sub-block constituting the block. In particular. As shown in FIG. 22B, a motion vector is derived for each sub-block in the target block. Note that the size of the sub-block is 1/8 both vertically and horizontally with respect to the target block. However, the minimum size of the sub-block is 4 ⁇ 4 pixels.
  • FRUC_MODE is a variable indicating the type of matching mode, and corresponds to the fruc_mode_idx already described.
  • step S1053 a block-level initial vector in the target block is derived (initial vector search).
  • the initial vector is a motion vector that serves as a base for the search.
  • a limited motion vector candidate spatial merge candidate, temporal merge candidate, combined merge candidate, zero vector, ATMVP vector of the target block, etc.
  • the vector that minimizes is derived as the initial vector.
  • the initial vector candidate is a motion vector derived based on the motion vector of the processed reference point.
  • the ATMVP vector is a vector derived from the average (or weighted average, median) of the motion vector around the target block and the motion vector of the reference image.
  • the initial vector search does not include a step search that repeats the search recursively according to the searched result and a raster search that searches a continuous region. These searches are called local searches.
  • step S1054 a block level local search (local search) in the target block is performed.
  • a local region centered on the initial vector derived in step S1051 is further searched to search for a vector having a minimum matching cost, and set as a final vector.
  • the local search may be a step search, raster search, or spiral search. Details of the local search will be described later.
  • an initial vector of a sub-block in the target block is derived (initial vector search).
  • vector candidates target block selection vector, zero vector, center collocation vector of the subblock, lower right collocation vector of the subblock, ATMVP vector of the subblock, upper adjacent vector of the subblock, the sub
  • the vector having the smallest matching cost among the left adjacent vectors of the block is set as the initial vector of the sub-block.
  • the vector candidates used for the initial vector search of the sub-block are not limited to the above-described vectors.
  • step S1059 a local search centering on the initial vector of the sub-block selected in S1058 is performed. Then, the matching cost of vector candidates near the initial vector of the sub-block is derived, and the minimum vector is derived as the sub-block motion vector.
  • 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 (motion vector generation device) 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 prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference 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 those 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 one 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 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 prediction parameter encoding unit 111 may be realized by a computer.
  • 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 a 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 serving as a server or a client may be included and a program that holds a program for a certain period of time.
  • the program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
  • the BTM process is executed once after the process in the merge mode. Since the accuracy of the motion vector derived by BTM processing is improved, the accuracy of the predicted image generated from the motion vector is increased, in other words, the difference from the original image is considered to be small. . Therefore, if a predicted image generated from a motion vector derived by BTM processing is used as a new template and BTM processing is executed again, a motion vector with higher accuracy may be derived. Therefore, in this embodiment, the BTM process is executed a plurality of times.
  • FIG. 23 is a flowchart showing the flow of processing in the present embodiment.
  • the BTM processing unit 3038 executes the BTM processing a plurality of times (twice in the example shown in FIG. 23).
  • step S1414a shown in FIG. 23 the same BTM process as that in the first embodiment is executed.
  • step S1414b the predicted image generated using the motion vector derived in step S1414a is used as a template, and the motion vector is derived using the template.
  • Embodiment 2-1 Although the above-described effect is achieved by the method of the second embodiment described above, the processing amount increases as compared to the method of the first embodiment by executing the BTM process a plurality of times. Therefore, in this embodiment, when the M pixel accuracy local search in the BTM process is completed, the template is updated, and the N pixel accuracy local search is executed using the updated template. As a result, the motion vector can be derived using a template closer to the original image while keeping the same number of local searches as the method of the first embodiment.
  • FIG. 24 is a flowchart showing the flow of processing in the present embodiment.
  • the BTM processing unit 3038 performs a local search with M pixel accuracy in step S2301, and then generates in step S2302 using the motion vector derived in step S2301.
  • a local search with N pixel accuracy is performed using the predicted image as a template.
  • the local search order is changed, but the number of times is not changed, so that an increase in processing amount can be suppressed.
  • FIG. 25 is a diagram illustrating a processing flow in the second embodiment and a processing flow in the present embodiment.
  • the processing in the second embodiment is indicated by steps S1414a and S1414b
  • the processing in the present embodiment is indicated by steps S2401 and S2402.
  • steps S1414a and S1414b the processing in the present embodiment.
  • steps S2401 and S2402. As shown in FIG. 25, in the present embodiment, compared with the method of the second embodiment, four of the M pixel accuracy search L0 processing, the N pixel accuracy search L0 processing, the M pixel accuracy search L1 processing, and the N pixel accuracy search L1 processing. Since the processing amount is small for one processing, the overall processing amount can be suppressed.
  • the BTM process is applied to the motion vector derived in the merge mode.
  • BTM processing is applied to the motion vector derived in the matching mode (S1404: FIG. 15).
  • FIG. 26 is a flowchart showing the flow of processing in the matching mode in the present embodiment. As shown in FIG. 26, in the present embodiment, after executing TM processing or BM processing in the matching mode of step S1404 shown in FIG. 15, the BTM processing unit 3038 executes BTM processing only for sub-blocks ( S1404d).
  • the BTM process is executed in addition to the matching mode process, so the processing amount increases. Therefore, in this embodiment, the search accuracy in the process in the matching mode and the search accuracy in the BTM process are set.
  • the matching mode has a 4-pixel accuracy
  • the BTM process has a 1-pixel accuracy
  • a 1 / 2-pixel accuracy As a result, in addition to the processing in the matching mode in the first embodiment, the number of times of matching can be reduced because the search accuracy is coarse compared with the case where the BTM processing is executed, thereby reducing the processing amount. Can be made.
  • the search accuracy is not limited to this, and it is only necessary to execute a coarse search in the matching mode and a fine search in the BTM processing.
  • the matching mode has 4 pixel accuracy
  • the BTM processing has 1 pixel accuracy
  • the matching mode May be 1 pixel accuracy
  • BTM processing may be 1/2 pixel accuracy
  • the matching mode may be 1 pixel accuracy
  • BTM processing may be 1/4 pixel accuracy.
  • processing in the matching mode (TM or BM) is performed at the block level, and BTM processing is performed at the sub-block level.
  • FIG. 27 is a flowchart showing the flow of processing in Processing Example 1.
  • the matching prediction unit 30373 performs only local search at the block level in the TM processing in step S1404b 'or the BM processing in step S1404c'.
  • the BTM processing unit 3038 executes only local search at the sub-block level in the BTM processing in step S1404d.
  • FIG. 28 is a diagram for explaining an example in which a sub-block level template is used in BTM processing.
  • the divided part corresponding to the sub-block in the template corresponding to the target block i.e., the corresponding part of the template whose coordinates in the template are the same as the coordinates of the sub-block in the target block A template used for matching.
  • a motion vector is derived by bilateral template matching.
  • mvL0 and mvL1 are motion vectors derived by block search in TM or BM
  • mvL0 'and mvL1' are motion vectors of the target sub-block.
  • Processing example 2 In Processing Example 2, processing in matching mode (TM, BM) and BTM processing are executed at the block level.
  • FIG. 29 is a flowchart showing the flow of processing in Processing Example 2.
  • the matching prediction unit 30373 performs only a local search at the block level in the TM process in step S1404b 'or the BM process in step S1404c'.
  • the BTM processing unit 3038 executes only a local search at the block level in the BTM processing in step S1404d '.
  • processing at the sub-block level is omitted, so that the processing amount can be reduced. Note that by performing the BTM processing, it is possible to suppress a decrease in accuracy due to not performing a sub-block level local search.
  • Processing example 3 In Processing Example 3, processing in the matching mode (TM, BM) and BTM processing are performed at the block level, and processing in the matching mode (TM, BM) is performed at the sub-block level.
  • FIG. 30 is a flowchart showing the flow of processing in Processing Example 3.
  • the matching prediction unit 30373 performs a local search at the block level in the TM process in step S1404b 'or the BM process in step S1404c'.
  • the BTM processing unit 3038 executes a local search at the block level in the BTM processing in step S1404d '.
  • the matching prediction unit 30373 performs a local search at the sub-block level in the TM process in step S2902 or the BM process in step S2903.
  • initial vector candidates in the matching mode are a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a zero vector, an ATM ATM vector, and the like.
  • the ATMVP vector is a vector derived from the motion vector around the target block and the average (or weighted average, median) of the motion vectors of the reference image.
  • the initial vector is selected from a limited number of candidates, if any of the initial vector candidates does not indicate an appropriate position as the center of the search, the selected initial vector also has poor accuracy. As a result, the accuracy of the motion vector derived from the initial vector is not good.
  • initial vector candidates are added. This increases the number of initial vector candidates, increasing the possibility of selecting an appropriate initial vector and improving the accuracy of the finally derived motion vector.
  • Embodiment 4-1 a motion vector derived by the L0 matching process in template matching (TM) is added to the initial vector candidate selected when bilateral matching (BM) is performed.
  • the motion vector derived by the L0 matching process in template matching is a motion vector derived as a result of the execution of the matching process, and may appropriately indicate the center of the search as an initial vector. Therefore, adding the motion vector derived by the L0 matching process to the initial vector candidate when bilateral matching is performed increases the possibility of selecting an appropriate initial vector, and the accuracy of the finally derived motion vector Can be improved.
  • FIG. 31 is a flowchart showing the flow of processing in this embodiment.
  • the matching prediction unit 30373 first executes part of the template matching process even if it is determined in step S1404a in FIG. Specifically, a template is acquired and a block search for L0 matching processing is executed (S3001). That is, a block level initial vector is selected and a block level local search is performed. Thereafter, the matching prediction unit 30373 starts the bilateral matching process (S1404c), and in the block search in the L0 / L1 matching process (S3002), using the vector candidate obtained by adding the result of the block search executed in step S3001, Perform an initial vector search.
  • a block-level local search is executed using the selected initial vector, and then a sub-block level initial vector is selected to perform a sub-block level local search.
  • the motion vector derived by the L0 matching process in the template matching is added to the initial vector candidate in the bilateral matching.
  • the present invention is not limited to this, and the motion vector derived by the L1 matching process is the initial in the bilateral matching. You may add to a vector candidate.
  • Embodiment 4-2 in template matching or bilateral matching, processing at the block level is the same as that in the first embodiment described above, and the initial vector selection method at the sub-block level is different.
  • template matching or bilateral matching first, a template at the block level is acquired. Next, an initial vector at the block level is selected, and a local search at the block level is performed.
  • the initial vector at the block level is selected.
  • the initial vector candidates include block level motion vector, zero vector, collocated vector (center and lower right), ATMVP vector, additional vector candidate, upper
  • the motion vector of the adjacent sub-block is included. This will be specifically described with reference to FIG. FIG. 32 is a diagram for explaining a sub-block adjacent to the sub-block. 32, the motion vector mvLX in the subblock A or the subblock L adjacent to the subblock X is added to the initial vector candidate in the subblock X.
  • This increases the number of initial vector candidates, increasing the possibility of selecting an appropriate initial vector candidate and improving the accuracy of the finally derived motion vector.
  • the vector with the lowest matching cost is selected as the initial vector.
  • the matching cost of candidate vectors near the sub-block initial vector is derived by local search centering on the initial vector, and the smallest vector is the final motion vector (sub-block level motion vector).
  • the LX (L0 or L1) matching process and the LY (non-LX: L1 or L0) matching process both use the portion adjacent to the upper or left of the target block as a template. .
  • the feature of the lower right portion is not reflected in the template, and there is a possibility that an appropriate motion vector cannot be derived.
  • a predicted image (predicted block) created by the LX matching process is used as a template in the LY matching process.
  • the template used in the LY matching process has the same shape as the target block, and therefore, there is a high possibility that the template reflects the features of the entire block. And the precision of the motion vector to derive can be raised by using the said template.
  • FIG. 33 is a diagram for explaining a template acquisition method according to the present embodiment.
  • FIG. 33A is a diagram illustrating a template acquisition method according to the first embodiment.
  • FIG. 33B is a template acquisition method according to the present embodiment. It is a figure which shows a method.
  • a portion adjacent to the upper or left side of the target block (Cur block) is used as a template.
  • the portion adjacent to the upper or left side of the target block (Cur block) is used as a template as in the first embodiment.
  • the predicted image (prediction block: Pred block) created in this way is used as a template.
  • LX matching process is L0 or L1 may be selected, for example, from Ref0 and Ref1, whichever has a shorter POC distance.
  • Embodiment 6-1 Template matching (TM) performs matching processing in both directions, that is, performs L0 matching processing and L1 matching processing. Therefore, when compared with bilateral matching, the amount of processing increases because bilateral matching involves only one matching process between reference images.
  • TM Template matching
  • the amount of processing is reduced by limiting the matching processing in template matching to one direction.
  • FIG. 34 is a diagram showing a flow of template matching processing in the present embodiment.
  • the matching prediction unit 30373 acquires a template (S3301), and then selects a direction (L0 or L1) for executing the matching process (S3302). Then, a reference image (Ref0 or Ref1) in the selected direction and matching processing (block search, sub-block search) are performed (S3303).
  • the matching process can be limited to one direction, so that the processing amount can be reduced.
  • the direction in which the matching process is executed may be determined by any method. For example, the following four methods are conceivable.
  • Embodiment 6-2 In the image encoding device 11, the inter prediction parameter encoding unit 112 selects whether to use template matching or bilateral matching for matching processing. At this time, in order to select a highly accurate matching method, both template matching and bilateral matching are tried and evaluated. Therefore, the amount of processing is large because the two matching methods are always executed.
  • the matching method is limited according to the shape of the target block. As a result, it is not necessary to always execute the two matching methods, and the amount of processing can be reduced.
  • FIG. 35 is a diagram for explaining the processing for determining the matching mode in the first embodiment, (a) is a table showing the relationship between parameters and matching modes, and (b) is a flowchart showing the flow of processing. Is part of.
  • FIG. 36 is a flowchart showing the flow of processing in this embodiment.
  • fruc_mode_idx for determining the matching mode is composed of 2 bits.
  • fruc_mode_idx is composed of fruc_mode_idx_prefix of the first bit and fruc_mode_idx_suffix of the second bit.
  • the first bit fruc_mode_idx_prefix indicates whether or not the matching mode is set. If “0”, the matching mode is OFF. If “1”, the matching mode is ON.
  • fruc_mode_idx_suffix in the second bit indicates whether the matching method is bilateral matching or template matching. If “0”, bilateral matching is indicated, and if “1”, template matching is indicated. Show. Further, MODE_OFF, MODE_BM, and MODE_TM that can be set in FRUC_MODE correspond to numerical values “0”, “1”, and “2”, respectively.
  • inter prediction parameter decoding control part 3031 performs decoding processing of fruc_mode_idx with the following flows. That is, in the fruc_mode_idx decoding process (S1402), the on / off flag fruc_mode_idx_prefix indicating whether or not to perform the matching mode is first decoded (S3401). If fruc_mode_idx_prefix is “1” (YES in S3402), the process proceeds to step S3403. The flag fruc_mode_idx_suffix indicating the type of matching mode is decoded (S3403). Then, the process proceeds to step S3404. On the other hand, if fruc_mode_idx_prefix is not “1” (NO in S3402), the process directly proceeds to step S3404.
  • the matching mode is determined using the decrypted fruc_mode_idx_prefix and fruc_mode_idx_suffix. Specifically, a value obtained by adding fruc_mode_idx_prefix and fruc_mode_idx_suffix is set in FRUC_MODE (frac_mode_idx). The initial value of fruc_mode_idx_suffix is “0”. When fruc_mode_idx_prefix is “0” indicating that the matching mode is not performed, “0” is set in FRUC_MODE, that is, MODE_OFF corresponding to “0” is set.
  • fruc_mode_idx_prefix is a value “1” indicating that the matching mode is performed
  • type of the matching mode (MODE_BMor MODE_TM) is determined according to fruc_mode_idx_suffix.
  • fruc_mode_idx_prefix is “1” and fruc_mode_idx_suffix is “0”
  • “1” is set in FRUC_MODE, that is, MODE_BM corresponding to “1” is set.
  • the matching method is limited according to the shape of the target block.
  • the shape of the target block is rectangular, only template matching is used, in other words, bilateral matching is prohibited.
  • the inter prediction parameter decoding control unit 3031 performs fruc_mode_idx decoding processing according to the following flow. That is, in the fruc_mode_idx decoding process (S1402), first, fruc_mode_idx_prefix is decoded (S3401), and if fruc_mode_idx_prefix is “1” (YES in S3402), the process proceeds to step S3501, whether the target block is a square, ie, the target It is determined whether the width and height of the block are the same (S3501).
  • step S3403 If the target block is a square (YES in S3501), the process proceeds to step S3403 and fruc_mode_idx_suffix is decoded (S3403). Then, the process proceeds to step S3404. On the other hand, if fruc_mode_idx_prefix is not “1” (NO in S3402), the process directly proceeds to step S3404.
  • step S3404 the matching mode is determined using the decrypted fruc_mode_idx_prefix and fruc_mode_idx_suffix.
  • step S3501 If it is determined in step S3501 that the target block is not square (NO in S3501), the process proceeds to step S3502, and template matching is selected as a matching method (S3502).
  • the matching method is determined by the shape of the target block, it is only necessary to try one matching method on the encoder side (image encoding device 11), and two matching methods are used. The amount of processing is reduced compared to the case of trying. Also, when the shape of the symmetric block is a block shape for which the matching method is limited, the possible value of the flack mode index fruc_mode_idx is also changed from three types to two types of matching or not. Can be reduced.
  • Embodiment 6-3 In the first embodiment described above, the local search at the block level and the sub-block level is performed in the matching process in the matching prediction unit 30373 of the image decoding device 31. If this local search process can be omitted, the amount of processing can be reduced. Therefore, in this embodiment, the processing amount is reduced by omitting some local searches.
  • Example 1 the matching prediction unit 30373 omits the sub-block search and executes only the block search when executing template matching.
  • FIG. 37 is a flowchart showing a process flow of process example 1 in the present embodiment.
  • FIG. 37 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
  • the block search processing (S1051 to S1054) is the same as that of the first embodiment.
  • the matching prediction unit 30373 determines whether or not the matching method is template matching (S3601). If it is template matching (NO in S3601), the subblock search is not performed and the matching process is performed. finish. On the other hand, if it is not template matching (YES in S3601), the same sub-block search as that of the first embodiment is executed (S1055 to S1060).
  • the sub-block search can be omitted, so that the processing amount can be reduced.
  • the matching prediction unit 30373 when executing bilateral matching, omits both local search for block search and sub-block search, and executes only initial vector search.
  • FIG. 38 is a flowchart showing a process flow of process example 2 in the present embodiment.
  • FIG. 38 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
  • the matching prediction unit 30373 determines whether or not the matching method is template matching (S3701). If YES in step S3701, the process advances to step S1054 to execute a block-level local search (S1054). On the other hand, if it is not template matching (NO in S3701), the block search ends and proceeds to the sub-block search. That is, if it is bilateral matching, the block level local search is not executed.
  • the matching prediction unit 30373 determines whether or not the matching method is template matching (S3702), and if it is template matching (S3702). In step S1059, the local search at the sub-block level is executed (S1059). On the other hand, if it is not template matching (NO in S3702), the process proceeds to step S1060. That is, if it is bilateral matching, the local search at the sub-block level is not executed.
  • the local search at the block level and the local search at the sub-block level can be omitted, so that the processing amount can be reduced.
  • the matching prediction unit 30373 omits the sub-block level local search regardless of whether template matching or bilateral matching is executed.
  • FIG. 39 is a flowchart showing a process flow of process example 3 in the present embodiment.
  • FIG. 39 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
  • the block search process (S1051 to S1054) is the same as that of the first embodiment.
  • a sub-block level local search is not executed. That is, after the sub-block level initial vector search in step S1058 is completed, the process proceeds to step S1060. In other words, the local search at the sub-block level in step S1059 in the sub-block search of the first embodiment is not executed.
  • the local search at the sub-block level can be omitted in the template matching and bilateral matching, so that the processing amount can be reduced.
  • Example 4 The present embodiment is a combination of the first embodiment and the third embodiment. Similar to the first embodiment, the matching prediction unit 30373 of the present embodiment does not perform a sub-block search in the case of template matching, and ends the matching process. Also, in the case of bilateral matching, the matching prediction unit 30373 of the present embodiment omits the sub-block level local search as in the third embodiment.
  • FIG. 40 is a flowchart illustrating a process flow of Process Example 4 in the present embodiment.
  • FIG. 40 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
  • the block search processing (S1051 to S1054) is the same as that of the first embodiment. Then, after the block search ends, the matching prediction unit 30373 determines whether the matching method is not template matching, and if it is template matching, does not perform the sub-block search and ends the matching process. On the other hand, if it is not template matching, only the initial vector search is performed, and the sub-block level local search is not performed. The following processing is performed in the form of bullets.
  • the image coding apparatus 11 may implement
  • 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. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, 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.
  • the image encoding device 11 and the image decoding device 31 described above can be used for transmission and reception of moving images.
  • FIG. 41 (a) is a block diagram showing a configuration of a transmission apparatus PROD_A in which the image encoding apparatus 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. 41A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but a part of the configuration 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.
  • 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.
  • FIG. 41B 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. 42 (a) is a block diagram illustrating a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted.
  • the recording apparatus PROD_C includes 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.
  • 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 (HardDisk Drive) or SSD (Solid State Drive), or (2) SD memory card. Or a type connected to the recording device PROD_C, such as a USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registered trademark) ) And the like may be loaded into a drive device (not shown) built in the recording device PROD_C.
  • a type built into the recording device PROD_C such as (1) HDD (HardDisk Drive) or SSD (Solid State Drive), or (2) SD memory card.
  • a type connected to the recording device PROD_C such as a USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registered trademark)
  • DVD Digital Versatile Disc
  • BD Blu-ray Disc: registered trademark
  • 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. 42A 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, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit 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 receiving unit PROD_C5 is a main source of moving images).
  • FIG. 42 (b) is a block diagram 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 on 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. 42B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but a part of the configuration 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.
  • 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 of the above devices stores a CPU that executes instructions of a program that realizes each function, a ROM (ReadOnly 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 is provided.
  • the object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner. 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)
  • Logic circuits such as FPGA and Field (Programmable Gate) Array can be used.
  • each of the above devices 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.
  • the Internet Intranet, Extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / CableTelevision) communication network, Virtual Private Network (Virtual Private Network) ), Telephone line networks, mobile communication networks, satellite communication networks, 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) and remote control, Wireless such as 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, digital terrestrial broadcasting network, etc. But it is available.
  • 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.
  • Image coding device (moving image coding device, predicted image generation device) 31 Image decoding device (moving image decoding device, predicted image generation device) 112 Inter prediction parameter encoding unit (motion vector generation device) 303 Inter prediction parameter decoding unit (motion vector generation device) 3036 Merge prediction parameter derivation unit (merge processing unit) 3038 BTM processing unit 30373 Matching prediction unit (first motion vector search unit, second motion vector search unit)

Landscapes

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

Abstract

The present invention addresses the problem of improving coding efficiency. An inter-prediction parameter decoding unit (303) includes a BTM processing unit (3038) that executes matching processing by way of bilateral template matching (BTM) using, as a template, a predicted block generated from a motion vector derived by a merge-prediction parameter deriving unit (3036), thereby modifying the motion vector, and the BTM processing unit (3038) executes the matching processing by performing bilateral template matching a plurality of times.

Description

動きベクトル生成装置、予測画像生成装置、動画像復号装置、および動画像符号化装置Motion vector generation device, predicted image generation device, moving image decoding device, and moving image encoding device
 本発明は、動きベクトル生成装置、予測画像生成装置、動画像復号装置、および動画像符号化装置に関する。 The present invention relates to a motion vector generation device, a predicted image generation device, a moving image decoding device, and a moving image encoding device.
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。 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 a moving image that generates a decoded image by decoding the encoded data An image 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が挙げられる。 In addition, Non-patent Document 1 using a matching technique (template matching and bilateral matching) for deriving a motion vector on the decoder side can be cited as a moving picture encoding and decoding technique in recent years.
 また、非特許文献2には、新たなマッチング技術として、バイラテラルテンプレートマッチングが記載されている。 Further, Non-Patent Document 2 describes bilateral template matching as a new matching technique.
 非特許文献1、非特許文献2に開示されているマッチング技術では、十分な予測精度の予測画像が生成できないという第1の課題が生じていた。また、非特許文献1に開示されているマッチング技術においては、予測画像生成に必要な動きベクトル探索のための処理量が増加するという第2の課題が生じていた。 The matching technique disclosed in Non-Patent Document 1 and Non-Patent Document 2 has a first problem that a predicted image with sufficient prediction accuracy cannot be generated. Further, the matching technique disclosed in Non-Patent Document 1 has a second problem that the amount of processing for motion vector search necessary for predictive image generation increases.
 本発明は、上記の第1及び第2の課題の少なくとも何れかの解決を図ることのできる動きベクトル生成装置、予測画像生成装置、動画像復号装置、および動画像符号化装置を提供することである。 The present invention provides a motion vector generation device, a predicted image generation device, a moving image decoding device, and a moving image encoding device capable of solving at least one of the first and second problems. is there.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マージ処理により予測ブロックごとに動きベクトルを導出するマージ処理部と、上記マージ処理部において導出された上記動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチング(BTM)を用いてマッチング処理を実行し、上記動きベクトルを修正するBTM処理部と、を備え、上記BTM処理部は、上記バイラテラルテンプレートマッチングを複数回、行って上記マッチング処理を実行する構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. In the above, a merge processing unit that derives a motion vector for each prediction block by merge processing and a prediction block generated from the motion vector derived by the merge processing unit as a template and matching using bilateral template matching (BTM) A BTM processing unit that executes processing and corrects the motion vector, and the BTM processing unit performs the matching processing by performing the bilateral template matching a plurality of times.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、第1のマッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、第2のマッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部により探索された動きベクトル、または、上記第2の動きベクトル探索部により探索された動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチング(BTM)を用いて第3のマッチング処理を実行し、上記動きベクトルを修正するBTM処理部をさらに備えている構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. In the prediction block, the first motion vector search unit for searching for a motion vector for each prediction block by the first matching process and the motion vector selected by the first motion vector search unit are referred to in the prediction block. A second motion vector search unit that searches for a motion vector by a second matching process for each of the plurality of sub-blocks included, and the first motion vector search unit performs an initial vector search for a prediction block. And the second motion vector is searched for a motion vector by performing a local search. The search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block, and the motion vector searched by the first motion vector search unit, or A BTM processor that corrects the motion vector by executing a third matching process using bilateral template matching (BTM) using a prediction block generated from the motion vector searched by the second motion vector search unit as a template. Is further provided.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部は、バイラテラルマッチングを実行する場合、テンプレートマッチングにより得られた動きベクトルを当該バイラテラルマッチングにおける初期ベクトル候補に加えて、上記初期ベクトル探索を行う構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. A motion vector is searched by performing a local search after performing an initial vector search for a block. The first motion vector search unit is obtained by template matching when bilateral matching is performed. The initial vector search is performed by adding the motion vector to the initial vector candidate in the bilateral matching.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、対象となるサブブロックの上または左に隣接しているサブブロックの動きベクトルを初期ベクトル候補に加えて、上記初期ベクトル探索を行う構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. After performing an initial vector search for a block, a motion vector is searched by performing a local search, and the second motion vector search unit is adjacent to the top or left of the target sub-block. In this configuration, the initial vector search is performed by adding the motion vector of the existing sub-block to the initial vector candidate.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、参照ピクチャのうちの1つとのマッチング処理の結果から作成した予測ブロックをテンプレートとして他の1つの参照ピクチャとのマッチング処理を実行する構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. A motion vector is searched by performing a local search after performing an initial vector search for a block. The first motion vector search unit and the second motion vector search unit perform template matching. In the case of execution, the configuration is such that the matching process with another reference picture is executed using a prediction block created from the result of the matching process with one of the reference pictures as a template.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、1つの参照ピクチャとのマッチング処理のみ実行する構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. A motion vector is searched by performing a local search after performing an initial vector search for a block. The first motion vector search unit and the second motion vector search unit perform template matching. When executed, only the matching process with one reference picture is executed.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、上記予測ブロックの形状に応じてテンプレートマッチングまたはバイラテラルマッチングを用いてマッチング処理を実行する構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. The first motion vector search unit and the second motion vector search unit search for a motion vector by performing a local search after performing an initial vector search for a block. The matching process is executed using template matching or bilateral matching according to the shape of the image.
 上記課題を解決するために、本発明の一態様に係る動きベクトル生成装置は、動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングおよびバイラテラルマッチングの何れを用いるかに応じて、初期ベクトル探索、および局所的探索を実行する構成である。 In order to solve the above problems, a motion vector generation device according to an aspect of the present invention generates a motion vector that is referred to in order to generate a prediction image used for encoding or decoding of a moving image. , A first motion vector search unit that searches for a motion vector for each prediction block by matching processing, and a plurality of motion vectors selected by the first motion vector search unit are included in the prediction block. A second motion vector search unit that searches for a motion vector by matching processing for each of the sub-blocks, and the first motion vector search unit performs an initial vector search for the prediction block and then performs local vector search. The second motion vector search unit searches for a motion vector by performing a general search. After performing an initial vector search for a block, a motion vector is searched by performing a local search. The first motion vector search unit and the second motion vector search unit include template matching and The initial vector search and the local search are executed in accordance with which of the bilateral matching is used.
 以上の構成によれば、上記の第1および第2の課題の少なくとも何れかの解決を図ることができる。 According to the above configuration, at least one of the first and second problems can be solved.
本実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on this embodiment. 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. 本実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on this embodiment. 本実施形態に係る画像復号装置の構成を示す概略図である。It is the schematic which shows the structure of the image decoding apparatus which concerns on this embodiment. 本実施形態に係る画像符号化装置のインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus which concerns on this embodiment. 本実施形態に係るマージ予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the merge prediction parameter derivation | leading-out part which concerns on this embodiment. 本実施形態に係るAMVP予測パラメータ導出部の構成を示す概略図である。It is the schematic which shows the structure of the AMVP prediction parameter derivation | leading-out part which concerns on this embodiment. 本実施形態に係る画像復号装置の動きベクトル復号処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the motion vector decoding process of the image decoding apparatus which concerns on this embodiment. 本実施形態に係る画像符号化装置のインター予測パラメータ符号化部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter encoding part of the image coding apparatus which concerns on this embodiment. 本実施形態に係るインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part which concerns on this embodiment. 本実施形態に係るインター予測パラメータ復号部の構成を示す概略図である。It is the schematic which shows the structure of the inter prediction parameter decoding part which concerns on this embodiment. 動きベクトルを予測する対象であるPU(横幅nPbW)を構成する各サブブロックの動きベクトルspMvLX[xi][yi]を導出する例を示す図である。It is a figure which shows the example which derives | leads-out the motion vector spMvLX [xi] [yi] of each subblock which comprises PU (horizontal width nPbW) which is the object which estimates a motion vector. (a)は、バイラテラルマッチング(Bilateral matching)について説明するための図である。(b)は、テンプレートマッチング(Template matching)について説明するための図である。(A) is a figure for demonstrating bilateral matching (Bilateral (matching) matching). (B) is a figure for demonstrating template matching (Template | matching). 動き予測モード決定フローの概要を示すフローチャート図である。It is a flowchart figure which shows the outline | summary of a motion prediction mode determination flow. (a)はBTM処理における参照画像とテンプレートとの関係を示す図であり、(b)は処理の流れを示す図である。(A) is a figure which shows the relationship between the reference image in a BTM process, and a template, (b) is a figure which shows the flow of a process. BTM処理におけるテンプレートの詳細を説明するための図である。It is a figure for demonstrating the detail of the template in a BTM process. BTM処理におけるローカルサーチを説明するための図である。It is a figure for demonstrating the local search in a BTM process. (a)、(b)は、テンプレートマッチングの概要を示す図である。(A), (b) is a figure which shows the outline | summary of template matching. (a)、(b)は、バイラテラルマッチングの概要を示す図である。(A), (b) is a figure which shows the outline | summary of bilateral matching. マッチングモード(テンプレートマッチング、バイラテラルマッチング)における動きベクトル導出処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of the motion vector derivation | leading-out process in matching mode (template matching, bilateral matching). マッチングモードにおける動きベクトル導出処理を説明するための図である。It is a figure for demonstrating the motion vector derivation | leading-out process in matching mode. 本発明の他の実施形態における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in other embodiment of this invention. 他の実施形態における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in other embodiment. 異なる実施形態における処理の流れを比較する図である。It is a figure which compares the flow of the process in different embodiment. 他の実施形態におけるマッチングモードの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the matching mode in other embodiment. 処理例における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in a process example. BTM処理において、サブブロックレベルのテンプレートを使用する例を説明するための図である。It is a figure for demonstrating the example which uses the template of a subblock level in BTM processing. 処理例における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in a process example. 処理例における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in a process example. 他の実施形態における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in other embodiment. サブブロックに隣接するサブブロックを説明するための図である。It is a figure for demonstrating the subblock adjacent to a subblock. 他の実施形態におけるテンプレートの取得方法を説明するための図であり、(a)は実施形態1におけるテンプレートの取得方法を示す図であり、(b)は本実施形態におけるテンプレートの取得方法を示す図である。It is a figure for demonstrating the acquisition method of the template in other embodiment, (a) is a figure which shows the acquisition method of the template in Embodiment 1, (b) shows the acquisition method of the template in this embodiment. FIG. 他の実施形態におけるテンプレートマッチング処理の流れを示す図である。It is a figure which shows the flow of the template matching process in other embodiment. 実施形態におけるマッチングモードを決定する処理を説明するための図であり、(a)はパラメータとマッチングモードとの関係を示すテーブルであり、(b)は処理の流れを示すフローチャートの一部である。It is a figure for demonstrating the process which determines the matching mode in embodiment, (a) is a table which shows the relationship between a parameter and a matching mode, (b) is a part of flowchart which shows the flow of a process. . 他の実施形態における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in other embodiment. 他の実施形態における処理例の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the process example in other embodiment. 他の実施形態における処理例の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the process example in other embodiment. 他の実施形態における処理例の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the process example in other embodiment. 他の実施形態における処理例の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the process example in other embodiment. 本実施形態に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on this embodiment, 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)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure shown about the structure of the recording device carrying the image coding apparatus which concerns on this embodiment, 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. 本実施形態に係る画像伝送システムの構成を示す概略図である。It is the schematic which shows the structure of the image transmission system which concerns on this embodiment.
 〔実施形態1〕
 以下、図面を参照しながら本発明の実施形態について説明する。
Embodiment 1
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 図43は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 FIG. 43 is a schematic diagram showing a 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 (moving image encoding device, predicted image generating device) 11, a network 21, an image decoding device (moving image decoding device, predicted image generating device) 31, and an image display device 41. Composed.
 画像符号化装置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 unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. 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)に示すように、ビデオパラメータセット(VideoParameter 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 additional extension. Information SEI (Supplemental Enhancement Information) is included. 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 SNS-1 (NS is the total number of slices included in the picture PICT).
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 In addition, hereinafter, when 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:CodingTree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest CodingUnit)と呼ぶこともある。
(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: Coding Tree Unit) 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. In the CU header, a prediction mode, a division method (PU division mode), and the like are defined.
 予測ツリーでは、符号化ユニットを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, similar to the above-described CU division.
 変換処理は、この変換ユニットごとに行われる。 Conversion processing is performed for each conversion unit.
  (予測パラメータ)
 予測ユニット(PU:PredictionUnit)の予測画像は、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: PredictionUnit) is derived by 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 reference relationship of the picture, a horizontal axis is time, I, P, and B in the rectangle are an intra picture, a single prediction picture, a bi-prediction picture, and numbers in the rectangle are Indicates the decoding 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 depending on 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 luminance. 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 from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the input prediction parameter and the read reference picture 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に出力する。 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.
 予測モード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(InverseDiscrete 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 (InverseDiscrete 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、およびBTM処理部3038を含んで構成される。 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 (merge processing unit) 3036, a sub-block prediction parameter derivation unit 3037, and a BTM process. A portion 3038 is included.
 インター予測パラメータ復号制御部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.
 詳細に説明すると、サブブロック予測パラメータ導出部3037は、サブブロック予測モードにてサブブロック予測を行う、時空間サブブロック予測部30371、アフィン予測部30372、マッチング予測部(第1の動きベクトル探索部、第2の動きベクトル探索部)30373、の少なくとも一つを備える。なお、マッチング予測部30373は、サブブロック予測パラメータ導出部3037の要素として構成せず、マージ予測パラメータ導出部3036の要素として構成してもよい。 More specifically, the sub-block prediction parameter derivation unit 3037 performs sub-block prediction in the sub-block prediction mode, and performs a spatio-temporal sub-block prediction unit 30371, an affine prediction unit 30372, a matching prediction unit (first motion vector search unit) , A second motion vector search unit) 30373. Note that the matching prediction unit 30373 may not be configured as an element of the sub-block prediction parameter derivation unit 3037, but may be configured as an element of the merge prediction parameter derivation unit 3036.
 (サブブロック予測モードフラグ)
 ここで、画像符号化装置11(詳細は後述する)における、あるPUの予測モードがサブブロック予測モードであるか否かを示すサブブロック予測モードフラグsubPbMotionFlagの導出方法について説明する。画像符号化装置11は、後述する空間サブブロック予測SSUB、時間サブブロック予測TSUB、アフィン予測AFFINE、マッチング予測MATのいずれを用いたかに基づいて、サブブロック予測モードフラグsubPbMotionFlagを導出する。たとえば、あるPUで選択された予測モードをN(たとえばNは選択されたマージ候補を示すラベル)とした場合には、以下の式によりサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。
(Subblock prediction mode flag)
Here, a method for deriving a sub-block prediction mode flag subPbMotionFlag indicating whether or not a prediction mode of a certain PU is a sub-block prediction mode in the image encoding device 11 (details will be described later) will be described. The image encoding device 11 derives a sub-block prediction mode flag subPbMotionFlag based on which one of spatial sub-block prediction SSUB, temporal sub-block prediction TSUB, affine prediction AFFINE, and matching prediction MAT described later is used. For example, when the prediction mode selected by a certain PU is N (for example, N is a label indicating the selected merge candidate), the sub-block prediction mode flag subPbMotionFlag may be derived by the following equation.
 subPbMotionFlag = (N == TSUB) || (N ==SSUB) || (N == AFFINE) || (N == MAT)
 ここで||は、論理和を示す(以下同様)。
subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == AFFINE) || (N == MAT)
Here, || represents a logical sum (the same applies hereinafter).
 また、以下のように、画像符号化装置11が行うサブブロック予測のモードの種類に応じて、上記式を、適宜、変更してもよい。すなわち、画像符号化装置11が空間サブブロック予測SSUB、アフィン予測AFFINEを行う構成である場合には、以下のようにサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。 Further, as described below, the above equation may be appropriately changed according to the type of sub-block prediction mode performed by the image encoding device 11. That is, when the image encoding device 11 is configured to perform spatial subblock prediction SSUB and affine prediction AFFINE, the subblock prediction mode flag subPbMotionFlag may be derived as follows.
 subPbMotionFlag = (N == SSUB)|| (N ==AFFINE)
 また、サブブロック予測に含まれる各予測モード(たとえば、時空間サブブロック予測、アフィン予測、マッチング予測)によって予測が行われる際に、各サブブロック予測に対応する予測モードの処理の中で、subPbMotionFlagを1に設定する構成としてもよい。
subPbMotionFlag = (N == SSUB) || (N == AFFINE)
In addition, when prediction is performed in each prediction mode (for example, spatiotemporal subblock prediction, affine prediction, matching prediction) included in subblock prediction, subPbMotionFlag is included in the prediction mode processing corresponding to each subblock prediction. May be set to 1.
 また、たとえば、CUサイズが8x8(対数CUサイズlog2CbSize == 3)であり、かつ、分割タイプが2Nx2N以外のようなPUが小さいサイズの場合はPUを分割数1のサブブロックとすることができる。この場合、以下のようにサブブロック予測モードsubPbMotionFlagを導出してもよい。 Also, for example, when the CU size is 8x8 (logarithmic CU size log2CbSize == 3) and the PU is a small size such as a division type other than 2Nx2N, the PU can be a sub-block with a division number of 1. . In this case, the sub-block prediction mode subPbMotionFlag may be derived as follows.
 subPbMotionFlag |= (log2CbSize == 3&& PartMode != 2Nx2N)
 なお|=は、別の条件との和演算(OR)でsubPbMotionFlagが導出されてもよいことを意味する。すなわち、subPbMotionFlagは、次のように、予測モードNの判定と小PUサイズ判定との和演算で導出してもよい(以下同様)。
subPbMotionFlag | = (log2CbSize == 3 && PartMode! = 2Nx2N)
Note that | = means that subPbMotionFlag may be derived by a sum operation (OR) with another condition. That is, subPbMotionFlag may be derived by the sum operation of determination of prediction mode N and small PU size determination as follows (the same applies hereinafter).
 subPbMotionFlag = (N == TSUB) || (N ==SSUB) || (N == AFFINE) || (N == MAT)|| (log2CbSize == 3 && PartMode !=2Nx2N)
 さらに、たとえば、CUサイズが8x8(log2CbSize == 3)で分割タイプが2NxN、Nx2N、NxNである場合をサブブロック予測に含めてもよい。すなわち、subPbMotionFlagは、次のように導出してもよい。
subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == AFFINE) || (N == MAT) || (log2CbSize == 3 && PartMode! = 2Nx2N)
Further, for example, a case where the CU size is 8 × 8 (log2CbSize == 3) and the division type is 2NxN, Nx2N, or NxN may be included in the sub-block prediction. That is, subPbMotionFlag may be derived as follows.
 subPbMotionFlag |= (log2CbSize == 3&& (PartMode == 2NxN || PartMode == Nx2N ||PartMode == NxN))
 さらに、たとえば、CUサイズが8x8(log2CbSize == 3)で分割タイプがNxNである場合をサブブロック予測に含めてもよい。すなわち、subPbMotionFlagは、次のように導出してもよい。
subPbMotionFlag | = (log2CbSize == 3 && (PartMode == 2NxN || PartMode == Nx2N || PartMode == NxN))
Further, for example, a case where the CU size is 8x8 (log2CbSize == 3) and the division type is NxN may be included in the sub-block prediction. That is, subPbMotionFlag may be derived as follows.
 subPbMotionFlag |= (log2CbSize == 3 && PartMode == NxN)
 また、サブブロック予測と判定する場合として、PUの幅もしくは高さが4である場合を含めてもよい。すなわち、サブブロック予測モードフラグsubPbMotionFlagは、次のように導出してもよい。
subPbMotionFlag | = (log2CbSize == 3 && PartMode == NxN)
In addition, a case where the PU width or height is 4 may be included as a case of determining sub-block prediction. That is, the sub-block prediction mode flag subPbMotionFlag may be derived as follows.
 subPbMotionFlag |= (nPbW == 4 || nPbH ==4)
 画像復号装置31のサブブロック予測パラメータ導出部3037では、上述と逆の方法でsubPbMotionFlagからサブブロックの予測モードを導出する。
subPbMotionFlag | = (nPbW == 4 || nPbH == 4)
The sub-block prediction parameter deriving unit 3037 of the image decoding device 31 derives a sub-block prediction mode from the subPbMotionFlag by a method reverse to that described above.
 (サブブロック予測部)
 次に、サブブロック予測部について説明する。
(Sub-block prediction unit)
Next, the sub-block prediction unit will be described.
 (時空間サブブロック予測部30371)
 時空間サブブロック予測部30371は、時間的に対象PUに隣接する参照画像上(たとえば直前のピクチャ)のPUの動きベクトル、もしくは、空間的に対象PUに隣接するPUの動きベクトルから、対象PUを分割して得られるサブブロックの動きベクトルを導出する。具体的には、参照画像上のPUの動きベクトルを対象PUが参照する参照ピクチャに合わせてスケーリングすることにより、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb +nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW /nSbW - 1、j=0, 1, 2,・・・,nPbH /nSbH - 1)を導出する(時間サブブロック予測)。ここで、(xPb, yPb)は対象PUの左上座標、nPbW, nPbHは対象PUのサイズ、nSbW, nSbHはサブブロックのサイズである。
(Spatio-temporal sub-block prediction unit 30371)
The spatio-temporal sub-block prediction unit 30371 calculates the target PU from the motion vector of the PU on the reference image temporally adjacent to the target PU (for example, the immediately preceding picture) or the motion vector of the PU spatially adjacent to the target PU. The motion vector of the sub-block obtained by dividing is derived. Specifically, the motion vector spMvLX [xi] [yi] (xi = xPb) of each sub-block in the target PU is scaled by matching the motion vector of the PU on the reference image with the reference picture referenced by the target PU. + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH-1) Derived (temporal sub-block prediction). Here, (xPb, yPb) is the upper left coordinate of the target PU, nPbW, nPbH are the size of the target PU, and nSbW, nSbH are the sizes of the sub-blocks.
 また、対象PUに隣接するPUの動きベクトルと、対象PUを分割して得られるサブブロックとの距離に応じて、加重平均を計算することで、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を導出してもよい(空間サブブロック予測)。 Also, by calculating a weighted average according to the distance between the motion vector of the PU adjacent to the target PU and the sub-block obtained by dividing the target PU, the motion vector spMvLX [ xi] [yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ...・, NPbH / nSbH-1) may be derived (spatial sub-block prediction).
 上記、時間サブブロック予測の候補TSUB、空間サブブロック予測の候補SSUBを、マージモードの一つのモード(マージ候補)として選択する。 The above-described temporal sub-block prediction candidate TSUB and spatial sub-block prediction candidate SSUB are selected as one mode (merge candidate) of the merge mode.
 (アフィン予測部)
 アフィン予測部30372は、対象PUのアフィン予測パラメータを導出する。本実施形態では、アフィン予測パラメータとして、対象PUの2つの制御点(V0、V1)の動きベクトル(mv0_x, mv0_y)(mv1_x, mv1_y)を導出する。具体的には、対象PUの隣接PUの動きベクトルから予測することにより、各制御点の動きベクトルを導出してもよいし、さらに、制御点の動きベクトルとして導出された予測ベクトルと符号化データから導出される差分ベクトルの和により、各制御点の動きベクトルを導出してもよい。
(Affine prediction unit)
The affine prediction unit 30372 derives the affine prediction parameters of the target PU. In the present embodiment, motion vectors (mv0_x, mv0_y) (mv1_x, mv1_y) of two control points (V0, V1) of the target PU are derived as affine prediction parameters. Specifically, the motion vector of each control point may be derived by prediction from the motion vector of the adjacent PU of the target PU, and further, the prediction vector and the encoded data derived as the motion vector of the control point The motion vector of each control point may be derived from the sum of the difference vectors derived from.
 図13は、対象PU(nPbW×nPbH)を構成する各サブブロックの動きベクトルspMvLXを、制御点V0の動きベクトル(mv0_x, mv0_y)およびV1の動きベクトル(mv1_x, mv1_y)から導出する例を示す図である。各サブブロックの動きベクトルspMvLXは、図13に示すように、各サブブロックの中心に位置する点毎の動きベクトルとして導出する。 FIG. 13 shows an example of deriving the motion vector spMvLX of each sub-block constituting the target PU (nPbW × nPbH) from the motion vector (mv0_x, mv0_y) of the control point V0 and the motion vector (mv1_x, mv1_y) of V1. FIG. The motion vector spMvLX of each subblock is derived as a motion vector for each point located at the center of each subblock, as shown in FIG.
 アフィン予測部30372は対象PUのアフィン予測パラメータに基づいて、対象PU中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb +nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW /nSbW - 1、j=0, 1, 2,・・・,nPbH /nSbH - 1)を下記の式を用いて、導出する。 The affine prediction unit 30372 is based on the affine prediction parameters of the target PU, and the motion vector spMvLX [xi] [yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i in the target PU = 0, 1, 2, ..., nPbW / nSbWS- 1, j = 0, 1, 2, ..., nPbH / nSbH-1) are derived using the following equations.
 spMvLX[xi][yi][0]=mv0_x + (mv1_x - mv0_x)/ nPbW * (xi + nSbW/2) - (mv1_y - mv0_y) / nPbH * (yi + nSbH/2)
 spMvLX[xi][yi][1]=mv0_y + (mv1_y - mv0_y)/ nPbW * (xi + nSbW/2) + (mv1_x - mv0_x) / nPbH * (yi + nSbH/2)
 ここで、xPb, yPbは、対象PUの左上座標、nPbW, nPbHは、対象PUの幅と高さ、nSbW, nSbHはサブブロックの幅と高さである。
spMvLX [xi] [yi] [0] = mv0_x + (mv1_x-mv0_x) / nPbW * (xi + nSbW / 2)-(mv1_y-mv0_y) / nPbH * (yi + nSbH / 2)
spMvLX [xi] [yi] [1] = mv0_y + (mv1_y-mv0_y) / nPbW * (xi + nSbW / 2) + (mv1_x-mv0_x) / nPbH * (yi + nSbH / 2)
Here, xPb and yPb are the upper left coordinates of the target PU, nPbW and nPbH are the width and height of the target PU, and nSbW and nSbH are the width and height of the sub-block.
 (マッチング予測部30373)
 マッチング予測部30373は、バイラテラルマッチング(Bilateralmatching、BM)またはテンプレートマッチング(Templatematching、TM)の何れかのマッチング処理を行うことにより、PUを構成するサブブロックの動きベクトルspMvLXを導出する。図14は、(a)バイラテラルマッチング、(b)テンプレートマッチングを説明するための図である。マッチング予測モードは、マージモードの一つのマージ候補(マッチング候補)として選択される。
(Matching prediction unit 30373)
The matching prediction unit 30373 derives a motion vector spMvLX of a sub-block constituting the PU by performing a matching process of either bilateral matching (Bilateralmatching, BM) or template matching (Templatematching, TM). FIG. 14 is a diagram for explaining (a) bilateral matching and (b) template matching. The matching prediction mode is selected as one merge candidate (matching candidate) in the merge mode.
 マッチング予測部30373は、物体が等速運動をすると仮定して、複数の参照画像における領域のマッチング(領域の近さの比較、差分導出)により動きベクトルを導出する。バイラテラルマッチングは、ある物体が、参照画像Aのある領域、対象ピクチャCur_Picの対象PU、参照画像Bのある領域を等速運動で通過するものと仮定して、参照画像A、B間のマッチングにより対象PUの動きベクトルを導出する。テンプレートマッチングは、対象PUの隣接領域と対象PUの動きベクトルが等しいと仮定して、対象PUの隣接領域Temp_Curと参照ピクチャ上の参照ブロックの隣接領域Temp_LXのマッチングにより動きベクトルを導出する。さらに、マッチング予測部では、対象PUを複数のサブブロックに分割し、分割したサブブロック単位で前述のバイラテラルマッチングもしくはテンプレートマッチングを行うことにより、サブブロックの動きベクトルspMvLX[xi][yi] (xi = xPb + nSbW * i, yj = yPb + nSbH * j, i=0, 1, 2,・・・,nPbW / nSbW - 1、j=0, 1, 2,・・・,nPbH / nSbH - 1)を導出してもよい。 The matching prediction unit 30373 derives a motion vector by matching regions (comparison of proximity of regions, derivation of differences) on a plurality of reference images, assuming that the object moves at a constant velocity. Bilateral matching is a matching between reference images A and B, assuming that an object passes through a certain region of reference image A, a target PU of target picture Cur_Pic, and a certain region of reference image B with a uniform motion. To derive the motion vector of the target PU. In template matching, a motion vector is derived by matching an adjacent area Temp_Cur of the target PU with an adjacent area Temp_LX of the reference block on the reference picture, assuming that the adjacent vector of the target PU and the motion vector of the target PU are equal. Further, the matching prediction unit divides the target PU into a plurality of sub-blocks, and performs the above-described bilateral matching or template matching in units of divided sub-blocks, so that the motion vector spMvLX [xi] [yi] ( xi = xPb + nSbW * i, yj = yPb + nSbH * j, i = 0, 1, 2, ..., nPbW / nSbW-1, j = 0, 1, 2, ..., nPbH / nSbH- 1) may be derived.
 図14の(a)に示すように、バイラテラルマッチングでは、対象ピクチャCur_PicにおけるサブブロックCur_blockの動きベクトルを導出するために、2枚の参照画像が参照される。より具体的には、まず、サブブロックCur_blockの座標を(xCur,yCur)と表現したとき、参照ピクチャインデックスRef0によって指定される参照画像(参照ピクチャAと呼ぶ)内の領域であって、
  (xPos0,yPos0)=(xCur + MV0_x, yCur + MV0_y)
によって特定される左上座標(xPos0,yPos0)を有するBlock_Aと、参照ピクチャインデックスRef1によって指定される参照画像(参照ピクチャBと呼ぶ)内の領域であって、
  (xPos1,yPos1)=(xCur+ MV1_x, xCur + MV1_y)=(xCur - MV0_x * TD1/TD0, yCur -MV0_y * TD1/TD0)
によって特定される左上座標(xPos1,yPos1)を有するBlock_Bとが設定される。ここで、TD0、及びTD1は、図14の(a)に示すように、それぞれ、対象ピクチャCur_Picと参照ピクチャAとのピクチャ間距離、及び対象ピクチャCur_Picと参照ピクチャBとのピクチャ間距離を表している。
As shown in FIG. 14A, in bilateral matching, two reference images are referred to in order to derive a motion vector of the sub-block Cur_block in the current picture Cur_Pic. More specifically, first, when the coordinates of the sub-block Cur_block are expressed as (xCur, yCur), an area in the reference image (referred to as reference picture A) specified by the reference picture index Ref0,
(XPos0, yPos0) = (xCur + MV0_x, yCur + MV0_y)
Block_A having the upper left coordinates (xPos0, yPos0) specified by, and a region in the reference image (referred to as reference picture B) specified by the reference picture index Ref1,
(XPos1, yPos1) = (xCur + MV1_x, xCur + MV1_y) = (xCur-MV0_x * TD1 / TD0, yCur -MV0_y * TD1 / TD0)
Block_B having the upper left coordinates (xPos1, yPos1) specified by is set. Here, TD0 and TD1 represent the inter-picture distance between the target picture Cur_Pic and the reference picture A, and the inter-picture distance between the target picture Cur_Pic and the reference picture B, respectively, as shown in FIG. ing.
 次に、Block_AとBlock_Bとのマッチングコストが最小となるように、(MV0_x,MV0_y)が決定される。このようにして導出された(MV0_x,MV0_y)が、サブブロックに付与される動きベクトルとなる。 Next, (MV0_x, MV0_y) is determined so that the matching cost between Block_A and Block_B is minimized. The (MV0_x, MV0_y) derived in this way is a motion vector assigned to the sub-block.
 一方、図14の(b)は、上記マッチング処理のうち、テンプレートマッチング(Templatematching)について説明するための図である。 On the other hand, (b) of FIG. 14 is a figure for demonstrating template matching (Templatematching) among the said matching processes.
 図14の(b)に示すように、テンプレートマッチングでは、対象ピクチャCur_PicにおけるサブブロックCur_blockの動きベクトルを導出するために、1枚の参照ピクチャが参照される。 As shown in FIG. 14B, in template matching, one reference picture is referred to in order to derive a motion vector of the sub-block Cur_block in the target picture Cur_Pic.
 より具体的には、まず、参照ピクチャインデックスRef0によって指定される参照画像(参照ピクチャAと呼ぶ)内の領域であって、
  (xPos,yPos)=(xCur + MV0_x, yCur + MV0_y)
によって特定される左上座標(xPos, yPos)を有する参照ブロックBlock_Aが特定される。ここで、(xCur, yCur)は、サブブロックCur_blockの左上座標である。
More specifically, first, an area in a reference image (referred to as reference picture A) designated by a reference picture index Ref0,
(XPos, yPos) = (xCur + MV0_x, yCur + MV0_y)
The reference block Block_A having the upper left coordinates (xPos, yPos) specified by is specified. Here, (xCur, yCur) is the upper left coordinate of the sub-block Cur_block.
 次に、対象ピクチャCur_PicにおいてサブブロックCur_blockに隣接したテンプレート領域Temp_Cur(テンプレート)と、参照ピクチャAにおいてBlock_Aに隣接したテンプレート領域Temp_L0とが設定される。図14の(b)に示す例において、テンプレート領域Temp_Curは、サブブロックCur_blockの上側に隣接する領域及びサブブロックCur_blockの左側に隣接する領域とから構成されている。また、テンプレート領域Temp_L0は、Block_Aの上側に隣接する領域及びBlock_Aの左側に隣接する領域とから構成されている。 Next, a template region Temp_Cur (template) adjacent to the sub-block Cur_block in the target picture Cur_Pic and a template region Temp_L0 adjacent to Block_A in the reference picture A are set. In the example shown in FIG. 14B, the template region Temp_Cur is composed of a region adjacent to the upper side of the sub-block Cur_block and a region adjacent to the left side of the sub-block Cur_block. The template area Temp_L0 is composed of an area adjacent to the upper side of Block_A and an area adjacent to the left side of Block_A.
 なお、テンプレートとは、マッチング(画像同士の比較)において教師画像(教師ブロック)の役割を果たすものである。マッチング予測では、動きベクトル候補の指す候補ブロックと教師であるテンプレートを比較して、教師にもっとも近い候補ブロックを指す動きベクトル候補を、動きベクトルとして導出する。 Note that the template plays a role of a teacher image (teacher block) in matching (comparison between images). In matching prediction, a candidate block pointed to by a motion vector candidate is compared with a template that is a teacher, and a motion vector candidate pointing to a candidate block closest to the teacher is derived as a motion vector.
 次にTemp_CurとTempL0とのマッチングコストが最小になる(MV0_x,MV0_y)が決定され、サブブロックに付与される動きベクトルspMvLXとなる。 Next, it is determined that the matching cost between Temp_Cur and TempL0 is minimum (MV0_x, MV0_y), and the motion vector spMvLX is given to the sub-block.
 図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、およびベクトル候補格納部3039を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する既に処理済みのPUの動きベクトルmvLXを読み出し、予測ベクトル候補を導出し、ベクトル候補格納部3039に対し、予測ベクトル候補リスト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 3039. 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 3039. 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.
 なお、マージ予測パラメータ導出部3036において導出された動きベクトル、またはマッチング予測部30373において導出された動きベクトルをそのままインター予測画像生成部309に出力するのではなく、BTM処理部3038を介して出力してもよい。 Note that the motion vector derived by the merge prediction parameter deriving unit 3036 or the motion vector derived by the matching prediction unit 30373 is not directly output to the inter prediction image generation unit 309 but is output via the BTM processing unit 3038. May be.
 BTM処理部3038は、マージ予測パラメータ導出部3036またはマッチング予測部30373により導出された動きベクトルを用いて生成された予測画像をテンプレートととし、バイラテラルテンプレートマッチング(BTM)処理を実行することにより、精度の高い動きベクトルを導出する。BTM処理の詳細については後述する。 The BTM processing unit 3038 uses the prediction image generated by using the motion vector derived by the merge prediction parameter deriving unit 3036 or the matching prediction unit 30373 as a template, and executes bilateral template matching (BTM) processing. A highly accurate motion vector is derived. Details of the BTM processing will be described later.
  (インター予測画像生成部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 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)を実行する。 When 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 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.
  (動きベクトル導出処理の例)
 動きベクトルの導出処理は、以下のように導出することができる。図15は、動き予測モード決定フローの概要を示すフローチャート図である。動き予測モード決定フローは、インター予測パラメータ復号部303により実行される。動き予測モードとは、動き補償予測に用いる動きベクトルの導出方法を決定するモードである。
(Example of motion vector derivation processing)
The motion vector deriving process can be derived as follows. FIG. 15 is a flowchart showing an outline of the motion prediction mode determination flow. The motion prediction mode determination flow is executed by the inter prediction parameter decoding unit 303. The motion prediction mode is a mode for determining a method for deriving a motion vector used for motion compensation prediction.
 図15に示すように、動き予測モード決定フローでは、まず、インター予測パラメータ復号制御部3031によって、マージフラグmerge_flagが復号され(S1400)、マージモードか否かが判断される(S1401)。詳細には、インター予測パラメータ復号制御部3031によって、マージフラグmerge_flagが復号され、merge_flag==1 ?が判断されることによって、マージモードか否かが判断される。 As shown in FIG. 15, in the motion prediction mode determination flow, first, the inter prediction parameter decoding control unit 3031 decodes the merge flag merge_flag (S1400), and determines whether the mode is the merge mode (S1401). Specifically, the inter prediction parameter decoding control unit 3031 decodes the merge flag merge_flag and determines merge_flag == 1?, Thereby determining whether or not the merge mode is set.
 マージモードでないと判断された場合(S1401でNO)、AMVPモードとなる。詳細には、merge_flag==1が偽の場合、AMVPモードが選択される。この場合、AMVP予測パラメータ導出部3032によって、差分ベクトルmvdLXが復号され、予測ベクトルインデックスmvp_LX_idxが復号される。更に、予測ベクトル候補pmvCandを導出し、動きベクトルmvLXを次式により導出する。 If it is determined that the mode is not the merge mode (NO in S1401), the AMVP mode is set. Specifically, when merge_flag == 1 is false, the AMVP mode is selected. In this case, the AMVP prediction parameter derivation unit 3032 decodes the difference vector mvdLX and decodes the prediction vector index mvp_LX_idx. Furthermore, a prediction vector candidate pmvCand is derived, and a motion vector mvLX is derived by the following equation.
  mvLX = pmvCand[mvp_LX_idx] + mvdLX
 一方、マージモードであると判断された場合(S1401でYES)、フラック(FRUC:Frame Rate Up Conversion)モードインデックスを復号し(S1402)、マッチングモードであるか否かが判断される(S1403)。詳細には、merge_flag==1が真の場合、フラックモードインデックスfruc_mode_idxが復号され、fruc_mode_idx!=0 ?が判断される。
mvLX = pmvCand [mvp_LX_idx] + mvdLX
On the other hand, when it is determined that the mode is the merge mode (YES in S1401), the frame (FRUC: Frame Rate Up Conversion) mode index is decoded (S1402), and it is determined whether the mode is the matching mode (S1403). Specifically, when merge_flag == 1 is true, the flack mode index fruc_mode_idx is decoded, and fruc_mode_idx! = 0? Is determined.
 そして、マッチングモードであると判断された場合(S1403でYES)、マッチングモードとなる(S1404)。詳細には、fruc_mode_idx!=0が真の場合、動きベクトル導出方法としてマッチングモードが選択される。そして、マッチング予測部30373によって、テンプレートマッチング(TM)を行うか否かが判断される(S1404a)。テンプレートマッチングを行う場合(S1404aでYES)、マッチング予測部30373はテンプレートマッチングを行い(S1404b)、テンプレートマッチングを行わない場合(S1404aでNO)、マッチング予測部30373はバイラテラルマッチング(BM)を行う(S1404c)。ステップS1404では、マッチング予測部30373によって、fruc_mode_idxがMODE_BM(例えば1)の場合、バイラテラルマッチングによりパターンマッチベクトルが導出され、fruc_mode_idxがMODE_TM(例えば2)の場合、テンプレートマッチングによりパターンマッチベクトルが導出される。 If it is determined that the matching mode is selected (YES in S1403), the matching mode is set (S1404). Specifically, when fruc_mode_idx! = 0 is true, the matching mode is selected as the motion vector derivation method. Then, the matching prediction unit 30373 determines whether to perform template matching (TM) (S1404a). When performing template matching (YES in S1404a), the matching prediction unit 30373 performs template matching (S1404b), and when not performing template matching (NO in S1404a), the matching prediction unit 30373 performs bilateral matching (BM) ( S1404c). In step S1404, when the fruc_mode_idx is MODE_BM (for example, 1), the pattern prediction vector is derived by bilateral matching when the fruc_mode_idx is MODE_BM (for example, 1), and when the fruc_mode_idx is MODE_TM (for example 2), the pattern matching vector is derived by template matching. The
 また、ステップ1403において、マッチングモードではないと判断された場合(S1403でNO)、マージモードとなる(S1412)。詳細には、fruc_mode_idx!=0が偽の場合、マージ予測パラメータ導出部3036によって、マージインデックスmerge_idxを復号する。続いて、マージ候補mergeCandを導出し、動きベクトルmvLXを次式により導出する。 If it is determined in step 1403 that the mode is not the matching mode (NO in S1403), the merge mode is set (S1412). Specifically, when fruc_mode_idx! = 0 is false, the merge prediction parameter deriving unit 3036 decodes the merge index merge_idx. Subsequently, a merge candidate mergeCand is derived, and a motion vector mvLX is derived by the following equation.
  mvLX = mergeCand[merge_idx]
 そして、マージモードにおいて導出した動きベクトルに関し、BTM処理部3038は、バイラテラルテンプレートマッチング(BTM)処理を行うか否かを判定し(S1413)、BTM処理を行うと判定した場合(S1413でYES)、BTM処理を実行する(S1414)。
mvLX = mergeCand [merge_idx]
Then, regarding the motion vector derived in the merge mode, the BTM processing unit 3038 determines whether or not to perform bilateral template matching (BTM) processing (S1413), and determines that BTM processing is performed (YES in S1413). , BTM processing is executed (S1414).
 BTM処理を行うか否かの判定は、マージモードにおいて双方向予測により動きベクトルが導出されていれば、BTM処理を行うと判定し、双方向予測でなければ、BTM処理は行わないと判定する。また、輝度補償の予測パラメータ、およびアフィン予測パラメータの場合、双方向予測であってもBTM処理は行わない。 Whether or not to perform BTM processing is determined to perform BTM processing if a motion vector is derived by bi-directional prediction in the merge mode, and is determined not to perform BTM processing unless bi-directional prediction is performed. . In addition, in the case of the prediction parameter for luminance compensation and the affine prediction parameter, the BTM process is not performed even in bidirectional prediction.
  (BTM(バイラテラルテンプレートマッチング)処理)
 次に、図16~図18を参照してバイラテラルテンプレートマッチング(BTM)処理の詳細について説明する。図16の(a)はBTM処理における参照画像とテンプレートとの関係を示す図であり、(b)は処理の流れを示す図である。また、図17は、BTM処理におけるテンプレートの詳細を説明するための図である。また、図18は、BTM処理におけるローカルサーチ(ある初期ベクトルの近傍である局所的領域における動きベクトルの探索)を説明するための図である。なお、以下、ある初期ベクトルを中心とした局所ベクトルを探索する場合、必ずしも初期ベクトルが探索空間上、完全に中心になくてもよい。つまり、多少一部の方向を大きく探索しても構わない。
(BTM (bilateral template matching) processing)
Next, details of the bilateral template matching (BTM) process will be described with reference to FIGS. FIG. 16A is a diagram showing a relationship between a reference image and a template in BTM processing, and FIG. 16B is a diagram showing a processing flow. FIG. 17 is a diagram for explaining the details of the template in the BTM processing. FIG. 18 is a diagram for explaining a local search in BTM processing (search for a motion vector in a local region near a certain initial vector). In the following, when searching for a local vector centered on an initial vector, the initial vector does not necessarily have to be completely centered in the search space. That is, you may search for some directions largely.
 図16の(a)、および図17に示すように、BTM処理部3038は、まず、マージ予測パラメータ導出部3036で導出された複数の動きベクトル(例えばmvL0およびmvL1)から予測ブロックを生成し、そのCur blockの予測ブロックをテンプレート(以後、単にCur blockで予測ブロックを示すこととする)とする。具体的には、重み予測部3094で説明したように、mvL0により導出された動き補償画像predSamplesL0と、mvL1により導出された動き補償画像predSamplesL1から導出される重み予測画像predSamples[][]を予測ブロックとする。
predSamples[X][Y] = Clip3( 0, ( 1 <<bitDepth ) - 1, ( predSamplesL0[X][Y] + predSamplesL1[X][Y] + offset2 )>> shift2 )
 次に、BTM処理部3038は、mvL0およびmvL1のそれぞれについて、mvL0またはmvL1を中心(初期ベクトル)とする範囲で、動きベクトルの候補を設定し、動きベクトル候補における予測画像と、テンプレートとのマッチングコストを導出する。そして、マッチングコストが最小となるベクトルmvL0’、mvL1’に動きベクトルを更新する。
As shown in FIG. 16A and FIG. 17, the BTM processing unit 3038 first generates a prediction block from a plurality of motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter deriving unit 3036. The predicted block of the Cur block is assumed to be a template (hereinafter simply referred to as a predicted block by the Cur block). Specifically, as described in the weight prediction unit 3094, the motion compensation image predSamplesL0 derived from mvL0 and the weight prediction image predSamples [] [] derived from the motion compensation image predSamplesL1 derived from mvL1 are predicted blocks. And
predSamples [X] [Y] = Clip3 (0, (1 << bitDepth)-1, (predSamplesL0 [X] [Y] + predSamplesL1 [X] [Y] + offset2) >> shift2)
Next, for each of mvL0 and mvL1, the BTM processing unit 3038 sets motion vector candidates in a range centered on mvL0 or mvL1 (initial vector), and matches the predicted image in the motion vector candidate with the template. Deriving the cost. Then, the motion vector is updated to the vectors mvL0 ′ and mvL1 ′ that minimize the matching cost.
 次に、図16の(b)を参照して、BTM処理の流れを説明する。図16の(b)に示すように、BTM処理部3038は、まずテンプレートを取得する(S501)。テンプレートの取得は上述した通り、マージ予測パラメータ導出部3036で導出された複数の動きベクトル(例えば、mvL0およびmvL1)から予測ブロックを生成し、その予測ブロックをテンプレートとする。次に、BTM処理部3038は、ローカルサーチを行う(S502)。図16の(b)に示すように、ローカルサーチは、複数の異なる精度のサーチを繰り返すことによって行ってもよい。例えば、ローカルサーチは、M画素精度サーチL0処理(S511)、N画素精度サーチL0処理(S512)、M画素精度サーチL1処理(S513)、N画素精度サーチL1処理(S514)の順に行う。MおよびNは、MよりもNの精度が高ければよく、例えば、M=1画素精度、N=1/2画素精度とすることができる。そして、M画素精度サーチL0処理は、mvL0が示す座標を中心としたサーチ処理を実施する。また、N画素精度サーチL0処理は、M画素精度サーチL0処理でマッチングコストが最小となった座標を中心としたサーチ処理を実施する。同様に、M画素精度サーチL1処理は、mvL1が示す座標を中心としたサーチ処理を実施する。そして、N画素精度サーチL1処理は、M画素精度サーチL1処理でマッチングコストが最小となった座標を中心としたサーチ処理を実施する。 Next, the flow of BTM processing will be described with reference to FIG. As shown in FIG. 16B, the BTM processing unit 3038 first acquires a template (S501). As described above, the template is acquired by generating a prediction block from a plurality of motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter deriving unit 3036 and using the prediction block as a template. Next, the BTM processing unit 3038 performs a local search (S502). As shown in FIG. 16B, the local search may be performed by repeating a plurality of different accuracy searches. For example, the local search is performed in the order of M pixel accuracy search L0 processing (S511), N pixel accuracy search L0 processing (S512), M pixel accuracy search L1 processing (S513), and N pixel accuracy search L1 processing (S514). M and N need only have a higher accuracy of N than M. For example, M = 1 pixel accuracy and N = 1/2 pixel accuracy can be achieved. The M pixel accuracy search L0 process performs a search process centered on the coordinates indicated by mvL0. Further, the N pixel accuracy search L0 process performs a search process centered on the coordinates where the matching cost is minimized in the M pixel accuracy search L0 process. Similarly, the M pixel accuracy search L1 process performs a search process centered on the coordinates indicated by mvL1. Then, the N pixel accuracy search L1 process performs a search process centered on the coordinates at which the matching cost is minimized in the M pixel accuracy search L1 process.
 図18を参照して、サーチ処理(ここではステップサーチ)の詳細について説明する。ここでは、M=1、N=1/2の例を説明する。図18に示すように1画素精度サーチでは、初期ベクトルstartMVの起点をmvL0またはmvL1に設定し、この点を(0,0)としたときに、searchOffsetSquare[8]={ (-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1),(-1,0)}で表される8点を探索対象として探索する。なお、図18では、白抜き菱形で初期ベクトルstartMVの起点を示し、黒丸で探索候補点を示し、四角で最適ベクトルbestMVの終点を示している。最適ベクトルbestMVは、各探索対象とのマッチングコストを評価し、最も小さいマッチングコストとなる探索対象となる点である。 Details of the search process (here, step search) will be described with reference to FIG. Here, an example where M = 1 and N = 1/2 will be described. As shown in FIG. 18, in the one-pixel accuracy search, when the starting point of the initial vector startMV is set to mvL0 or mvL1, and this point is set to (0,0), searchOffsetSquare [8] = {(-1,1) , (0,1), (1,1), (1,0), (1, -1), (0, -1), (-1, -1), (-1,0)} 8 points to be searched are searched for. In FIG. 18, the starting point of the initial vector startMV is indicated by a white diamond, the search candidate point is indicated by a black circle, and the end point of the optimal vector bestMV is indicated by a square. The optimal vector bestMV is a point that evaluates the matching cost with each search target and becomes the search target with the lowest matching cost.
 次に、BTM処理部3038は、1画素精度サーチにおいて、最適ベクトルbestMVの終点として選択された点を今回の探索における初期ベクトルstartMVの起点とし、1/2画素の距離にある8点を探索し、マッチングコストを評価する。探索対象となる8点は、1画像精度サーチにおける初期ベクトルstartMVと探索候補点との位置関係と同じであり、距離が1/2画素となっているのみである。 Next, the BTM processing unit 3038 searches for 8 points at a distance of 1/2 pixel using the point selected as the end point of the optimal vector bestMV in the one-pixel accuracy search as the starting point of the initial vector startMV in this search. , Evaluate matching costs. The eight points to be searched are the same as the positional relationship between the initial vector startMV and the search candidate point in the one-image accuracy search, and the distance is only ½ pixel.
 次に、図19を参照して、テンプレートマッチング(TM)の概要について説明する。図19の(a)、(b)は、テンプレートマッチングの概要を示す図である。図19の(b)に示すように、テンプレートマッチングでは、L0マッチング処理(S801)、およびL1マッチング処理(S802)を行う。また、L0マッチング処理およびL1マッチング処理のそれぞれにおいて、ブロックサーチ(S811、S821)、およびサブブロックサーチ(S812、S822)を行う。ブロックサーチおよびサブブロックサーチの詳細については後述する。 Next, an outline of template matching (TM) will be described with reference to FIG. FIGS. 19A and 19B are diagrams showing an outline of template matching. As shown in FIG. 19B, in template matching, L0 matching processing (S801) and L1 matching processing (S802) are performed. In each of the L0 matching process and the L1 matching process, a block search (S811, S821) and a sub-block search (S812, S822) are performed. Details of the block search and sub-block search will be described later.
 次に、図20を参照して、バイラテラルマッチング(BM)の概要について説明する。図20の(a)、(b)は、バイラテラルマッチングの概要を示す図である。図20の(b)に示すように、バイラテラルマッチングでは、L0/L1マッチング処理(S901)を行う。また、L0/L1マッチング処理において、ブロックサーチ(S911)、およびサブブロックサーチ(S912)を行う。ブロックサーチおよびサブブロックサーチの詳細については後述する。 Next, an overview of bilateral matching (BM) will be described with reference to FIG. 20A and 20B are diagrams showing an outline of bilateral matching. As shown in FIG. 20B, in bilateral matching, L0 / L1 matching processing (S901) is performed. In the L0 / L1 matching process, a block search (S911) and a sub-block search (S912) are performed. Details of the block search and sub-block search will be described later.
  (TM(テンプレートマッチング)、BM(バイラテラルマッチング)処理)
 次に、図21および図22を参照して、テンプレートマッチングおよびバイラテラルマッチングの詳細について説明する。図21は、マッチングモード(テンプレートマッチング、バイラテラルマッチング)における動きベクトル導出処理の流れを示すフローチャート図である。図22は、マッチングモードにおける動きベクトル導出処理を説明するための図である。
(TM (template matching), BM (bilateral matching) processing)
Next, details of template matching and bilateral matching will be described with reference to FIGS. 21 and 22. FIG. 21 is a flowchart showing the flow of motion vector derivation processing in the matching mode (template matching, bilateral matching). FIG. 22 is a diagram for explaining the motion vector deriving process in the matching mode.
 図21に示す処理は、マッチング予測部30373により実行される。 The processing shown in FIG. 21 is executed by the matching prediction unit 30373.
 なお、図21に示す各ステップのうち、ステップS1051~S1054は、ブロックレベルで実行されるブロックサーチである。すなわち、パターンマッチを用いて、ブロック(CU、またはPU)全体で動きベクトルを導出する。具体的には、図22の(a)に示すように、対象ブロック全体における動きベクトルを導出している。換言すれば対象ブロック単位で動きベクトルを導出している。 Of steps shown in FIG. 21, steps S1051 to S1054 are block searches executed at the block level. That is, a motion vector is derived for the entire block (CU or PU) using pattern matching. Specifically, as shown in FIG. 22A, motion vectors in the entire target block are derived. In other words, a motion vector is derived for each target block.
 また、ステップS1055~S1060は、サブブロックレベルで実行されるサブブロックサーチである。すなわち、パターンマッチを用いて、ブロックを構成するサブブロック単位で動きベクトルを導出する。具体的には。図22の(b)に示すように、対象ブロックにおける各サブブロック単位で動きベクトルを導出している。なお、サブブロックのサイズは、対象ブロックに対し、縦横それぞれ1/8である。ただし、サブブロックの最小サイズは、4×4画素である。図21においてFRUC_MODEは、マッチングモードの種類を示す変数であり、すでに説明したfruc_mode_idxに対応する。 Also, steps S1055 to S1060 are a sub-block search executed at the sub-block level. That is, using a pattern match, a motion vector is derived for each sub-block constituting the block. In particular. As shown in FIG. 22B, a motion vector is derived for each sub-block in the target block. Note that the size of the sub-block is 1/8 both vertically and horizontally with respect to the target block. However, the minimum size of the sub-block is 4 × 4 pixels. In FIG. 21, FRUC_MODE is a variable indicating the type of matching mode, and corresponds to the fruc_mode_idx already described.
 まず、ステップS1051において、FRUC_MODE==MODE_TMが判断される。FRUC_MODE==MODE_TM が真(S1051でYES)の場合、ステップS1052において、テンプレートマッチングを行うためのテンプレートを取得する。より詳細には、テンプレートマッチング用のテンプレートをブロックの周辺領域から取得する。具体的には、図22の(c)に示すように、対象ブロックの上隣接領域または左隣接領域からテンプレートを取得する。なお、テンプレートのサイズ(厚み)は4画素である。そして、ステップS1053に進む。 First, in step S1051, FRUC_MODE == MODE_TM is determined. If FRUC_MODE == MODE_TM is true (YES in S1051), a template for performing template matching is acquired in step S1052. More specifically, a template for template matching is acquired from the peripheral area of the block. Specifically, as shown in FIG. 22C, a template is acquired from the upper adjacent region or the left adjacent region of the target block. The template size (thickness) is 4 pixels. Then, the process proceeds to step S1053.
 また、FRUC_MODE==MODE_TM が偽(S1051でNO)の場合もステップS1053に進む。ステップS1053において、対象ブロックにおけるブロックレベルの初期ベクトルを導出(初期ベクトルサーチ)する。なお、初期ベクトルとは、探索のベースとなる動きベクトルであり、限られた動きベクトル候補(空間マージ候補、時間マージ候補、結合マージ候補、ゼロベクトル、対象ブロックのATMVPベクトル等)から、マッチングコストが最小となるベクトルを導出し、初期ベクトルとしている。上述のように、初期ベクトル候補は、処理済みの参照点の動きベクトルに基づいて導出される動きベクトルである。つまり、各種マージ候補のように、すでに処理された点の動きベクトル(処理済み動きベクトル)、処理済み動きベクトルをスケールしたもの、もしくは、ATMVPベクトルのように複数の処理済み動きベクトルから導出される代表値を用いる。なお、ATMVPベクトルとは、対象ブロックの周囲の動きベクトルと、参照画像の動きベクトルとの平均(もしくは加重平均、メジアン)により、導出されるベクトルである。初期ベクトルサーチは、探索された結果に応じて再帰的に探索を繰り返すステップサーチや、連続領域をサーチするラスタサーチを含まない。これらのサーチはローカルサーチと呼ぶ。 Also, if FRUC_MODE == MODE_TM is false (NO in S1051), the process proceeds to step S1053. In step S1053, a block-level initial vector in the target block is derived (initial vector search). Note that the initial vector is a motion vector that serves as a base for the search. From a limited motion vector candidate (spatial merge candidate, temporal merge candidate, combined merge candidate, zero vector, ATMVP vector of the target block, etc.), a matching cost is determined. The vector that minimizes is derived as the initial vector. As described above, the initial vector candidate is a motion vector derived based on the motion vector of the processed reference point. That is, it is derived from motion vectors of already processed points (processed motion vectors) like various merge candidates, a scaled version of a processed motion vector, or a plurality of processed motion vectors such as ATMVP vectors. Use representative values. The ATMVP vector is a vector derived from the average (or weighted average, median) of the motion vector around the target block and the motion vector of the reference image. The initial vector search does not include a step search that repeats the search recursively according to the searched result and a raster search that searches a continuous region. These searches are called local searches.
 ステップS1054において、対象ブロックにおけるブロックレベルのローカルサーチ(局所的探索)を行う。ローカルサーチでは、ステップS1051で導出された初期ベクトルを中心とする局所領域をさらにサーチし、マッチングコストが最小となるベクトルを探索し、最終的なベクトルとする。なお、ローカルサーチは、ステップサーチやラスタサーチ、スパイラルサーチでもよい。ローカルサーチの詳細については後述する。 In step S1054, a block level local search (local search) in the target block is performed. In the local search, a local region centered on the initial vector derived in step S1051 is further searched to search for a vector having a minimum matching cost, and set as a final vector. The local search may be a step search, raster search, or spiral search. Details of the local search will be described later.
 続いて、対象ブロックに含まれる各サブブロックについて、以下の処理を行う(ステップS1055~S1060)。 Subsequently, the following processing is performed for each sub-block included in the target block (steps S1055 to S1060).
 まず、ステップS1056において、FRUC_MODE==MODE_TMが判断される。FRUC_MODE==MODE_TMが真(S1056でYES)の場合、ステップS1057において、テンプレートマッチングを行うためのテンプレートを取得する。より詳細には、テンプレートマッチング用のテンプレートをサブブロックの周辺領域から取得する。具体的には、図22の(c)に示すように、対象サブブロックの上隣接領域または左隣接領域からテンプレートを取得する。そして、ステップS1058に進む。また、FRUC_MODE==MODE_TMが偽(S1056でNO)の場合もステップS1058に進む。 First, in step S1056, FRUC_MODE == MODE_TM is determined. If FRUC_MODE == MODE_TM is true (YES in S1056), a template for performing template matching is acquired in step S1057. More specifically, a template for template matching is acquired from the peripheral area of the sub-block. Specifically, as shown in FIG. 22C, a template is acquired from the upper adjacent region or the left adjacent region of the target sub block. Then, the process proceeds to step S1058. Also, if FRUC_MODE == MODE_TM is false (NO in S1056), the process proceeds to step S1058.
 ステップS1058において、対象ブロックにおけるサブブロックの初期ベクトルを導出(初期ベクトルサーチ)する。詳細には、ベクトル候補(対象ブロックの選択ベクトル、ゼロベクトル、当該サブブロックの中心コロケートベクトル、当該サブブロックの右下コロケートベクトル、当該サブブロックのATMVPベクトル、当該サブブロックの上隣接ベクトル、当該サブブロックの左隣接ベクトル等)のうち、マッチングコストが最小となるベクトルを当該サブブロックの初期ベクトルとする。なお、サブブロックの初期ベクトル探索に利用するベクトル候補は上述のベクトルに限定されない。 In step S1058, an initial vector of a sub-block in the target block is derived (initial vector search). In detail, vector candidates (target block selection vector, zero vector, center collocation vector of the subblock, lower right collocation vector of the subblock, ATMVP vector of the subblock, upper adjacent vector of the subblock, the sub The vector having the smallest matching cost among the left adjacent vectors of the block is set as the initial vector of the sub-block. Note that the vector candidates used for the initial vector search of the sub-block are not limited to the above-described vectors.
 次に、ステップS1059において、S1058で選択されたサブブロックの初期ベクトルを中心とするローカルサーチを行う。そして、サブブロックの初期ベクトル付近のベクトル候補のマッチングコストを導出し、最小となるベクトルをサブブロックの動きベクトルとして導出する。 Next, in step S1059, a local search centering on the initial vector of the sub-block selected in S1058 is performed. Then, the matching cost of vector candidates near the initial vector of the sub-block is derived, and the minimum vector is derived as the sub-block motion vector.
 そして、対象ブロックに含まれる全てのサブブロックについて処理が完了すると、パターンマッチベクトル導出処理が終了する。 Then, when the process is completed for all the sub-blocks included in the target block, the pattern match vector derivation process ends.
 なお、初期ベクトルサーチ、ローカルサーチともに、FRUC_MODE==MODE_TMでない場合は、バイラテラルマッチングによってマッチングコストを導出する。また、FRUC_MODE==MODE_TMの場合は、テンプレートマッチングによってマッチングコストを導出する。 Note that, for both initial vector search and local search, if FRUC_MODE == MODE_TM, the matching cost is derived by bilateral matching. If FRUC_MODE == MODE_TM, the matching cost is derived by template matching.
  (画像符号化装置の構成)
 次に、本実施形態に係る画像符号化装置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 (motion vector generation device) 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 prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference 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 those 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 one 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.
 なお、上述した実施形態における画像符号化装置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等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 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, The prediction parameter encoding unit 111 may be realized by 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 a 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 such a case, a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
 〔実施形態2〕
 上述したように、実施形態1では、マージモードによる処理後、BTM処理を1回実行している。BTM処理により導出された動きベクトルは精度が向上しているため、当該動きベクトルから生成される予測画像の精度が上がっている、換言すれば、原画像との差分が小さくなっていると考えられる。よって、BTM処理により導出された動きベクトルから生成された予測画像を新たなテンプレートとし、再度BTM処理を実行すれば、より精度の高い動きベクトルを導出できる可能性がある。そこで、本実施形態では、BTM処理を複数回実行する。
[Embodiment 2]
As described above, in the first embodiment, the BTM process is executed once after the process in the merge mode. Since the accuracy of the motion vector derived by BTM processing is improved, the accuracy of the predicted image generated from the motion vector is increased, in other words, the difference from the original image is considered to be small. . Therefore, if a predicted image generated from a motion vector derived by BTM processing is used as a new template and BTM processing is executed again, a motion vector with higher accuracy may be derived. Therefore, in this embodiment, the BTM process is executed a plurality of times.
 図23は、本実施形態における処理の流れを示すフローチャートである。図23に示すように、本実施形態では、BTM処理部3038は、BTM処理を複数回(図23に示す例では2回)、実行する。 FIG. 23 is a flowchart showing the flow of processing in the present embodiment. As shown in FIG. 23, in this embodiment, the BTM processing unit 3038 executes the BTM processing a plurality of times (twice in the example shown in FIG. 23).
 図23に示すステップS1414aでは、上述した実施形態1と同様のBTM処理を実行する。本実施形態では、その後、ステップS1414bでは、ステップS1414aにおいて導出された動きベクトルを用いて生成された予測画像をテンプレートとし、当該テンプレートを用いて動きベクトルを導出する。これにより、より原画像に近いテンプレートを用いて動きベクトルを導出することができるので、当該動きベクトルを用いて生成される予測画像の精度を向上させることができる。 In step S1414a shown in FIG. 23, the same BTM process as that in the first embodiment is executed. In this embodiment, after that, in step S1414b, the predicted image generated using the motion vector derived in step S1414a is used as a template, and the motion vector is derived using the template. Thereby, since a motion vector can be derived using a template closer to the original image, the accuracy of a predicted image generated using the motion vector can be improved.
  (実施形態2-1)
 上述した実施形態2の方法により、上述した効果を奏するが、BTM処理を複数回実行することにより、実施形態1の方法よりも処理量が増加してしまう。そこで、本実施形態では、BTM処理におけるM画素精度のローカルサーチが終了した時点で、テンプレートを更新し、更新後のテンプレートを用いてN画素精度のローカルサーチを実行する。これにより、実施形態1の方法とローカルサーチの回数は同じまま、より原画像に近いテンプレートを用いて動きベクトルを導出することができる。
Embodiment 2-1
Although the above-described effect is achieved by the method of the second embodiment described above, the processing amount increases as compared to the method of the first embodiment by executing the BTM process a plurality of times. Therefore, in this embodiment, when the M pixel accuracy local search in the BTM process is completed, the template is updated, and the N pixel accuracy local search is executed using the updated template. As a result, the motion vector can be derived using a template closer to the original image while keeping the same number of local searches as the method of the first embodiment.
 図24は、本実施形態における処理の流れを示すフローチャートである。図24に示すように、本実施形態では、BTM処理部3038は、ステップS2301にてM画素精度のローカルサーチを行い、その後、ステップS2302にて、ステップS2301で導出された動きベクトルを用いて生成された予測画像をテンプレートとし、N画素精度のローカルサーチを行う。 FIG. 24 is a flowchart showing the flow of processing in the present embodiment. As shown in FIG. 24, in this embodiment, the BTM processing unit 3038 performs a local search with M pixel accuracy in step S2301, and then generates in step S2302 using the motion vector derived in step S2301. A local search with N pixel accuracy is performed using the predicted image as a template.
 これにより、実施形態1におけるBTM処理(S1414a)と比較して、ローカルサーチの順序は変わるが、回数は変わらないため、処理量の増加を抑制することができる。 Thereby, compared with the BTM processing (S1414a) in the first embodiment, the local search order is changed, but the number of times is not changed, so that an increase in processing amount can be suppressed.
 また、上述した実施形態2の方法と比較しても、処理量を抑制することができる。図25を参照して説明する。図25は、実施形態2における処理の流れと、本実施形態における処理の流れとを示す図である。図25では、実施形態2における処理をステップS1414a、およびステップS1414bで示し、本実施形態における処理をステップS2401、およびステップS2402で示している。図25に示すように、本実施形態では、実施形態2の方法と比較し、M画素精度サーチL0処理、N画素精度サーチL0処理、M画素精度サーチL1処理、N画素精度サーチL1処理の4つの処理分、処理量が少ないので、全体的な処理量を抑制することができる。
 〔実施形態3〕
 上述した実施形態では、マージモードで導出した動きベクトルに対しBTM処理を適用していた。本実施形態では、これとは異なり、またはこれに加え、マッチングモード(S1404:図15)で導出した動きベクトルに対し、BTM処理を適用する。これにより、マッチングモードで導出した動きベクトルについて、精度を向上させることができるので、予測画像の精度を向上させることができる。
In addition, the processing amount can be suppressed as compared with the method of the second embodiment described above. This will be described with reference to FIG. FIG. 25 is a diagram illustrating a processing flow in the second embodiment and a processing flow in the present embodiment. In FIG. 25, the processing in the second embodiment is indicated by steps S1414a and S1414b, and the processing in the present embodiment is indicated by steps S2401 and S2402. As shown in FIG. 25, in the present embodiment, compared with the method of the second embodiment, four of the M pixel accuracy search L0 processing, the N pixel accuracy search L0 processing, the M pixel accuracy search L1 processing, and the N pixel accuracy search L1 processing. Since the processing amount is small for one processing, the overall processing amount can be suppressed.
[Embodiment 3]
In the above-described embodiment, the BTM process is applied to the motion vector derived in the merge mode. In this embodiment, differently or in addition, BTM processing is applied to the motion vector derived in the matching mode (S1404: FIG. 15). Thereby, since the precision can be improved about the motion vector derived | led-out by matching mode, the precision of an estimated image can be improved.
 図26は、本実施形態におけるマッチングモードの処理の流れを示すフローチャートである。図26に示すように、本実施形態では、図15に示したステップS1404のマッチングモードにおいて、TM処理またはBM処理を実行後、BTM処理部3038は、サブブロックについてのみ、BTM処理を実行する(S1404d)。 FIG. 26 is a flowchart showing the flow of processing in the matching mode in the present embodiment. As shown in FIG. 26, in the present embodiment, after executing TM processing or BM processing in the matching mode of step S1404 shown in FIG. 15, the BTM processing unit 3038 executes BTM processing only for sub-blocks ( S1404d).
  (実施形態3-1)(マッチング方法ごとに探索制度を設定)
 上述した実施形態3の方法では、マッチングモードの処理に加え、BTM処理を実行することになるため、処理量が増加する。そこで、本実施形態では、マッチングモードにおける処理における探索精度とBTM処理における探索精度とをそれぞれ設定する。具体的には、例えば、マッチングモードは4画素精度、BTM処理は1画素精度、および1/2画素精度とする。これにより、実施形態1におけるマッチングモードの処理に加え、BTM処理を実行した場合と比較して、探索精度が粗くなっていることにより、マッチングの回数を減少させることができるため、処理量を低減させることができる。
(Embodiment 3-1) (Search system is set for each matching method)
In the method of the third embodiment described above, the BTM process is executed in addition to the matching mode process, so the processing amount increases. Therefore, in this embodiment, the search accuracy in the process in the matching mode and the search accuracy in the BTM process are set. Specifically, for example, the matching mode has a 4-pixel accuracy, the BTM process has a 1-pixel accuracy, and a 1 / 2-pixel accuracy. As a result, in addition to the processing in the matching mode in the first embodiment, the number of times of matching can be reduced because the search accuracy is coarse compared with the case where the BTM processing is executed, thereby reducing the processing amount. Can be made.
 なお、探索精度はこれに限られるものではなく、マッチングモードでは粗い探索を実行し、BTM処理では細かい探索を実行できればよく、例えば、マッチングモードは4画素精度、BTM処理は1画素精度、マッチングモードは1画素精度、BTM処理は1/2画素精度、マッチングモードは1画素精度、BTM処理は1/4画素精度としてもよい。 Note that the search accuracy is not limited to this, and it is only necessary to execute a coarse search in the matching mode and a fine search in the BTM processing. For example, the matching mode has 4 pixel accuracy, the BTM processing has 1 pixel accuracy, and the matching mode. May be 1 pixel accuracy, BTM processing may be 1/2 pixel accuracy, the matching mode may be 1 pixel accuracy, and BTM processing may be 1/4 pixel accuracy.
  (実施形態3-2)(マッチング方法ごとにレベルを設定)
 上述した実施形態3の方法では、マッチングモードの処理に加え、BTM処理を実行することになるため、処理量が増加する。そこで、本実施形態では、マッチング方法ごとにレベル(ブロックレベルまたはサブブロックレベル)を設定する。これにより、当該レベルにおけるマッチング方法が固定されるので、実施形態3の各サブブロックレベルまでマッチングモードの処理、およびBTM処理を行う場合と比較して、処理量を抑制することができる。
(Embodiment 3-2) (Setting a level for each matching method)
In the method of the third embodiment described above, the BTM process is executed in addition to the matching mode process, so the processing amount increases. Therefore, in this embodiment, a level (block level or sub-block level) is set for each matching method. Thereby, since the matching method at the level is fixed, the processing amount can be suppressed as compared with the case where the matching mode process and the BTM process are performed up to each sub-block level in the third embodiment.
 (処理例1)
 マッチング方法ごとに、レベルを設定する例として、ブロックレベルで、マッチングモード(TM、またはBM)による処理を行い、サブブロックレベルでBTM処理を行うことが挙げられる。
(Processing example 1)
As an example of setting the level for each matching method, processing in the matching mode (TM or BM) is performed at the block level, and BTM processing is performed at the sub-block level.
 図27は、処理例1における処理の流れを示すフローチャートである。図27に示すように、処理例1では、マッチング予測部30373は、ステップS1404b’におけるTM処理、またはステップS1404c’におけるBM処理において、ブロックレベルにおけるローカルサーチのみ実行する。また、BTM処理部3038は、ステップS1404dにおけるBTM処理において、サブブロックレベルにおけるローカルサーチのみ実行する。 FIG. 27 is a flowchart showing the flow of processing in Processing Example 1. As illustrated in FIG. 27, in the processing example 1, the matching prediction unit 30373 performs only local search at the block level in the TM processing in step S1404b 'or the BM processing in step S1404c'. Further, the BTM processing unit 3038 executes only local search at the sub-block level in the BTM processing in step S1404d.
 なお、BTM処理部3038によるサブブロックレベルのBTM処理では、テンプレートもサブブロックに分割されたものを使用する。図28を参照して説明する。図28は、BTM処理において、サブブロックレベルのテンプレートを使用する例を説明するための図である。 In the BTM processing at the sub-block level by the BTM processing unit 3038, the template is also divided into sub-blocks. This will be described with reference to FIG. FIG. 28 is a diagram for explaining an example in which a sub-block level template is used in BTM processing.
 対象ブロックにおける各サブブロックについて、対象ブロックに対応するテンプレートにおける、サブブロックに対応する分割部分、すなわち、テンプレート内の座標が、対象ブロックにおけるサブブロックの座標と同じである、テンプレートの当該分割部分を、マッチングに用いるテンプレートとする。そして、当該分割部分をテンプレートして用いて、バイラテラルテンプレートマッチングにより動きベクトルを導出する。 For each sub-block in the target block, the divided part corresponding to the sub-block in the template corresponding to the target block, i.e., the corresponding part of the template whose coordinates in the template are the same as the coordinates of the sub-block in the target block A template used for matching. Then, using the divided portion as a template, a motion vector is derived by bilateral template matching.
 なお、図28において、mvL0、およびmvL1は、TMまたはBMにおけるブロックサーチにより導出された動きベクトルであり、mvL0’、およびmvL1’は、対象サブブロックの動きベクトルである。 In FIG. 28, mvL0 and mvL1 are motion vectors derived by block search in TM or BM, and mvL0 'and mvL1' are motion vectors of the target sub-block.
 これにより、マッチングモードにおけるサブブロックレベルの処理が省略されるため、処理量を低減することができる。 Thereby, processing at the sub-block level in the matching mode is omitted, so that the processing amount can be reduced.
 (処理例2)
 処理例2では、ブロックレベルで、マッチングモード(TM、BM)による処理、およびBTM処理を実行する。
(Processing example 2)
In Processing Example 2, processing in matching mode (TM, BM) and BTM processing are executed at the block level.
 図29は、処理例2における処理の流れを示すフローチャートである。図29に示すように、処理例2では、マッチング予測部30373は、ステップS1404b’におけるTM処理、またはステップS1404c’におけるBM処理において、ブロックレベルにおけるローカルサーチのみ実行する。また、BTM処理部3038は、ステップS1404d’におけるBTM処理において、ブロックレベルにおけるローカルサーチのみ実行する。 FIG. 29 is a flowchart showing the flow of processing in Processing Example 2. As illustrated in FIG. 29, in the processing example 2, the matching prediction unit 30373 performs only a local search at the block level in the TM process in step S1404b 'or the BM process in step S1404c'. Further, the BTM processing unit 3038 executes only a local search at the block level in the BTM processing in step S1404d '.
 これにより、サブブロックレベルの処理が省略されるため、処理量を低減することができる。なお、BTM処理を実施することにより、サブブロックレベルのローカルサーチを行わないことによる精度の低下を抑制できる。 Thereby, processing at the sub-block level is omitted, so that the processing amount can be reduced. Note that by performing the BTM processing, it is possible to suppress a decrease in accuracy due to not performing a sub-block level local search.
 (処理例3)
 処理例3では、ブロックレベルで、マッチングモード(TM、BM)による処理、およびBTM処理を行い、サブブロックレベルで、マッチングモード(TM、BM)による処理を行う。
(Processing example 3)
In Processing Example 3, processing in the matching mode (TM, BM) and BTM processing are performed at the block level, and processing in the matching mode (TM, BM) is performed at the sub-block level.
 図30は、処理例3における処理の流れを示すフローチャートである。図30に示すように、処理例1では、マッチング予測部30373は、ステップS1404b’におけるTM処理、またはステップS1404c’におけるBM処理において、ブロックレベルにおけるローカルサーチを実行する。次に、BTM処理部3038は、ステップS1404d’におけるBTM処理において、ブロックレベルにおけるローカルサーチを実行する。その後、マッチング予測部30373は、ステップS2902におけるTM処理、またはステップS2903におけるBM処理において、サブブロックレベルにおけるローカルサーチを実行する。 FIG. 30 is a flowchart showing the flow of processing in Processing Example 3. As illustrated in FIG. 30, in the processing example 1, the matching prediction unit 30373 performs a local search at the block level in the TM process in step S1404b 'or the BM process in step S1404c'. Next, the BTM processing unit 3038 executes a local search at the block level in the BTM processing in step S1404d '. After that, the matching prediction unit 30373 performs a local search at the sub-block level in the TM process in step S2902 or the BM process in step S2903.
 これにより、BTM処理をサブブロックごとではなく、ブロックレベルで1回実施するのみとなるため、処理量を低減することができる。 This makes it possible to reduce the amount of processing because the BTM processing is performed only once at the block level, not for each sub-block.
 〔実施形態4〕
 上述した実施形態では、マッチングモード(テンプレートマッチング、バイラテラルマッチング)における初期ベクトルの候補は、空間マージ候補、時間マージ候補、結合マージ候補、ゼロベクトル、PUのATMVPベクトル等である。なお、ATMVPベクトルとは、対象ブロックの周囲の動きベクトルと、参照画像の動きベクトルの平均(もしくは加重平均、メジアン)により、導出されるベクトルである。
[Embodiment 4]
In the embodiment described above, initial vector candidates in the matching mode (template matching, bilateral matching) are a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a zero vector, an ATM ATM vector, and the like. The ATMVP vector is a vector derived from the motion vector around the target block and the average (or weighted average, median) of the motion vectors of the reference image.
 したがって、初期ベクトルは限られた候補から選択されるので、初期ベクトルの候補のいずれもが、サーチの中心として適切な位置を示していない場合、選択される初期ベクトルも精度が悪いものとなる。その結果、初期ベクトルから導出される動きベクトルの精度も良くないものになってしまう。 Therefore, since the initial vector is selected from a limited number of candidates, if any of the initial vector candidates does not indicate an appropriate position as the center of the search, the selected initial vector also has poor accuracy. As a result, the accuracy of the motion vector derived from the initial vector is not good.
 そこで、本実施形態では、初期ベクトルの候補を追加する。これにより、初期ベクトルの候補が増えるため、適切な初期ベクトルを選択できる可能性が高まり、最終的に導出される動きベクトルの精度を向上させることができる。 Therefore, in this embodiment, initial vector candidates are added. This increases the number of initial vector candidates, increasing the possibility of selecting an appropriate initial vector and improving the accuracy of the finally derived motion vector.
  (実施形態4-1)
 本実施形態では、バイラテラルマッチング(BM)を行うときに選択される初期ベクトルの候補に、テンプレートマッチング(TM)におけるL0マッチング処理により導出された動きベクトルを加える。テンプレートマッチングにおけるL0マッチング処理により導出された動きベクトルは、既にマッチング処理が実行された結果、導出された動きベクトルであり、初期ベクトルとして適切にサーチの中心を示すものである可能性がある。よって、L0マッチング処理により導出された動きベクトルを、バイラテラルマッチングを行うときの初期ベクトル候補に加えることにより、適切な初期ベクトルを選択できる可能性が高まり、最終的に導出される動きベクトルの精度を向上させることができる。
Embodiment 4-1
In this embodiment, a motion vector derived by the L0 matching process in template matching (TM) is added to the initial vector candidate selected when bilateral matching (BM) is performed. The motion vector derived by the L0 matching process in template matching is a motion vector derived as a result of the execution of the matching process, and may appropriately indicate the center of the search as an initial vector. Therefore, adding the motion vector derived by the L0 matching process to the initial vector candidate when bilateral matching is performed increases the possibility of selecting an appropriate initial vector, and the accuracy of the finally derived motion vector Can be improved.
 図31を参照して、より詳細に説明する。図31は、本実施形態における処理の流れを示すフローチャートである。本実施形態では、マッチング予測部30373は、図3のステップS1404aにおいて、テンプレートマッチングではない判断した場合であっても、まず、テンプレートマッチングの一部の処理を実行する。具体的には、テンプレートを取得し、L0マッチング処理のブロックサーチを実行する(S3001)。すなわち、ブロックレベルの初期ベクトルを選択し、ブロックレベルのローカルサーチを行う。その後、マッチング予測部30373は、バイラテラルマッチング処理を開始し(S1404c)、L0/L1マッチング処理(S3002)におけるブロックサーチにおいて、ステップS3001で実行したブロックサーチの結果を加えたベクトル候補を用いて、初期ベクトルサーチを行う。 This will be described in more detail with reference to FIG. FIG. 31 is a flowchart showing the flow of processing in this embodiment. In the present embodiment, the matching prediction unit 30373 first executes part of the template matching process even if it is determined in step S1404a in FIG. Specifically, a template is acquired and a block search for L0 matching processing is executed (S3001). That is, a block level initial vector is selected and a block level local search is performed. Thereafter, the matching prediction unit 30373 starts the bilateral matching process (S1404c), and in the block search in the L0 / L1 matching process (S3002), using the vector candidate obtained by adding the result of the block search executed in step S3001, Perform an initial vector search.
 そして、選択した初期ベクトルを用いてブロックレベルのローカルサーチを実行し、続いて、サブブロックレベルの初期ベクトルを選択し、サブブロックレベルのローカルサーチを行う。 Then, a block-level local search is executed using the selected initial vector, and then a sub-block level initial vector is selected to perform a sub-block level local search.
 以上が、本実施形態における処理の流れである。 The above is the processing flow in the present embodiment.
 なお、上記では、テンプレートマッチングにおけるL0マッチング処理により導出された動きベクトルをバイラテラルマッチングにおける初期ベクトル候補に加えたが、これに限られず、L1マッチング処理により導出された動きベクトルをバイラテラルマッチングにおける初期ベクトル候補に加えてもよい。 In the above, the motion vector derived by the L0 matching process in the template matching is added to the initial vector candidate in the bilateral matching. However, the present invention is not limited to this, and the motion vector derived by the L1 matching process is the initial in the bilateral matching. You may add to a vector candidate.
  (実施形態4-2)
 本実施形態では、テンプレートマッチング、またはバイラテラルマッチングにおいて、ブロックレベルにおける処理は上述した実施形態1と同様の処理を行い、サブブロックレベルにおける初期ベクトルの選択方法が異なる。
Embodiment 4-2
In the present embodiment, in template matching or bilateral matching, processing at the block level is the same as that in the first embodiment described above, and the initial vector selection method at the sub-block level is different.
 より具体的には、テンプレートマッチング、またはバイラテラルマッチングにおいて、まず、ブロックレベルにおけるテンプレートを取得する。次に、ブロックレベルにおける初期ベクトルを選択し、ブロックレベルにおけるローカルサーチを行う。 More specifically, in template matching or bilateral matching, first, a template at the block level is acquired. Next, an initial vector at the block level is selected, and a local search at the block level is performed.
 次に、サブブロックレベルにおけるテンプレートを取得する。そして、ブロックレベルにおける初期ベクトルを選択するのであるが、本実施形態では、初期ベクトル候補として、ブロックレベルの動きベクトル、ゼロベクトル、コロケートベクトル(中心と右下)、ATMVPベクトル、追加ベクトル候補、上隣接ベクトル、および左隣接ベクトルに加え、隣接するサブブロックの動きベクトルを含める。具体的に図32を参照して説明する。図32は、サブブロックに隣接するサブブロックを説明するための図である。図32に示すサブブロックXにおける動きベクトルを導出するときに、サブブロックXに隣接するサブブロックA、またはサブブロックLにおける動きベクトルmvLXを、サブブロックXにおける初期ベクトル候補に加える。 Next, get a template at the sub-block level. Then, the initial vector at the block level is selected. In this embodiment, the initial vector candidates include block level motion vector, zero vector, collocated vector (center and lower right), ATMVP vector, additional vector candidate, upper In addition to the adjacent vector and the left adjacent vector, the motion vector of the adjacent sub-block is included. This will be specifically described with reference to FIG. FIG. 32 is a diagram for explaining a sub-block adjacent to the sub-block. 32, the motion vector mvLX in the subblock A or the subblock L adjacent to the subblock X is added to the initial vector candidate in the subblock X.
 これにより、初期ベクトル候補が増えるので、適切な初期ベクトル候補を選択できる可能性が高まり、最終的に導出される動きベクトルの精度を向上させることができる。 This increases the number of initial vector candidates, increasing the possibility of selecting an appropriate initial vector candidate and improving the accuracy of the finally derived motion vector.
 その後、マッチングコストが最小となるベクトルを初期ベクトルとして選択する。そして、サブブロックレベルにおいて、初期ベクトルを中心とするローカルサーチにより、サブブロック初期ベクトル付近の候補ベクトルのマッチングコストを導出し、最小となるベクトルを最終的な動きベクトル(サブブロックレベルの動きベクトル)として導出する。 After that, the vector with the lowest matching cost is selected as the initial vector. At the sub-block level, the matching cost of candidate vectors near the sub-block initial vector is derived by local search centering on the initial vector, and the smallest vector is the final motion vector (sub-block level motion vector). Derived as
 〔実施形態5〕
 実施形態1におけるテンプレートマッチングでは、LX(L0またはL1)マッチング処理、およびLY(LXではない方:L1またはL0)マッチング処理の両方とも対象ブロックの上または左に隣接している部分をテンプレートとしていた。この場合、対象ブロックの右下部分はテンプレートとの距離が離れるため、当該テンプレートには当該右下部分の特徴が反映されておらず、適切な動きベクトルを導出することができない可能性がある。
[Embodiment 5]
In the template matching in the first embodiment, the LX (L0 or L1) matching process and the LY (non-LX: L1 or L0) matching process both use the portion adjacent to the upper or left of the target block as a template. . In this case, since the lower right portion of the target block is far from the template, the feature of the lower right portion is not reflected in the template, and there is a possibility that an appropriate motion vector cannot be derived.
 そこで、本実施形態におけるテンプレートマッチングでは、LXマッチング処理で作成された予測画像(予測ブロック)をLYマッチング処理におけるテンプレートとする。これにより、LYマッチング処理で用いられるテンプレートは、対象ブロックと同形状となるため、ブロック全体の特長を反映したテンプレートとなる可能性が高い。そして、当該テンプレートを用いることにより、導出する動きベクトルの精度を高めることができる。 Therefore, in the template matching in this embodiment, a predicted image (predicted block) created by the LX matching process is used as a template in the LY matching process. As a result, the template used in the LY matching process has the same shape as the target block, and therefore, there is a high possibility that the template reflects the features of the entire block. And the precision of the motion vector to derive can be raised by using the said template.
 図33を参照して、具体的に説明する。図33は、本実施形態におけるテンプレートの取得方法を説明するための図であり、(a)は実施形態1におけるテンプレートの取得方法を示す図であり、(b)は本実施形態におけるテンプレートの取得方法を示す図である。 Specific description will be given with reference to FIG. FIG. 33 is a diagram for explaining a template acquisition method according to the present embodiment. FIG. 33A is a diagram illustrating a template acquisition method according to the first embodiment. FIG. 33B is a template acquisition method according to the present embodiment. It is a figure which shows a method.
 図33の(a)に示すように、実施形態1では、対象ブロック(Cur block)の上または左に隣接している部分をテンプレートとしている。これに対し、本実施形態では、図33の(b)に示すように、LXマッチング処理では、実施形態1と同様に対象ブロック(Cur block)の上または左に隣接している部分をテンプレートとし、これにより作成された予測画像(予測ブロック:Pred block)をテンプレートとする。 33 (a), in the first embodiment, a portion adjacent to the upper or left side of the target block (Cur block) is used as a template. On the other hand, in this embodiment, as shown in FIG. 33 (b), in the LX matching process, the portion adjacent to the upper or left side of the target block (Cur block) is used as a template as in the first embodiment. The predicted image (prediction block: Pred block) created in this way is used as a template.
 なお、LXマッチング処理をL0またはL1の何れにするかは、例えば、Ref0とRef1とのうち、POC距離が近い方を選択すればよい。 Note that whether the LX matching process is L0 or L1 may be selected, for example, from Ref0 and Ref1, whichever has a shorter POC distance.
 〔実施形態6〕
  (実施形態6-1)
 テンプレートマッチング(TM)は、双方向にマッチング処理を行う、すなわち、L0マッチング処理およびL1マッチング処理を行う。よって、バイラテラルマッチングと比較した場合、バイラテラルマッチングでは参照画像間におけるマッチング処理は1回のみのため、処理量が増大してしまう。
[Embodiment 6]
Embodiment 6-1
Template matching (TM) performs matching processing in both directions, that is, performs L0 matching processing and L1 matching processing. Therefore, when compared with bilateral matching, the amount of processing increases because bilateral matching involves only one matching process between reference images.
 そこで、本実施形態では、テンプレートマッチングにおけるマッチング処理を1方向に制限することにより、処理量を削減する。 Therefore, in this embodiment, the amount of processing is reduced by limiting the matching processing in template matching to one direction.
 図34を参照して、本実施形態におけるテンプレートマッチング処理の流れを説明する。図34は、本実施形態におけるテンプレートマッチング処理の流れを示す図である。 Referring to FIG. 34, the flow of template matching processing in the present embodiment will be described. FIG. 34 is a diagram showing a flow of template matching processing in the present embodiment.
 図34に示すように、本実施形態におけるテンプレートマッチング処理(S1404b)では、マッチング予測部30373は、テンプレートを取得(S3301)後、マッチング処理を実行する方向(L0またはL1)を選択し(S3302)、選択した方向における参照画像(Ref0またはRef1)とマッチング処理(ブロックサーチ、サブブロックサーチ)を行う(S3303)。これにより、マッチング処理を1方向に制限することができるので、処理量を削減することができる。 As shown in FIG. 34, in the template matching process (S1404b) in this embodiment, the matching prediction unit 30373 acquires a template (S3301), and then selects a direction (L0 or L1) for executing the matching process (S3302). Then, a reference image (Ref0 or Ref1) in the selected direction and matching processing (block search, sub-block search) are performed (S3303). As a result, the matching process can be limited to one direction, so that the processing amount can be reduced.
 マッチング処理を実行する方向は、どのような方法で決めてもよいが、例えば、以下の4つの方法が考えられる。 The direction in which the matching process is executed may be determined by any method. For example, the following four methods are conceivable.
 1つ目として、POC距離が近い方を選択することが考えられる。これは、ブロックレベル初期ベクトルサーチと同様の処理により初期ベクトルを導出し、参照画像Ref0,Ref1を特定して、両者のPOC距離を比較すればよい。2つ目として、隣接ブロックのrefIdxの中央値が示す参照画像を選択することが考えられる。3つ目として、ブロックごとにフラグで指定することが考えられる。この場合、対象ブロックのマッチングモードがテンプレートマッチングであれば、LXを特定するフラグを符号化すればよい。4つ目として、スライスヘッダで参照画像を指定することが考えられる。 First, it is possible to select the one with the shorter POC distance. This can be done by deriving an initial vector by the same process as the block level initial vector search, specifying the reference images Ref0 and Ref1, and comparing the POC distances between them. Second, it is conceivable to select a reference image indicated by the median value of refIdx of adjacent blocks. Third, it is conceivable to specify a flag for each block. In this case, if the matching mode of the target block is template matching, a flag specifying LX may be encoded. As a fourth method, it is conceivable to specify a reference image using a slice header.
 なお、テンプレートマッチング処理を1方向に制限するか、それとも双方向に行うかをフラグによって切り替える構成であってもよい。 It should be noted that a configuration may be employed in which template matching processing is limited to one direction or bidirectionally switched according to a flag.
  (実施形態6-2)
 画像符号化装置11では、インター予測パラメータ符号化部112において、マッチング処理について、テンプレートマッチングかバイラテラルマッチングのどちらを利用するか選択している。このとき精度の高いマッチング方法を選択するために、テンプレートマッチングとバイラテラルマッチングの両方を試し、評価している。したがって、2つのマッチング方法を常に実行するため、処理量が大きい。
Embodiment 6-2
In the image encoding device 11, the inter prediction parameter encoding unit 112 selects whether to use template matching or bilateral matching for matching processing. At this time, in order to select a highly accurate matching method, both template matching and bilateral matching are tried and evaluated. Therefore, the amount of processing is large because the two matching methods are always executed.
 そこで、本実施形態では、対象となるブロックの形状に応じてマッチング方法を制限している。これにより、常に2つのマッチング方法を実行する必要がなくなるため、処理量を削減することができる。 Therefore, in this embodiment, the matching method is limited according to the shape of the target block. As a result, it is not necessary to always execute the two matching methods, and the amount of processing can be reduced.
 図35、36を参照して、具体的に説明する。図35は、実施形態1におけるマッチングモードを決定する処理を説明するための図であり、(a)はパラメータとマッチングモードとの関係を示すテーブルであり、(b)は処理の流れを示すフローチャートの一部である。また、図36は、本実施形態における処理の流れを示すフローチャートである。 Specific description will be given with reference to FIGS. FIG. 35 is a diagram for explaining the processing for determining the matching mode in the first embodiment, (a) is a table showing the relationship between parameters and matching modes, and (b) is a flowchart showing the flow of processing. Is part of. FIG. 36 is a flowchart showing the flow of processing in this embodiment.
 図35の(a)に示すように、実施形態1では、マッチングモードを決定するfruc_mode_idxが2ビットで構成されている。詳細には、fruc_mode_idxは、1ビット目のfruc_mode_idx_prefixと2ビット目のfruc_mode_idx_suffixで構成されている。そして、1ビット目のfruc_mode_idx_prefixがマッチングモードであるか否かを示し、「0」であれば、マッチングモードOFF、「1」であれば、マッチングモードONである。さらに、2ビット目の fruc_mode_idx_suffixがマッチング方法がバイラテラルマッチングとテンプレートマッチングとのどちらであるかを示しており、「0」であればバイラテラルマッチング、「1」であればテンプレートマッチングであることを示している。また、FRUC_MODEに設定されうるMODE_OFF、MODE_BM及びMODE_TMは、それぞれ数値としては「0」、「1」、「2」に対応している。 As shown in FIG. 35 (a), in the first embodiment, fruc_mode_idx for determining the matching mode is composed of 2 bits. Specifically, fruc_mode_idx is composed of fruc_mode_idx_prefix of the first bit and fruc_mode_idx_suffix of the second bit. The first bit fruc_mode_idx_prefix indicates whether or not the matching mode is set. If “0”, the matching mode is OFF. If “1”, the matching mode is ON. Furthermore, fruc_mode_idx_suffix in the second bit indicates whether the matching method is bilateral matching or template matching. If “0”, bilateral matching is indicated, and if “1”, template matching is indicated. Show. Further, MODE_OFF, MODE_BM, and MODE_TM that can be set in FRUC_MODE correspond to numerical values “0”, “1”, and “2”, respectively.
 そして、図35の(b)に示すように、インター予測パラメータ復号制御部3031は、以下の流れでfruc_mode_idxの復号処理を実行する。すなわち、fruc_mode_idxの復号処理(S1402)では、まず、マッチングモードを行うか否かを示すオンオフフラグfruc_mode_idx_prefixが復号され(S3401)、fruc_mode_idx_prefixが「1」であれば(S3402でYES)、ステップS3403に進みマッチングモードの種類を示すフラグfruc_mode_idx_suffixが復号される(S3403)。そしてステップS3404に進む。一方、fruc_mode_idx_prefixが「1」でなければ(S3402でNO)、そのままステップS3404に進む。 And as shown in (b) of Drawing 35, inter prediction parameter decoding control part 3031 performs decoding processing of fruc_mode_idx with the following flows. That is, in the fruc_mode_idx decoding process (S1402), the on / off flag fruc_mode_idx_prefix indicating whether or not to perform the matching mode is first decoded (S3401). If fruc_mode_idx_prefix is “1” (YES in S3402), the process proceeds to step S3403. The flag fruc_mode_idx_suffix indicating the type of matching mode is decoded (S3403). Then, the process proceeds to step S3404. On the other hand, if fruc_mode_idx_prefix is not “1” (NO in S3402), the process directly proceeds to step S3404.
 ステップS3404では、復号されたfruc_mode_idx_prefixおよびfruc_mode_idx_suffixを用いてマッチングモードが決定される。具体的には、fruc_mode_idx_prefixとfruc_mode_idx_suffixを加算した値をFRUC_MODE(frac_mode_idx)に設定する。fruc_mode_idx_suffixの初期値は「0」であるとし、fruc_mode_idx_prefixがマッチングモードを行わないことを示す「0」の場合には、FRUC_MODEには「0」が、即ち、「0」に対応するMODE_OFFが設定される。fruc_mode_idx_prefixがマッチングモードを行うことを示す値「1」である場合には、fruc_mode_idx_suffixに応じて、マッチングモードの種類(MODE_BMor MODE_TM)が決定される。ここでは、fruc_mode_idx_prefixが「1」であり、fruc_mode_idx_suffixが「0」の場合には、FRUC_MODEには「1」が、即ち、「1」に対応するMODE_BMが設定される。fruc_mode_idx_prefixが「1」であり、fruc_mode_idx_suffixが「1」の場合には、FRUC_MODEには「2」が、即ち、「2」に対応するMODE_TMが設定される。 In step S3404, the matching mode is determined using the decrypted fruc_mode_idx_prefix and fruc_mode_idx_suffix. Specifically, a value obtained by adding fruc_mode_idx_prefix and fruc_mode_idx_suffix is set in FRUC_MODE (frac_mode_idx). The initial value of fruc_mode_idx_suffix is “0”. When fruc_mode_idx_prefix is “0” indicating that the matching mode is not performed, “0” is set in FRUC_MODE, that is, MODE_OFF corresponding to “0” is set. The When fruc_mode_idx_prefix is a value “1” indicating that the matching mode is performed, the type of the matching mode (MODE_BMor MODE_TM) is determined according to fruc_mode_idx_suffix. Here, when fruc_mode_idx_prefix is “1” and fruc_mode_idx_suffix is “0”, “1” is set in FRUC_MODE, that is, MODE_BM corresponding to “1” is set. When fruc_mode_idx_prefix is “1” and fruc_mode_idx_suffix is “1”, “2” is set in FRUC_MODE, that is, MODE_TM corresponding to “2” is set.
 これに対し、本実施形態では、対象ブロックの形状に応じて、マッチング方法を制限する。例えば、対象ブロックの形状が長方形の場合には、テンプレートマッチングしか使用しない、換言すれば、バイラテラルマッチングを禁止する。 In contrast, in this embodiment, the matching method is limited according to the shape of the target block. For example, when the shape of the target block is rectangular, only template matching is used, in other words, bilateral matching is prohibited.
 図36を参照して、対象ブロックの形状が長方形の場合には、テンプレートマッチングしか使用しない例における処理の流れを説明する。図36に示すように、本実施形態では、インター予測パラメータ復号制御部3031は、以下の流れでfruc_mode_idxの復号処理を実行する。すなわち、fruc_mode_idxの復号処理(S1402)では、まず、fruc_mode_idx_prefixが復号され(S3401)、fruc_mode_idx_prefixが「1」であれば(S3402でYES)、ステップS3501に進み、対象ブロックが正方形か否か、すなわち対象ブロックの幅と高さが同じか否かを判定する(S3501)。対象ブロックが正方形であれば(S3501でYES)、ステップS3403に進みfruc_mode_idx_suffixが復号される(S3403)。そしてステップS3404に進む。一方、fruc_mode_idx_prefixが「1」でなければ(S3402でNO)、そのままステップS3404に進む。 36, the flow of processing in an example in which only template matching is used when the shape of the target block is rectangular will be described. As illustrated in FIG. 36, in the present embodiment, the inter prediction parameter decoding control unit 3031 performs fruc_mode_idx decoding processing according to the following flow. That is, in the fruc_mode_idx decoding process (S1402), first, fruc_mode_idx_prefix is decoded (S3401), and if fruc_mode_idx_prefix is “1” (YES in S3402), the process proceeds to step S3501, whether the target block is a square, ie, the target It is determined whether the width and height of the block are the same (S3501). If the target block is a square (YES in S3501), the process proceeds to step S3403 and fruc_mode_idx_suffix is decoded (S3403). Then, the process proceeds to step S3404. On the other hand, if fruc_mode_idx_prefix is not “1” (NO in S3402), the process directly proceeds to step S3404.
 ステップS3404では、復号されたfruc_mode_idx_prefixおよびfruc_mode_idx_suffixを用いてマッチングモードが決定される。 In step S3404, the matching mode is determined using the decrypted fruc_mode_idx_prefix and fruc_mode_idx_suffix.
 また、ステップS3501で、対象ブロックが正方形でなければ(S3501でNO)、ステップS3502に進み、マッチング方法としてテンプレートマッチングが選択される(S3502)。 If it is determined in step S3501 that the target block is not square (NO in S3501), the process proceeds to step S3502, and template matching is selected as a matching method (S3502).
 以上のように、本実施形態では、対象ブロックの形状によってマッチング方法が決まるため、エンコーダ側(画像符号化装置11)では1通りのマッチング方法のみを試すのみでよくなり、2通りのマッチング方法を試す場合と比較して処理量が低減される。また、対称ブロックの形状が、マッチング方法が制限されるブロック形状の場合には、フラックモードインデックスfruc_mode_idxのとりうる値も、3通りから、マッチングをするかしないかの2通りになるため、符号量を削減することができる。 As described above, in this embodiment, since the matching method is determined by the shape of the target block, it is only necessary to try one matching method on the encoder side (image encoding device 11), and two matching methods are used. The amount of processing is reduced compared to the case of trying. Also, when the shape of the symmetric block is a block shape for which the matching method is limited, the possible value of the flack mode index fruc_mode_idx is also changed from three types to two types of matching or not. Can be reduced.
  (実施形態6-3)
 上述した実施形態1では、画像復号装置31のマッチング予測部30373におけるマッチング処理で、ブロックレベル、およびサブブロックレベルのローカルサーチを実行している。このローカルサーチの処理を省略できれば、処理量を削減することができる。そこで、本実施形態では、一部のローカルサーチを省略することにより処理量を削減する。
Embodiment 6-3
In the first embodiment described above, the local search at the block level and the sub-block level is performed in the matching process in the matching prediction unit 30373 of the image decoding device 31. If this local search process can be omitted, the amount of processing can be reduced. Therefore, in this embodiment, the processing amount is reduced by omitting some local searches.
   (実施例1)
 本実施例では、マッチング予測部30373は、テンプレートマッチングを実行する場合、サブブロックサーチを省略し、ブロックサーチのみ実行する。
Example 1
In this embodiment, the matching prediction unit 30373 omits the sub-block search and executes only the block search when executing template matching.
 図37を参照して実施例1における処理の流れを説明する。図37は、本実施形態における処理例1の処理の流れを示すフローチャートである。図37では、マッチング予測部30373によって実行されるマッチング処理(テンプレートマッチング処理、またはバイラテラルマッチング処理)における処理の流れを示している。 The flow of processing in the first embodiment will be described with reference to FIG. FIG. 37 is a flowchart showing a process flow of process example 1 in the present embodiment. FIG. 37 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
 図37に示すように、本実施例では、ブロックサーチの処理(S1051~S1054)は、実施形態1と同様である。そして、ブロックサーチ終了後、マッチング予測部30373は、マッチング方法がテンプレートマッチングでないか否かを判定し(S3601)、テンプレートマッチングであれば(S3601でNO)、サブブロックサーチを行わず、マッチング処理を終了する。一方、テンプレートマッチングでなければ(S3601でYES)、実施形態1と同様のサブブロックサーチを実行する(S1055~S1060)。 As shown in FIG. 37, in this embodiment, the block search processing (S1051 to S1054) is the same as that of the first embodiment. After the block search, the matching prediction unit 30373 determines whether or not the matching method is template matching (S3601). If it is template matching (NO in S3601), the subblock search is not performed and the matching process is performed. finish. On the other hand, if it is not template matching (YES in S3601), the same sub-block search as that of the first embodiment is executed (S1055 to S1060).
 これにより、テンプレートマッチングの場合は、サブブロックサーチを省略できるので、処理量を低減することができる。 Thus, in the case of template matching, the sub-block search can be omitted, so that the processing amount can be reduced.
   (実施例2)
 本実施例では、マッチング予測部30373は、バイラテラルマッチングを実行する場合、ブロックサーチおよびサブブロックサーチの両方のローカルサーチを省略し、初期ベクトルサーチのみ実行する。
(Example 2)
In the present embodiment, when executing bilateral matching, the matching prediction unit 30373 omits both local search for block search and sub-block search, and executes only initial vector search.
 図38を参照して実施例2における処理の流れを説明する。図38は、本実施形態における処理例2の処理の流れを示すフローチャートである。図38では、マッチング予測部30373によって実行されるマッチング処理(テンプレートマッチング処理、またはバイラテラルマッチング処理)における処理の流れを示している。 The processing flow in the second embodiment will be described with reference to FIG. FIG. 38 is a flowchart showing a process flow of process example 2 in the present embodiment. FIG. 38 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
 図38に示すように、本実施例では、ブロックレベルの初期ベクトルサーチ終了後(S1053後)、マッチング予測部30373は、マッチング方法がテンプレートマッチングか否かを判定し(S3701)、テンプレートマッチングであれば(S3701でYES)、ステップS1054に進みブロックレベルのローカルサーチを実行する(S1054)。一方、テンプレートマッチングでなければ(S3701でNO)、ブロックサーチは終了しサブブロックサーチへと進む。すなわち、バイラテラルマッチングであれば、ブロックレベルのローカルサーチは実行しない。 As shown in FIG. 38, in this embodiment, after the end of the block-level initial vector search (after S1053), the matching prediction unit 30373 determines whether or not the matching method is template matching (S3701). If YES in step S3701, the process advances to step S1054 to execute a block-level local search (S1054). On the other hand, if it is not template matching (NO in S3701), the block search ends and proceeds to the sub-block search. That is, if it is bilateral matching, the block level local search is not executed.
 そして、サブブロックサーチにおいても、サブブロックレベルの初期ベクトルサーチ終了後(S1058後)、マッチング予測部30373は、マッチング方法がテンプレートマッチングか否かを判定し(S3702)、テンプレートマッチングであれば(S3702でYES)、ステップS1059に進みサブブロックレベルのローカルサーチを実行する(S1059)。一方、テンプレートマッチングでなければ(S3702でNO)、ステップS1060へと進む。すなわち、バイラテラルマッチングであれば、サブブロックレベルのローカルサーチは実行しない。 Also in the sub-block search, after the sub-block level initial vector search is completed (after S1058), the matching prediction unit 30373 determines whether or not the matching method is template matching (S3702), and if it is template matching (S3702). In step S1059, the local search at the sub-block level is executed (S1059). On the other hand, if it is not template matching (NO in S3702), the process proceeds to step S1060. That is, if it is bilateral matching, the local search at the sub-block level is not executed.
 これにより、バイラテラルマッチングの場合は、ブロックレベルのローカルサーチおよびサブブロックレベルのローカルサーチを省略できるので、処理量を低減することができる。 Thereby, in the case of bilateral matching, the local search at the block level and the local search at the sub-block level can be omitted, so that the processing amount can be reduced.
   (実施例3)
 本実施例では、マッチング予測部30373は、テンプレートマッチングおよびバイラテラルマッチングの何れを実行する場合でも、サブブロックレベルのローカルサーチを省略する。
(Example 3)
In the present embodiment, the matching prediction unit 30373 omits the sub-block level local search regardless of whether template matching or bilateral matching is executed.
 図39を参照して実施例3における処理の流れを説明する。図39は、本実施形態における処理例3の処理の流れを示すフローチャートである。図39では、マッチング予測部30373によって実行されるマッチング処理(テンプレートマッチング処理、またはバイラテラルマッチング処理)における処理の流れを示している。 The flow of processing in the third embodiment will be described with reference to FIG. FIG. 39 is a flowchart showing a process flow of process example 3 in the present embodiment. FIG. 39 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
 図39に示すように、本実施例では、ブロックサーチの処理(S1051~S1054)は、実施形態1と同様である。そして、サブブロックサーチでは、サブブロックレベルのローカルサーチを実行しない。すなわち、ステップS1058におけるサブブロックレベルの初期ベクトルサーチ終了後、ステップS1060に進む。換言すれば、実施形態1のサブブロックサーチにおけるステップS1059のサブブロックレベルのローカルサーチを実行しない。 As shown in FIG. 39, in this embodiment, the block search process (S1051 to S1054) is the same as that of the first embodiment. In the sub-block search, a sub-block level local search is not executed. That is, after the sub-block level initial vector search in step S1058 is completed, the process proceeds to step S1060. In other words, the local search at the sub-block level in step S1059 in the sub-block search of the first embodiment is not executed.
 これにより、テンプレートマッチングおよびバイラテラルマッチングにおいて、サブブロックレベルのローカルサーチを省略できるので、処理量を低減することができる。 Thereby, the local search at the sub-block level can be omitted in the template matching and bilateral matching, so that the processing amount can be reduced.
   (実施例4)
 本実施例は、実施例1と実施例3を組み合わせた構成である。本実施例のマッチング予測部30373は、実施例1と同様、テンプレートマッチングの場合にサブブロックサーチを行わず、マッチング処理を終了する。また、本実施例のマッチング予測部30373は、バイラテラルマッチングの場合には、実施形態3と同様、サブブロックレベルのローカルサーチを省略する。
Example 4
The present embodiment is a combination of the first embodiment and the third embodiment. Similar to the first embodiment, the matching prediction unit 30373 of the present embodiment does not perform a sub-block search in the case of template matching, and ends the matching process. Also, in the case of bilateral matching, the matching prediction unit 30373 of the present embodiment omits the sub-block level local search as in the third embodiment.
 図40を参照して実施例4における処理の流れを説明する。図40は、本実施形態における処理例4の処理の流れを示すフローチャートである。図40では、マッチング予測部30373によって実行されるマッチング処理(テンプレートマッチング処理、またはバイラテラルマッチング処理)における処理の流れを示している。 The flow of processing in the fourth embodiment will be described with reference to FIG. FIG. 40 is a flowchart illustrating a process flow of Process Example 4 in the present embodiment. FIG. 40 shows a flow of processing in matching processing (template matching processing or bilateral matching processing) executed by the matching prediction unit 30373.
 図40に示すように、本実施例では、ブロックサーチの処理(S1051~S1054)は、実施形態1と同様である。そして、ブロックサーチ終了後、マッチング予測部30373は、マッチング方法がテンプレートマッチングでないか否かを判定し、テンプレートマッチングであれば、サブブロックサーチを行わず、マッチング処理を終了する。一方、テンプレートマッチングでなければ、初期ベクトルサーチのみを行い、サブブロックレベルのローカルサーチを実行しない。箇条書きで示すと以下の処理をする。 As shown in FIG. 40, in this embodiment, the block search processing (S1051 to S1054) is the same as that of the first embodiment. Then, after the block search ends, the matching prediction unit 30373 determines whether the matching method is not template matching, and if it is template matching, does not perform the sub-block search and ends the matching process. On the other hand, if it is not template matching, only the initial vector search is performed, and the sub-block level local search is not performed. The following processing is performed in the form of bullets.
 (FRUC_MODE == MODE_TMの場合)
 ブロックサーチ(テンプレート取得S1052、ブロックレベル初期ベクトルサーチS1053、ブロックレベルローカルサーチS1054)
→終了
 (FRUC_MODE == MODE_BMの場合)
 ブロックサーチ(ブロックレベル初期ベクトルサーチS1053、ブロックレベルローカルサーチS1054)
→サブブロックサーチ(初期ベクトルサーチS1058)
 これにより、テンプレートマッチングのサブブロックサーチ、および、バイラテラルマッチングのサブブロックレベルのローカルサーチを省略できるので、処理量を低減することができる。
(When FRUC_MODE == MODE_TM)
Block search (template acquisition S1052, block level initial vector search S1053, block level local search S1054)
→ End (when FRUC_MODE == MODE_BM)
Block search (block level initial vector search S1053, block level local search S1054)
→ Sub-block search (initial vector search S1058)
Thereby, the sub-block search for template matching and the local search at the sub-block level for bilateral matching can be omitted, so that the processing amount can be reduced.
 〔付記事項〕
 また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
[Additional Notes]
Moreover, you may implement | achieve part or all of the image coding apparatus 11 in the embodiment mentioned above, and the image decoding apparatus 31 as integrated circuits, such as 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. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in 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 example]
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を、動画像の送信及び受信に利用できることを、図41を参照して説明する。 First, it will be described with reference to FIG. 41 that the image encoding device 11 and the image decoding device 31 described above can be used for transmission and reception of moving images.
 図41の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図41の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。 41 (a) is a block diagram showing a configuration of a transmission apparatus PROD_A in which the image encoding apparatus 11 is mounted. As illustrated in (a) of FIG. 41, 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を更に備えていてもよい。図41の(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. 41A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but a part of the configuration 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.
 図41の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図41の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。 41 (b) is a block diagram illustrating a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted. As shown in FIG. 41 (b), 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を更に備えていてもよい。図41の(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. 41B, 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を、動画像の記録及び再生に利用できることを、図42を参照して説明する。 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.
 図42の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図42の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。 42 (a) is a block diagram illustrating a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted. As shown in (a) of FIG. 42, the recording apparatus PROD_C includes 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(HardDisk 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 (HardDisk Drive) or SSD (Solid State Drive), or (2) SD memory card. Or a type connected to the recording device PROD_C, such as a USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registered trademark) ) And the like may be loaded into a drive device (not shown) built in the recording device PROD_C.
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図42の(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. 42A 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 DiskDrive)レコーダなどが挙げられる(この場合、入力端子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, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit 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 receiving unit PROD_C5 is a main source of moving images).
 図42の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロック図である。図42の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。 42 (b) is a block diagram showing a configuration of a playback device PROD_D equipped with the image decoding device 31 described above. As shown in (b) of FIG. 42, the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written on 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を更に備えていてもよい。図42の(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. 42B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but a part of the configuration 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(ReadOnly Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。 In the latter case, each of the above devices stores a CPU that executes instructions of a program that realizes each function, a ROM (ReadOnly 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 is provided. The object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner. 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 andProgrammable 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) Logic circuits such as FPGA and Field (Programmable Gate) Array can be used.
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/CableTelevision)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and ElectronicEngineers)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 of the above devices 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, the Internet, Intranet, Extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / CableTelevision) communication network, Virtual Private Network (Virtual Private Network) ), Telephone line networks, mobile communication networks, satellite communication networks, 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) and remote control, Wireless such as 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, digital terrestrial broadcasting network, etc. But it is available. 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年12月15日に出願された特願2016-243700に対して優先権の利益を主張するものであり、当該出願を参照することにより、その内容の全てが本書に含まれる。
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 Japanese Patent Application No. 2016-243700 filed on December 15, 2016, and the entire contents of this application are hereby incorporated by reference. .
11 画像符号化装置(動画像符号化装置、予測画像生成装置)
31 画像復号装置(動画像復号装置、予測画像生成装置)
112 インター予測パラメータ符号化部(動きベクトル生成装置)
303 インター予測パラメータ復号部(動きベクトル生成装置)
3036 マージ予測パラメータ導出部(マージ処理部)
3038 BTM処理部
30373 マッチング予測部(第1の動きベクトル探索部、第2の動きベクトル探索部)
11 Image coding device (moving image coding device, predicted image generation device)
31 Image decoding device (moving image decoding device, predicted image generation device)
112 Inter prediction parameter encoding unit (motion vector generation device)
303 Inter prediction parameter decoding unit (motion vector generation device)
3036 Merge prediction parameter derivation unit (merge processing unit)
3038 BTM processing unit 30373 Matching prediction unit (first motion vector search unit, second motion vector search unit)

Claims (21)

  1.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マージ処理により予測ブロックごとに動きベクトルを導出するマージ処理部と、
     上記マージ処理部において導出された上記動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチング(BTM)を用いてマッチング処理を実行し、上記動きベクトルを修正するBTM処理部と、を備え、
     上記BTM処理部は、上記バイラテラルテンプレートマッチングを複数回、行って上記マッチング処理を実行することを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A merge processing unit for deriving a motion vector for each prediction block by merge processing;
    A prediction block generated from the motion vector derived in the merge processing unit as a template, bilateral template matching (BTM) is used to perform a matching process, and the BTM processing unit corrects the motion vector, and
    The BTM processing unit performs the matching process by performing the bilateral template matching a plurality of times.
  2.  上記BTM処理部は、1回目のバイラテラルテンプレートマッチングの結果、修正された動きベクトルから生成した予測ブロックをテンプレートとして2回目のバイラテラルテンプレートマッチングを行うことを特徴とする請求項1に記載の動きベクトル生成装置。 The motion according to claim 1, wherein the BTM processing unit performs the second bilateral template matching using a prediction block generated from the modified motion vector as a template as a result of the first bilateral template matching. Vector generator.
  3.  上記BTM処理部は、バイラテラルテンプレートマッチングにより、動きベクトルを探索する場合、探索精度を異ならせて複数回の探索を実行するものであり、2回目の上記探索を実行するとき、1回目の探索により修正された動きベクトルから生成した予測ブロックをテンプレートとすることを特徴とする請求項1に記載の動きベクトル生成装置。 When searching for a motion vector by bilateral template matching, the BTM processing unit executes a plurality of searches with different search accuracy. When the second search is executed, the first search is performed. The motion vector generation apparatus according to claim 1, wherein a prediction block generated from the motion vector corrected by the step is used as a template.
  4.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     第1のマッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、第2のマッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部により探索された動きベクトル、または、上記第2の動きベクトル探索部により探索された動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチング(BTM)を用いて第3のマッチング処理を実行し、上記動きベクトルを修正するBTM処理部をさらに備えていることを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by the first matching process;
    A second motion vector for searching for a motion vector by a second matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit A search unit,
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    Using the bilateral template matching (BTM) using the motion vector searched by the first motion vector search unit or the prediction block generated from the motion vector searched by the second motion vector search unit as a template A motion vector generation apparatus further comprising a BTM processing unit that executes a third matching process and corrects the motion vector.
  5.  上記BTM処理部による探索精度は、上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部による探索精度よりも高いことを特徴とする請求項4に記載の動きベクトル生成装置。 The motion vector generation apparatus according to claim 4, wherein the search accuracy by the BTM processing unit is higher than the search accuracy by the first motion vector search unit and the second motion vector search unit.
  6.  上記第1の動きベクトル探索部は、テンプレートマッチングまたはバイラテラルマッチングを用いて上記第1のマッチング処理を実行し、
     上記BTM処理部は、上記第1の動きベクトル探索部により探索された動きベクトルから生成した予測ブロックをテンプレートとして、上記サブブロックの各々についてバイラテラルテンプレートマッチングを用いて上記第3のマッチング処理を実行し、上記動きベクトルを修正することを特徴とする請求項4または5に記載の動きベクトル生成装置。
    The first motion vector search unit performs the first matching process using template matching or bilateral matching,
    The BTM processing unit executes the third matching process using bilateral template matching for each of the sub-blocks using the prediction block generated from the motion vector searched by the first motion vector search unit as a template. The motion vector generation apparatus according to claim 4, wherein the motion vector is corrected.
  7.  上記第1の動きベクトル探索部は、テンプレートマッチングまたはバイラテラルマッチングを用いて上記第1のマッチング処理を実行し、
     上記BTM処理部は、上記第1の動きベクトル探索部により探索された動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチングを用いて予測ブロックに関する上記第3のマッチング処理を実行し、
     上記第2の動きベクトル探索部は、上記BTM処理部により修正された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、上記第2のマッチング処理により動きベクトルを探索することを特徴とする請求項4または5に記載の動きベクトル生成装置。
    The first motion vector search unit performs the first matching process using template matching or bilateral matching,
    The BTM processing unit performs the third matching process on the prediction block using bilateral template matching with the prediction block generated from the motion vector searched by the first motion vector search unit as a template,
    The second motion vector search unit refers to the motion vector corrected by the BTM processing unit, and obtains a motion vector for each of a plurality of sub-blocks included in the prediction block by the second matching process. 6. The motion vector generation apparatus according to claim 4, wherein a search is performed.
  8.  上記第1の動きベクトル探索部は、テンプレートマッチングまたはバイラテラルマッチングを用いて上記第1のマッチング処理を実行し、
     上記BTM処理部は、上記第1の動きベクトル探索部により探索された動きベクトルから生成した予測ブロックをテンプレートとして、バイラテラルテンプレートマッチングを用いて予測ブロックに関する上記第3のマッチング処理を実行することを特徴とする請求項4または5に記載の動きベクトル生成装置。
    The first motion vector search unit performs the first matching process using template matching or bilateral matching,
    The BTM processing unit performs the third matching process on the prediction block using bilateral template matching using the prediction block generated from the motion vector searched by the first motion vector search unit as a template. The motion vector generation device according to claim 4 or 5, characterized in that
  9.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部は、バイラテラルマッチングを実行する場合、テンプレートマッチングにより得られた動きベクトルを当該バイラテラルマッチングにおける初期ベクトル候補に加えて、上記初期ベクトル探索を行うことを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    When performing bilateral matching, the first motion vector search unit performs the initial vector search by adding a motion vector obtained by template matching to an initial vector candidate in the bilateral matching. Motion vector generator.
  10.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、対象となるサブブロックの上または左に隣接しているサブブロックの動きベクトルを初期ベクトル候補に加えて、上記初期ベクトル探索を行うことを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    The second motion vector search unit performs the initial vector search by adding the motion vector of the sub-block adjacent to the top or left of the target sub-block to the initial vector candidate. Generator.
  11.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、
    を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、参照ピクチャのうちの1つとのマッチング処理の結果から作成した予測ブロックをテンプレートとして他の1つの参照ピクチャとのマッチング処理を実行することを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; ,
    With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    When the template matching is performed, the first motion vector search unit and the second motion vector search unit use the prediction block created from the result of the matching process with one of the reference pictures as a template. A motion vector generation device that performs matching processing with two reference pictures.
  12.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、1つの参照ピクチャとのマッチング処理のみ実行することを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    The first motion vector search unit and the second motion vector search unit, when executing template matching, execute only matching processing with one reference picture.
  13.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、上記予測ブロックの形状に応じてテンプレートマッチングまたはバイラテラルマッチングを用いてマッチング処理を実行することを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    The first motion vector search unit and the second motion vector search unit execute a matching process using template matching or bilateral matching according to the shape of the prediction block. apparatus.
  14.  動画像の符号化または復号に用いられる予測画像を生成するために参照される動きベクトルを生成する動きベクトル生成装置において、
     マッチング処理により予測ブロック毎に動きベクトルを探索する第1の動きベクトル探索部と、
     上記第1の動きベクトル探索部により選択された動きベクトルを参照して、上記予測ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルを探索する第2の動きベクトル探索部と、を備え、
     上記第1の動きベクトル探索部は、予測ブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第2の動きベクトル探索部は、サブブロックに関する初期ベクトル探索を行ったうえで、局所的探索を行うことにより動きベクトルを探索するものであり、
     上記第1の動きベクトル探索部、および上記第2の動きベクトル探索部は、テンプレートマッチングおよびバイラテラルマッチングの何れを用いるかに応じて、初期ベクトル探索、および局所的探索を実行することを特徴とする動きベクトル生成装置。
    In a motion vector generation device that generates a motion vector referred to in order to generate a predicted image used for encoding or decoding a moving image,
    A first motion vector search unit that searches for a motion vector for each prediction block by matching processing;
    A second motion vector search unit that searches for a motion vector by a matching process for each of a plurality of sub-blocks included in the prediction block with reference to the motion vector selected by the first motion vector search unit; With
    The first motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a prediction block,
    The second motion vector search unit searches for a motion vector by performing a local search after performing an initial vector search for a sub-block,
    The first motion vector search unit and the second motion vector search unit execute an initial vector search and a local search depending on whether template matching or bilateral matching is used. Motion vector generating device.
  15.  上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、動きベクトルを探索する処理を実行しないことを特徴とする請求項14に記載の動きベクトル生成装置。 15. The motion vector generation device according to claim 14, wherein the second motion vector search unit does not execute a process of searching for a motion vector when executing template matching.
  16.  上記第1の動きベクトル探索部は、バイラテラルマッチングを実行する場合、上記初期ベクトル探索のみを実行して動きベクトルの探索を行い、
     上記第2の動きベクトル探索部は、バイラテラルマッチングを実行する場合、上記初期ベクトル探索のみを実行して動きベクトルの探索を行うことを特徴とする請求項14に記載の動きベクトル生成装置。
    When performing the bilateral matching, the first motion vector search unit performs a motion vector search by executing only the initial vector search,
    15. The motion vector generation apparatus according to claim 14, wherein, when performing bilateral matching, the second motion vector search unit performs motion vector search by executing only the initial vector search.
  17.  上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、動きベクトルを探索する処理を実行せず、バイラテラルマッチングを実行する場合、上記初期ベクトル探索のみを実行して動きベクトルの探索を行うことを特徴とする請求項14に記載の動きベクトル生成装置。 When executing template matching, the second motion vector search unit does not execute the process of searching for a motion vector, and when executing bilateral matching, executes only the initial vector search and searches for a motion vector. The motion vector generation device according to claim 14, wherein the motion vector generation device performs the motion vector generation.
  18.  上記第2の動きベクトル探索部は、テンプレートマッチングを実行する場合、動きベクトルを探索する処理を実行せず、バイラテラルマッチングを実行する場合、上記初期ベクトル探索のみを実行して動きベクトルの探索を行うことを特徴とする請求項14に記載の動きベクトル生成装置。 When executing template matching, the second motion vector search unit does not execute the process of searching for a motion vector, and when executing bilateral matching, executes only the initial vector search and searches for a motion vector. The motion vector generation device according to claim 14, wherein the motion vector generation device performs the motion vector generation.
  19.  請求項1~18の何れか1項に記載の動きベクトル生成装置を備え、
     上記動きベクトル生成装置によって生成された動きベクトルを参照して予測画像を生成する予測画像生成装置。
    A motion vector generation device according to any one of claims 1 to 18,
    A predicted image generation device that generates a predicted image with reference to a motion vector generated by the motion vector generation device.
  20.  請求項19に記載の予測画像生成装置を備え、
     上記予測画像に対して、残差画像を加算または減算することによって符号化対象画像を復元することを特徴とする動画像復号装置。
    A prediction image generation device according to claim 19,
    A moving picture decoding apparatus, wherein an encoding target picture is restored by adding or subtracting a residual picture to the predicted picture.
  21.  請求項19に記載の予測画像生成装置を備え、
     上記予測画像と符号化対象画像との残差を符号化することを特徴とする動画像符号化装置。
    A prediction image generation device according to claim 19,
    A moving picture coding apparatus, characterized by coding a residual between the predicted picture and a picture to be coded.
PCT/JP2017/040838 2016-12-15 2017-11-14 Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device WO2018110180A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016243700 2016-12-15
JP2016-243700 2016-12-15

Publications (1)

Publication Number Publication Date
WO2018110180A1 true WO2018110180A1 (en) 2018-06-21

Family

ID=62558693

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/040838 WO2018110180A1 (en) 2016-12-15 2017-11-14 Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device

Country Status (1)

Country Link
WO (1) WO2018110180A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019049684A1 (en) * 2017-09-08 2019-03-14 ソニー株式会社 Image processing device and method
WO2020059459A1 (en) * 2018-09-21 2020-03-26 Kddi株式会社 Image decoding device, image encoding device, image processing system, and program
JP7026286B1 (en) 2018-09-21 2022-02-25 Kddi株式会社 Image decoding device, image coding device, image processing system and program
CN114374850A (en) * 2018-07-01 2022-04-19 北京字节跳动网络技术有限公司 Method, device and storage medium for efficient affine Merge motion vector derivation
JP2022078071A (en) * 2021-11-10 2022-05-24 Kddi株式会社 Image decoder, image encoder, image processing system and program
WO2024074094A1 (en) * 2022-10-05 2024-04-11 Mediatek Inc. Inter prediction in video coding

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016160608A1 (en) * 2015-03-27 2016-10-06 Qualcomm Incorporated Motion vector derivation in video coding
WO2017036414A1 (en) * 2015-09-02 2017-03-09 Mediatek Inc. Method and apparatus of decoder side motion derivation for video coding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016160608A1 (en) * 2015-03-27 2016-10-06 Qualcomm Incorporated Motion vector derivation in video coding
WO2017036414A1 (en) * 2015-09-02 2017-03-09 Mediatek Inc. Method and apparatus of decoder side motion derivation for video coding

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIANLE CHEN ET AL.: "Algorithm Description of Joint Exploration Test Model 4", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-D1001_V3, 4TH MEETING, November 2016 (2016-11-01), Chengdu, CN, pages i - iii, 18-19, XP030150460 *
JIANLE CHEN ET AL.: "Further improvements to HMKTA-1.0, ITU - Telecommunications Standardization Sector STUDY GROUP 16 Question 6 Video Coding Experts Group (VCEG", VCEG-AZ07_V2, 52ND MEETING, June 2015 (2015-06-01), Warsaw, Poland, pages 1 - 8 *
XU CHEN ET AL.: "Decoder-Side Motion Vector Refinement Based on Bilateral Template Matchin g", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-D0029R2, 4TH MEETING, October 2016 (2016-10-01), Chengdu, CN, pages 1 - 4, XP030150254 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019049684A1 (en) * 2017-09-08 2019-03-14 ソニー株式会社 Image processing device and method
CN114374850A (en) * 2018-07-01 2022-04-19 北京字节跳动网络技术有限公司 Method, device and storage medium for efficient affine Merge motion vector derivation
CN111837386A (en) * 2018-09-21 2020-10-27 Kddi 株式会社 Image decoding device, image encoding device, image processing system, and program
JP2020053723A (en) * 2018-09-21 2020-04-02 Kddi株式会社 Image decoding device, image encoding device, image processing system, and program
JP7026286B1 (en) 2018-09-21 2022-02-25 Kddi株式会社 Image decoding device, image coding device, image processing system and program
JP2022043026A (en) * 2018-09-21 2022-03-15 Kddi株式会社 Image decoding device, image coding device, image processing system, and program
WO2020059459A1 (en) * 2018-09-21 2020-03-26 Kddi株式会社 Image decoding device, image encoding device, image processing system, and program
US11438625B2 (en) 2018-09-21 2022-09-06 Kddi Corporation Image decoding device, image encoding device, image processing system, and program
US11627336B2 (en) 2018-09-21 2023-04-11 Kddi Corporation Image decoding device, image encoding device, image processing system, and program
US11882308B2 (en) 2018-09-21 2024-01-23 Kddi Corporation Image decoding device, image encoding device, image processing system, and program
CN111837386B (en) * 2018-09-21 2024-09-20 Kddi株式会社 Image decoding device, image encoding device, image processing system, and program
US12143629B2 (en) 2018-09-21 2024-11-12 Kddi Corporation Image decoding device, image encoding device, image processing system, and program
JP2022078071A (en) * 2021-11-10 2022-05-24 Kddi株式会社 Image decoder, image encoder, image processing system and program
JP7167372B2 (en) 2021-11-10 2022-11-08 Kddi株式会社 Image decoding device, image encoding device, image processing system and program
WO2024074094A1 (en) * 2022-10-05 2024-04-11 Mediatek Inc. Inter prediction in video coding

Similar Documents

Publication Publication Date Title
JP7421586B2 (en) Decoding device and encoding device
JP7026049B2 (en) Affine motion vector derivation device, predictive image generator, motion image decoding device, and motion image coding device
US11722690B2 (en) Motion vector generation device, a prediction image generation device, a video decoding device and a video coding device
WO2018110203A1 (en) Moving image decoding apparatus and moving image encoding apparatus
CN111886867B (en) Motion vector derivation device, moving image decoding device, and moving image encoding device
WO2018230493A1 (en) Video decoding device, video encoding device, prediction image generation device and motion vector derivation device
WO2018110180A1 (en) Motion-vector generating device, predicted-image generating device, moving-image decoding device, and moving-image coding device
JP2021005741A (en) Image coding device and image decoding device
WO2018173895A1 (en) Predicted-image generation device, video decoding device, and video coding device
JP7555328B2 (en) Video decoding device, video encoding device, and video decoding method
US20190158860A1 (en) Video decoding device
WO2020116456A1 (en) Moving image decoding device
CN112740704A (en) Image decoding device and image encoding device
JP2019201256A (en) Image filter device
JP2019201254A (en) Image decoding apparatus and image encoding apparatus
WO2018037919A1 (en) Image decoding device, image coding device, image decoding method, and image coding method
JP2020036101A (en) Image decoder, and image encoder
JP2020088660A (en) Moving picture coding apparatus and moving picture decoding apparatus
JP2020145650A (en) Image decoding device and image coding device
WO2018061550A1 (en) Image decoding device and image coding device
JP2021016021A (en) Video coding device, video decoding device, and motion vector derivation device
JP2019205036A (en) Video encoding device and video decoding device
WO2019065537A1 (en) Motion compensation filter device, image decoding device, and moving image coding device
JP2021057621A (en) Moving image encoding device, moving image decoding device, and prediction image generation device
JP2021016018A (en) Video coding device, video decoding device, and motion vector derivation 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: 17879776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17879776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP