WO2019093523A1 - 動画像符号化装置および動画像復号装置 - Google Patents

動画像符号化装置および動画像復号装置 Download PDF

Info

Publication number
WO2019093523A1
WO2019093523A1 PCT/JP2018/042009 JP2018042009W WO2019093523A1 WO 2019093523 A1 WO2019093523 A1 WO 2019093523A1 JP 2018042009 W JP2018042009 W JP 2018042009W WO 2019093523 A1 WO2019093523 A1 WO 2019093523A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
prediction
sub
unit
image
Prior art date
Application number
PCT/JP2018/042009
Other languages
English (en)
French (fr)
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
Priority claimed from JP2017218056A external-priority patent/JP2021016018A/ja
Priority claimed from JP2017242466A external-priority patent/JP2021016021A/ja
Application filed by シャープ株式会社 filed Critical シャープ株式会社
Publication of WO2019093523A1 publication Critical patent/WO2019093523A1/ja

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/583Motion compensation with overlapping blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • Embodiments of the present invention relate to a video decoding device, a video coding device, and a motion vector derivation device.
  • a moving picture coding apparatus (image coding apparatus) that generates coded data by coding a moving picture, and decoding the coded data
  • a moving image decoding apparatus (image decoding apparatus) that generates a decoded image is used.
  • HEVC High-Efficiency Video Coding
  • an image (picture) constituting a moving picture is a slice obtained by dividing the image, a coding tree unit obtained by dividing the slice (CTU: Coding Tree Unit)
  • a predicted picture is usually generated based on a locally decoded picture obtained by coding / decoding an input picture, and the predicted picture is generated from the input picture (original picture).
  • the prediction residual obtained by subtraction (sometimes referred to as "difference image” or "residual image") is encoded.
  • inter-prediction inter-screen prediction
  • intra-frame prediction intra-prediction
  • Non-Patent Document 1 can be cited as a technology for moving picture encoding and decoding in recent years.
  • Non-Patent Document 2 describes a sub-block based motion compensation technique, affine prediction, overlap motion compensation, and a technique for deriving a motion vector by matching in a moving picture coding apparatus and a moving picture decoding apparatus.
  • the present invention aims to reduce memory bandwidth.
  • a moving picture decoding apparatus divides a target block into sub blocks, and performs a second interpolation based on a movement parameter of an adjacent block and a first interpolation image based on the movement parameter of the target block in units of sub blocks.
  • a moving picture coding apparatus performs overlap motion compensation prediction for generating a prediction image of a subblock boundary based on an inter prediction parameter of a target subblock and an adjacent subblock, A first prediction unit that generates a first interpolated image of a target sub-block based on inter prediction parameters, and a second prediction unit that generates a second interpolated image of the target sub-block based on inter prediction parameters of adjacent sub-blocks
  • the image processing apparatus comprises: prediction means; predicted image generation means for generating a predicted image by weighted addition processing of the first interpolation image and the second interpolation image, and the second prediction means satisfies a predetermined condition In this case, the overlap motion compensation process of the right and lower boundaries of the target sub-block is inhibited, and the right and And setting the first interpolated image as a prediction image.
  • the memory bandwidth can be reduced in the inter prediction technique.
  • (b), (c) is a figure which shows the positional relationship of an object block and a reference block. It is a figure which shows an example of the syntax of a slice header. It is a figure explaining ATM VP processing. It is a flowchart which shows operation
  • (a) is a figure for demonstrating bilateral matching (Bilateral matching).
  • (b) is a figure for demonstrating template matching (Template matching). It is a figure which shows an object block, the search range of motion compensation, and the number of taps of a motion compensation filter. It is a figure which shows the relationship between a block size, a search range, and the number of taps of a motion compensation filter. It is a figure which shows the search range of a matching prediction. It is another figure which shows the search range of a matching prediction. It is a flow chart which shows operation of motion vector derivation processing in matching mode. It is a figure which shows an example of the object subblock of OBMC prediction, and an adjacent block.
  • FIG. 1 is a diagram showing a configuration of a transmitting device equipped with a moving image encoding device according to the present embodiment and a receiving device equipped with a moving image decoding device.
  • FIG. 1 is a diagram showing a configuration of a recording apparatus equipped with a moving picture coding apparatus according to the present embodiment and a reproduction apparatus equipped with a moving picture decoding apparatus.
  • (a) shows a recording apparatus equipped with a moving picture coding apparatus, and (b) shows a reproduction apparatus equipped with a moving picture decoding apparatus.
  • (a), (b) is a figure for demonstrating a motion search pattern. It is a figure for demonstrating the relationship between a block size and a memory band. It is a figure which shows the relationship between a search range and the number of search steps.
  • FIG. 1 is a schematic view showing the configuration of an image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits a coded stream obtained by coding an image to be coded, decodes the transmitted code, and displays the image.
  • the image transmission system 1 includes a moving image coding device (image coding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41.
  • An image T is input to the moving picture coding device 11.
  • the network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31.
  • the network 21 is the Internet, a wide area network (WAN), a small area network (LAN), or a combination of these.
  • the network 21 is not necessarily limited to a two-way communication network, and may be a one-way communication network for transmitting broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
  • the network 21 may be replaced by a storage medium recording a coded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
  • the video decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td which are respectively decoded.
  • the moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31.
  • the moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • the form of the display may be stationary, mobile, HMD or the like.
  • the video decoding device 31 has high processing capability, it displays an enhancement layer image with high image quality, and when it has only lower processing capability, it is necessary to have higher processing capability and display capability as the enhancement layer. Do not display the base layer image.
  • X? Y: z is a ternary operator that takes y if x is true (other than 0) and z if x is false (0).
  • Abs (a) is a function that returns the absolute value of a.
  • Int (a) is a function that returns an integer value of a.
  • Floor (a) is a function that returns the largest integer less than or equal to a.
  • a / d represents the division of a by d (rounding down the decimal point).
  • Avg (a (i)) is a function for deriving N average values of a (0) to a (N-1).
  • FIG. 2 is a diagram showing the hierarchical structure of data in the coded stream Te.
  • the coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence.
  • (A) to (f) in FIG. 2 respectively represent a coded video sequence specifying the sequence SEQ, a coded picture specifying the picture PICT, a coding slice specifying the slice S, and a coding slice specifying slice data.
  • It is a figure which shows a coding tree unit contained in data, coding slice data, and a coding unit (Coding Unit; CU) contained in a coding tree unit.
  • Coding Unit CU
  • the encoded video sequence In the encoded video sequence, a set of data to which the video decoding device 31 refers in order to decode the sequence SEQ to be processed is defined. As shown in FIG. 2A, the sequence SEQ includes a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and Supplemental enhancement information SEI (Supplemental Enhancement Information) is included.
  • VPS Video Parameter Set
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • Supplemental enhancement information SEI Supplemental Enhancement Information
  • the value shown after # indicates a layer ID.
  • a video parameter set VPS is a set of coding parameters common to a plurality of moving pictures in a moving picture composed of a plurality of layers, and coding related to a plurality of layers included in the moving picture and each layer A set of parameters is defined.
  • sequence parameter set SPS a set of coding parameters to be referred to by the video decoding device 31 for decoding the target sequence is defined.
  • the width and height of the picture are defined.
  • multiple SPS may exist. In that case, one of a plurality of SPSs is selected from PPS.
  • a set of coding parameters to be referred to by the video decoding device 31 for decoding each picture in the target sequence is defined.
  • a reference value of quantization width (pic_init_qp_minus 26) used for decoding a picture and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
  • multiple PPS may exist. In that case, one of a plurality of PPSs is selected from each slice header in the target sequence.
  • the picture PICT includes slices S 0 to S NS-1 (NS is the total number of slices included in the picture PICT), as shown in (b) of FIG.
  • the slice S includes a slice header SH and slice data SDATA as shown in (c) of FIG.
  • the slice header SH includes a coding parameter group to which the video decoding device 31 refers in order to determine the decoding method of the target slice.
  • the slice type specification information (slice_type) for specifying a slice type is an example of a coding parameter included in the slice header SH.
  • slice types that can be designated by slice type designation information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction at the time of encoding or intra prediction, (3) B-slice using uni-directional prediction, bi-directional prediction, or intra prediction at the time of encoding.
  • inter prediction is not limited to single prediction and bi prediction, and more reference pictures may be used to generate a predicted image.
  • P and B slices it refers to a slice including a block for which inter prediction can 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, CTU block) as shown in (d) of FIG.
  • the CTU is a block of a fixed size (for example, 64 ⁇ 64) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).
  • a set of data to which the video decoding device 31 refers in order to decode a coding tree unit to be processed is defined.
  • a coding tree unit is divided into a coding unit (CU: Coding Unit) which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division) .
  • a tree structure obtained by recursive quadtree division or binary tree division is called a coding tree (CT: Coding Tree), and nodes of the tree structure are called a coding node (CN: Coding Node).
  • CT Coding Tree
  • CN Coding Node
  • the intermediate nodes of the quadtree and binary tree are encoding nodes, and the encoding tree unit itself is also defined as the topmost encoding node.
  • the CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split.
  • cu_split_flag and / or split_bt_mode are transmitted for each coding node CN.
  • cu_split_flag is 1, the coding node CN is split into four coding nodes CN.
  • cu_split_flag is 0, if split_bt_mode is 1, the encoding node CN is horizontally split into two encoding nodes CN.
  • split_bt_mode When split_bt_mode is 2, the coding node CN is vertically split into two coding nodes CN. When split_bt_mode is 0, the coding node CN is not split, and has one coding unit CU as a node.
  • the coding unit CU is a terminal node (leaf node) of the coding node and is not further divided.
  • the size of the encoding unit is 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 pixels, 16x32 pixels, 16x16 pixels 64x8 pixels 8x64 pixels 32x8 pixels 8x32 pixels 16x8 pixels 8x16 pixels 8x8 pixels 64x4 pixels 4x64 pixels 32x4 pixels 4x32 pixels 16x4 pixels 4x16 pixels 8x4 pixels 4x8 pixels 4x4 pixels It can take any of
  • a set of data to which the moving picture decoding apparatus 31 refers in order to decode the coding unit to be processed is defined.
  • the coding unit is composed of a prediction tree, a transformation tree, and a CU header CUH.
  • a prediction mode, a division method (PU division mode), and the like are defined.
  • a prediction unit is one or more non-overlapping regions that make up a coding unit.
  • the prediction tree includes one or more prediction units obtained by the above-mentioned division.
  • segmented the prediction unit further is called a "subblock.”
  • the sub block is composed of a plurality of pixels. If the size of the prediction unit and the subblock is equal, there is one subblock in the prediction unit. If the prediction unit is larger than the size of the subblock, the prediction unit is divided into subblocks. For example, when the prediction unit is 8x8 and the subblock is 4x4, the prediction unit is divided into four subblocks, which are horizontally divided into two and vertically divided into two.
  • the prediction process may be performed for each prediction unit (sub block).
  • Intra prediction is prediction in the same picture
  • inter prediction refers to prediction processing performed between mutually different pictures (for example, between display times, between layer images).
  • the division method is encoded according to PU division mode (part_mode) of encoded data, 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and There are NxN etc.
  • 2NxN and Nx2N indicate 1: 1 symmetric division, 2NxnU, 2NxnD and nLx2N, nRx2N show 1: 3, 3: 1 asymmetric division.
  • the PUs included in the CU are expressed as PU0, PU1, PU2, PU3 in order.
  • the coding unit is divided into one or more transform units TU, and the position and size of each transform unit are defined.
  • a transform unit is one or more non-overlapping regions that make up a coding unit.
  • the transformation tree includes one or more transformation units obtained by the above-mentioned division.
  • Partitions in the transform tree may be allocated as a transform unit a region of the same size as the encoding unit, or may be based on recursive quadtree partitioning as in the case of CU partitioning described above.
  • a conversion process is performed for each conversion unit.
  • the prediction image of a prediction unit is derived by prediction parameters associated with PU.
  • the prediction parameters include intra prediction prediction parameters or inter prediction prediction parameters.
  • prediction parameters for inter prediction 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 a reference picture list called an L0 list or an L1 list is used, respectively. When the value is 1, the corresponding reference picture list is used.
  • a flag indicating whether or not it is XX if the flag is other than 0 (for example, 1) is XX, it is assumed that 0 is not XX; Treat 1 as true, 0 as false, and so on. However, in an actual apparatus or method, other values may be used as true values or false values.
  • Syntax elements for deriving inter prediction parameters included in encoded data include, for example, PU division mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index ref_idx_lX (refIdxLX), prediction vector There is an index mvp_lX_idx and a difference vector mvdLX.
  • the reference picture list is a list of reference pictures stored in the reference picture memory 306.
  • FIG. 3 is a conceptual diagram showing an example of a reference picture and a reference picture list.
  • the rectangle is a picture
  • the arrow is a reference of the picture
  • the horizontal axis is time
  • I, P and B in the rectangle are intra pictures, uni-predicted pictures, bi-predicted pictures, and numbers in the rectangle are decoded. Show the order.
  • the decoding order of pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, B1, P1.
  • FIG. 3B shows an example of the reference picture list.
  • the reference picture list is a list representing reference picture candidates, 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. Reference pictures when the target picture is B3 are I0, P1, and B2, and the reference pictures have these pictures as elements.
  • the figure shows an example in which reference pictures P1 and B2 are referenced by refIdxL0 and refIdxL1.
  • LX is a description method used when L0 prediction and L1 prediction are not distinguished, and hereafter, LX is replaced with L0 and L1 to distinguish parameters for the L0 list and parameters for the L1 list.
  • 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 mode is a mode used for deriving from the prediction parameter of the already processed neighboring PU without including the prediction list use flag predFlagLX (or the inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX in the encoded data.
  • the AMVP mode is a mode in which an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, and a motion vector mvLX are included in encoded data.
  • the motion vector mvLX is encoded as a prediction vector index mvp_lX_idx for identifying a prediction vector mvpLX and a difference vector mvdLX.
  • the inter prediction identifier inter_pred_idc is a value indicating the type and the number of reference pictures, and takes any one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate that reference pictures managed by reference pictures in the L0 list and the L1 list are used, respectively, and indicate that one reference picture is used (uniprediction).
  • PRED_BI indicates using two reference pictures (bi-prediction BiPred), and uses reference pictures managed by the L0 list and the L1 list.
  • the predicted vector index mvp_lX_idx is an index indicating a predicted vector
  • the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list.
  • Merge index merge_idx is an index which shows whether any prediction parameter is used as a prediction parameter of decoding object PU among the prediction parameter candidates (merge candidate) derived
  • the motion vector mvLX indicates the amount of shift (shift) between blocks on two different pictures.
  • the prediction vector and the difference vector relating to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
  • the flag biPred of bi-prediction BiPred can be derived depending on whether both of the two prediction list use flags are 1. For example, it can be derived by the following equation.
  • the flag biPred can also be derived based 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 equation.
  • the intra prediction parameter is a parameter used for prediction processing with information on a picture of a CU, for example, an intra prediction mode IntraPredMode, and a luminance intra prediction mode IntraPredModeY and a chrominance intra prediction mode IntraPredModeC may be different.
  • the intra prediction mode includes, for example, 67 types, and includes planar prediction, DC prediction, and Angular (direction) prediction.
  • the color difference prediction mode IntraPredModeC uses, for example, any of planar prediction, DC prediction, Angular prediction, direct mode (mode using prediction mode of luminance), and LM prediction (mode of performing linear prediction from luminance pixels).
  • a loop filter is a filter provided in a coding loop, which removes block distortion and ringing distortion and improves image quality.
  • the loop filters mainly include a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF).
  • Entropy coding includes variable length coding of syntax using a context (probability model) adaptively selected according to the type of syntax and surrounding circumstances, and a predetermined table or calculation formula There is a method of variable-length coding syntax using.
  • CABAC Context Adaptive Binary Arithmetic Coding
  • the former CABAC stores in memory a probability model updated for each picture encoded or decoded. Then, in the P picture or B picture using the subsequent inter prediction, the initial state of the context of the target picture uses the same slice type and the same slice level quantization parameter among the probability models stored in the memory.
  • the probability model of the picture is selected and used for encoding and decoding processes.
  • FIG. 4 shows a moving picture decoding apparatus (image decoding apparatus) 31 according to the present invention.
  • the moving picture decoding apparatus 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (predicted image decoding apparatus) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a predicted image generation unit (predicted image generation apparatus) 308,
  • the configuration includes an inverse quantization / inverse transform unit 311 and an addition unit 312.
  • the loop filter 305 is not included in the video decoding device 31 in accordance with the video encoding device 11 described later.
  • the prediction parameter decoding unit 302 is configured to include an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304.
  • the predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
  • CTU, CU, PU, and TU may be replaced with blocks, and processing may be performed in units of blocks.
  • the entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside to separate and decode individual codes (syntax elements).
  • the separated codes include prediction parameters 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.
  • the part of the separated code is, for example, prediction mode predMode, PU division mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index ref_idx_lX, prediction vector index mvp_lX_idx, difference vector mvdLX. Control of which code to decode is performed based on an instruction of the prediction parameter decoding unit 302.
  • the entropy decoding unit 301 outputs the quantized transform coefficient to the inverse quantization / inverse transform unit 311.
  • the quantization transform coefficients are used to encode the residual signal by discrete cosine transform (DCT), discrete sine transform (DST), Karynen Loeve transform, and Karhunen Loeve transform in a coding process. Etc.) and is obtained by quantization.
  • DCT discrete cosine transform
  • DST discrete sine transform
  • DST discrete sine transform
  • Karynen Loeve transform Karhunen Loeve transform
  • 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. Further, the inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308, and stores the inter prediction parameter 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 decodes the intra 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 intra prediction parameter is a parameter used in a process of predicting a CU in 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 loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • the loop filter 305 may not necessarily include the above three types of filters as long as the loop filter 305 is paired with the moving picture coding device 11.
  • the loop filter 305 may have only a deblocking filter.
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 in a predetermined position for each of the picture to be decoded and the CTU or CU.
  • the prediction parameter memory 307 stores prediction parameters in a predetermined position for each picture to be decoded and each 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 inter prediction parameters to be stored include, for example, a prediction list use 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 also receives a prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of a PU (block) or a sub block using the input prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode.
  • the inter prediction image generation unit 309 performs inter prediction using the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture (reference picture block). To generate a predicted image of a block or subblock.
  • the inter-predicted image generation unit 309 uses the reference picture index refIdxLX for the reference picture list (L0 list or L1 list) for which the prediction list use flag predFlagLX is 1, and the motion vector based on the block to be decoded
  • the reference picture block at the position indicated by mvLX is read out from the reference picture memory 306.
  • the inter predicted image generation unit 309 performs interpolation based on the read reference picture block to generate a predicted image (interpolated image or motion compensated image) of the block.
  • the inter predicted image generation unit 309 outputs the generated predicted image of the block to the addition unit 312.
  • the reference picture block is a set of pixels on the reference picture (usually referred to as a block because it is a rectangle), and is an area to which reference is made in order to generate a predicted image of the block or sub block.
  • the intra prediction 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 pixel.
  • the intra prediction image generation unit 310 generates a prediction image of a block with reference to the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent block.
  • the intra predicted image generation unit 310 outputs the generated predicted image of the block to the addition unit 312.
  • the inverse quantization / inverse transform unit 311 inversely quantizes the quantized transform coefficient input from the entropy decoding unit 301 to obtain a transform coefficient.
  • the inverse quantization / inverse transform unit 311 performs inverse frequency transform such as inverse DCT, inverse DST, and inverse KLT on the obtained transform coefficient to calculate a prediction residual signal.
  • the inverse quantization / inverse transform unit 311 outputs the calculated residual signal to the addition unit 312.
  • the addition unit 312 adds, for each pixel, the prediction image of the block input from the inter prediction image generation unit 309 or the prediction image generation unit 308 and the residual signal input from the inverse quantization / inverse conversion unit 311. Generate a decoded image of The addition unit 312 outputs the generated decoded image of the block to at least one of the deblocking filter, the SAO unit, and the ALF.
  • FIG. 5 is a schematic diagram showing a configuration of the inter prediction parameter decoding unit 303 according to the present embodiment.
  • the inter prediction parameter decoding unit 303 includes an inter prediction parameter decoding control unit 3031, an AMVP prediction parameter derivation unit 3032, an addition unit 3035, a merge prediction parameter derivation unit 3036, a sub block prediction parameter derivation unit 3037, and a BTM prediction unit 3038. Be done.
  • the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the sub block prediction parameter derivation unit 3037, and the BTM prediction unit 3038 may be collectively referred to as a motion vector derivation unit (motion vector derivation device).
  • 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 division mode part_mode , Merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index ref_idx_lX, predicted vector index mvp_lX_idx, difference vector mvdLX is extracted.
  • the inter prediction parameter decoding control unit 3031 first extracts the merge flag merge_flag. When the inter prediction parameter decoding control unit 3031 expresses that a syntax element is to be extracted, it instructs the entropy decoding unit 301 to decode a syntax element, which means that the corresponding syntax element is read out from the encoded data. Do.
  • the inter prediction parameter decoding control unit 3031 extracts an AMVP prediction parameter from the encoded data using the entropy decoding unit 301.
  • AMVP prediction parameters for example, there are inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_lX_idx, 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 a 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 sub-block prediction parameter derivation unit 3037 divides the block into a plurality of sub-blocks according to the value of the sub-block prediction mode flag subPbMotionFlag, and derives a motion vector in units of sub-blocks.
  • a prediction block is predicted in small blocks of 4x4 or 8x8.
  • multiple subblocks are set in the subblock prediction mode ( In order to encode and decode the syntax of the prediction parameter for each set, the motion information of many subblocks can be encoded with a small code amount.
  • the sub block prediction parameter derivation unit 3037 (sub block prediction means) divides the target block into a plurality of sub blocks, and derives a motion vector in units of sub blocks.
  • the sub-block prediction parameter derivation unit 3037 performs sub-block prediction in the sub-block prediction mode
  • the space-time sub-block prediction unit 30371 (ATMVP prediction means, STMVP prediction means)
  • affine It comprises at least one of a prediction unit 30372 (affine prediction means), a matching motion derivation unit 30373 (matching prediction means), and an OBMC prediction unit 30374.
  • the affine prediction unit 30372 (affine prediction means) derives the motion vector of the sub block using two or more reference motion vectors.
  • the space-time sub-block prediction unit 30371 derives the motion vector of the above-mentioned sub-block using the motion vector of the point obtained by dividing the block on the reference picture at the position corresponding to the target block.
  • the space-time sub-block prediction unit 30371 uses an adjacent motion vector adjacent to the target block and a motion vector of a point obtained by dividing a block on a reference picture at a position corresponding to the target block. To derive the motion vector of the sub-block.
  • Matching motion derivation unit 30373 (matching prediction means) derives a motion vector in block units by matching in target block units, and further derives a motion vector in matching by using the motion vector in block units as the initial motion vector in subblock units. It is characterized in that it is a matching prediction means.
  • sub-block prediction mode flag a method of deriving a sub-block prediction mode flag subPbMotionFlag indicating whether or not the prediction mode of a certain block is the sub-block prediction mode in the moving image decoding device 31 and the moving image encoding device 11 (details will be described later).
  • the moving picture decoding apparatus 31 and the moving picture coding apparatus 11 use the subblock prediction mode flag based on which one of a spatial subblock prediction SSUB, a temporal subblock prediction TSUB, an affine prediction AFFINE, and a matching motion derivation MAT, which will be described later, is used.
  • Deriving subPbMotionFlag For example, when the prediction mode selected in a certain block is N (for example, N is a label indicating a selected merge candidate), the sub-block prediction mode flag subPbMotionFlag may be derived by the following equation.
  • the sub-block prediction mode flag subPbMotionFlag is derived as follows. May be
  • FIG. 6A is a schematic view showing the configuration of the merge prediction parameter derivation unit 3036 according to the present embodiment.
  • the merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361, a merge candidate selection unit 30362, and a merge candidate storage unit 30363.
  • the merge candidate storage unit 30363 stores the merge candidate input from the merge candidate derivation unit 30361.
  • the merge candidate is configured to include 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 merge candidates using the motion vector of the adjacent block for which the decoding processing has already been performed and the reference picture index refIdxLX as it is.
  • merge candidates may be derived using affine prediction. That is, the merge candidate derivation unit 30361 may use affine prediction for spatial merge candidate derivation processing, temporal merge candidate derivation processing, combined merge candidate derivation processing, and zero merge candidate derivation processing described later.
  • Affine prediction is performed in units of subblocks, and prediction parameters are stored in the prediction parameter memory 307 for each subblock.
  • affine prediction may be performed pixel by pixel.
  • the merge candidate derivation unit 30361 reads out 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 prediction parameters are derived as merge candidates, and stored in the merge candidate list mergeCandList [] (predicted vector candidate list mvpListLX []).
  • the prediction parameters to be read are in contact with blocks within a predetermined range from the decoding target block (for example, the lower left end L, BL, upper left end AL, upper right end A, AR of the decoding target block shown in FIG. 7B) Prediction parameters for all or part of the block).
  • the merge candidate derivation unit 30361 predicts the prediction parameter of the block C at the lower right of the co-located block shown in FIG. 7C in the reference picture or the block C including the coordinates of the center of the block to be decoded. It is read as a merge candidate from the memory 307 and stored in the merge candidate list mergeCandList [].
  • the block BR has no motion vector (for example, an intra prediction block) in addition to the merge candidate list mergeCandList [] by giving priority to the block BR, or if the block BR is located outside the picture, the motion of the block C Add a vector to the candidate prediction vector.
  • the reference picture may be specified, for example, by the reference picture index collocated_ref_idx (SYN01) specified in the slice header of FIG. 8 or by using the smallest reference picture index refIdxLX of the block adjacent to the block to be decoded You may.
  • the merge candidate derivation unit 30361 may derive the position of the block C (xColCtr, yColCtr) and the position of the block BR (xColBr, yColBr) by the following equation.
  • xColCtr xPb + (W >> 1)
  • yColCtr yPb + (H >> 1)
  • xColBr xPb + W
  • yColBr yPb + H
  • (xPb, yPb) is the upper left coordinate of the target block
  • (W, H) is the width and height of the target block.
  • the merge candidate derivation unit 30361 sets the motion vector and reference picture index of two different derived merge candidates that are already derived and stored in the merge candidate storage unit 30363 as L0 and L1 motion vectors, respectively. Combine merge candidates by combining them, and store them in the merge candidate list mergeCandList [].
  • the merge candidate derivation unit 30361 derives merge candidates 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, and stores them in the merge candidate list mergeCandList [] Do.
  • the merge candidate derived by the merge candidate derivation unit 30361 is stored in the merge candidate storage unit 30363.
  • the merge candidate list labels of merge candidate names may be stored, or motion vectors of merge candidates and a reference picture index may be stored.
  • the order of storage in the merge candidate list mergeCandList [] is as follows: blocks shown in FIGS. 7B and 7C, combined merge candidate, and zero merge candidate are added ⁇ L, A, AR, BL, AL, BR / C, Join merge candidate, zero merge candidate ⁇ .
  • BR / C means that block C is used if block BR is not available. Note that reference blocks for which a motion vector is not available (such as intra prediction) are not stored in the merge candidate list.
  • the merge candidate selection unit 30362 assigns an index corresponding to the merge index merge_idx input from the inter prediction parameter decoding control unit 3031.
  • the merge candidate is selected as the inter prediction parameter of the target block.
  • the merge candidate selection unit 30362 stores the selected merge candidate in the prediction parameter memory 307 and outputs the merge candidate to the predicted image generation unit 308.
  • the spatio-temporal sub-block prediction unit 30371 uses the motion vector of the block on the reference picture (for example, the immediately preceding picture) temporally adjacent to the target block or the motion vector of the block spatially adjacent to the target block To derive the motion vector of the subblock obtained by dividing.
  • (xPb, yPb) is the upper left coordinate of the target block
  • W and H are the size of the target block
  • BW and BH are the sizes of the subblocks.
  • the subscripts [k] and [j], which are indices (integer values) representing subblocks, are used instead of the subscripts [xi] and [yi] using coordinate values xi and yi.
  • the process may be described using [l], the process is the same.
  • NBW W / BW
  • NBH H / BH
  • the motion vector spMvLX [xi] [yi] of each sub block in the target block is calculated by calculating the weighted average according to the distance between the motion vector of the adjacent block and the sub block obtained by dividing the target block.
  • (xi xPb + BW * i
  • yj yPb + BH * j
  • i 0, 1, 2,..., W / BW-1
  • the above candidate TSUB for temporal sub-block prediction and candidate SSUB for spatial sub-block prediction are selected as one mode (merge candidate) of merge mode.
  • Motion vector scaling A method of deriving motion vector scaling will be described.
  • the derived function MvScale (Mv, Pic1, Pic2, Pic3, Pic4) of sMv is expressed by the following equation.
  • DiffPicOrderCnt (Pic1, Pic2) is a function that returns the difference between the time information (for example, POC) of Pic1 and Pic2.
  • scaling function MvScale (Mv, Pic1, Pic2, Pic3, Pic4) may be the following expression.
  • MvScale (Mv, Pic1, Pic2, Pic3, Pic4) Mv * DiffPicOrderCnt (Pic3, Pic4) / DiffPicOrderCnt (Pic1, Pic2) (Expression MVSCALE-2) That is, Mv may be scaled according to the ratio of the time information difference between Pic1 and Pic2 and the time information difference between Pic3 and Pic4.
  • ATMVP Adaptive Temporal Motion Vector Prediction
  • STMVP Spatial-Temporal Motion Vector Prediction
  • ATMVP The ATMVP derives a motion vector for each sub block of the target block based on the motion vector of the space adjacent block (L, A, AR, BL, AL) of the target block of the target picture PCur shown in FIG. And a method of generating a predicted image in units of subblocks, and processing is performed according to the following procedure.
  • Step 1) Block Level Motion Vector Derivation
  • the spatial adjacent blocks L, A, AR, BL, AL around the target block are scanned in order to find the first adjacent block having an available motion vector. If an adjacent block having an available motion vector is found, the motion vector and reference picture of the block are set to the block-level motion vector BMV (bmv [0], bmv [1]) of the target block and the reference picture BRef. Set and move to step 2. If the motion vectors of all the adjacent blocks are not available (non available), the ATM VP is turned off and the processing is terminated.
  • the meaning of “ATMVP is off” means that the ATMVP candidate (motion vector by ATMVP) is not stored in the merge candidate list.
  • the meaning of "available adjacent block” is, for example, that the adjacent block has a motion vector.
  • Step 2 Sub-block level motion vector derivation
  • a block (colocate block) at a position where the target block is shifted by the motion vector BMV is divided into sub blocks on the reference picture BRef.
  • NBW and NBH are the numbers of horizontal and vertical sub-blocks, respectively. If there is no motion vector of a certain subblock M (kM, lM), the motion vector BMV of the block level and the reference picture BRef, the motion vector SpRefMvLX [kM] [lM] of the subblock (kM, lM) and the reference picture SpRef [ Set as kM] [lM].
  • Step 3) Motion vector scaling The motion vector of each subblock on the target block from the motion vector SpRefMvLX [k] [l] of each subblock on the reference picture and the reference picture SpRef [k] [l] by the scaling function MvScale () Derivate SpMvLX [k] [l].
  • the reference picture at the sub-block level of the target block may be a reference picture designated by the index (collocated_ref_idx), which is used for deriving a motion vector predictor in the time direction notified by the slice header shown in FIG.
  • the reference picture at the subblock level of the target block is RefPicListX [collocated_ref_idx]
  • the formula for calculating the motion vector SpMvLX [k] [l] at the subblock level of the target block is as follows.
  • Step 4 Clipping of Sub-block Level Motion Vector after Scaling
  • the inter-prediction image generation unit 309 generates a prediction image based on the sub-block level motion vector after scaling, the image data of the reference picture from the reference picture memory 306 Transfer On the reference image RefPicListX [refIdxATMVP], the scaling may enlarge the difference in motion vector (shift amount) between the sub-blocks as shown in FIG. 9B.
  • the transfer amount (memory bandwidth) of image data of the entire block increases.
  • a configuration for limiting the difference in motion vector of the sub block is appropriate.
  • the spatio-temporal sub-block prediction unit 30371 places a motion vector beyond the range of ⁇ THCLIP with respect to the representative motion vector repMV (repMV [0], repMV [1]) of the sub-block level motion vector within a predetermined range.
  • spMvLX [k] [l] [0] Clip3 (repMV [0] -THCLIP, repMV [0] + THCLIP-1, spMvLX [k] [l] [0]) (Expression ATMVP-3)
  • spMvLX [k] [l] [1] Clip3 (repMV [1] -THCLIP, repMV [1] + THCLIP-1, spMvLX [k] [l] [1])
  • the following configuration may be used in which the motion vector of each sub block is updated after calculation of all sub block level motion vectors spMvLX [] [].
  • the space-time sub-block prediction unit 30371 calculates the range of the motion vector spMvLX [k] [l] of the sub-block level after scaling included in the target block.
  • the maximum values of spMvLX [k] [l] in horizontal and vertical directions maxspMvLXx and maxspMvLXy, and the minimum values of spMvLX [k] [l] in horizontal and vertical directions minspMvLXx and minspMvLXy are derived.
  • NBW and NBH are the numbers of horizontal and vertical sub-blocks, respectively.
  • the space-time sub-block prediction unit 30371 When the difference between the maximum value and the minimum value of spMvLX [k] [l] exceeds the predetermined value THCLIP * 2, the space-time sub-block prediction unit 30371 performs block-level motion vectors as shown in FIG. 9 (d). A motion vector beyond the range of ⁇ THCLIP with respect to BMV (bmv [0], bmv [1]) restricts (clippings) the motion vector to be within the range.
  • the representative motion vectors repMV [0] and repMV [1] may be derived, for example, by the average value of the horizontal and vertical components of the motion vector spMvLX [k] [l] of the sub block.
  • the representative motion vector repMV is, for example, the motion vector spMvLX [(NBW-1) / 2] [(NBH-1) / 2] of the sub block at the central position of the target block or the motion vector spMvLX of the sub block at the upper left position of the target block. [0] [0] may be used. In addition, if the motion vector spMvLX [(NBW-1) / 2] [(NBH-1) / 2] of the sub block at the center position of the target block is not available, the motion vector spMvLX of the sub block at the upper left position [0] [0] may be used. Alternatively, the representative motion vector repMV may use the average value of motion vectors of subblocks located at the four corners of the target block.
  • the image on the reference picture RefPicListX [refIdxATMVP] is read out based on each sub block SpMvLX [k] [l] of the target block, and interpolation is performed. And derive a predicted image.
  • the space-time sub-block prediction unit 30371 searches for five neighboring blocks of the target block (S2301).
  • the space-time sub-block prediction unit 30371 determines the presence or absence of the first available adjacent block, and proceeds to S2303 if there is an available adjacent block, or proceeds to S2309 if there is no available adjacent block (S2302).
  • the space-time sub-block prediction unit 30371 sets the motion vector and reference picture of the available adjacent block as the block-level motion vector BMV and reference picture BRef of the target block (S2303).
  • the spatio-temporal sub-block prediction unit 30371 uses the block-based motion vector BMV of the target block and the reference picture BRef to generate the sub-block-based motion vector SpRefMvLX [k] [l] of the co-located block and the reference picture SpRef [k] [l]. l] is acquired (S2304).
  • the space-time sub-block prediction unit 30371 uses the motion vector SpRefMvLX [k] [l] and the reference picture SpRef to set the reference picture of the target picture to RefPicListX [refIdxATMVP], and the sub-block based movement of the target block.
  • the vector spMvLX [k] [l] is derived by scaling (S2305).
  • the space-time sub-block prediction unit 30371 determines whether or not the sub-block based motion vector spMvLX [k] [l] derived by scaling is within a predetermined value. If spMvLX [k] [l] is within the predetermined value, the process advances to step S2308; otherwise, the process advances to step S2307 (S2306).
  • the spatiotemporal sub-block prediction unit 30371 performs clipping according to the method shown in spMvLX [k] [l] for clipping of sub-block motion vectors or step 4). (S2307).
  • the space-time sub-block prediction unit 30371 stores the ATM VP motion vector or the label called ATM VP in the merge candidate list mergeCandList [] shown in FIG. 7A (S2308).
  • the space-time sub-block prediction unit 30371 does not store the ATM VP motion vector or the label called ATM VP in the merge candidate list mergeCandList [] (S2309).
  • the merge candidate list related to the ATM VP is derived.
  • the ATMVP by limiting the range of the motion vector of the subblock after scaling to a predetermined value or less, it is possible to prevent an increase in memory bandwidth.
  • the STMVP is a space adjacent block (a, b, c, d,%) Of the target block of the target picture PCur shown in FIG. 11 (a), and a co-located block (A ′, b) of the target block shown in FIG. Based on the motion vector of B ′, C ′, D ′,...), A motion vector is derived for each sub block of the target block, and a prediction image is generated in units of sub blocks.
  • A, B, C, and D in FIG. 11A are examples of subblocks obtained by dividing the target block.
  • a ', B', C ', and D' in FIG. 11B are co-located blocks of the sub blocks A, B, C, and D in FIG.
  • A'c, B'c, C'c and D'c in FIG. 11 (b) are areas located at the centers of A ', B', C 'and D', and A'br, B'br, C'br and D'br are regions located at the lower right of A ', B', C 'and D'. Note that A'br, B'br, C'br, D'br are not in the lower right position outside A ', B', C ', D' shown in FIG. It may be the lower right position in A ', B', C ', D' shown. STMVP is processed according to the following procedure. The target block is divided into sub blocks, and each sub block is sequentially subjected to the following procedure.
  • Step 2 From the left adjacent block b of the target sub block (sub block A), find the first available block downward. If an available adjacent block is found, the motion vector and the reference picture of the first block are set as the left vector mvA_left and the reference picture RefA_left, and the count cnt is incremented by one. If there is no adjacent block available, the count cnt is not updated.
  • Step 3 In the co-located block A ′ which is a temporally adjacent block of the target sub block (sub block A), it is checked whether the lower right position A ′ br and the center position A ′ c can be used in order. If an available area is found, the first motion vector and reference picture of the block are set as the co-locate vector mvA_col and reference picture RefA_col, and the count is incremented by one. If no block is available, do not update the count cnt.
  • Step 5) If ctn is not 0, the available motion vector obtained in step 1) to step 3) is scaled using time information of the target picture PCur and the reference picture RefPicListX [collocated_ref_idx] of the target block.
  • the motion vector after scaling is set as smvA_above, smvA_left, smvA_col.
  • Unavailable motion vectors are set to zero.
  • Step 6) Calculate the average of motion vectors smvA_above, smvA_left, smvA_col of peripheral blocks, and set as the motion vector spMvLX [A] of the target sub block (sub block A).
  • the reference picture of the target block (subblock A) is RefPicListX [collocated_ref_idx].
  • spMvLX [A] (smvA_above + smvA_left + smvA_col) / cnt (expression STMVP-2)
  • the count cnt of the derived motion vector number is 2, and the two motion vectors are sequentially described as mvA_0 and mvA_1
  • the motion vector spMvLX of the target block may be derived by the following equation.
  • spMvLX [A] (5 * smvA_above + 5 * smvA_1eft + 6 * smvA_col) >> 4
  • steps 1) to 6) are executed on each subblock in the target block, such as subblocks B, C, D, etc., as shown in FIGS. Determine the motion vector of the subblock.
  • sub block B the upper adjacent block is searched from d in the right direction.
  • the upper adjacent block is A
  • the left adjacent block is searched downward from a.
  • the sub-block D the upper adjacent block is B and the left adjacent block is C.
  • Step 7) Sub-block level motion vector clipping As in step 4) of ATMVP, sub-block level motion vector spMvLX [] is added after motion vector derivation for each sub-block (step 6) in order not to increase memory bandwidth. It may be limited.
  • the space-time sub-block prediction unit 30371 is capable of motion vectors that exceed the range of ⁇ THCLIP with respect to the representative motion vector repMV (repMV [0], repMV [1]) of the sub-block level motion vector, Restrict (clipping) motion vectors so that they fall within the range.
  • spMvLX [k] [0] Clip3 (repMV [0]-THCLIP, repMV [0] + THCLIP-1, spMvLX [k] [0])
  • spMvLX [k] [1] Clip3 (repMV [1]-THCLIP, repMV [1] + THCLIP-1, spMvLX [k] [1])
  • the space-time sub-block prediction unit 30371 may limit the motion vector of each sub-block of STMVP as already described in (Expression CLIP1), (Expression CLIP2), and (Expression CLIP3) in ATVMP.
  • Step 8) Store the STMVP motion vector (or label STMVP) in the merge candidate list.
  • the order of merge candidates to be stored in the merge candidate list is shown in FIG. 7 (a). From this list, merge candidates of the target block are selected using merge_idx derived by the inter prediction parameter decoding control unit 3031.
  • an image on the reference picture RefPicListX [collocated_ref_idx] is read from each subblock of the target block based on the motion vector, and interpolation is performed to derive a predicted image.
  • the space-time sub-block prediction unit 30371 divides the target block into sub-blocks (S2601).
  • the space-time sub-block prediction unit 30371 searches the upper side, the left side, and the adjacent blocks in the time direction of the sub-block (S2602).
  • the space-time sub-block prediction unit 30371 determines the presence or absence of available adjacent blocks, and proceeds to S2604 if there is an available adjacent block, or proceeds to S2610 if there is no available adjacent block (S2603).
  • the space-time sub-block prediction unit 30371 scales the motion vector of the available adjacent block in accordance with the temporal distance between the target picture and the reference pictures of the plurality of adjacent blocks (S2604).
  • the space-time sub-block prediction unit 30371 calculates the average value of the scaled motion vectors, and sets it as the motion vector spMvLX [] of the target sub-block (S2605).
  • the space-time sub-block prediction unit 30371 checks whether the sub-block being processed is the last sub-block of the target block (S2606). If it is the last sub-block, the process proceeds to S2607, otherwise it is the processing target Is transferred to the next sub-block and the process proceeds to S2602 (S2611), and S2602 to S2605 are repeatedly processed.
  • the space-time sub-block prediction unit 30371 determines whether the derived sub-block-based motion vector spMvLX [] is within a predetermined value. If spMvLX [] is within the predetermined value, the process advances to step S2609; otherwise, the process advances to step S2608 (S2607).
  • the spatiotemporal sub-block prediction unit 30371 clips the motion vector spMvLX [] by the method of clipping the sub-block motion vector or the method of step 7) (S2608).
  • the space-time sub-block prediction unit 30371 stores the STMVP motion vector or the label STMVP in the merge candidate list mergeCandList [] shown in FIG. 7A (S2609).
  • the space-time sub-block prediction unit 30371 When there is no usable motion vector, the space-time sub-block prediction unit 30371 does not store the motion vector of STMVP in the merge candidate list mergeCandList [], and ends the processing (S2610).
  • the merge candidate list regarding STMVP is derived.
  • the affine prediction units 30372 and 30321 derive affine prediction parameters of the target block.
  • motion vectors (mv0_x, mv0_y) (mv1_x, mv1_y) of two control points (V0, V1) of the target block are derived as affine prediction parameters.
  • the motion vector of each control point may be derived by predicting from the motion vector of the adjacent block (affine prediction unit 30372), and the prediction vector derived as the motion vector of the control point and the encoding
  • the motion vector of each control point may be derived from the sum of difference vectors derived from data (affine prediction unit 30321).
  • the affine prediction units 30372 and 30321 represent representative points of the target block (here, the upper left point V0 of the block and the upper right of the block) as two control points used for affine prediction for deriving a candidate. Derive a motion vector of each of the points V1) of As a representative point of the block, a point on the target block is used.
  • a representative point of a block used as a control point of affine prediction is referred to as a "block control point".
  • FIG. 13 is a diagram showing an example of the position of a reference block used for derivation of motion vectors of control points in the AMVP mode and the merge mode.
  • the affine prediction unit 30372 For a block including L, A, AR, LB, and AL as shown in FIG. 13C, the affine prediction unit 30372 refers to the prediction parameter memory 307 and checks whether affine prediction is used or not. .
  • a block is searched in the order of block L, A, AR, LB, AL, and a block using the first found affine prediction (here, L in FIG. 13C) is selected as a reference block (merge reference block) and a motion vector Derive
  • (STEP 2) Derivation of Sub-block Vector
  • the affine prediction units 30372 and 30321 use motion vectors of block control points (control points V0 and V1 or V0 and V2) that are representative points of the target block derived in (STEP 1). , And derive motion vectors of respective sub-blocks included in the target block.
  • the motion vector spMvLX of each sub block is derived by (STEP 1) and (STEP 2).
  • control points V0 and V1 will be described below, if the motion vector of V1 is replaced with a motion vector of V2, the motion vector of each sub block is derived in the same process at control points V0 and V2. Can.
  • FIG. 14A shows an example of deriving the motion vector spMvLX of each sub block constituting the target block from the motion vector mv0 (mv0_x, mv0_y) of the control point V0 and the motion vector mv1 (mv1_x, mv1_y) of V1.
  • FIG. The motion vector spMvLX of each sub block is derived as a motion vector for each point located at the center of each sub block, as shown in FIG. 14 (a).
  • the motion compensation unit 3091 is based on the prediction list use flag predFlagLX, the reference picture index refIdxLX, and the motion vector spMvLX of the subblock derived in (STEP 2), which are input from the inter prediction parameter decoding unit 303. , Motion compensation in units of subblocks. Specifically, the block at a position shifted by the motion vector spMvLX from the position of the target sub-block on the reference picture specified by the reference picture index refIdxLX from the reference picture memory 306 is read and filtered. A motion compensated image PredLX is generated.
  • the subblock level motion vector spMvLX [] may be restricted after motion vector derivation for each subblock in order not to increase the memory bandwidth.
  • the affine prediction unit 30372 is configured such that motion vectors beyond the range of ⁇ THCLIP with respect to the representative motion vector repMV (repMV [0], repMV [1]) of the sub block level motion vector are within the range Restrict (clipping) motion vectors to
  • spMvLX [k] [0] Clip3 (repMV [0]-THCLIP, repMV [0] + THCLIP-1, spMvLX [k] [0])
  • spMvLX [k] [1] Clip3 (repMV [1]-THCLIP, repMV [1] + THCLIP-1, spMvLX [k] [1])
  • the affine prediction unit 30372 may limit the motion vector of each sub-block of affine prediction as already described in (Expression CLIP1), (Expression CLIP2), and (Expression CLIP3) in ATVMP.
  • an increase in memory bandwidth can be prevented by limiting the range of motion vectors of the derived sub-block to within a predetermined value.
  • the matching motion deriving unit 30373 derives the motion vector spMvLX of the block or the sub block by performing either bilateral matching or template matching.
  • FIG. 15 is a diagram for describing (a) Bilateral matching and (b) Template matching.
  • the matching motion derivation mode is selected as one merge candidate (matching candidate) of the merge mode.
  • the matching motion deriving unit 30373 derives a motion vector by matching the regions in a plurality of reference pictures, on the assumption that the object performs constant motion.
  • bilateral matching it is assumed that an object passes through a region of a reference picture A, a target block of a target picture Cur_Pic, a region of a reference picture B with constant motion, matching between reference pictures A and B
  • the motion vector of the target block is derived by
  • template matching assuming that the motion vector of the adjacent region of the target block and the motion vector of the target block are equal, the motion vector is determined by matching the adjacent region Temp_Cur (template) of the target block and the adjacent region Temp_L0 of the reference block on the reference picture.
  • DiffPicOrderCnt (Cur_Pic, Ref0) and DiffPicOrderCnt (Cur_Pic, Ref1) are functions that return the difference in time information between the target picture Cur_Pic and the reference picture A, respectively, as shown in FIG. It represents a function that returns the difference in temporal information between the picture Cur_Pic and the reference picture B.
  • (mv0 [0], mv0 [1]) is determined so as to minimize the matching cost between Block_A and Block_B.
  • the (mv0 [0], mv0 [1]) derived in this manner is the motion vector assigned to the target block.
  • a motion vector spMVL0 is derived for each sub block obtained by dividing the target block.
  • Block_A [xi] [yi] -Block_B [xi] [yi]) (formula FRUC-3)
  • is the sum of xi and yi
  • Block_A [] [] and Block_B [] [] respectively have (xPos0, 0 of (formula FRUC-1) and (formula FRUC-2) upper left coordinates of the block. It is a block represented by yPos0) and (xPos1, yPos1).
  • the matching motion derivation unit 30373 includes a first motion vector search unit 303731 and a second motion vector search unit 303732.
  • the first motion vector search unit 303731 derives a motion vector for each block by matching processing.
  • the motion vector of an adjacent block such as an AMVP candidate of a target block and a merge candidate is used as an initial vector candidate to derive an initial vector in the target block.
  • Assign an initial vector candidate to (mv0 [0], mv0 [1]) set a motion vector with the smallest matching cost as a block-level initial vector, and set it again to (mv0 [0], mv0 [1]) (Initial vector search).
  • the first motion vector search unit 303731 performs a local search (local search) of the block level in the target block.
  • a local region centered on the initial vector for example, a region of ⁇ SR pixels centered on the initial vector
  • the vector with the smallest matching cost is the block level motion of the final target block. Derive the vector.
  • the second motion vector search unit 303732 derives a motion vector of each sub block included in the target block.
  • an initial vector of each subblock is derived (initial vector search).
  • the initial block candidate of the sub block is a block level motion vector derived by the first motion vector search unit 303731, a motion vector of an adjacent block in the space-time direction of each sub block, an ATMVP or STMVP vector of the subblock, or the like. is there. From these candidate vectors, a motion vector that minimizes the matching cost is determined for each subblock, and an initial vector of each subblock is derived.
  • the vector candidate used for the initial vector search of the sub block is not limited to the above-described vector.
  • the second motion vector search unit 303732 performs step search or the like (local search) in a local area centered on the initial vector of the sub block (for example, an area of ⁇ SR pixels centered on the initial vector). Then, a vector that minimizes the matching cost of the subblock vector candidate is derived as a motion vector of the final subblock.
  • the subblock level motion vector spMvLX [] may be restricted after motion vector derivation for each subblock in order not to increase the memory bandwidth.
  • the motion vector search unit 303732 enters a range of motion vectors beyond the range of ⁇ THCLIP with respect to the representative motion vector repMV (repMV [0], repMV [1]) of the sub block level motion vector. To limit (clipping) motion vectors.
  • spMvLX [k] [0] Clip3 (repMV [0]-THCLIP, repMV [0] + THCLIP-1, spMvLX [k] [0])
  • spMvLX [k] [1] Clip3 (repMV [1]-THCLIP, repMV [1] + THCLIP-1, spMvLX [k] [1])
  • the motion vector search unit 303732 may limit the motion vector of each sub-block of affine prediction as already described in (Expression CLIP1), (Expression CLIP2), and (Expression CLIP3) in ATVMP.
  • an increase in memory bandwidth can be prevented by limiting the range of motion vectors of the derived sub-block to within a predetermined value.
  • FIG. 30 is a diagram for explaining a motion search pattern.
  • stepMethod is a motion search method
  • stepIter is the number of repetitions (the number of steps) of the motion search method, and is set to a predetermined value.
  • the maximum step number stepIterSubPU of the sub block level may be set to less than the maximum step number stepIterPU of the block level.
  • the matching motion derivation unit 30373 regards the search candidate point giving the minimum matching cost as the optimum search point among the search candidate points for which the matching cost has been evaluated, and selects the motion vector bestMV of the search candidate point.
  • functions for deriving the matching cost include SAD (Sum of Absolute Difference, absolute value error sum), SATD (Hadamard transform absolute value error sum), SSD (Sum of Square difference), and the like.
  • FIG. 30A shows a motion search pattern when the diamond search is applied.
  • FIG. 30B is a diagram showing a motion search pattern when the cross search is applied.
  • step search search candidate points are set centering on an initial vector (search start point), a matching cost is derived and evaluated for each set search candidate point, and a search candidate point having an optimal matching cost is selected.
  • step process This one process is called “step process” here.
  • this "step processing" is repeatedly executed stepIter times. In each step processing, the number of search steps numIter is incremented by one.
  • open rhombuses indicate the initial vector startMV at each search frequency
  • black rhombuses indicate the optimum vector bestMV at each search step
  • black circles indicate search candidate points at each search frequency
  • open circles It shows the searched points at each search number.
  • the matching motion derivation unit 30373 initializes the search step numIter to 0 before starting the search. Then, at the start of each search step, the matching cost of the search start point is set to the minimum cost minCost, and an initial value ( ⁇ 1) is set to the optimum candidate index bestIdx.
  • mcost (X) is a function for deriving the matching cost of the search vector X.
  • the matching motion derivation unit 30373 selects and evaluates search candidate points centered on the search start point in each search step numIter. Specifically, for each search candidate index Idx, the matching motion derivation unit 30373 adds the value (offsetCandD [Idx]) of the offset candidate (offsetCandD) to the coordinates (position) startMV of the search start point to search candidates. Select point coordinates.
  • the motion vector candidate candMV is sequentially derived according to the following equation to evaluate the matching cost in each candMV.
  • offsetCandD [Idx] is an offset candidate to be added to the coordinates of the search start point in order to set the search candidate point.
  • the first motion vector search unit 303 731 is used as a diamond search offset candidate.
  • offsetCandD [8] ⁇ (0,2), (1,1), (2,0), (1, -1), (0, -2), (-1, -1), (-2, -1) 0), (-1, 1) ⁇ Use
  • bestIdx Idx (equation STEP-4)
  • the search candidate point indicated by the optimal vector bestMV is used as the search start point of the next step in order to perform the next step processing.
  • startMV bestMV (here P (1)) (Equation STEP-5) It should be noted that the determination as to whether or not there has been an update of the optimum vector bestMV is whether or not the bestIdx has been updated to a value other than the initial value (-1), besides whether the optimum vector bestMV is different from the search start point It may be determined based on whether minCost is updated to a value other than the initial cost of the start point. If the search start index nDirectStart and the search end index nDirectEnd used in the next step are determined by the following equation, depending on the position of the optimum vector bestMV (the optimum candidate index bestIdx), the already searched search points are re-determined. Efficient searching is possible without searching.
  • nStep 2-(bestIdx & 1) (equation STEP-6)
  • nDirectStart bestIdx-nStep
  • nDirectEnd bestIdx + nStep
  • the point 2 is set to an initial vector startMV (search start point P1).
  • search start point P1 search start point
  • any one of unsearched candidate points is set as a search candidate point.
  • the first motion vector search unit 303731 sets points 0 to 4 as search candidate points in the second stage of FIG. 30 (a).
  • the first motion vector search unit 303731 selects these points in order and evaluates the matching cost.
  • the point 1 is set to an initial vector startMV (search start point P2).
  • search start point P2 search start point
  • any one of unsearched candidate points and points existing in the search range is set as a search candidate point.
  • the optimal vector bestMV is not updated. If there is no update of the optimum vector bestMV, the step search process (diamond search) ends here.
  • the first motion vector search unit 303731 may perform a step search other than the diamond search.
  • the following values are used as offset candidates (offsetCandC).
  • FIG. 30 (b) shows an example in which cross search is performed after diamond search.
  • the first motion vector search unit 303731 takes points at upper, lower, left, and right (cross) positions as search candidate points with the search start point (the search start point P2 in the third row in FIG. 30A) as a center. Select in order.
  • the motion vector search unit 303731 derives a motion vector to a point to the right of P2 as the optimal vector bestMV for the block.
  • the second motion vector search unit 303732 also performs motion vector search at the sub block level in the same procedure as the first motion vector search unit 303731.
  • the matching motion derivation unit 30373 comprehensively selects the search points within the search range at regular intervals, and evaluates these matching costs in raster scan order.
  • raster scan starting from the upper left corner of the search range, the pixels are examined from left to right until reaching the right edge, and when reaching the right edge, the row is lowered by one row and from the left edge to the right And an exhaustive search method for examining pixels in order.
  • the matching motion derivation unit 30373 selects a search vector that gives the smallest matching cost among the matching costs calculated for each of the search vectors from the start point to the end point set in raster scan order.
  • Extended raster scan is to scan each point within the search range according to a predetermined scan order such as raster scan. For example, a spiral scan that scans spirally from the center to the periphery is also one of extended raster scans.
  • the first motion vector search unit 303731 searches for a block level motion vector
  • the second motion vector search unit 303732 searches for a sub block level motion vector
  • FIG. 15B is a diagram for describing template matching in the above matching processing.
  • one reference picture is referenced at a time in order to derive a motion vector of a target block Cur_block in a target picture Cur_Pic.
  • a reference block Block_A having upper left coordinates (xPos0, yPos0) specified by is set.
  • a template region Temp_Cur adjacent to the target block Cur_block and a template region Temp_L0 adjacent to the Block_A in the reference picture A are set.
  • the template region Temp_Cur is configured of a region adjacent to the upper side of the target block Cur_block and a region adjacent to the left side of the target block Cur_block.
  • the template region Temp_L0 is configured of a region adjacent to the upper side of the Block_A and a region adjacent to the left side of the Block_A.
  • the first motion vector search unit 303731 derives an initial vector at the block level of the target block using this template.
  • the matching cost of template matching is represented, for example, by the following equation.
  • the vector with the smallest matching cost is set again as (mv0 [0], mv0 [1]) as an initial vector.
  • the second motion vector search unit 303732 performs a block level local search (local search) in the target block.
  • a local region centered on the initial vector for example, a region of ⁇ SR pixels centered on the initial vector
  • the vector with the smallest matching cost is derived as the motion vector of the final target block .
  • the second motion vector search unit 303732 derives a motion vector of each sub block included in the target block.
  • the template of the sub block in the target block is acquired. If only the upper or left side area of the target block is set in the template at the block level, the template of the sub block is also made the same shape.
  • a block-level motion vector, a motion vector of an adjacent block in the space-time direction of the sub-block, an ATMVP or STMVP vector of the sub-block, etc. Decide on (initial vector search).
  • the vector candidate used for the initial vector search of the sub block is not limited to the above-described vector.
  • a step search or the like (local search) is performed in a local area centered on the initial vector of the sub block (for example, an area of ⁇ SR pixels centered on the initial vector). Then, the matching cost of the vector candidate near the initial vector of the sub block is derived, and the vector which becomes the minimum is derived as the motion vector spMvL0 of the sub block.
  • template matching may be performed on two reference pictures Ref0 and Ref1.
  • the matching of the reference picture Ref0 described above and the matching of the reference picture Ref1 are sequentially performed.
  • a reference block Block_B having upper left coordinates (xPos1, yPos1) specified by the above-mentioned and a template region Temp_L1 adjacent to the Block_B in the reference picture B are set.
  • the matching prediction unit 30373 performs the initial vector search and the local search in the target block and the sub block, respectively.
  • the search requires reading of the reference picture from the reference picture memory 306. If the area of the reference picture to be read is large, the amount of data to be transferred, that is, the memory bandwidth also increases.
  • the memory bandwidth P can be modeled as follows according to the size of the target block (width W, height H), the number of taps NTAP of the filter used for generating the interpolation image, and the memory pattern (m, n).
  • the memory pattern is the size of memory accessible at one time, and m and n are the width and height of the memory pattern.
  • the position indicated by the initial vector (startMV) of the local search and the position indicated by the optimum vector (bestMV) of the diamond search of the third step are obtained by the diamond search of step number 3 and the cross search of step number 1.
  • the difference in displacement corresponds to the final search range (search range).
  • the above search range can be calculated from the number of search steps and the search width in each step. For example, in the case of FIG. 30, since the displacement of the position is horizontal 3 and vertical 1 and the search range required in each step is horizontal and vertical ⁇ 2, the final search range is horizontal 7 and vertical 5
  • the size of the image required to generate an interpolated image of all the search candidates is a size obtained by expanding the size of the target block by the search range, that is, W + 2 * SR, H + 2 * SR.
  • the memory bandwidth MBP required for the local search is determined by the size of the target block (width W, height H), search range SR, the number of taps of the filter tap used for interpolation image generation NTAP, and the memory pattern (m * n) It can be modeled.
  • the search can be performed by adaptively setting the size of the target block, the search range, and the number of taps of the filter within the predetermined memory bandwidth MBP_TARGET.
  • MBP_TARGET (WC + 2 * SRC + NTAPC-1) * (HC + 2 * SRC + NTAPC-1) / (WC * HC) (Expression MBC-3)
  • the memory bandwidth MBP_TEST in the case of the target block search width WV, height HV), search range SRV, and number of taps NTAPV as shown in FIG. 16A-1 is as follows.
  • MBP_TEST (WV + 2 * SRV + NTAPC-1) * (HV + 2 * SRV + NTAPV-1) / (WV * HV) (Eq. MBC-4)
  • the matching prediction unit 30373 may set each of the search range of the block level and the search range of the sub block level after sub block division according to the target block size.
  • MBP_TEST (WV + 2 * SRV + 1) * (HV + 2 * SRV + 1) / (WV * HV) (equation MBC-7)
  • MBP_TARGET_HEVC a predetermined memory bandwidth
  • FIG. 31A shows the relationship between the block width WV and the search range SRV when the horizontal and vertical directions are calculated independently using (Expression MBC-8).
  • the matching prediction unit 30373 may set the search range SRV or the maximum number of steps by table lookup according to the target block size S.
  • SRV search_table [log2 [S] -2]
  • search_table [3, 6, 13, 27].
  • the matching prediction unit 30373 may set the search range SRV or the maximum number of steps by the target block size S, arithmetic operations, and shift operations.
  • the search range may be further clipped to a predetermined range.
  • SRV Clip 3 (0, SRMAX, (7 * S-4) >> 3) (Expression MBC-10)
  • SRMAX may be 16.
  • the constant of arithmetic operations is not limited to the above, and the matching prediction unit 30373 may set the search range SRV or the maximum number of steps using the following equation using predetermined a, b and c.
  • the search range is determined by processing including the operation of shifting the result of adding the second constant (b) to the product of the block size and the first constant (a) and subtracting it with the third constant (c). It may be derived.
  • SRV (a * Sb) >> c (Expression MBC-11)
  • the width WV may be used as the target block size S used to derive the search range SRV.
  • the minimum value min (WV, HV) of the width WV and the height HV may be used.
  • S (3 * minS + maxS) >> 2.
  • search range SRV can be derived by the following equation by solving the quadratic equation of (Expression MBC-8).
  • Matching prediction section 30373 may set search range SRV or the maximum number of steps using the following equation.
  • SRV ⁇ -b + SQRT (b * ba * c) ⁇ / a (Expression MBC-12)
  • a 4
  • b WV + HV + 2
  • c (WV + 1) * (HV + 1) -MBP_TARGET_HEVC * WV * HV.
  • the search range SRV calculated by (Expression MBC-12) when the width WV and height HV of the target block are set is shown in FIG. 31 (c).
  • the matching prediction unit 30373 may set the search range SRV or the maximum number of steps by table reference according to the target block size.
  • the matching prediction unit 30373 may limit the number of search steps in the step search (set the maximum number of steps) according to the target block size.
  • the setting of the maximum step size may derive stepIterPU according to the SRV derivation method described above.
  • stepIterPU may be set as follows.
  • stepIterPU (a * Sb) >> c
  • stepIterSubPU the maximum number of steps stepIterPU (stepIterSubPU) may be set as follows.
  • stepIterPU ⁇ -b + SQRT (b * ba * c) ⁇ / a
  • a 4
  • b WV + HV + 2
  • c (WV + 1) * (HV + 1) -MBP_TARGET_HEVC * WV * HV.
  • the maximum number of steps stepIterPU may be set as follows.
  • the search range SRV of MVC-14) can be expressed by the following equation.
  • FIG. 17A shows possible values of SRV when the block size (WV, HV) is 8 ⁇ 8, 16 ⁇ 16, 32 ⁇ 32.
  • the search range SRV that can be taken from the block size of 8x8, 16x16 and 32x32 from FIG. 17A is approximately twice, 4 times and 8 times the search range SRC when the block size is 4x4. That is, the matching prediction unit 30373 may set the search range of the block size (WV, HV) below the product of the ratio of the block size (WV, HV) to 4 ⁇ 4 and the search range SRC in 4 ⁇ 4. In this case, data can be transferred within a predetermined memory bandwidth.
  • the block size can also be expressed in depth (division hierarchy) rooted at the coding tree unit CTU.
  • the depth of the root is zero.
  • the matching prediction unit 30373 may set the search range according to the division hierarchy (depth) in the same manner as setting the search range according to the target block size. For example, the matching prediction unit 30373 may derive the search range by the following equation.
  • SRV ⁇ (CTUSize >> (QTDepth + BTDepth / 2)) * (SRC + 1) / 4 -1 (Adaptive setting method 2) Filter tap number setting according to block size
  • the matching prediction unit 30373 derives the filter tap number NTAPV of (Expression MBC-14) by the following expression.
  • FIG. 17B shows possible values of NTAPV when the block size (WV, HV) is 8 ⁇ 8, 16 ⁇ 16, 32 ⁇ 32. From FIG. 17B, the number of filter taps NTAPV that can be taken for the block size of 8 ⁇ 8, 16 ⁇ 16 and 32 ⁇ 32 is about twice, 4 times and 8 times the number of filter taps NTAPC for the block size of 4 ⁇ 4. That is, by setting the number of filter taps equal to or less than the ratio of block size (WV, HV) to 4 ⁇ 4, data can be transferred within a predetermined memory bandwidth.
  • the matching prediction unit 30373 when the matching prediction unit 30373 calculates the number of filter taps when the block size is changed based on the predetermined block size and the number of filter taps satisfying the predetermined memory bandwidth, the matching prediction unit 30373 changes the predetermined block size.
  • the number of filter taps may be set equal to or less than the product of the ratio to the block size and the predetermined number of filter taps. Thereby, data can be transferred within a predetermined memory bandwidth.
  • the matching prediction unit 30373 may set the number of taps of the filter according to the division hierarchy (depth), as in the setting of the number of taps of the filter according to the block size.
  • Adaptive setting method 3 Search range and filter tap number setting according to block size
  • the block size width WV, height HV
  • the matching prediction unit 30373 derives the search range SRV of (Expression MBC-14) and the number of filter taps NTAPV by the following expression.
  • WV * (2 * SRC + NTAPC-1)> WC (2 * SRV + NTAPV-1) (Expression MB-5)
  • HV * (2 * SRC + NTAPC-1)> HC (2 * SRV + NTAPV-1)
  • NTAPC 3
  • SRC 1, the following equation is derived.
  • the matching prediction unit 30373 calculates the search range and the number of filter taps when the block size is changed based on the predetermined block size, the search range, and the number of filter taps that satisfy the predetermined memory bandwidth, the search
  • the result of the linear operation of the range and the number of filter taps may be set to less than or less than the changed block size. Thereby, data can be transferred within a predetermined memory bandwidth.
  • the matching prediction unit 30373 may set the search range and the number of taps of the filter according to the division hierarchy (depth), similarly to the setting of the search range and the number of taps of the filter according to the block size.
  • the matching prediction unit 30373 refers to the motion vectors of a plurality of adjacent blocks as initial vector candidates, and an initial vector (motion vector) for which the matching cost is minimized. Derive Therefore, the pixel value of the area shifted by each motion vector candidate is transferred from each reference picture.
  • FIG. 18A is an example in which the difference value between the initial vector candidates is large, that is, the magnitude and direction are random.
  • FIG. 18C is an example in which the difference values between the initial vector candidates are small, that is, the magnitudes and directions are similar.
  • the broken line blocks in FIG. 18B and FIG. 18D indicate block positions where the target blocks in FIGS. 18A and 18C are shifted by the motion vector.
  • 18B and 18D is a range transferred from the reference picture memory 306 at the time of calculation of the matching costs in FIGS. 18A and 18C. In FIG. 18B, the transfer range is wider than that of FIG. 18D, and it can be seen that the data amount several times larger is transferred.
  • the number of candidates used for the initial vector search may be limited in order to reduce the transfer amount of image data to a predetermined memory bandwidth or less.
  • the matching prediction unit 30373 may limit the motion vectors used for the initial vector search to CandN motion vectors from the head of the merge candidate list or the predicted vector candidate list mvpListLX [].
  • the motion vector difference value is less than one pixel
  • the representative vector repMV (average value) of the motion vectors of the candidate list is calculated, and as shown in FIG. 19A, the transfer range is horizontal ⁇ vertical ⁇ Trans centered on the representative vector repMV (average value MVavg) It may be limited to the range of pixels.
  • the representative vector may be an average vector of motion vectors of the candidate list.
  • Nmerge is the number of motion vectors in the merge candidate list.
  • Npred is the number of motion vectors in the prediction vector candidate list.
  • the representative vector may be the top motion vector of the candidate list.
  • the representative vector is expressed by the following equation.
  • repMV [0] mergeCandList [0] [0] (Expression MB-9)
  • repMV [1] mergeCandList [0] [1]
  • the representative vector is expressed by the following equation.
  • repMV [0] mvpListLX [0] [0] (Expression MB-10)
  • repMV [1] mvpListLX [0] [1]
  • the reference pictures referred to by the motion vector of the candidate list may be counted, and only the motion vector referring to the most frequently used reference picture may be used for the initial vector search. That is, when the CandP-th picture RefPicListX [CandP] of the reference picture list RefPicListX [] is the most referenced picture, only the motion vector whose reference picture is RefPicListX [CandP] may be subjected to the initial vector search.
  • the matching prediction unit 30373 can transfer data necessary for the search within a predetermined memory bandwidth by limiting the motion vector of the adjacent block used to determine the initial vector.
  • matching prediction section 30373 performs block level search for transfer of image data from reference picture memory 306 by prohibiting reference outside the search range used for initial vector search of blocks in initial block vector search of sub blocks. It can be reduced to one transfer at a time. For example, by clipping a motion vector, reference outside the search range can be prohibited.
  • the search range and the number of filter taps may be set according to the magnitude of the motion vector derived at the block level.
  • the search range is set large, and when the block level motion vector is smaller than the predetermined threshold value THMV, the search range is set small.
  • the number of filter taps is shortened when the block level motion vector is larger than the predetermined threshold THMV, and the number of filter taps is set longer when the block level motion vector is smaller than the predetermined threshold THMV.
  • the search range SR when the block level motion vector is larger than the predetermined threshold value THMV, the search range SR may be set large and the number of filter taps NTAP may be set short.
  • the search range SR when the block level motion vector is smaller than the predetermined threshold value THMV, the search range SR may be small and the number of filter taps NTAP may be set long.
  • the number of filter taps may be set to 0, and the motion vector search may be limited to integer precision. Then, when the block level motion vector is less than or equal to the predetermined threshold value THMV, the number of filter taps may be set to NTAP (NTAP ⁇ 0), and motion vector search with decimal precision may be performed.
  • the matching prediction unit 30373 can appropriately control the data transfer amount by setting the search range and the number of filter taps according to the size of the motion vector derived at the block level.
  • the maximum search range is determined from the maximum value stepIterPU of the block level search step.
  • the maximum search range is determined from the maximum value stepIterSubPU of the search step at the sub block level.
  • FIG. 32 shows the relationship between the search range and the number of search steps.
  • the first motion vector search unit 303 731 advances at most rW in the horizontal direction and at most rH in the vertical direction for each search step.
  • One square in FIG. 32 represents 1/16 * 1/16 pixels, and the case of searching for a motion vector with 1/4 accuracy will be described.
  • the first motion vector search unit 303731 may set the search range SRb (SRWb, SRHb) according to the following equation from the maximum value stepIterPU of the block level search step.
  • search range SRs (SRWs, SRHs) may be set by the following equation.
  • the first motion vector search unit 303731 may set the maximum value of the number of search steps so as to satisfy the following expression from the search range SR (SRW, SRH).
  • stepIterPU min (SRWb / rW, SRHb / rH)
  • stepIterSubPU min (SRWs / rW, SRHs / rH)
  • the maximum value stepIterPU of the block level search step may be derived by the following equation.
  • stepIterPU min (SRWb / rW, SRHb / rH)
  • stepIterSubPU min (SRWb / rW, SRHb / rH)
  • SRWs SRW-abs (bestMVb [0])
  • SRHs SRH-abs (bestMVb [1])
  • stepIterSubPU ⁇ min (SRWs / rW, SRHs / rH)
  • bestMVb is an optimal vector when the block level search is finished.
  • the second motion vector search unit 303732 also determines the maximum value of the number of search steps at the sub block level in the same procedure as the first motion vector search unit 303731.
  • step search it is possible to search for a motion vector within a predetermined search range by limiting the number of search steps. Therefore, there is no need to transfer additional image data from the reference picture memory, and the memory bandwidth required for transfer can be reduced.
  • FIG. 20A is a flowchart of the bilateral matching process
  • FIG. 20B is a flowchart of the template matching process.
  • S3201 to S3204 are block searches performed at the block level. That is, a pattern match is used to derive motion vectors throughout the block (CU or PU).
  • S3205 to S3208 are subblock searches performed at the subblock level. That is, motion vectors are derived in units of subblocks constituting a block using pattern matching.
  • the matching prediction unit 30373 (first motion vector search unit 303731) sets an initial vector candidate of the block level in the target block.
  • the matching prediction unit 30373 (first motion vector search unit 303731) implements initial vector restriction and limits the search range at the block level. Also, the search range or the number of taps of the motion compensation filter used in the block level search is determined by any of the above-mentioned adaptive setting methods 1 to 3.
  • the matching prediction unit 30373 searches for a vector with the smallest matching cost from among the initial vector candidates constrained in S3202, and derives an initial vector.
  • the matching prediction unit 30373 (first motion vector search unit 303731) performs a local search of the block level in the target block, and derives a final motion vector of the target block.
  • the matching prediction unit 30373 (second motion vector search unit 303732) sets initial vector candidates for each sub block in the target block.
  • the matching prediction unit 30373 (second motion vector search unit 303732) clips the initial vector candidate so that the initial vector search of the sub block does not exceed the block level search range. Also, the sub block level search range is limited so that the search of each sub block does not use image data outside the search range used at the block level.
  • the matching prediction unit 30373 searches for a vector with the smallest matching cost among the initial vector candidates constrained in S3206, and sets it as an initial vector at the sub block level. .
  • step S3208 the matching prediction unit 30373 (second motion vector search unit 303732) performs a local search centering on the initial vector of the sub block selected in step S3207, and determines the vector for which the matching cost is minimum. It is derived as a block motion vector.
  • S3211 to S3204 are block searches executed at the block level. Also, S3205 to S3208 are subblock searches performed at the subblock level. The same processes as in FIG. 20A are denoted by the same reference numerals.
  • the matching prediction unit 30373 acquires a template of the target block (S3211).
  • the matching prediction unit 30373 (first motion vector search unit 303731) sets an initial vector candidate of the block level in the target block.
  • the matching prediction unit 30373 (first motion vector search unit 303731) implements initial vector restriction, and limits the search range at the block level. Further, any one of the above-mentioned adaptive setting methods 1 to 3 is carried out to determine the search range used in the block level search range or the number of taps of the motion compensation filter.
  • the matching prediction unit 30373 (first motion vector search unit 303731) sets a vector with the smallest matching cost as an initial vector at the block level among the initial vector candidates set above.
  • the matching prediction unit 30373 (first motion vector search unit 303731) searches a local region centered on the initial vector derived in S3203, and the vector with the smallest matching cost is the final target block. Set as a motion vector.
  • the matching prediction unit 30373 (second motion vector search unit 303732) sets initial vector candidates for each sub block in the target block.
  • the matching prediction unit 30373 (second motion vector search unit 303732) clips the initial vector candidate so that the initial vector search of the sub block does not exceed the block level search range. Also, the sub block level search range is limited so that the search of each sub block does not use image data outside the search range used at the block level.
  • the matching prediction unit 30373 acquires a template of the sub block in the target block.
  • the matching prediction unit 30373 (second motion vector search unit 303732) sets a vector with the smallest matching cost as an initial vector at the sub block level out of the initial vectors constrained in S3206.
  • step S3208 the matching prediction unit 30373 (second motion vector search unit 303732) performs a local search centering on the initial vector of the sub block set in step S3207, and determines the vector with the smallest matching cost. It is derived as a block motion vector.
  • the motion compensation unit 3091 performs bi-prediction processing using the two derived motion vectors.
  • the fruc_merge_idx to be output to the motion compensation unit 3091 is derived by the following equation.
  • fruc_merge_idx BM_flag + (TM_flag ⁇ 1) (Expression FRUC-7)
  • BM_flag and TM_flag may be derived before the pattern match vector derivation process, and only the matching process in which the value of the flag is true may be performed.
  • BM_flag fruc_merge_idx & 1 (formula FRUC-8)
  • TM_flag (fruc_merge_idx & 2) >> 1
  • the motion compensation unit 3091 may generate a predicted image using OBMC processing.
  • OBMC Overlapped block motion compensation
  • an interpolation image PredC generated using an inter prediction parameter (hereinafter, motion parameter) of a target block (target sub block) for each sub block with respect to sub blocks constituting the target block, and a target
  • An interpolated image is generated using a second interpolated image (interpolated image of target block) PredRN generated using motion parameters of adjacent blocks (adjacent points) of the sub block It is a process.
  • processing of correcting the interpolated image PredC of the target block using the interpolated image PredRN based on the motion parameters of the adjacent block (interpolation) in the pixels (boundary peripheral pixels) in the target block that are close to the block boundary Image correction is performed.
  • the processing may be performed in units of subblocks.
  • FIG. 22 is a diagram showing an example of a region for generating a predicted image using motion parameters of adjacent blocks according to the present embodiment.
  • the pixels of hatched sub blocks within a predetermined distance from the block boundary are to be subjected to the OBMC process.
  • the application of the OBMC process is not applied. That is, if the right side of the subblock out of the subblocks constituting the target block is outside the target block or the lower side of the subblock is outside the target block, it is not applied.
  • the motion parameters of sub-blocks within the target block may differ from each other, and therefore, as shown in FIG. It becomes an application object.
  • the OBMC process is performed in units of sub-blocks obtained by dividing the block (in units of OBMC blocks), in order to achieve uniform processing regardless of the sizes of the target block and the adjacent blocks.
  • the size of the subblocks may be 4x4, 8x8 or the like.
  • an interpolated image of a target sub block (first OBMC interpolated image) derived based on an inter prediction parameter of a target block, and an interpolated image derived based on an inter prediction parameter of an adjacent block (second Two types of interpolation images (OBMC interpolation image) are generated, and an interpolation image to be used finally for prediction is generated by these weighted addition processing.
  • NumOBMC in the vertical direction from the boundary at the upper and lower boundaries (horizontal boundary) of the target block (target sub-block)
  • Two types of interpolation images are generated using two types of motion vectors for pixel values of.
  • two interpolated images are generated using two types of motion vectors for NumOBMC pixel values in the horizontal direction from the boundary .
  • FIG. 23 is a flowchart showing parameter derivation processing performed by the OBMC prediction unit 30374 according to the present embodiment.
  • the OBMC prediction unit 30374 determines, with respect to the target sub-block, the presence / absence and availability of adjacent blocks (reference blocks) adjacent in the upper, left, lower, and right directions.
  • FIG. 23 after the OBMC processing (interpolated image correction) of all the subblocks is performed in the upper, left, lower, and right directions, a method of shifting to processing in the next direction is adopted. After performing OBMC processing (interpolated image correction) in all directions on a block, it is also possible to adopt a method of shifting to processing of the next sub block.
  • OBMC processing interpolated image correction
  • the OBMC prediction unit 30374 checks the necessity of the OBMC process and the presence or absence of the adjacent block (S3401).
  • the prediction unit is in block units and the target subblock is not in contact with the block boundary in the direction indicated by i, or when the subblock is in contact with the right or lower boundary of the block, it is necessary for OBMC processing (interpolated image correction) Since there is no adjacent block (N in S3401), the process advances to S3404 and sets the flag obmc_flag [i] to 0. Otherwise (if the prediction unit is a block unit and the target sub-block touches a block boundary, or if the processing unit is a sub-block), there is an adjacent block required for the OBMC process (Y in S3401), S3402 move on.
  • the OBMC prediction unit 30374 checks whether the adjacent block in the direction indicated by i is an intra prediction block as the availability of the adjacent block (S3402). If the adjacent block is an intra prediction block (Y in S3402), the process advances to S3404 to set obmc_flag [i] of the corresponding direction i to 0. Otherwise (if the adjacent block is an inter prediction block) (N in S3402), the process proceeds to S3403.
  • the upper adjacent block is intra prediction with respect to the target sub-block SCU4 [3] [0] of the target block CU4, and thus the target sub-block SCU4 [3].
  • Obmc_flag [1 (up)] of [0] is set to 0.
  • motion vector and the reference picture index are used in the above equation, determination may be made using the motion vector and POC as in the following equation.
  • refPOC is the POC of the target sub block
  • refPOCRN is the POC of the adjacent block
  • the OBMC off conditions use any of the OBMC off conditions 0 to 6, 1 'to 5' described below.
  • the OBMC prediction unit 30374 outputs the prediction parameter (obmc_flag and the motion parameter of the adjacent block of each sub block) derived above to the inter prediction image generation unit 309, and the inter prediction image generation unit 309 refers to obmc_flag to perform OBMC processing.
  • the OBMC-interpolated image is generated for the target block while determining the necessity of (1) (details will be described in (motion compensation)).
  • the interpolation image (first OBMC interpolation image) of the target sub-block derived based on the inter prediction parameter of the target block, the interpolation image (second OBMC interpolated image). Therefore, the transfer amount of image data from the reference picture memory 306, that is, the memory bandwidth increases. In order to suppress the increase in the memory bandwidth, any of the following conditions in which the overhead of the transfer amount indicates the size may be added to the determination condition of OBMC on.
  • OBMC OFF Condition 0 OBMC Prohibition of Small Block
  • the OBMC prediction unit 30374 prohibits the OBMC process when the width W and the height H of the block are smaller than a predetermined value OBMC_S.
  • OBMC off condition 1 OBMC prohibition of small sub-blocks
  • OBMC prediction unit 30374 determines the sub-block unit size if the sub-block has a small size (width BW or height BH is smaller than predetermined value OBMC_S). Prohibit OBMC processing in a specific direction of sub-blocks.
  • the condition of the small block is not limited to the sub-block width BW or height BH being smaller than the predetermined value OBMC_S, and the sum of the sub-block width BW and height BH may be smaller than the predetermined value OBMC_S. Good.
  • OBMC processing in a specific direction may be prohibited.
  • OBMC process in a specific direction (for example, the OBMC process in the right direction and the lower direction of the sub block) may be prohibited.
  • OBMC off condition 2 When the difference between the small subblock and the adjacent subblock and the motion vector is large, the OBMC prohibition OBMC prediction unit 30374 determines that the size of the subblock is smaller than the predetermined value OBMC_S in the prediction of the subblock unit. When the difference between the motion vector mvLX [] of the target subblock and the motion vector mvLXRN [] of the adjacent subblock is larger than the predetermined value OBMC_MV, the OBMC process of the subblock is inhibited.
  • diffMV abs (mvLX [0] -mvLXRN [0]) + abs (mvLX [1] -mvLXRN [1]) (Expression OBMC-5) if ((BW ⁇ OBMC_S
  • OBMC off condition 3 OBMC prohibited by combination with a specific tool
  • the motion vector of the target block or target sub block is an adjacent block or an adjacent sub block. Very similar to the motion vector of, and the difference in motion vector is small.
  • OBMC memory band reduction 4 In the OBMC process, transferring image data necessary for generating the interpolated image PredRN from the reference picture memory 306 is a cause of increasing the memory bandwidth. At the vertical CTU boundary that divides the CTUs to the left and right, reference is made by temporarily storing in the cache the image data used for processing the immediately preceding CTU located on the left side and using it for OBMC processing of the next CTU. The image data transferred from the picture memory 306 is reduced.
  • OBMC OFF Condition 4 OBMC Prohibited at Upper Boundary of CTU
  • the OBMC predicting unit 30374 prohibits the OBMC processing in the upward direction when the upper side of the sub block overlaps with the boundary of the CTU.
  • the OBMC prediction unit 30374 corrects using the interpolation image PredRN based on the motion parameter on the upper side of the sub block. If the upper side of the sub block belonging to the target block is equal to the CTU to which the target block belongs, correction is performed using the interpolated image PredRN based on the motion parameter on the upper side of the sub block.
  • the following processing may be performed.
  • the OBMC may also be prohibited at the left boundary of the CTU.
  • the OBMC prediction unit 30374 prohibits the OBMC processing in the left direction when the left side of the sub-block overlaps the CTU boundary.
  • the following processing may be performed.
  • OBMC off condition 5 OBMC prohibition of small subblock at upper boundary of CTU
  • the OBMC prediction unit 30374 performs OBMC processing in the upward direction when the upper boundary of the subblock overlaps with the boundary of CTU and the subblock is a small block.
  • OBMC Off Condition 4 ' When the upper or lower boundary of the OBMC prohibited sub-block at the upper and lower boundaries of the CTU overlaps the CTU boundary, the right and lower OBMC processing is inhibited.
  • OBMC OFF condition 5 ' When the upper or lower boundary of the OBMC prohibited sub-block of the small sub-block at the upper and lower boundaries of CTU overlaps the CTU boundary, the width BW of the sub-block or the height BH is greater than the predetermined value OBMC_S If smaller, prohibit right and downward OBMC processing.
  • the BTM prediction unit 3038 uses bi-directional motion vectors derived by the merge prediction parameter derivation unit 3036 as a template, and executes bilateral template matching (BTM) processing to achieve high accuracy. Deriving motion vectors.
  • the BTM prediction unit 3038 performs bilateral template matching (BTM) processing.
  • FIG. Fig.24 (a) is a figure which shows the relationship of the reference picture and template in BTM prediction, (b) is a figure which shows the flow of a process, (c) is a figure explaining the template in BTM prediction.
  • the BTM prediction unit 3038 first selects the prediction block of the target block Cur_block from the plurality of motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter derivation unit 3036. Generate and use this as a template. Specifically, the prediction block Cur_Temp is generated from the motion compensated image predL0 generated by mvL0 and the motion compensated image predL1 generated by mvL1.
  • Cur_Temp [x] [y] Clip3 (0, (1 ⁇ bitDepth) -1, (predL0 [x] [y] + predL1 [x] [y] +1) >> 1) (Equation BTM-1)
  • the BTM prediction unit 3038 sets motion vector candidates within a search range ⁇ SR pixel range centered on mvL0 and mvL1 (initial vector), respectively, and generates a motion compensated image PredL0 ′ generated by each motion vector candidate, Deriving the matching cost between PredL1 ′ and the template. Then, the vectors mvL 0 ′ and mv L 1 ′ which minimize the matching cost are set as the updated motion vectors of the target block.
  • the BTM unit 3038 carries out a search in a range of ⁇ SR pixels centered on the initial vectors mvL0 and mvL1 in the target block. This search requires reading of the reference picture from the reference picture memory 306. If the area of the reference picture to be read is large, the amount of data to be transferred, that is, the memory bandwidth also increases.
  • the range of the predetermined memory bandwidth MBP_TARGET can be set by adaptively setting the size of the target block, the search range, and the number of filter taps (using any of the adaptive setting methods 1 to 3). You can conduct a search within.
  • the search range or the number of taps of the motion compensation filter may be set. Specifically, when the initial vector is large, the search range is set large, and when the initial vector is small, the search range is set small. Alternatively, when the initial vector is large, the number of filter taps is short, and when the initial vector is small, the number of filter taps is set long. Alternatively, as shown in FIG.
  • the search range when the initial vector is large, the search range may be set large and the number of taps of the filter may be set short.
  • the search range when the initial vector is small, the search range may be small and the number of taps of the filter may be set long.
  • the search range and the number of taps of the filter derived using any of these methods are used to generate a template and motion compensated image.
  • the BTM prediction unit 3038 acquires a template (S3501).
  • the template is generated from the motion vectors (for example, mvL0 and mvL1) derived by the merge prediction parameter derivation unit 3036.
  • the BTM prediction unit 3038 determines the number of taps of the search range SR or the motion compensation filter using the above-described adaptive selection method (S3502).
  • the local search is performed using the search range SR or the number of taps of the motion compensation filter determined here.
  • the BTM prediction unit 3038 performs a local search.
  • the local search may be performed by repeating a plurality of different precision searches as in S3503 to S3506.
  • the local search is performed in the order of M pixel accuracy search L0 processing (S3503), N pixel accuracy search L0 processing (S3504), M pixel accuracy search L1 processing (S3505), and N pixel accuracy search L1 processing (S3506).
  • transfer of image data from the reference picture memory 306 by creating a BTM predicted image using the block size or the search range determined based on the size of the initial vector or the number of taps of the motion compensation filter The amount can be limited to a predetermined value or less. Thus, memory bandwidth can be reduced.
  • FIG. 6B is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to the present 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 3036.
  • the vector candidate derivation unit 3033 derives a prediction vector candidate from the motion vector mvLX of the already processed block stored in the prediction parameter memory 307 based on the reference picture index refIdx, and the prediction vector candidate list mvpListLX [of the vector candidate storage unit 3036] Store in].
  • the vector candidate selection unit 3034 selects, as a prediction vector mvpLX, a motion vector mvpListLX [mvp_lX_idx] indicated by the prediction vector index mvp_lX_idx among the prediction vector candidates of the prediction vector candidate list mvpListLX [].
  • the vector candidate selection unit 3034 outputs the selected prediction vector mvpLX to the addition unit 3035.
  • the prediction vector candidate is a block for which decoding processing has been completed, and is derived by scaling a motion vector of a block (for example, an adjacent block) in a predetermined range from the decoding target block.
  • the adjacent block is a block spatially adjacent to the block to be decoded, for example, a left block, an upper block, and an area temporally adjacent to the block to be decoded, for example, a picture to be decoded And the region obtained from the prediction parameters of the block containing the same position as.
  • 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 addition unit 3035 outputs the calculated motion vector mvLX to the predicted image generation unit 308 and the prediction parameter memory 307.
  • motion vector derived in the merge prediction parameter derivation unit 3036 may be output via the BTM prediction unit 3038 without outputting the motion vector as it is to the inter prediction image generation unit 309.
  • FIG. 14B is a schematic diagram showing the configuration of the inter predicted image generation unit 309 included in the predicted image generation unit 308 according to the present embodiment.
  • the inter predicted image generation unit 309 includes a motion compensation unit (predicted image generation device) 3091 and a weight prediction unit 3094.
  • the motion compensation unit 3091 receives the inter prediction parameters (prediction list use flag predFlagLX, reference picture index refIdxLX, motion vector mvLX, on / off flag, etc.) input from the inter prediction parameter decoding unit 303 from the reference picture memory 306.
  • the reference picture RefX specified by the reference picture index refIdxLX an interpolated image (motion compensated 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 block.
  • a filter called a motion compensation filter for generating pixels at decimal positions is applied to generate a motion compensated image.
  • an interpolation image is used to calculate an interpolated image from pixel values of reference pictures at integer pixel positions.
  • M is a natural number of 2 or more
  • an interpolation image is used to calculate an interpolated image from pixel values of reference pictures at integer pixel positions.
  • the motion compensation unit 3091 first derives the integer position (xInt, yInt) and the phase (xFrac, yFrac) corresponding to the intra-prediction block coordinates (x, y) according to the following equation.
  • the motion compensation unit 3091 derives a temporary image temp [] [] by performing horizontal interpolation processing on the reference picture refImg using an interpolation filter.
  • shift1 is a normalization parameter for adjusting the range of values
  • offset1 1 ⁇ (shift1-1).
  • the motion compensation unit 3091 derives an interpolated image Pred [] [] by performing vertical interpolation processing on the temporary image temp [] [].
  • shift2 is a normalization parameter for adjusting the range of values
  • offset2 1 ⁇ (shift2-1).
  • Pred [x] [y] ( ⁇ mcFilter [yFrac] [k] * temp [x] [y + k ⁇ NTAP / 2 + 1] + offset2) >> shift2 (Expression INTER-3)
  • the above Pred [] [] is derived for each of the lists L0 and L1 (referred to as the interpolated images PredL0 [] [] and PredL1 [] []), and the interpolated image PredL0 [] []
  • An interpolated image Pred [] [] is generated from the interpolated image PredL1 [] [].
  • OBMC interpolated image generation In OBMC, two types of interpolation images are generated: an interpolation image of the target sub-block derived based on the inter prediction parameter of the target block, and an interpolation image derived based on the inter prediction parameter of the adjacent block. In the weighted addition process of, an interpolated image to be used finally for prediction is generated.
  • the interpolation image of the target sub-block derived based on the inter prediction parameter of the target block is interpolated with the interpolation image PredC (first OBMC interpolated image) and the interpolation image derived based on the inter prediction parameter of the adjacent block. It is called an image PredRN (second OBMC interpolated image).
  • N indicates any one of the upper side (A), the left side (L), the lower side (B) and the right side (R) of the target sub block.
  • the interpolation image PredC becomes the motion compensated image PredLX of the target sub block as it is.
  • the motion compensated image PredLX of the target sub block is generated from the interpolated image PredC and the interpolated image PredRN.
  • the motion compensation unit 3091 performs interpolation on the basis of the inter prediction parameters (prediction list use flag predFlagLX, reference picture index refIdxLX, motion vector mvLX, OBMC flag obmc_flag) of the target sub-block input from the inter prediction parameter decoding unit 303.
  • the size of the sub-block in contact with the CTU boundary and the size of the sub-block are increased by increasing the size of the sub-block in the horizontal direction at the CTU boundary in the horizontal direction Reduce the number of motion vectors and reduce the transfer amount of image data.
  • FIG. 25 (a) is an example in the case of prediction in block units
  • FIG. 25 (b) is an example in the case of prediction in sub block units. Since the subblock size inside the block is the same, as shown in FIG. 25, the subblock prediction parameter derivation unit 3037 changes the subblock size for each block for blocks that do not touch the CTU boundary and for blocks that do not. Good.
  • means for deriving a motion vector in units of subblocks includes a space-time sub-block prediction unit 30371 (ATMVP prediction means, STMVP prediction means), affine prediction unit 30372 (affine prediction means), matching motion derivation unit 30373 (matching prediction means Or OBMC prediction unit 30374. That is, the sub-block sizes of ATM VP prediction, STM VP prediction, affine prediction, matching prediction, and OBMC prediction may be increased in the case of being located at the CTU boundary.
  • the size of the subblock of the block not in contact with the CTU boundary may be (BW, BH), and the size of the subblock of the block in contact with the CTU boundary may be (2 * BW, 2 * BH).
  • the size of the subblock of the block not in contact with the CTU boundary may be (BW, BH), and the size of the subblock of the block in contact with the CTU boundary may be (2 * BW, BH). That is, horizontally long sub-blocks may be used in the block adjacent to the CTU boundary.
  • the motion vector is derived with the size of a certain subblock, and after derivation, the derived motion vectors of a plurality of subblocks are integrated It is also good.
  • motion vectors of two or more subblocks for example, they are derived by the following method.
  • C1 A motion vector of a representative subblock (for example, the upper left subblock) of the integrated subblock is set as a representative vector.
  • R1 Among the motion vectors of the integrated adjacent sub-block, the motion vector located at the leftmost is set as a representative vector of the adjacent sub-block.
  • R2) An average vector of motion vectors of the integrated adjacent sub-blocks is set as a representative vector of the adjacent sub-blocks.
  • R3) Among the plurality of motion vectors, the motion vector having the smallest difference value with the motion vector of the target sub block is set as a representative vector of the adjacent sub block.
  • the above is a moving image including a sub-block prediction unit that divides the target block into a plurality of sub-blocks and derives a motion vector in units of sub-blocks, and a predicted image generation unit that generates an interpolated image using the derived motion vector
  • a motion vector is derived depending on whether or not the upper side of the sub block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs.
  • the sub-block prediction means sets the first size to the sub-block size when the upper side of the sub-block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs, in other cases. Is characterized by setting a second size.
  • the sub-block prediction means integrates the sub-block size to derive a motion parameter when the upper side of the sub-block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs. Do.
  • FIG. 23B is a flowchart for describing an operation of interpolation image generation in OBMC prediction of the motion compensation unit 3091.
  • the motion compensation unit 3091 determines whether the block boundary is a CTU boundary (S3411). If the block boundary is a CTU boundary (Y in S3411), the process proceeds to S3412. If not (N in S3411), the process proceeds to S3413.
  • the motion compensation unit 3091 integrates the subblocks of the target block to change the size, and sets a motion vector by any one of the combinations of C1) to C3) and R1) to R3) described above (S3412).
  • the motion compensation unit 3091 performs weighted average processing on the first OBMC interpolated image PredC [x] [y] of the sub block and the second OBMC interpolated image PredRN [x] [y] of the sub block (S3416).
  • the motion compensation unit 3091 performs weighted averaging on the first OBMC interpolated image PredC [x] [y] of the sub block and the second OBMC interpolated image PredRN [x] [y] of the sub block. To update the interpolated image PredC [x] [y].
  • the motion compensation unit 3091 selects NumOBMC in a direction perpendicular to the direction indicated by i. The following weighted averaging process is performed on the pixels.
  • PredC [x] [y] ((w1 * PredC [x] [y] + w2 * PredRN [x] [y]) + o) >> shift (Equation INTER-4)
  • the shift value shift may be set or fixed according to the distance of the target pixel from the subblock boundary.
  • a prediction image is generated using interpolated images of a plurality of adjacent blocks.
  • a method of updating the first OBMC interpolated image PredC [x] [y] of the sub block from the motion parameters of the plurality of adjacent blocks will be described.
  • the motion compensation unit 3091 uses the motion parameter of the upper adjacent block for the first OBMC-interpolated image PredC [x] [y] of the subblock of the target subblock. Apply the second OBMC interpolated image PredRA [x] [y] of the block to update PredC [x] [y].
  • PredC [x] [y] ((w1 * PredC [x] [y] + w2 * PredRA [x] [y]) + o) >> shift (Equation INTER-5)
  • the second OBMC interpolated image PredRL [x] [y], PredRL [x] [y], PredRL [x] [y] of the subblock created using the motion parameters of The interpolated image PredC [x] [y] is sequentially updated. That is, it updates by the following formula.
  • PredC [x] [y] ((w1 * PredC [x] [y] + w2 * PredRL [x] [y]) + o) >> shift (Expression INTER-6)
  • PredC [x] [y] ((w1 * PredC [x] [y] + w2 * PredRB [x] [y]) + o) >> shift
  • PredC [x] [y] ((w1 * PredC [x] [y] + w2 * PredRR [x] [y]) + o) >> shift
  • the prediction image PredLX [x] [y] is set (S3417).
  • PredLX [x] [y] PredC [x] [y] (Equation INTER-7) Since the motion compensation unit 3091 can generate a prediction image in consideration of the motion parameters of the adjacent block of the target sub block, the OBMC process can generate a prediction image with high prediction accuracy.
  • the division mode of the block including the sub-block to be subjected to the OBMC process may also be any division mode such as 2NxN, Nx2N, NxN, and the like.
  • the transfer amount of image data from the reference picture memory 306 can be limited to a predetermined value or less by creating a predicted image by setting the sub-block size large at the CTU boundary.
  • memory bandwidth can be reduced.
  • the weight prediction unit 3094 generates a predicted image of the target block by multiplying the input motion compensated image PredLX by the weight coefficient.
  • one of the prediction list use flags predFlagL0 or predFlagL1 is 1 (in the case of uni-prediction)
  • the input motion compensated image PredLX (LX is L0 or L1) when the weight prediction is not used is the pixel bit number bitDepth Perform the processing of the following formula according to.
  • Pred [x] [y] Clip3 (0, (1 ⁇ bitDepth) -1, (PredLX [x] [y] + offset1) >> shift1) (Expression INTER-8)
  • predFlagL0 and predFlagL1 are 1 (in the case of bi-prediction BiPred)
  • weight prediction is not used
  • the input motion compensated images PredL0 and PredL1 are averaged and the number of pixel bits is Perform the processing of the following formula according to.
  • Pred [x] [y] Clip3 (0, (1 ⁇ bitDepth) -1, (PredL0 [x] [y] + PredL1 [x] [y] + offset2) >> shift2) (Expression INTER-9)
  • shift2 15-bit Depth
  • offset2 1 ⁇ (shift2-1).
  • 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.
  • Pred [x] [y] Clip3 (0, (1 ⁇ bitDepth) -1, ((PredLX [x] [y] * w0 + 2 ⁇ (log2WD-1)) >> log2WD) + o0) (Expression INTER-10)
  • log2WD is a variable indicating a predetermined shift amount.
  • the weight prediction unit 3094 derives weight prediction coefficients w0, w1, o0, and o1 from encoded data, and performs the processing of the following formula.
  • Pred [x] [y] Clip3 (0, (1 ⁇ bitDepth) -1, (PredL0 [x] [y] * w0 + PredL1 [x] [y] * w1 + ((o0 + o1 + 1) ⁇ log 2 WD)) >> (log 2 WD + 1)) (Equation INTER-11) (Configuration of video coding device)
  • the configuration of the moving picture coding apparatus 11 will be described. The configuration of the moving picture coding apparatus 11 will be described below using FIG. 26 as an example.
  • the moving picture coding apparatus 11 includes a predicted image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, and prediction parameters.
  • a memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, an encoding parameter determination unit 110, and a prediction parameter encoding unit 111 are included.
  • the prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding unit 113. Note that the video encoding device 11 may be configured not to include the loop filter 107.
  • the prediction image generation unit 101 generates, for each picture of the image T, a prediction image P of a prediction unit block for each coding unit CU, which 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 coding unit 111.
  • the prediction parameter input from the prediction parameter coding unit 111 is, for example, a motion vector in the case of inter prediction.
  • the predicted image generation unit 101 reads out a block at a position on a reference picture indicated by the motion vector starting from the target block.
  • the prediction parameter is, for example, an intra prediction mode.
  • the pixel values of the adjacent block used in the intra prediction mode are read from the reference picture memory 109 to generate a predicted picture P of the block.
  • the predicted image generation unit 101 generates a predicted image P of a block for the read reference picture block using one of a plurality of prediction methods.
  • the predicted image generation unit 101 outputs the generated predicted image P of the block to the subtraction unit 102.
  • the predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 described above.
  • the predicted image generation unit 101 generates a predicted image P of a block based on the pixel values of the reference block read from the reference picture memory, using the parameters input from the prediction parameter coding 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 intra prediction image generation unit (not shown) included in the prediction image generation unit 101 is the same operation as the intra prediction image generation unit 310 described above.
  • the subtraction unit 102 subtracts the signal value of the prediction image P of the block input from the prediction image generation unit 101 from the pixel value of the corresponding block position of the image T to generate a residual signal.
  • the subtraction unit 102 outputs the generated residual signal to the transformation / quantization unit 103.
  • Transform / quantization section 103 performs frequency transform on the prediction residual signal input from subtraction section 102 to calculate transform coefficients.
  • the transform / quantization unit 103 quantizes the calculated transform coefficient to obtain a quantized transform coefficient.
  • Transform / quantization section 103 outputs the obtained quantized transform coefficient to entropy coding section 104 and inverse quantization / inverse transform section 105.
  • the entropy coding unit 104 receives the quantization transform coefficient from the transform / quantization unit 103 and receives the prediction parameter from the prediction parameter coding unit 111.
  • the prediction parameters to be input include, for example, a reference picture index ref_idx_lX, a prediction vector index mvp_lX_idx, a difference vector mvdLX, a prediction mode pred_mode_flag, and a code such as a merge index merge_idx.
  • the entropy coding unit 104 entropy-codes the input division information, prediction parameters, quantized transform coefficients and the like to generate a coded stream Te, and outputs the generated coded stream Te to the outside.
  • the inverse quantization / inverse transform unit 105 is the same as the inverse quantization / inverse transform unit 311 (FIG. 4) in the video decoding device 31, and dequantizes the quantized transform coefficients input from the transform / quantization unit 103. Quantize to obtain transform coefficients.
  • the inverse quantization / inverse transform unit 105 performs inverse transform on the obtained transform coefficient to calculate a residual signal.
  • the inverse quantization / inverse transform 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 block input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse conversion unit 105 for each pixel, and decodes Generate an image.
  • the addition unit 106 stores the generated decoded image in the reference picture memory 109.
  • the loop filter 107 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image generated by the adding unit 106.
  • the loop filter 107 may not necessarily include the three types of filters described above, and may have, for example, only a deblocking filter.
  • the prediction parameter memory 108 stores the prediction parameter generated by the coding parameter determination unit 110 in a predetermined position for each picture and CU to be coded.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 in a predetermined position for each picture and CU to be encoded.
  • the coding parameter determination unit 110 selects one of a plurality of sets of coding parameters.
  • the coding parameter is the QT or BT division parameter or prediction parameter described above, or a parameter to be coded that is generated in association with these.
  • the predicted image generation unit 101 generates a predicted image P of a block using each of these sets of coding parameters.
  • the coding parameter determination unit 110 calculates an RD cost value indicating the size of the information amount and the coding error for each of the plurality of sets.
  • the RD cost value is, for example, the sum of the code amount and a value obtained by multiplying the square error by the coefficient ⁇ .
  • the code amount is the information amount of the coded stream Te obtained by entropy coding the quantization residual and the coding parameter.
  • the squared error is a sum between pixels with respect to the square value of the residual value of the residual signal calculated by the subtraction unit 102.
  • the factor ⁇ is a real number greater than a preset zero.
  • the coding parameter determination unit 110 selects a set of coding parameters that minimize the calculated RD cost value.
  • the entropy coding unit 104 externally outputs the set of selected coding parameters as the coded stream Te, and does not output the set of non-selected coding parameters.
  • the coding parameter determination unit 110 stores the determined coding parameters in the prediction parameter memory 108.
  • the prediction parameter coding unit 111 derives a format for coding from the parameters input from the coding parameter determination unit 110, and outputs the format to the entropy coding unit 104. Derivation of a form for encoding is, for example, derivation of a difference vector from a motion vector and a prediction vector. Further, the prediction parameter coding unit 111 derives parameters necessary to generate a prediction image from the parameters input from the coding parameter determination unit 110, and outputs the parameters to the prediction image generation unit 101.
  • the parameters required to generate a predicted image are, for example, motion vectors in units of subblocks.
  • the inter prediction parameter coding unit 112 derives inter prediction parameters such as a difference vector based on the prediction parameters input from the coding parameter determination unit 110.
  • the inter prediction parameter coding unit 112 is partially identical to the configuration in which the inter prediction parameter decoding unit 303 derives the inter prediction parameter, as a configuration for deriving a parameter necessary for generating a predicted image to be output to the predicted image generation unit 101. Includes configuration. The configuration of the inter prediction parameter coding unit 112 will be described later.
  • the intra prediction parameter coding unit 113 derives the prediction parameters necessary for generating the prediction image to be output to the prediction image generation unit 101
  • the intra prediction parameter decoding unit 304 derives the intra prediction parameter, and Some include the same configuration.
  • the intra prediction parameter coding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode, etc.) for coding from the intra prediction mode IntraPredMode input from the coding parameter determination unit 110.
  • a format for example, MPM_idx, rem_intra_luma_pred_mode, etc.
  • the inter prediction parameter coding unit 112 is a means corresponding to the inter prediction parameter decoding unit 303 in FIG. 5, and the configuration is shown in FIG.
  • the inter prediction parameter coding unit 112 includes an inter prediction parameter coding control unit 1121, an AMVP prediction parameter derivation unit 1122, a subtraction unit 1123, a sub block prediction parameter derivation unit 1125, a BTM prediction unit 1126, and a division mode derivation unit not shown.
  • the vector difference deriving unit respectively derives the PU division mode part_mode, the merge flag merge_flag, the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the difference vector mvdLX.
  • the inter prediction parameter coding unit 112 outputs the motion vector (mvLX, subMvLX), the reference picture index refIdxLX, the PU division mode part_mode, the inter prediction identifier inter_pred_idc, or information indicating these to the predicted image generation unit 101.
  • the inter prediction parameter encoding unit 112 includes: PU division 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 Output to encoding section 104.
  • the inter prediction parameter coding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212.
  • the merge index derivation unit 11211 compares the motion vector and reference picture index input from the coding parameter determination unit 110 with the motion vector and reference picture index of the block of the merge candidate read from the prediction parameter memory 108 to merge
  • the index merge_idx is derived and output to the entropy coding unit 104.
  • the merge candidate is a reference block (for example, a reference block in contact with the lower left end, upper left end, upper right end of the encoding target block) within a predetermined range from the encoding target CU to be encoded, which is encoded It is a block that has completed processing.
  • the vector candidate index derivation unit 11212 derives a predicted vector index mvp_lX_idx.
  • the sub block prediction parameter derivation unit 1125 When the coding parameter determination unit 110 determines to use the sub block prediction mode, the sub block prediction parameter derivation unit 1125 performs spatial sub block prediction, temporal sub block prediction, affine prediction, matching motion derivation, according to the value of subPbMotionFlag.
  • the motion vector and reference picture index of any sub-block prediction of OBMC prediction are derived.
  • the motion vector and the reference picture index are derived from the prediction parameter memory 108 by reading out motion vectors and reference picture indexes such as adjacent blocks and reference picture blocks as described in the description of the moving picture device 31.
  • the sub-block prediction parameter derivation unit 1125, and the spatio-temporal sub-block prediction unit 11251, the affine prediction unit 11252, the matching prediction unit 11253, and the OBMC prediction unit 11254 included in this block The configuration is similar to that of the derivation unit 3037, and the spatio-temporal sub-block prediction unit 30371, affine prediction unit 30372, matching prediction unit 30373, and OBMC prediction unit 30374 included therein.
  • the AMVP prediction parameter derivation unit 1122 includes an affine prediction unit 11221, and has a configuration similar to that of the above-described AMVP prediction parameter derivation unit 3032 (see FIG. 5).
  • the motion vector mvLX is input from the coding parameter determination unit 110 to the AMVP prediction parameter derivation unit 1122.
  • the AMVP prediction parameter derivation unit 1122 derives a prediction vector mvpLX based on the input motion vector mvLX.
  • the AMVP prediction parameter derivation unit 1122 outputs the derived prediction vector mvpLX to the subtraction unit 1123.
  • the reference picture index refIdxLX and the prediction vector index mvp_lX_idx are output to the entropy coding unit 104.
  • the affine prediction unit 11221 has the same configuration as the affine prediction unit 30321 (see FIG. 5) of the above-described AMVP prediction parameter derivation unit 3032.
  • the subtracting 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 coding unit 104.
  • a moving picture decoding apparatus or a moving picture coding apparatus generates overlapping predicted motion images of subblock boundaries based on inter prediction parameters of a target subblock and an adjacent subblock.
  • First prediction means for performing prediction and generating an interpolated image (first interpolated image) of the target sub block based on the inter prediction parameter of the target sub block, and the target sub based on the inter prediction parameter of the adjacent sub block
  • Second prediction means for generating an interpolation image (second interpolation image) of a block, and prediction image generation means for generating a prediction image by weighted addition processing of the first interpolation image and the second interpolation image
  • the second prediction means prohibits OBMC processing of the right and lower boundaries of the target sub-block when the predetermined condition is satisfied, And sets the first interpolation image as the right and the downward direction of the prediction image of the subblock.
  • the moving picture decoding apparatus or the moving picture coding apparatus according to an aspect of the present invention is characterized in that the predetermined condition is that the size of the target sub-block is smaller than a first predetermined value.
  • the predetermined condition is that the size of the target sub-block is smaller than a first predetermined value and adjacent to the target sub-block
  • the present invention is characterized in that the difference between the motion vector of the sub block and the sub block is larger than a second predetermined value.
  • the predetermined condition is that the upper or lower boundary of the sub block overlaps the boundary of a CTU (coding tree unit). It is characterized by
  • the predetermined condition is that the upper or lower boundary of the sub block overlaps the boundary of a CTU (coding tree unit), and the target It is characterized in that the size of the sub block is smaller than a first predetermined value.
  • a moving picture decoding apparatus or a moving picture coding apparatus generates overlapping predicted motion images of subblock boundaries based on inter prediction parameters of a target subblock and an adjacent subblock.
  • a first prediction unit that generates an interpolated image (first interpolated image) of a target subblock based on an inter prediction parameter of a target subblock, and a target subblock based on an inter prediction parameter of an adjacent subblock
  • second prediction means for generating an interpolation image (second interpolation image)
  • prediction image generation means for generating a prediction image by weighted addition processing of the first interpolation image and the second interpolation image.
  • the second prediction unit is configured to generate a plurality of horizontal blocks. Characterized by using a common motion vector subblock.
  • the common motion vector is an average value of a plurality of motion vectors of a plurality of sub-blocks.
  • the common motion vector is a motion vector of a leftmost subblock among a plurality of subblocks. Do.
  • the common motion vector is a motion vector having a minimum difference value with respect to a motion vector of a target subblock among a plurality of subblocks. It is characterized by
  • a moving picture decoding apparatus or a moving picture coding apparatus generates overlapping predicted motion images of subblock boundaries based on inter prediction parameters of a target subblock and an adjacent subblock.
  • a first prediction unit that generates an interpolated image (first interpolated image) of a target subblock based on an inter prediction parameter of a target subblock, and a target subblock based on an inter prediction parameter of an adjacent subblock
  • a second prediction unit that generates an interpolation image (a second interpolation image)
  • a prediction image generation unit that generates a prediction image by weighted addition processing of the first interpolation image and the second interpolation image.
  • the second prediction means prohibits the OBMC process when the first prediction means and the second prediction means do not use affine prediction.
  • setting the first interpolated image as a prediction image of the serial target sub block.
  • a motion vector derivation device refers to a first motion vector search unit for searching for a motion vector of a target block by matching processing, and a motion vector selected by the first motion vector search unit.
  • a second motion vector search unit for searching for a motion vector by matching processing for each of a plurality of sub-blocks included in the target block; and the first motion vector search unit relates to the target block.
  • the motion vector is searched by performing the local search, and the second motion vector search unit performs the initial vector search on the sub block and then performs the local search. Search for a motion vector by performing Kutorusachi unit, or in the second motion vector search unit, and changes the number of taps of the search range or the motion compensation filter based on a predetermined condition.
  • the motion vector derivation device is characterized in that, in the first motion vector search unit or the second motion vector search unit, the predetermined condition is a size of a target block. .
  • the predetermined condition is that the magnitude of the motion vector searched by the first motion vector search unit is It features.
  • motion vectors of neighboring blocks of the prediction block stored in a prediction vector candidate list are within a predetermined value.
  • the clipped vector is used for initial vector search.
  • the predetermined value is determined using N motion vectors from the head of the predicted motion vector candidate list.
  • the predetermined value is determined using an average value of motion vectors stored in the predicted vector candidate list.
  • the motion vector derivation device is characterized in that the predetermined value is determined using only a motion vector that uses a leading picture of a reference picture list.
  • a motion vector deriving device searches for a block adjacent to the target block, and a motion vector and a reference picture of an available adjacent block are used as a block-level motion vector of the target block (first Sub block-based motion vector (second motion vector) of a co-located block using setting means set as a motion vector) and a reference picture (first reference picture), and a first motion vector and a first reference picture
  • acquisition means for acquiring a reference picture (second reference picture), and a subblock-based motion vector of the target block corresponding to the reference picture (third reference picture) at the subblock level of the target block
  • the third motion vector is scaled with the second reference picture to the second motion vector , And the third motion vector is clipped when the third motion vector derived by scaling is larger than a predetermined value.
  • a motion vector derivation device refers to a first motion vector search unit for searching for a motion vector of a target block by matching processing, and a motion vector selected by the first motion vector search unit.
  • a second motion vector search unit for searching for a motion vector by matching processing for each of a plurality of sub-blocks included in the target block; and the first motion vector search unit relates to the target block. After performing the initial vector search, the motion vector is searched by performing the local search, and the second motion vector search unit performs the initial vector search on the sub block and then performs the local search.
  • Search for a motion vector by performing The motion search unit or the second motion vector search unit searches for a motion vector within a predetermined search range using a step search, and the number of search steps of the step search is from the predetermined search range It is characterized by deriving.
  • the first motion vector search unit derives the number of search steps used in the first motion vector search unit from the predetermined search range
  • the second motion vector search unit The motion vector search unit is characterized in that the number of search steps used in the second motion vector search unit is derived from the predetermined search range and the number of search steps used in the first motion vector search unit.
  • a moving picture decoding apparatus divides a target block into a plurality of sub blocks and derives a sub block prediction unit that derives a motion vector in units of sub blocks, and an interpolated image using the derived motion vector.
  • Sub-block prediction means for limiting the motion vector of each sub-block to a predetermined range.
  • the sub block prediction means is affine prediction means for deriving a motion vector of the sub block using two or more reference motion vectors.
  • the sub-block prediction means uses a motion vector of a point obtained by dividing a block on a reference picture at a position corresponding to a target block. It is characterized by being an ATM VP prediction means for deriving a motion vector.
  • the sub-block prediction means is obtained by dividing a block on an adjacent motion vector adjacent to the target block and a reference picture at a position corresponding to the target block. It is characterized in that it is an STMVP prediction means for deriving a motion vector of the above-mentioned subblock using a motion vector of
  • the sub-block prediction unit derives a motion vector in block units by matching in target block units, and further performs an initial motion of the motion vector in block units in sub blocks. It is characterized in that it is matching prediction means for deriving a motion vector by matching as a vector.
  • the sub-block prediction means derives a representative motion vector of the block, and each sub-block so that a difference value from the representative motion vector of the block falls within a predetermined range. Clip the motion vector.
  • the sub-block prediction means derives a representative motion vector of the block, and each sub-block so that a difference value from the representative motion vector of the block falls within a predetermined range. Clip the motion vector.
  • a moving picture decoding apparatus includes a matching prediction unit that derives a motion vector of a target block by matching processing, and the matching prediction unit determines the search range or the maximum number of search steps according to the block size. To set.
  • the matching prediction unit adds a second constant to the product of the block size and the first constant and subtracts the result from the second constant, and shifts the result by the third constant. It is characterized in that the search range or the maximum number of steps of the search is set by the processing including the following operation.
  • the matching prediction unit sets a search range or the maximum number of steps of search by referring to a table according to the size of a block.
  • the matching prediction unit is characterized by setting a search range or a maximum number of search steps in accordance with the minimum value of the width and height of the block.
  • the matching prediction unit sets the search range or the maximum number of steps of the search according to the weighted average of the minimum value and the maximum value of the width and height of the block. It is characterized by
  • a moving picture decoding apparatus includes a matching prediction unit that derives a motion vector of a target block by matching processing and selects the number of taps for interpolation image generation, and the matching prediction unit determines the size of the block. The number of taps for generating the interpolation image is set accordingly.
  • the moving picture decoding apparatus includes a matching prediction unit that derives a motion vector of a target block by matching processing, and selects the number of taps for interpolation image generation, and the matching prediction unit is a search range or a search
  • the number of taps for generating the interpolation image is set according to the maximum number of steps of
  • the moving picture decoding apparatus includes a matching prediction unit that derives a motion vector of a target block by matching processing and selects the number of taps for interpolation image generation, and the matching prediction unit generates the interpolation image
  • the search range or the maximum number of steps of the search is set according to the number of taps.
  • the moving picture decoding apparatus divides the target block into sub blocks, and uses the interpolation image PredC (first interpolated image) based on the movement parameter of the target block in units of sub blocks as the movement parameter of the adjacent block. And an OBMC prediction unit that performs processing (interpolated image correction) for correcting with the interpolated image PredRN (second interpolated image) based on the CTU (coding tree unit) to which the target block belongs, and above the subblock belonging to the target block.
  • PredC first interpolated image
  • OBMC prediction unit that performs processing (interpolated image correction) for correcting with the interpolated image PredRN (second interpolated image) based on the CTU (coding tree unit) to which the target block belongs, and above the subblock belonging to the target block.
  • the OBMC prediction unit moves the left side of the sub block. If correction is not performed using the parameter-based interpolated image PredRN, and the left side of the sub-block belonging to the target block is equal to the CTU to which the target block belongs, using the interpolated image PredRN based on the upper motion parameter of the sub-block It is characterized by correcting.
  • the OBMC prediction unit when the target block or sub block has a small size, the OBMC prediction unit does not correct using the interpolated image PredRN based on the motion parameter of the reference block. In other cases, correction is performed using an interpolated image PredRN based on the motion parameter of the reference block.
  • the OBMC prediction unit when the target sub-block has a small size, the OBMC prediction unit does not perform correction using the interpolated image PredRN based on the motion parameter of the reference block. In this case, correction is performed using an interpolated image PredRN based on the motion parameter of the reference block.
  • the OBMC prediction unit corrects using an interpolated image PredRN based on a motion parameter of a reference block. Otherwise, the correction is performed using the interpolation image PredRN based on the motion parameter of the reference block.
  • the OBMC prediction unit uses an interpolated image PredRN based on a motion parameter of a reference block. In other cases, the correction is performed using the interpolation image PredRN based on the motion parameter of the reference block.
  • a moving picture decoding apparatus divides a target block into a plurality of sub blocks and derives a sub block prediction unit that derives a motion vector in units of sub blocks, and an interpolated image using the derived motion vector. And generating a motion vector in accordance with whether or not the upper side of the sub-block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs. .
  • the sub block prediction means when the upper side of the sub block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs, the sub block prediction means , And otherwise set a second size.
  • the sub-block prediction unit integrates sub-block sizes when the upper side of the sub-block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs. To derive motion parameters.
  • a moving picture coding apparatus divides a target block into sub blocks, and corrects an interpolated image PredC based on a motion parameter of the target block in units of sub blocks with an interpolated image PredRN based on a motion parameter of an adjacent block. Interpolation based on the motion parameter of the upper side of the sub block if the upper side of the sub block belonging to the target block belongs to a CTU different from the CTU to which the target block belongs. When the upper side of the sub block belonging to the target block is equal to the CTU to which the target block belongs without correcting using the image PredRN, the correction is performed using the interpolated image PredRN based on the motion parameter of the upper side of the sub block. I assume.
  • the moving picture coding apparatus 11 and a part of the moving picture decoding apparatus 31 in the embodiment described above for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the prediction image generation unit 308, the dequantization Inverse transformation unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, transformation / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse transformation unit 105, loop filter 107, encoding parameter determination unit 110, the prediction parameter coding unit 111 may be realized by a computer.
  • a program for realizing the control function may be recorded in a computer readable recording medium, and the computer system may read and execute the program recorded in the recording medium.
  • the “computer system” is a computer system built in any of the moving image encoding device 11 and the moving image decoding device 31, and includes an OS and hardware such as peripheral devices.
  • the “computer-readable recording medium” means a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a storage device such as a hard disk built in a computer system.
  • the “computer-readable recording medium” is one that holds a program dynamically for a short time, like a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line.
  • a volatile memory in a computer system serving as a server or a client may be included, which holds a program for a predetermined time.
  • the program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the computer system.
  • part or all of the video encoding device 11 and the video decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the moving picture coding device 11 and the moving picture decoding device 31 may be individually processorized, or part or all may be integrated and processorized.
  • the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible. In the case where an integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology, integrated circuits based on such technology may also be used.
  • the moving image encoding device 11 and the moving image decoding device 31 described above can be mounted and used in various devices that transmit, receive, record, and reproduce moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 28 (a) is a block diagram showing a configuration of a transmission device PROD_A on which the moving picture coding device 11 is mounted.
  • the transmitting device PROD_A modulates a carrier wave with the coding unit PROD_A1 for obtaining coded data by coding a moving image and the coding data obtained by the coding unit PROD_A1.
  • the above-described moving picture coding apparatus 11 is used as the coding unit PROD_A1.
  • the transmission device PROD_A is a camera PROD_A4 for capturing a moving image, a recording medium PROD_A5 for recording the moving image, an input terminal PROD_A6 for externally inputting the moving image, and a transmission source of the moving image input to the encoding unit PROD_A1. , And may further include an image processing unit PRED_A7 that generates or processes an image.
  • FIG. 28A illustrates the configuration in which the transmission device PROD_A includes all of the above, a part of the configuration may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-coded moving image, or a moving image encoded by a recording encoding method different from the transmission encoding method. It may be one. In the latter case, it is preferable to interpose, between the recording medium PROD_A5 and the encoding unit PROD_A1, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding scheme for recording.
  • FIG. 28 (b) is a block diagram showing a configuration of a reception device PROD_B on which the moving picture decoding device 31 is mounted.
  • the receiving device PROD_B receives the modulated signal, receives the modulated signal, demodulates the modulated signal received by the receiving portion PROD_B1, obtains the encoded data by the demodulated portion PROD_B2, and demodulates it.
  • a decoding unit PROD_B3 for obtaining a moving image by decoding encoded data obtained by the PROD_B2.
  • the above-described moving picture decoding apparatus 31 is used as the decoding unit PROD_B3.
  • the receiving device PROD_B is a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the 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. It may further comprise PROD_B6.
  • FIG. 28 (b) exemplifies the configuration in which the reception device PROD_B includes all of the above, a part of the configuration may be omitted.
  • the recording medium PROD_B5 may be for recording a moving image which has not been encoded, or is encoded by a recording encoding method different from the transmission encoding method. May be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5 to encode the moving image acquired from the decoding unit PROD_B3 according to the encoding method for recording.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulation signal may be broadcast (here, a transmission mode in which the transmission destination is not specified in advance), or communication (in this case, transmission in which the transmission destination is specified in advance) (Refer to an aspect). That is, transmission of the modulation signal may be realized by any of wireless broadcast, wired broadcast, wireless communication, and wired communication.
  • a broadcasting station (broadcasting facility etc.) / Receiving station (television receiver etc.) of terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B which transmits and receives a modulated signal by wireless broadcasting.
  • a cable television broadcast station (broadcasting facility or the like) / receiving station (television receiver or the like) is an example of a transmitting device PROD_A / receiving device PROD_B which transmits and receives a modulated signal by cable broadcasting.
  • a server such as a workstation
  • client such as a VOD (Video On Demand) service or a video sharing service using the Internet
  • PROD_A / receiving device PROD_B
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multifunctional mobile phone terminal.
  • the client of the moving image sharing service has a function of encoding a moving image captured by a camera and uploading it to the server. That is, the client of the moving image sharing service functions as both the transmitting device PROD_A and the receiving device PROD_B.
  • FIG. 29A is a block diagram showing the configuration of a recording device PROD_C on which the above-described moving picture coding device 11 is mounted.
  • the recording device PROD_C writes the encoded data obtained by the encoding unit PROD_C1 for obtaining encoded data by encoding a moving image, and the encoding unit PROD_C1 to the recording medium PROD_M.
  • the above-described moving picture coding apparatus 11 is used as the coding unit PROD_C1.
  • the recording medium PROD_M may be (1) a type incorporated in the recording device PROD_C, such as a hard disk drive (HDD) or a solid state drive (SSD), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a Universal Serial Bus (USB) flash memory, or (3) a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: Registration It may be loaded into a drive device (not shown) built in the recording device PROD_C, such as a trademark).
  • a type incorporated in the recording device PROD_C such as a hard disk drive (HDD) or a solid state drive (SSD), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a Universal Serial Bus (USB) flash memory, or (3) a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: Registration It may be loaded into
  • the recording device PROD_C is a camera PROD_C3 for capturing a moving image as a supply source of the moving image input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting the moving image from the outside, and a reception for receiving the moving image
  • the image processing unit PROD_C5 may further include an image processing unit PROD_C6 that generates or processes an image.
  • FIG. 29A illustrates the configuration in which the recording apparatus PROD_C includes all of the above, a part of the configuration may be omitted.
  • the receiving unit PROD_C5 may receive an uncoded moving image, and receives encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. It may be In the latter case, it is preferable to interpose a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding scheme between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, etc.
  • the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images).
  • a camcorder in this case, the camera PROD_C3 is the main supply source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main supply source of moving images
  • a smartphone this In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images
  • the like are also examples of such a recording device PROD_C.
  • FIG. 29 (b) is a block showing the configuration of the playback device PROD_D on which the above-described moving picture decoding device 31 is mounted.
  • the playback device PROD_D obtains a moving image by decoding the encoded data read by the reading unit PROD_D1 that reads the encoded data written to the recording medium PROD_M and the reading unit PROD_D1.
  • the above-described moving picture decoding apparatus 31 is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be (1) a type incorporated in the playback device PROD_D such as an HDD or an SSD, or (2) such as an SD memory card or a USB flash memory. It may be of a type connected to the playback device PROD_D, or (3) it may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
  • the playback device PROD_D is a display 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. It may further comprise PROD_D5.
  • FIG. 29 (b) exemplifies the configuration in which the playback device PROD_D includes all of these, part of the configuration may be omitted.
  • the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmit encoded data encoded by a transmission encoding method different from the recording encoding method. It may be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_D2 and the transmission unit PROD_D5 for encoding moving pictures according to a transmission encoding scheme.
  • a playback device PROD_D for example, a DVD player, a BD player, an HDD player, etc. may be mentioned (in this case, the output terminal PROD_D4 to which a television receiver etc. is connected is the main supply destination of moving images) .
  • the display PROD_D3 is the main supply destination of moving images
  • digital signage also referred to as an electronic signboard or electronic bulletin board, etc.
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images.
  • desktop type PC in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main supply destination of moving images
  • laptop type or tablet type PC in this case, display PROD_D3 or transmission unit PROD_D5 is moving image
  • the main supply destination of the image the smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the moving image), and the like are also examples of such a reproduction device PROD_D.
  • each block of the above-described moving picture decoding apparatus 31 and moving picture coding apparatus 11 may be realized as hardware by a logic circuit formed on an integrated circuit (IC chip), or CPU (Central Processing). It may be realized as software using Unit).
  • IC chip integrated circuit
  • CPU Central Processing
  • each of the devices described above includes a CPU that executes instructions of a program that implements each function, a read only memory (ROM) that stores the program, a random access memory (RAM) that develops the program, the program, and various data.
  • a storage device such as a memory for storing the
  • the object of the embodiment of the present invention is to record computer program readable program codes (execution format program, intermediate code program, source program) of control programs of the above-mentioned respective devices which are software for realizing the functions described above.
  • the present invention can also be achieved by supplying a medium to each of the above-described devices, and a computer (or a CPU or an MPU) reading and executing a program code recorded on a recording medium.
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CDs (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical disc).
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disks
  • CDs Compact Disc Read-Only Memory
  • MO disks Magnetic-Optical disc
  • Discs including optical discs such as / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray (registered trademark) Disc), IC cards (including memory card) ) / Cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory (registered trademark)) / semiconductor memory such as flash ROM, or PLD (Programmable logic) Logic circuits such as device) and FPGA (Field Programmable Gate Array) can be used.
  • optical discs such as / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray (registered trademark) Disc), IC cards (including memory card) ) / Cards such as optical cards, mask ROM / EPROM
  • each device may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • This communication network is not particularly limited as long as the program code can be transmitted.
  • the Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / CableTelevision) communication network, Virtual Private Network (Virtual Private Network) A telephone network, a mobile communication network, a satellite communication network, etc. can be used.
  • the transmission medium that constitutes this communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • the embodiment of the present invention may also be realized in the form of a computer data signal embedded in a carrier wave, in which the program code is embodied by electronic transmission.
  • Embodiments of the present invention are not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. That is, an embodiment obtained by combining technical means appropriately modified within the scope of the claims is also included in the technical scope of the present invention.
  • An embodiment of the present invention is suitably applied to a video decoding apparatus that decodes encoded data obtained by encoding image data, and a video encoding apparatus that generates encoded data obtained by encoding image data. be able to. Further, the present invention can be suitably applied to the data structure of encoded data generated by the moving picture coding apparatus and referred to by the moving picture decoding apparatus.
  • Sub block prediction parameter derivation unit (sub block prediction means, motion vector derivation device) 30371 Space-time sub-block prediction unit (ATM VP prediction means, STM VP prediction means) 30372 Affine Prediction Unit (Affine Prediction Means) 30373 Matching motion deriving unit (matching prediction means, motion vector deriving device) 30374 OBMC Prediction Unit

Abstract

動画像復号装置は、対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく第1の補間画像を隣接ブロックの動きパラメータに基づく第2の補間画像で補正する処理を行うOBMC(オーバーラップ動き補償)予測部を備える。動画像復号装置は、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットとは異なる符号化ツリーユニットに属する場合には、第2の補間画像を用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットと等しい場合には、第2の補間画像を用いて補正する。上記の構成によれば、OBMC 予測技術において、メモリバンド幅を削減することができる。

Description

動画像符号化装置および動画像復号装置
 本発明の実施形態は、動画像復号装置、動画像符号化装置および動きベクトル導出装置に関する。
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置(画像符号化装置)、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置(画像復号装置)が用いられている。
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得られる符号化単位(CU:Coding Unit、符号化ユニットと呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU:Prediction Unit)、変換ユニット(TU:Transform Unit)からなる階層構造により管理され、CUごとに符号化/復号される。
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる(非特許文献2)。
 また、近年の動画像符号化及び復号の技術として非特許文献1が挙げられる。非特許文献2には、サブブロックベースの動き補償技術、アフィン予測、オーバーラップ動き補償、動画像符号化装置と動画像復号装置において、マッチングにより動きベクトルを導出する技術が記載されている。
"Algorithm Description of Joint Exploration Test Model 7", JVET-G1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 2017-08-19 02:20:15 ITU-T H.265(04/2015) SERIES H:AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services - Coding of moving video High efficiency video coding
 マッチングにより動きベクトルを導出する技術を用いて予測画像を生成する場合、動きベクトル導出に必要なメモリバンド幅が大きくなるため、メモリバンド幅を削減する技術が求められている。同様に、サブブロックベースの動き補償もしくはオーバーラップ動き補償を用いた補間画像から予測画像を生成する場合、補間画像導出に必要なメモリバンド幅が大きくなる。
 本発明は、メモリバンド幅を削減することを目的とする。
 本発明の一態様に係る動画像復号装置は、対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく第1の補間画像を隣接ブロックの動きパラメータに基づく第2の補間画像で補正する処理を行うOBMC予測部を備え、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットとは異なる符号化ツリーユニットに属する場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットと等しい場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正することを特徴とする。
 本発明の一態様に係る動画像符号化装置は、対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償予測を行い、対象サブブロックのインター予測パラメータに基づいて対象サブブロックの第1の補間画像を生成する第1の予測手段と、隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの第2の補間画像を生成する第2の予測手段と、前記第1の補間画像と前記第2の補間画像の重み付加算処理により、予測画像を生成する予測画像生成手段とを備え、前記第2の予測手段は、所定の条件を満たす場合、前記対象サブブロックの右および下方向境界のオーバーラップ動き補償処理を禁止し、前記対象サブブロックの右および下方向の予測画像として前記第1の補間画像を設定することを特徴とする。
 上記の構成によれば、インター予測技術において、メモリバンド幅を削減することができる。
本実施形態に係る画像伝送システムの構成を示す概略図である。 本実施形態に係る符号化ストリームのデータの階層構造を示す図である。 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。 本実施形態に係る動画像復号装置の構成を示す図である。 本実施形態に係るインター予測パラメータ復号部の構成を示す図である。 本実施形態に係るAMVP予測パラメータ導出部、および、マージ予測パラメータ導出部の構成を示す図である。 (a)は予測ベクトル候補リスト(マージ候補リスト)を示す図である。(b)、(c)は対象ブロックと参照ブロックの位置関係を示す図である。 スライスヘッダのシンタックスの一例を示す図である。 ATMVP処理を説明する図である。 ATMVP処理の動作を示すフローチャートである。 STMVP処理を説明する図である。 STMVP処理の動作を示すフローチャートである。 アフィン予測における制御点の動きベクトルの導出のために参照するブロックの位置の例を示す図である。 (a)はブロックを構成する各サブブロックの動きベクトルを説明する図である。(b)は本実施形態に係るインター予測画像生成部の構成を示す図である。 (a)は、バイラテラルマッチング(Bilateral matching)について説明するための図である。(b)は、テンプレートマッチング(Template matching)について説明するための図である。 対象ブロックと、動き補償のサーチレンジと動き補償フィルタのタップ数を示す図である。 ブロックサイズとサーチレンジ、動き補償フィルタのタップ数の関係を示す図である。 マッチング予測のサーチレンジを示す図である。 マッチング予測のサーチレンジを示す別の図である。 マッチングモードの動きベクトル導出処理の動作を示すフローチャートである。 OBMC予測の対象サブブロックと隣接ブロックの一例を示す図である。 OBMC予測の対象サブブロックと隣接ブロックの一例を示す図である。 OBMC予測のパラメータ導出処理を示すフローチャートである。 バイラテラルテンプレートマッチング処理を説明する図である。 OBMC処理の単位を示す図である。 本実施形態に係る動画像符号化装置の構成を示すブロック図である。 本実施形態に係るインター予測パラメータ符号化部の構成を示す概略図である。 本実施形態に係る動画像符号化装置を搭載した送信装置、および、動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。 本実施形態に係る動画像符号化装置を搭載した記録装置、および、動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。 (a)、(b)は、動き探索パターンを説明するための図である。 ブロックサイズとメモリバンドの関係を説明するための図である。 サーチレンジと探索ステップ数の関係を示す図である。
  (第1の実施形態)
 以下、図面を参照しながら本発明の実施形態について説明する。
 図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。
 画像伝送システム1は、符号化対象画像を符号化した符号化ストリームを伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、動画像符号化装置(画像符号化装置)11、ネットワーク21、動画像復号装置(画像復号装置)31及び動画像表示装置(画像表示装置)41を含んで構成される。
 動画像符号化装置11には画像Tが入力される。
 ネットワーク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を記録した記憶媒体で代替されても良い。
 動画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。
 動画像表示装置41は、動画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。動画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。ディスプレイの形態としては、据え置き、モバイル、HMD等が挙げられる。また、動画像復号装置31が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。
  <演算子>
 本明細書で用いる演算子を以下に記載する。
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=はOR代入演算子である。
 ||は、論理和を示す。
 x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。
 Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。
 abs(a)はaの絶対値を返す関数である。
 Int(a)はaの整数値を返す関数である。
 floor(a)はa以下の最大の整数を返す関数である。
 a/dはdによるaの除算(小数点以下切り捨て)を表す。
 avg(a(i))はa(0)~a(N-1)のN個の平均値を導出する関数である。
  <符号化ストリームTeの構造>
 本実施形態に係る動画像符号化装置11および動画像復号装置31の詳細な説明に先立って、動画像符号化装置11によって生成され、動画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
 図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために動画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2の(a)に示すように、ビデオパラメータセットVPS(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合、および、動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各スライスヘッダから複数のPPSの何れかを選択する。
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために動画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスSは、図2の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
 スライスヘッダSHには、対象スライスの復号方法を決定するために動画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P、Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライスを指す。
 なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。
  (符号化スライスデータ)
 符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図2の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit、CTUブロック)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
  (符号化ツリーユニット)
 図2の(e)には、処理対象の符号化ツリーユニットを復号するために動画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割(QT分割)または2分木分割(BT分割)により符号化処理の基本的な単位である符号化ユニット(CU:Coding Unit)に分割される。再帰的な4分木分割または2分木分割により得られる木構造を符号化ツリー(CT:Coding Tree)、木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木及び2分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。
 CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、及びBT分割の分割方法を示すBT分割モード(split_bt_mode)を含む。cu_split_flag及び/又はsplit_bt_modeは符号化ノードCNごとに伝送される。cu_split_flagが1の場合には、符号化ノードCNは4つの符号化ノードCNに分割される。cu_split_flagが0の時、split_bt_modeが1の場合には、符号化ノードCNは2つの符号化ノードCNに水平分割される。split_bt_modeが2の場合には、符号化ノードCNは2つの符号化ノードCNに垂直分割される。split_bt_modeが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニットCUをノードとして持つ。符号化ユニットCUは符号化ノードの末端ノード(リーフノード)であり、これ以上分割されない。
 また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、64x32画素、32x64画素、32x32画素、64x16画素、16x64画素、32x16画素、16x32画素、16x16画素、64x8画素、8x64画素、32x8画素、8x32画素、16x8画素、8x16画素、8x8画素、64x4画素、4x64画素、32x4画素、4x32画素、16x4画素、4x16画素、8x4画素、4x8画素、及び、4x4画素の何れかをとり得る。
  (符号化ユニット)
 図2の(f)には、処理対象の符号化ユニットを復号するために動画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
 予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測パラメータ(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。
 予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。
 予測ツリーにおける予測の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。
 イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。
 また、インター予測の場合、分割方法は、符号化データの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と表現する。
 また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットTUに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。
 変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。
 変換処理は、この変換ユニットごとに行われる。
  (予測パラメータ)
 予測ユニット(PU:Prediction Unit)の予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。以下、インター予測の予測パラメータ(インター予測パラメータ)について説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に、対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
 符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_idx_lX(refIdxLX)、予測ベクトルインデックスmvp_lX_idx、差分ベクトル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(X=0または1)中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0およびrefIdxL1により参照ピクチャP1とB2が参照される例を示す。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、以降では、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。
  (マージ予測と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として符号化される。
 インター予測識別子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は、参照ピクチャリストで管理された参照ピクチャを示すインデックスである。
 マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれかの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。
  (動きベクトル)
 動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ(シフト)量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
  (双予測biPredの判定)
 双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
 biPred = (predFlagL0 == 1 && predFlagL1 == 1)
 フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
 biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
  (イントラ予測)
 次にイントラ予測パラメータについて説明する。
 イントラ予測パラメータとは、CUをピクチャ内の情報で予測処理に用いられるパラメータ、例えば、イントラ予測モードIntraPredModeであり、輝度イントラ予測モードIntraPredModeYと色差イントラ予測モードIntraPredModeCは異なっても良い。イントラ予測モードは、例えば67種類存在し、プレーナ予測、DC予測、Angular(方向)予測からなる。色差予測モードIntraPredModeCは、例えば、プレーナ予測、DC予測、Angular予測、ダイレクトモード(輝度の予測モードを使用するモード)、LM予測(輝度画素から線形予測するモード)の何れかを用いる。
  (ループフィルタ)
 ループフィルタは符号化ループ内に設けたフィルタで、ブロック歪やリンギング歪を除去し、画質を改善するフィルタである。ループフィルタには、主に、デブロッキングフィルタ、サンプル適応オフセット(SAO:Sample Adaptive Offset)、適応ループフィルタ(ALF:Adaptive Loop Filter)がある。
 (エントロピー符号化)
 エントロピー符号化には、シンタックスの種類や周囲の状況に応じて適応的に選択したコンテキスト(確率モデル)を用いてシンタックスを可変長符号化する方式と、あらかじめ定められた表、あるいは計算式を用いてシンタックスを可変長符号化する方式がある。前者のCABAC(Context Adaptive Binary Arithmetic Coding)では、符号化あるいは復号したピクチャ毎に更新した確率モデルをメモリに格納する。そして、後続のインター予測を用いるPピクチャ、あるいはBピクチャにおいて、対象ピクチャのコンテキストの初期状態は、メモリに格納された確率モデルの中から、同じスライスタイプ、同じスライスレベルの量子化パラメータを使用したピクチャの確率モデルを選択して、符号化、復号処理に使用する。
  (動画像復号装置の構成)
 図4に本発明の動画像復号装置(画像復号装置)31を示す。
動画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312を含んで構成される。なお、後述の動画像符号化装置11に合わせ、動画像復号装置31にループフィルタ305が含まれない構成もある。
 また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。
 また、以降では処理の単位としてCTU、CU、PU、TUを使用した例を記載するが、この例に限らず、TUあるいはPU単位の代わりにCU単位で処理をしてもよい。あるいはCTU、CU、PU、TUをブロックと読み替え、ブロック単位の処理としてもよい。
 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測パラメータおよび、差分画像を生成するための残差情報などがある。
 エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_idx_lX、予測ベクトルインデックスmvp_lX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化変換係数を逆量子化・逆変換部311に出力する。この量子化変換係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)、KLT(Karyhnen Loeve Transform、カルーネンレーベ変換)等の周波数変換を行い量子化して得られる係数である。
 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。また、インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。インター予測パラメータ復号部303の詳細については後述する。
 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。
 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。なお、ループフィルタ305は動画像符号装置11と対になっていれば、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCTUあるいはCU毎に予め定めた位置に記憶する。
 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。
 予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてPU(ブロック)もしくはサブブロックの予測画像を生成する。
 ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてインター予測によりブロックもしくはサブブロックの予測画像を生成する。
 インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象ブロックを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに補間を行ってブロックの予測画像(補間画像、動き補償画像)を生成する。インター予測画像生成部309は、生成したブロックの予測画像を加算部312に出力する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、ブロックもしくはサブブロックの予測画像を生成するために参照する領域である。
 予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照画素を用いてイントラ予測を行う。
 イントラ予測画像生成部310は、読み出した隣接ブロックに対し、イントラ予測モードIntraPredModeが示す予測モードを参照して、ブロックの予測画像を生成する。イントラ予測画像生成部310は、生成したブロックの予測画像を加算部312に出力する。
 逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化変換係数を逆量子化して変換係数を求める。逆量子化・逆変換部311は、求めた変換係数について逆DCT、逆DST、逆KLT等の逆周波数変換を行い、予測残差信号を算出する。逆量子化・逆変換部311は、算出した残差信号を加算部312に出力する。
 加算部312は、インター予測画像生成部309または予測画像生成部308から入力されたブロックの予測画像と逆量子化・逆変換部311から入力された残差信号を画素毎に加算して、ブロックの復号画像を生成する。加算部312は、生成したブロックの復号画像をデブロッキングフィルタ、SAO部、またはALFの少なくとも何れかに出力する。
  (インター予測パラメータ復号部の構成)
 次に、インター予測パラメータ復号部303の構成について説明する。
 図5は、本実施形態に係るインター予測パラメータ復号部303の構成を示す概略図である。インター予測パラメータ復号部303は、インター予測パラメータ復号制御部3031、AMVP予測パラメータ導出部3032、加算部3035、マージ予測パラメータ導出部3036およびサブブロック予測パラメータ導出部3037、BTM予測部3038を含んで構成される。AMVP予測パラメータ導出部3032、マージ予測パラメータ導出部3036、サブブロック予測パラメータ導出部3037、BTM予測部3038を総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。
 インター予測パラメータ復号制御部3031は、インター予測に関連する符号(シンタックス要素)の復号をエントロピー復号部301に指示し、符号化データに含まれる符号(シンタックス要素)、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_idx_lX、予測ベクトルインデックスmvp_lX_idx、差分ベクトルmvdLXを抽出する。
 インター予測パラメータ復号制御部3031は、まず、マージフラグmerge_flagを抽出する。インター予測パラメータ復号制御部3031が、あるシンタックス要素を抽出すると表現する場合は、あるシンタックス要素の復号をエントロピー復号部301に指示し、該当のシンタックス要素を符号化データから読み出すことを意味する。
 マージフラグ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を加算し、動きベクトルを導出する。
 マージフラグmerge_flagが1、すなわち、マージ予測モードを示す場合、インター予測パラメータ復号制御部3031は、マージ予測に係る予測パラメータとして、マージインデックスmerge_idxを抽出する。インター予測パラメータ復号制御部3031は、抽出したマージインデックスmerge_idxをマージ予測パラメータ導出部3036(詳細は後述する)に出力し、サブブロック予測モードフラグsubPbMotionFlagをサブブロック予測パラメータ導出部3037に出力する。サブブロック予測パラメータ導出部3037は、サブブロック予測モードフラグsubPbMotionFlagの値に応じて、ブロックを複数のサブブロックに分割し、サブブロック単位で動きベクトルを導出する。すなわち、サブブロック予測モードでは、予測ブロックは4x4もしくは8x8という小さいブロック単位で予測される。CUを複数のパーティション(2NxN、Nx2N、NxNなどのブロック)に分割し、パーティション単位で予測パラメータのシンタックスを符号化・復号する方法に対して、サブブロック予測モードでは複数のサブブロックを集合(セット)にまとめ、当該集合毎に予測パラメータのシンタックスを符号化・復号するため、少ない符号量で多くのサブブロックの動き情報を符号化することができる。サブブロック予測パラメータ導出部3037(サブブロック予測手段)は、対象ブロックを複数のサブブロックに分割し、サブブロック単位の動きベクトルを導出する。
 詳細に説明すると、サブブロック予測パラメータ導出部3037(サブブロック予測手段)は、サブブロック予測モードにてサブブロック予測を行う、時空間サブブロック予測部30371(ATMVP予測手段、STMVP予測手段)、アフィン予測部30372(アフィン予測手段)、マッチング動き導出部30373(マッチング予測手段)、OBMC予測部30374の少なくとも一つを備える。
 アフィン予測部30372(アフィン予測手段)は2つ以上の基準動きベクトルを用いて上記サブブロックの動きベクトルを導出する。
 時空間サブブロック予測部30371(ATMVP予測手段)は、対象ブロックに対応する位置の参照ピクチャ上のブロックを分割して得られる点の動きベクトルを用いて、上記サブブロックの動きベクトルを導出する。
 時空間サブブロック予測部30371(STMVP予測手段)は、対象ブロックに隣接する隣接動きベクトルと、対象ブロックに対応する位置にある参照ピクチャ上のブロックを分割して得られる点の動きベクトルとを用いて、上記サブブロックの動きベクトルを導出する。
 マッチング動き導出部30373(マッチング予測手段)は、対象ブロック単位でマッチングによりブロック単位の動きベクトルを導出し、さらに上記サブブロック単位で上記ブロック単位の動きベクトルを初期動きベクトルとしてマッチングによる動きベクトルを導出するマッチング予測手段であることを特徴とする。
  (サブブロック予測モードフラグ)
 ここで、動画像復号装置31、動画像符号化装置11(詳細は後述する)における、あるブロックの予測モードがサブブロック予測モードであるか否かを示すサブブロック予測モードフラグsubPbMotionFlagの導出方法について説明する。動画像復号装置31、動画像符号化装置11は、後述する空間サブブロック予測SSUB、時間サブブロック予測TSUB、アフィン予測AFFINE、マッチング動き導出MATのいずれを用いたかに基づいて、サブブロック予測モードフラグsubPbMotionFlagを導出する。たとえば、あるブロックで選択された予測モードをN(たとえばNは選択されたマージ候補を示すラベル)とした場合には、以下の式によりサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。
 subPbMotionFlag = (N == TSUB) || (N == SSUB) || (N == AFFINE) || (N == MAT)
 動画像復号装置31、動画像復号装置11が一部の予測、例えば、空間サブブロック予測SSUB、アフィン予測AFFINEを行う構成である場合には、以下のようにサブブロック予測モードフラグsubPbMotionFlagを導出してもよい。
 subPbMotionFlag = (N == SSUB)|| (N == AFFINE)
 図6(a)は、本実施形態に係るマージ予測パラメータ導出部3036の構成を示す概略図である。マージ予測パラメータ導出部3036は、マージ候補導出部30361とマージ候補選択部30362、マージ候補格納部30363を備える。マージ候補格納部30363は、マージ候補導出部30361から入力されたマージ候補を格納する。なお、マージ候補は、予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLXを含んで構成されている。マージ候補格納部30363において、格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。
 マージ候補導出部30361は、すでに復号処理が行われた隣接ブロックの動きベクトルと参照ピクチャインデックスrefIdxLXをそのまま用いてマージ候補を導出する。それ以外にアフィン予測を用いてマージ候補を導出してもよい。つまり、マージ候補導出部30361は、アフィン予測を、後述する空間マージ候補導出処理、時間マージ候補導出処理、結合マージ候補導出処理、およびゼロマージ候補導出処理に用いてもよい。なお、アフィン予測はサブブロック単位で行われ、予測パラメータはサブブロック毎に予測パラメータメモリ307に格納されている。あるいは、アフィン予測は画素単位で行われてもよい。
  (空間マージ候補導出処理)
 空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータ(予測リスト利用フラグpredFlagLX、動きベクトルmvLX、参照ピクチャインデックスrefIdxLX)を読み出し、読み出した予測パラメータをマージ候補として導出し、マージ候補リストmergeCandList[](予測ベクトル候補リストmvpListLX[])に格納する。読み出される予測パラメータは、復号対象ブロックから予め定めた範囲内にあるブロック(例えば、図7(b)に示す復号対象ブロックの左下端L、BL、左上端AL、右上端A、ARにそれぞれ接するブロックの全部または一部)のそれぞれに係る予測パラメータである。
  (時間マージ候補導出処理)
 時間マージ導出処理として、マージ候補導出部30361は、参照ピクチャにおいて図7(c)に示すコロケートブロックの右下ブロックBR、あるいは、復号対象ブロックの中心の座標を含むブロックCの予測パラメータを予測パラメータメモリ307から読みだしマージ候補とし、マージ候補リストmergeCandList[]に格納する。一般的にブロックBRを優先してマージ候補リストmergeCandList[]に加え、ブロックBRが動きベクトルを持たない(例えばイントラ予測ブロック)場合や、ブロックBRがピクチャ外に位置する場合は、ブロックCの動きベクトルを予測ベクトル候補に加える。動きの異なる可能性が高いコロケートブロックの動きベクトルを予測候補として加えることで、予測ベクトルの選択肢が増え、符号化効率が高まる。参照ピクチャの指定方法は、例えば、図8のスライスヘッダにおいて指定された参照ピクチャインデックスcollocated_ref_idx(SYN01)でも良いし、復号対象ブロックに隣接するブロックの参照ピクチャインデックスrefIdxLXのうち最小のものを用いて指定しても良い。
 例えばマージ候補導出部30361は、ブロックCの位置(xColCtr, yColCtr)とブロックBRの位置(xColBr、yColBr)を、以下の式で導出してもよい。
  xColCtr = xPb + (W>>1)
  yColCtr = yPb + (H>>1)
  xColBr = xPb + W
  yColBr = yPb + H
ここで、(xPb,yPb)は対象ブロックの左上座標、(W,H)は対象ブロックの幅と高さである。
  (結合マージ候補導出処理)
 結合マージ導出処理として、マージ候補導出部30361は、既に導出され、マージ候補格納部30363に格納された2つの異なる導出済マージ候補の動きベクトルと参照ピクチャインデックスを、それぞれL0、L1の動きベクトルとして組み合わせることで結合マージ候補を導出し、マージ候補リストmergeCandList[]に格納する。
  (ゼロマージ候補導出処理)
 ゼロマージ候補導出処理として、マージ候補導出部30361は、参照ピクチャインデックスrefIdxLXが0であり、動きベクトルmvLXのX成分、Y成分が共に0であるマージ候補を導出し、マージ候補リストmergeCandList[]に格納する。
 マージ候補導出部30361によって導出された上記マージ候補はマージ候補格納部30363に格納される。マージ候補リストへは、マージ候補名のラベルを格納してもよいし、マージ候補の動きベクトルと参照ピクチャインデックスを格納してもよい。マージ候補リストmergeCandList[]に格納する順番は、図7(b)、(c)に示すブロックと、結合マージ候補、ゼロマージ候補を加えた{L、A、AR、BL、AL、BR/C、結合マージ候補、ゼロマージ候補}である。BR/Cは、ブロックBRが利用可能でなければブロックCを使用する、という意味である。なお、動きベクトルが利用可能でない(ブロックがイントラ予測等)参照ブロックは、マージ候補リストに格納されない。
 マージ候補選択部30362は、マージ候補格納部30363のマージ候補リストmergeCandList[]に格納されているマージ候補のうち、インター予測パラメータ復号制御部3031から入力されたマージインデックスmerge_idxに対応するインデックスが割り当てられたマージ候補を、対象ブロックのインター予測パラメータとして選択する。
マージ候補選択部30362は選択したマージ候補を予測パラメータメモリ307に記憶するとともに、予測画像生成部308に出力する。
  (サブブロック予測部)
 次に、サブブロック予測部について説明する。
 (時空間サブブロック予測部30371)
 時空間サブブロック予測部30371は、時間的に対象ブロックに隣接する参照ピクチャ上(たとえば直前のピクチャ)のブロックの動きベクトル、もしくは、空間的に対象ブロックに隣接するブロックの動きベクトルから、対象ブロックを分割して得られるサブブロックの動きベクトルを導出する。具体的には、対象ブロックが参照する参照ピクチャに合わせて参照ピクチャ上の動きベクトルをスケーリングすることにより、対象ブロック中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi=xPb+BW*i, yj=yPb+BH*j, i=0,1,2,・・・,W/BW-1、j=0,1,2,・・・,H/BH-1)を導出する(時間サブブロック予測)。ここで、(xPb, yPb)は対象ブロックの左上座標、W、Hは対象ブロックのサイズ、BW、BHはサブブロックのサイズである。
 なお、本明細書では、座標値であるxi, yiを用いた添え字[xi][yi]に変えて、サブブロックを表すインデックス(整数値)であるk, jを用いた添え字[k][l]を用いて説明する場合があるが、処理は同じである。この場合、水平および垂直方向のサブブロックの個数であるNBW、NBHを用いて、spMvLX[k][l] (k=0..NBW-1、l=0..NBH-1)を導出する。ここで、NBW = W / BW、NBH = H / BH
 また、隣接ブロックの動きベクトルを、対象ブロックを分割して得られるサブブロックとの距離に応じて加重平均を計算することで、対象ブロック中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi=xPb+BW*i, yj=yPb+BH*j, i=0,1,2,・・・,W/BW-1、j=0,1,2,・・・,H/BH-1)を導出してもよい(空間サブブロック予測)。
 上記、時間サブブロック予測の候補TSUB、空間サブブロック予測の候補SSUBを、マージモードの一つのモード(マージ候補)として選択する。
  (動きベクトルスケーリング)
 動きベクトルのスケーリングの導出方法を説明する。動きベクトルMv、動きベクトルMvをもつブロックを含むピクチャPic1(colPic)、動きベクトルMvの参照ピクチャRic2(refPicCol)、スケーリング後の動きベクトルsMv、スケーリング後の動きベクトルsMvをもつブロックを含むピクチャPic3(currPic)、スケーリング後の動きベクトルsMvが参照する参照ピクチャPic4(refPic)に設定すると、sMvの導出関数MvScale(Mv, Pic1, Pic2, Pic3, Pic4)は下式で表される。
  sMv = MvScale(Mv, Pic1, Pic2, Pic3, Pic4)
    = Clip3(-R1,R1-1,sign(distScaleFactor*Mv)*((abs(distScaleFactor*Mv)+round1-1)>>shift1))    (式MVSCALE-1)
  distScaleFactor = Clip3(-R2, R2-1, (tb*tx+round2)>>shift2)
  tx = (16384+abs(td)>>1)/td
  td = DiffPicOrderCnt(Pic1, Pic2) // e.g POC diff of col pics
  tb = DiffPicOrderCnt(Pic3, Pic4) // e.g. POC diff of curr pics
ここで、round1、round2、shift1、shift2は、逆数を用いて除算を行うためのラウンド値及びシフト値で例えば、round1=1<<(shift1-1)、round2=1<<(shift2-1)、shift1=8、shift2=6などである。DiffPicOrderCnt(Pic1, Pic2)はPic1とPic2の時間情報(例えばPOC)の差を返す関数である。R1、R2、R3は処理を限られた精度で行うために値域を制限するもので例えば、R1=32768、R2=4096、R3=128などである。
 また、スケーリング関数MvScale(Mv, Pic1, Pic2, Pic3, Pic4)は以下の式でもよい。
  MvScale(Mv, Pic1, Pic2, Pic3, Pic4) = 
   Mv*DiffPicOrderCnt(Pic3,Pic4)/DiffPicOrderCnt(Pic1,Pic2) (式MVSCALE-2)
 すなわち、Pic1とPic2の時間情報の差と、Pic3とPic4の時間情報の差との比に応じてMvをスケーリングしてもよい。
 具体的な時空間サブブロック予測方法として、ATMVP(Adaptive Temporal Motion Vector Prediction)とSTMVP(Spatial-Temporal Motion Vector Prediction)について説明する。
  (ATMVP)
 ATMVPは、図7(b)に示す対象ピクチャPCurの対象ブロックの空間隣接ブロック(L、A、AR、BL、AL)の動きベクトルをもとに、対象ブロックのサブブロック毎に動きベクトルを導出し、サブブロック単位で予測画像を生成する方式であり、下記の手順で処理する。
 ステップ1)ブロックレベル動きベクトル導出
 対象ブロックの周囲の空間隣接ブロックL、A、AR、BL、ALの順に走査し、利用可能(available)な動きベクトルを有する最初の隣接ブロックを求める。利用可能な動きベクト
ルを有する隣接ブロックが見つかった場合、そのブロックが有する動きベクトルと参照ピクチャを、対象ブロックのブロックレベルの動きベクトルBMV(bmv[0],bmv[1])と参照ピクチャBRefに設定して、ステップ2に移行する。全ての隣接ブロックの動きベクトルが利用可能でない(non available)場合、ATMVPをオフとし、処理を終了する。「ATMVPがオフ」の意味は、マージ候補リストにATMVP候補(ATMVPによる動きベクトル)を格納しないということである。
 また、「利用可能な隣接ブロック」の意味は、例えば、隣接ブロックが動きベクトルを有する、である。
 ステップ2)サブブロックレベル動きベクトル導出
 図9(a)に示すように、参照ピクチャBRef上で、対象ブロックを動きベクトルBMVだけシフトした位置のブロック(コロケートブロック)をサブブロックに分割し、各サブブロックの有する動きベクトルSpRefMvLX[k][l](k=0..NBW-1、l=0..NBH-1)と参照ピクチャSpRef[k][l]の情報を取得する。
 なお、対象ブロックをサブブロックに分割し、各サブブロックを動きベクトルBMVだけシフトした位置の動きベクトルSpRefMvLX[k][l](k=0..NBW-1、l=0..NBH-1)を導出してもよい。ここで、NBW、NBHは各々、水平および垂直方向のサブブロックの個数である。あるサブブロックM(kM,lM)の動きベクトルがない場合、ブロックレベルの動きベクトルBMVと参照ピクチャBRefを、サブブロック(kM,lM)の動きベクトルSpRefMvLX[kM][lM]と参照ピクチャSpRef[kM][lM]としてセットする。
 ステップ3)動きベクトルスケーリング
 参照ピクチャ上の各サブブロックの動きベクトルSpRefMvLX[k][l]と参照ピクチャSpRef[k][l]からスケーリング関数MvScale()により対象ブロック上の各サブブロックの動きベクトルSpMvLX[k][l]を導出する。
  SpMvLX[k][l] = MvScale(SpRefMvLX[k][l], Bref, SpRef[k][l], PCur, RefPicListX[refIdxATMVP]) (式ATMVP-1)
 ここでRefPicListX[refIdxATMVP]は、対象ブロックの参照ピクチャであり、例えば、refIdxATMVP = 0に設定する。
 なお、対象ブロックのサブブロックレベルの参照ピクチャは、図8に示す、スライスヘッダで通知された時間方向の予測動きベクトル導出に用いられる、インデックス(collocated_ref_idx)で指定された参照ピクチャでもよい。この場合、対象ブロックのサブブロックレベルの参照ピクチャはRefPicListX[collocated_ref_idx]であり、対象ブロックのサブブロックレベルの動きベクトルSpMvLX[k][l]の算出式は下記である。
  SpMvLX[k][l] = MvScale(SpRefMvLX[k][l], Bref, SpRef[k][l], PCur, RefPicListX[collocated_ref_idx])) (式ATMVP-2)
 ステップ4)スケーリング後のサブブロックレベル動きベクトルのクリッピング
 インター予測画像生成部309は、スケーリング後のサブブロックレベル動きベクトルをもとに予測画像を生成する時に、参照ピクチャメモリ306から参照ピクチャの画像データを転送する。参照画像RefPicListX[refIdxATMVP]上では、スケーリングによって、図9(b)のように、各サブブロック間の動きベクトル(シフト量)の差が拡大することがある。図9(c)のように各動きベクトルの差が大きくなると、ブロック全体の画像データの転送量(メモリバンド幅)が増加する。参照ピクチャメモリ306からの転送量(メモリバンド幅)を増加させないために、サブブロックの動きベクトルの差を制限する構成が適当である。
 (サブブロック動きベクトルのクリッピング、ATMVP, STMVP, Affine共通)
 時空間サブブロック予測部30371は、サブブロックレベル動きベクトルの代表動きベクトルrepMV(repMV[0],repMV[1])に対し±THCLIPの範囲を超えた動きベクトルを、所定の範囲内に入るように動きベクトルを制限(クリッピング)する。
 spMvLX[k][l][0] = Clip3(repMV[0]-THCLIP,repMV[0]+THCLIP-1,spMvLX[k][l][0]) (式ATMVP-3)
 spMvLX[k][l][1] = Clip3(repMV[1]-THCLIP,repMV[1]+THCLIP-1,spMvLX[k][l][1])
 また、全てのサブブロックレベル動きベクトルspMvLX[][]を計算後に各サブブロックの動きベクトルを更新する以下の構成を用いてもよい。
 時空間サブブロック予測部30371は、対象ブロックに含まれるスケーリング後のサブブロックレベルの動きベクトルspMvLX[k][l]の範囲を計算する。水平および垂直方向のspMvLX[k][l]の最大値maxspMvLXx、maxspMvLXy、水平および垂直方向のspMvLX[k][l]の最小値minspMvLXx、minspMvLXyを導出する。
  maxspMvLXx = max(spMvLX[k][l][0]) k=0..NBW-1、l=0..NBH-1 (式CLIP1)
  maxspMvLXy = max(spMvLX[k][l][1]) k=0..NBW-1、l=0..NBH-1
  minspMvLXx = min(spMvLX[k][l][0]) k=0..NBW-1、l=0..NBH-1
  minspMvLXy = min(spMvLX[k][l][1]) k=0..NBW-1、l=0..NBH-1
  rangeX = maxSpMvLxx-minspMvLXx
  rangeY = maxSpMvLxy-minspMvLXy
 ここで、NBW、NBHは各々、水平および垂直方向のサブブロックの個数である。
 spMvLX[k][l]の最大値と最小値の差分値が所定値THCLIP*2を超えた場合、時空間サブブロック予測部30371は、図9(d)に示すように、ブロックレベル動きベクトルBMV(bmv[0],bmv[1])に対し±THCLIPの範囲を超えた動きベクトルは、範囲内に入るように動きベクトルを制限(クリッピング)する。
  if (rangeX > THCLIP*2)                   (式CLIP2)
   spMvLX[k][l][0] = Clip3(bmv[0]-THCLIP, bmv[0]+THCLIP-1, spMvLX[k][l][0])
  if (rangeY > THCLIP*2)
   spMvLX[k][l][1] = Clip3(bmv[1]-THCLIP, bmv[1]+THCLIP-1, spMvLX[k][l][1])
 なお、上記ではブロックレベル動きベクトルBMV(bmv[0],bmv[1])に対し±THCLIPの範囲を超えた動きベクトルを、クリッピングの対象にしたが、ブロックレベル動きベクトルBMV(bmv[0],bmv[1])ではなく、サブブロックレベルの動きベクトルの代表値(例えば、平均値)に対し±THCLIPの範囲を超えた動きベクトルをクリッピングの対象にしてもよい。
  if (rangeX > THCLIP*2)                   (式CLIP3)
   spMvLX[k][l][0] = Clip3(repMV[0]-THCLIP, repMV[0]+THCLIP-1, spMvLX[k][l][0])
  if (rangeY > THCLIP*2)
   spMvLX[k][l][1] = Clip3(repMV[1]-THCLIP, repMV[1]+THCLIP-1, spMvLX[k][l][1])
 (代表動きベクトル)
 ここで代表動きベクトルrepMV[0]、repMV[1]は例えば、サブブロックの動きベクトルspMvLX[k][l]の水平、垂直成分の平均値で導出しても良い。代表動きベクトルrepMVは、例えば対象ブロックの中心位置のサブブロックの動きベクトルspMvLX[(NBW-1)/2][(NBH-1)/2]や対象ブロックの左上位置のサブブロックの動きベクトルspMvLX[0][0]でもよい。また、対象ブロックの中心位置のサブブロックの動きベクトルspMvLX[(NBW-1)/2][(NBH-1)/2]が利用可能ではない場合には、左上位置のサブブロックの動きベクトルspMvLX[0][0]を用いてもよい。また、代表動きベクトルrepMVを対象ブロックの4隅に位置するサブブロックの動きベクトルの平均値を用いても良い。
  repMV[0] = (spMvLX[0][0][0] + spMvLX[NBW-1][0][0] + spMvLX[0][NBH-1][0] + spMvLX[NBW-1][NBH-1][0]+2)>>2
  repMV[1] = (spMvLX[0][0][1] + spMvLX[NBW-1][0][1] + spMvLX[0][NBH-1][1] + spMvLX[NBW-1][NBH-1][1]+2)>>2
 ステップ5)ATMVPをマージ候補リストに格納
 マージ候補リストに格納するマージ候補の順番の例を図7(a)に示す。このリストの中から、インター予測パラメータ復号制御部3031で導出されたmerge_idxを用いて、対象ブロックのマージ候補が選択される。
 マージ候補としてATMVPが選択された場合、図9(a)に示すように、対象ブロックの各サブブロックSpMvLX[k][l]に基づいて、参照ピクチャRefPicListX[refIdxATMVP]上の画像を読み出し、補間を行い、予測画像を導出する。
 以上ステップ1)~ステップ5)で説明したATMVPに関するマージ候補リスト導出処理を図10のフローチャートで説明する。
 時空間サブブロック予測部30371は、対象ブロックの5つの隣接ブロックをサーチする(S2301)。
 時空間サブブロック予測部30371は、利用可能な最初の隣接ブロックの有無を判定し、利用可能な隣接ブロックがあればS2303に進み、利用可能な隣接ブロックがなければS2309に進む(S2302)。
 時空間サブブロック予測部30371は、利用可能な隣接ブロックの有する動きベクトルと参照ピクチャを、対象ブロックのブロックレベルの動きベクトルBMVと参照ピクチャBRefとして設定する(S2303)。
 時空間サブブロック予測部30371は、対象ブロックのブロックベースの動きベクトルBMVと参照ピクチャBRefを用いて、コロケートブロックのサブブロックベースの動きベクトルSpRefMvLX[k][l]と参照ピクチャSpRef[k][l]を取得する(S2304)。
 時空間サブブロック予測部30371は、動きベクトルSpRefMvLX[k][l]と参照ピクチャSpRefを用いて、対象ピクチャの参照ピクチャをRefPicListX[refIdxATMVP]に設定した時の、対象ブロックのサブブロックベースの動きベクトルspMvLX[k][l]をスケーリングにより導出する(S2305)。
 時空間サブブロック予測部30371は、スケーリングによって導出されたサブブロックベースの動きベクトルspMvLX[k][l]が所定値内にあるか否かを判定する。spMvLX[k][l]が所定値内にあればS2308に進み、そうでない場合、S2307に進む(S2306)。
 動きベクトルspMvLX[k][l]が所定値外の場合、時空間サブブロック予測部30371はspMvLX[k][l]をサブブロック動きベクトルのクリッピングに示す方法又はステップ4)に示す方法でクリッピングする(S2307)。
 時空間サブブロック予測部30371は、図7(a)に示すマージ候補リストmergeCandList[]にATMVPの動きベクトル、あるいは、ATMVPというラベルを格納する(S2308)。
 時空間サブブロック予測部30371は、マージ候補リストmergeCandList[]にATMVPの動きベクトル、あるいは、ATMVPというラベルを格納しない(S2309)。
 以上の処理により、ATMVPに関するマージ候補リストを導出する。
 このようにATMVPにおいて、スケーリング後のサブブロックの動きベクトルの範囲を所定値以内に制限することによって、メモリバンド幅の増加を防ぐことができる。
  (STMVP)
 STMVPは、図11(a)に示す対象ピクチャPCurの対象ブロックの空間隣接ブロック(a,b,c,d,…)、および、図11(b)に示す対象ブロックのコロケートブロック(A',B',C',D',…)の動きベクトルをもとに、対象ブロックのサブブロック毎に動きベクトルを導出し、サブブロック単位で予測画像を生成する方式である。図11(a)のA,B,C,Dは、対象ブロックを分割したサブブロックの例である。図11(b)のA',B',C',D'は、図11(a)のサブブロックA,B,C,Dのコロケートブロックである。図11(b)のA'c,B'c,C'c,D'cはA',B',C',D'の中心に位置する領域であり、A'br,B'br,C'br,D'brはA',B',C',D'の右下に位置する領域である。なお、A'br,B'br,C'br,D'brは図11(b)に示すA',B',C',D'外の右下位置ではなく、図11(g)に示すA',B',C',D'内の右下位置であってもよい。STMVPは下記の手順で処理する。対象ブロックをサブブロックに分割し、各サブブロックを順に下記手順を行う。
 ステップ1)対象サブブロック(サブブロックAと呼ぶ)の上側隣接ブロックから右方向に、利用可能(available)な最初のブロックを求める。利用可能な隣接ブロックが見つかった場合、その最初のブロックが有する動きベクトルと参照ピクチャをSTMVPの上側ベクトルmvA_aboveと参照ピクチャRefA_aboveとし、カウントcnt=1に設定する。利用可能な隣接ブロックがない場合、カウントcnt=0に設定する。
 ステップ2)対象サブブロック(サブブロックA)の左側隣接ブロックbから下方向に、利用可能な最初のブロックを求める。利用可能な隣接ブロックが見つかった場合、その最初のブロックが有する動きベクトルと参照ピクチャを左側ベクトルmvA_leftと参照ピクチャRefA_leftとし、カウントcntを1インクリメントする。利用可能な隣接ブロックがない場合、カウントcntを更新しない。
 ステップ3)対象サブブロック(サブブロックA)の時間方向隣接ブロックであるコロケートブロックA'において、右下位置A'brおよび中心位置A'cの順に利用可能か否かをチェックする。利用可能な領域が見つかった場合、そのブロックが有する最初の動きベクトルと参照ピクチャをコロケートベクトルmvA_colと参照ピクチャRefA_colとし、カウントを1インクリメントする。利用可能なブロックがない場合、カウントcntを更新しない。
 ステップ4)cnt=0(利用可能な動きベクトルが1つもない)の場合、対象サブブロック(サブブロックA)の動きベクトルにゼロベクトルをセットする(STMVPをオフにし、処理を終了する)。
 ステップ5)ctnが0でない場合、対象ピクチャPCurと、対象ブロックの参照ピクチャRefPicListX[collocated_ref_idx]との時間情報を用いて、ステップ1)~ステップ3)で求めた利用可能な動きベクトルをスケーリングする。スケーリング後の動きベクトルをsmvA_above,smvA_left,smvA_colとしてセットする。
  smvA_above = MvScale(mvA_above, PCur, RefA_above, PCur, RefPicListX[collocated_ref_idx])) (式STMVP-1)
  smvA_left = MvScale(mvA_left, PCur, RefA_left, PCur, RefPicListX[collocated_ref_idx]))
  smvA_col = MvScale(mvA_col, PCur, RefA_col, PCur, RefPicListX[collocated_ref_idx]))
利用可能でない動きベクトルは0にセットする。
 ステップ6)周辺ブロックの動きベクトルsmvA_above,smvA_left,smvA_colの平均を算出し、対象サブブロック(サブブロックA)の動きベクトルspMvLX[A]としてセットする。対象ブロック(サブブロックA)の参照ピクチャはRefPicListX[collocated_ref_idx]である。
  spMvLX[A] = (smvA_above+smvA_left+smvA_col)/cnt (式STMVP-2)
 整数演算のために例えば、以下のように導出しても良い。導出した動きベクトル数のカウントcntが2の場合、2つの動きベクトルを順にmvA_0, mvA_1と記載すると、以下の式で対象ブロックの動きベクトルspMvLXを導出してもよい。
  spMvLX[A] = (smvA_0+smvA_1)>>1
 cntが3の場合、以下の式で導出してもよい。
  spMvLX[A] = (5*smvA_above+5*smvA_1eft+6*smvA_col)>>4
 上記ステップ1)~ステップ6)の処理をサブブロックB,C,D等、対象ブロック中の各サブブロックに対して実行し、図11(d)、(e)、(f)のように各サブブロックの動きベクトルを求める。ただし、サブブロックBでは、上側隣接ブロックはdから右方向にサーチする。サブブロックCでは、上側隣接ブロックはAであり、左側隣接ブロックはaから下方向にサーチする。サブブロックDでは、上側隣接ブロックはBであり、左側隣接ブロックはCである。
 ステップ7)サブブロックレベル動きベクトルのクリッピング
 ATMVPのステップ4)と同様、メモリバンド幅を増加させないために、各サブブロックの動きベクトル導出(ステップ6)の後に、サブブロックレベル動きベクトルspMvLX[]を制限してもよい。
 また、具体的には、時空間サブブロック予測部30371は、サブブロックレベル動きベクトルの代表動きベクトルrepMV(repMV[0],repMV[1])に対し±THCLIPの範囲を超えた動きベクトルは、範囲内に入るように動きベクトルを制限(クリッピング)する。
 spMvLX[k][0] = Clip3(repMV[0]-THCLIP,repMV[0]+THCLIP-1,spMvLX[k][0])
 spMvLX[k][1] = Clip3(repMV[1]-THCLIP,repMV[1]+THCLIP-1,spMvLX[k][1])
 時空間サブブロック予測部30371は、ATVMPにおいて既に(式CLIP1)、(式CLIP2)、(式CLIP3)で説明したようにSTMVPの各サブブロックの動きベクトルを制限してもよい。
 ステップ8)マージ候補リストにSTMVPの動きベクトル(もしくはSTMVPというラベル)を格納する。マージ候補リストに格納するマージ候補の順番を図7(a)に示す。このリストの中から、インター予測パラメータ復号制御部3031で導出されたmerge_idxを用いて、対象ブロックのマージ候補が選択される。
 マージ候補としてSTMVPが選択された場合、対象ブロックの各サブブロックから動きベクトルに基づいて参照ピクチャRefPicListX[collocated_ref_idx]上の画像を読み出し、補間を行い、予測画像を導出する。
 以上ステップ1)~ステップ8)で説明したSTMVPに関するマージ候補リスト導出処理を図12のフローチャートで説明する。
 時空間サブブロック予測部30371は、対象ブロックをサブブロックに分割する(S2601)。
 時空間サブブロック予測部30371は、サブブロックの上側、左側、時間方向の隣接ブロックをサーチする(S2602)。
 時空間サブブロック予測部30371は、利用可能な隣接ブロックの有無を判定し、利用可能な隣接ブロックがあればS2604に進み、利用可能な隣接ブロックが1個もなければS2610に進む(S2603)。
 時空間サブブロック予測部30371は、対象ピクチャと複数の隣接ブロックの参照ピクチャ間の時間的な距離に応じて、利用可能な隣接ブロックの有する動きベクトルをスケーリングする(S2604)。
 時空間サブブロック予測部30371は、スケーリングした動きベクトルの平均値を算出し、対象サブブロックの動きベクトルspMvLX[]としてセットする(S2605)。
 時空間サブブロック予測部30371は、処理中のサブブロックが対象ブロックの最後のサブブロックか否かをチェックし(S2606)、最後のサブブロックであればS2607に進み、そうでなければ、処理対象を次のサブブロックに移してS2602に進み(S2611)、S2602~S2605を繰り返し処理する。
 時空間サブブロック予測部30371は、導出されたサブブロックベースの動きベクトルspMvLX[]が所定値内にあるか否かを判定する。spMvLX[]が所定値内にあればS2609に進み、そうでなければS2608に進む(S2607)。
 動きベクトルspMvLX[]が所定値外の場合、時空間サブブロック予測部30371はサブブロック動きベクトルのクリッピングの方法又はステップ7)の方法で動きベクトルspMvLX[]をクリッピングする(S2608)。
 時空間サブブロック予測部30371は、図7(a)に示すマージ候補リストmergeCandList[]にSTMVPの動きベクトル、あるいは、STMVPというラベルを格納する(S2609)。
 時空間サブブロック予測部30371は、利用可能な動きベクトルがない場合、マージ候補リストmergeCandList[]にSTMVPの動きベクトルを格納せず、処理を終了する(S2610)。
 以上の処理により、STMVPに関するマージ候補リストを導出する。
 このようにSTMVPにおいて、スケーリング後のサブブロックの動きベクトルの範囲を所定値以内に制限することによって、メモリバンド幅の増加を防ぐことができる。
  (アフィン予測部)
 アフィン予測部30372、30321は、対象ブロックのアフィン予測パラメータを導出する。本実施形態では、アフィン予測パラメータとして、対象ブロックの2つの制御点(V0、V1)の動きベクトル(mv0_x, mv0_y)(mv1_x, mv1_y)を導出する。具体的には、隣接ブロックの動きベクトルから予測することにより、各制御点の動きベクトルを導出してもよいし(アフィン予測部30372)、制御点の動きベクトルとして導出された予測ベクトルと符号化データから導出される差分ベクトルの和により、各制御点の動きベクトルを導出してもよい(アフィン予測部30321)。
  (サブブロックの動きベクトル導出処理)
 以下、具体的な実施構成の例として、アフィン予測部30372、30321がアフィン予測を用いて、各サブブロックの動きベクトルmvLXを導出する処理の流れを、ステップに分けて説明する。アフィン予測部30372、30321がアフィン予測を用いて、対象サブブロックの動きベクトルmvLXを導出する処理は、下記(STEP1)~(STEP3)の3つの工程を含んでいる。
 (STEP1)制御点ベクトルの導出
 アフィン予測部30372、30321は、候補を導出するためのアフィン予測に用いる2つの制御点として、対象ブロックの代表点(ここではブロックの左上の点V0及びブロックの右上の点V1)の各々の動きベクトルを導出する。なお、ブロックの代表点は、対象ブロック上の点を用いる。本明細書では、アフィン予測の制御点に用いるブロックの代表点を「ブロック制御点」と記載する。
 まず、AMVPモード及びマージモードの(STEP1)の処理について、図13を用いて各々説明する。図13は、AMVPモード及びマージモードにおける制御点の動きベクトルの導出のために利用される参照ブロックの位置の例を示す図である。
  (AMVPモードにおける制御点の動きベクトルの導出)
 アフィン予測部30321は、図13(a)に示す2つの制御点(V0、V1)、あるいは、図13(b)に示す2つの制御点(V0、V2)の予測ベクトルmvpVNLXと差分ベクトルを加算して、各々動きベクトルmvN=(mvN_x,mvN_y)を導出する。Nは制御点を表す。
  (マージモードにおける制御点の動きベクトルの導出)
 アフィン予測部30372は、図13(c)に示すようなL、A、AR、LB、ALを含むブロックに対し、予測パラメータメモリ307を参照し、アフィン予測が利用されているか否かをチェックする。ブロックL、A、AR、LB、ALの順にサーチし、最初に見つかったアフィン予測を利用するブロック(ここでは図13(c)のL)を参照ブロック(マージ参照ブロック)として選択し、動きベクトルを導出する。
 アフィン予測部30372は、選択されたマージ参照ブロックの3点(図13(d)の点v0、点v1、点v2)を含むブロックの動きベクトル(mvvN_x,mvvN_y)(N=0..2)から、制御点(例えばV0、V1)の動きベクトル(mvN_x,mvN_y)(N=0..1)を導出する。
 (STEP2)サブブロックベクトルの導出
 アフィン予測部30372、30321は、(STEP1)で導出された対象ブロックの代表点であるブロック制御点(制御点V0とV1、あるいは、V0とV2)の動きベクトルから、対象ブロックに含まれる各サブブロックの動きベクトルを導出する。(STEP1)と(STEP2)によって、各サブブロックの動きベクトルspMvLXが導出される。なお、以下では制御点V0とV1の例を説明するが、V1の動きベクトルをV2の動きベクトルに置き換えれば、制御点V0とV2でも同様の処理で、各サブブロックの動きベクトルを導出することができる。
 図14(a)は、対象ブロックを構成する各サブブロックの動きベクトルspMvLXを、制御点V0の動きベクトルmv0(mv0_x, mv0_y)およびV1の動きベクトルmv1(mv1_x, mv1_y)から導出する例を示す図である。各サブブロックの動きベクトルspMvLXは、図14(a)に示すように、各サブブロックの中心に位置する点毎の動きベクトルとして導出する。
 アフィン予測部30372、30321は制御点V0とV1の動きベクトル(mv0_x,mv0_y)、(mv1_x,mv1_y)に基づいて、対象ブロック中の各サブブロックの動きベクトルspMvLX[xi][yi] (xi=xb+BW*i、yj=yb+BH*j、i=0,1,2,・・・,W/BW-1、j=0,1,2,・・・,H/BH-1)を導出する。
 (STEP3)サブブロック動き補償
 動き補償部3091は、インター予測パラメータ復号部303から入力された、予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、(STEP2)で導出したサブブロ
ックの動きベクトルspMvLXに基づいて、サブブロック単位の動き補償を行う。具体的には、参照ピクチャメモリ306から、参照ピクチャインデックスrefIdxLXで指定された参照ピクチャ上の、対象サブブロックの位置を起点として、動きベクトルspMvLXだけシフトした位置にあるブロックを読み出しフィルタリングすることによって、動き補償画像PredLXを生成する。
 ATMVP、STMVPと同様、メモリバンド幅を増加させないために、各サブブロックの動きベクトル導出の後に、サブブロックレベル動きベクトルspMvLX[]を制限してもよい。
 具体的には、アフィン予測部30372は、サブブロックレベル動きベクトルの代表動きベクトルrepMV(repMV[0],repMV[1])に対し±THCLIPの範囲を超えた動きベクトルは、範囲内に入るように動きベクトルを制限(クリッピング)する。
 spMvLX[k][0] = Clip3(repMV[0]-THCLIP,repMV[0]+THCLIP-1,spMvLX[k][0])
 spMvLX[k][1] = Clip3(repMV[1]-THCLIP,repMV[1]+THCLIP-1,spMvLX[k][1])
 アフィン予測部30372は、ATVMPにおいて既に(式CLIP1)、(式CLIP2)、(式CLIP3)で説明したようにアフィン予測の各サブブロックの動きベクトルを制限してもよい。
 このようにアフィン予測において、導出後のサブブロックの動きベクトルの範囲を所定値以内に制限することによって、メモリバンド幅の増加を防ぐことができる。
  (マッチング動き導出部30373)
 マッチング動き導出部30373は、バイラテラルマッチングまたはテンプレートマッチングの何れかのマッチング処理を行うことにより、ブロック又はサブブロックの動きベクトルspMvLXを導出する。図15は、(a)バイラテラルマッチング(Bilateral matching)、(b)テンプレートマッチング(Template matching)を説明するための図である。マッチング動き導出モードは、マージモードの一つのマージ候補(マッチング候補)として選択される。
 マッチング動き導出部30373は、物体が等速運動をすると仮定して、複数の参照ピクチャにおける領域のマッチングにより動きベクトルを導出する。バイラテラルマッチングでは、ある物体が、参照ピクチャAのある領域、対象ピクチャCur_Picの対象ブロック、参照ピクチャBのある領域を等速運動で通過するものと仮定して、参照ピクチャA、B間のマッチングにより対象ブロックの動きベクトルを導出する。テンプレートマッチングでは、対象ブロックの隣接領域の動きベクトルと対象ブロックの動きベクトルが等しいと仮定して、対象ブロックの隣接領域Temp_Cur(テンプレート)と参照ピクチャ上の参照ブロックの隣接領域Temp_L0のマッチングにより動きベクトルを導出する。マッチング動き導出部では、対象ブロックを複数のサブブロックに分割し、分割したサブブロック単位で後述のバイラテラルマッチングもしくはテンプレートマッチングを行うことにより、サブブロックの動きベクトルspMvLX[xi][yi] (xi=xPb+BW*i、yj=yPb+BH*j、i=0,1,2,・・・,W/BW-1、j=0,1,2,・・・,H/BH-1)を導出する。
 図15(a)に示すように、バイラテラルマッチングでは、対象ピクチャCur_Picにおける対象ブロックCur_blockの動きベクトルを導出するために、2枚の参照ピクチャが参照される。より具体的には、まず、対象ブロックCur_blockの座標を(xCur,yCur)と表現したとき、参照ピクチャインデックスrefIdxL0によって指定される参照ピクチャRef0(参照ピクチャA)内の領域であって、
  (xPos0,yPos0)=(xCur+mv0[0],yCur+mv0[1]) (式FRUC-1)
によって特定される左上座標(xPos0,yPos0)を有するBlock_Aと、例えば参照ピクチャインデックスrefIdxL1によって指定される参照ピクチャRef1(参照ピクチャB)内の領域であって、
  (xPos1,yPos1)=(xCur+mv1[0],xCur+mv1[1]) =(xCur-mv0[0]*DiffPicOrderCnt(Cur_Pic,Ref1)/DiffPicOrderCnt(Cur_Pic,Ref0), yCur-mv0[1]*DiffPicOrderCnt(Cur_Pic,Ref1)/DiffPicOrderCnt(Cur_Pic,Ref0))     (式FRUC-2)
によって特定される左上座標(xPos1,yPos1)を有するBlock_Bとが設定される。ここで、DiffPicOrderCnt(Cur_Pic,Ref0)、及びDiffPicOrderCnt(Cur_Pic,Ref1)は、図15(a)に示すように、それぞれ、対象ピクチャCur_Picと参照ピクチャAとの時間情報の差を返す関数、及び対象ピクチャCur_Picと参照ピクチャBとの時間情報の差を返す関数を表している。
 次に、Block_AとBlock_Bとのマッチングコストが最小となるように、(mv0[0],mv0[1])が決定される。このようにして導出された(mv0[0],mv0[1])が、対象ブロックに付与される動きベクトルとなる。この対象ブロックに付与された動きベクトルをもとに、対象ブロックを分割したサブブロック毎に動きベクトルspMVL0を導出する。
 Block_AとBlock_Bのマッチングコストは、例えば下式のように表される。
  SAD = ΣΣabs(Block_A[xi][yi]-Block_B[xi][yi])        (式FRUC-3)
ここで、ΣΣはxiおよびyiについての和であり、Block_A[][]とBlock_B[][]は各々、ブロックの左上座標が(式FRUC-1)、(式FRUC-2)の(xPos0,yPos0)、(xPos1,yPos1)で表されるブロックである。
 マッチング動き導出部30373は、第1の動きベクトル探索部303731と、第2の動きベクトル探索部303732とを備える。
 第1の動きベクトル探索部303731は、マッチング処理によりブロック毎に動きベクトルを導出する。まず、マッチング予測では、対象ブロックのAMVP候補、マージ候補等の隣接ブロックの動きベクトルを初期ベクトル候補として、対象ブロックにおける初期ベクトルを導出する。(mv0[0],mv0[1])に初期ベクトル候補を代入し、マッチングコストが最小となる動きベクトルをブロックレベルの初期ベクトルとし、再度(mv0[0],mv0[1])にセットする(初期ベクトルサーチ)。
 次に、第1の動きベクトル探索部303731は、対象ブロックにおけるブロックレベルのローカルサーチ(局所的探索)を行う。ローカルサーチでは、初期ベクトルを中心とする局所領域(例えば初期ベクトルを中心とする±SR画素の領域)をさらにサーチし、マッチングコストが最小となるベクトルを、最終的な対象ブロックのブロックレベルの動きベクトルを導出する。
 続いて、第2の動きベクトル探索部303732は、対象ブロックに含まれる各サブブロックの動きベクトルを導出する。まず、各サブブロックの初期ベクトルを導出する(初期ベクトルサーチ)。サブブロックの初期ベクトル候補は、第1の動きベクトル探索部303731によって導出されたブロックレベルの動きベクトル、各サブブロックの時空間方向の隣接ブロックの動きベクトル、当該サブブロックのATMVPあるいはSTMVPベクトル等である。これらの候補ベクトルの中から、マッチングコストが最小となる動きベクトルをサブブロック毎に求め、各サブブロックの初期ベクトルを導出する。なお、サブブロックの初期ベクトルサーチに利用するベクトル候補は上述のベクトルに限定されない。
 次に、第2の動きベクトル探索部303732は、サブブロックの初期ベクトルを中心とする局所領域(例えば初期ベクトルを中心とする±SR画素の領域)で、ステップサーチ等(ローカルサーチ)を行う。そして、サブブロックのベクトル候補のマッチングコストが最小となるベクトルを最終的なサブブロックの動きベクトルとして導出する。
 (FRUCの動きベクトル制限)
 ATMVP、STMVP、アフィン予測と同様、メモリバンド幅を増加させないために、各サブブロックの動きベクトル導出の後に、サブブロックレベル動きベクトルspMvLX[]を制限してもよい。
 具体的には、動きベクトル探索部303732は、サブブロックレベル動きベクトルの代表動きベクトルrepMV(repMV[0],repMV[1])に対し±THCLIPの範囲を超えた動きベクトルは、範囲内に入るように動きベクトルを制限(クリッピング)する。
 spMvLX[k][0] = Clip3(repMV[0]-THCLIP,repMV[0]+THCLIP-1,spMvLX[k][0])
 spMvLX[k][1] = Clip3(repMV[1]-THCLIP,repMV[1]+THCLIP-1,spMvLX[k][1])
 動きベクトル探索部303732は、ATVMPにおいて既に(式CLIP1)、(式CLIP2)、(式CLIP3)で説明したようにアフィン予測の各サブブロックの動きベクトルを制限してもよい。
 このようにアフィン予測において、導出後のサブブロックの動きベクトルの範囲を所定値以内に制限することによって、メモリバンド幅の増加を防ぐことができる。
  (ローカルサーチの具体例)
 次に、図30を参照して、ローカルサーチの具体例について説明する。図30は、動き探索パターンを説明するための図である。図中、stepMethodは動き探索方法、stepIterは動き探索方法の繰り返し回数(ステップ数)であり、所定の値に設定する。サブブロックレベルの最大ステップ数stepIterSubPUは、ブロックレベルの最大ステップ数stepIterPU未満に設定するとよい。
 マッチング動き導出部30373は、マッチングコストを評価した探索候補点のうち、最小のマッチングコストを与える探索候補点を最適な探索点とみなし、当該探索候補点の動きベクトルbestMVを選択する。なお、マッチングコストの導出用の関数としては、SAD(Sumof Absolute Difference、絶対値誤差和)及びSATD(アダマール変換絶対値誤差和)、SSD(Sum of Square difference)等が挙げられる。
 マッチング動き導出部30373が行う動きベクトルのローカルサーチは、これに限定されるものではなく、ステップサーチ(ダイヤモンドサーチ(stepMethod=DIAMOND)及びクロスサーチ(stepMethod=CROSS))、ラスタサーチ(ラスタ型の探索、stepMethod=RASTER)、スパイラルサーチ等の動き探索アルゴリズムを用いてもよい。
  (ステップサーチの具体例)
 まず、ステップサーチの一例として、ダイヤモンドサーチとクロスサーチを説明する。図30(a)は、ダイヤモンドサーチを適用したときの動き探索パターンを示す図である。図30(b)は、クロスサーチを適用したときの動き探索パターンを示す図である。
 ステップサーチでは、初期ベクトル(探索開始点)を中心に探索候補点を設定し、設定された探索候補点毎にマッチングコストを導出、評価し、最適なマッチングコストとなる探索候補点を選択する。この一通りの処理をここでは「ステップ処理」と呼ぶ。ステップサーチではこの「ステップ処理」をstepIter回、繰り返し実行する。各回のステップ処理では、探索ステップ数numIterを1だけインクリメントする。
 図30では、白抜き菱形で各探索回数での初期ベクトルstartMVを示し、黒菱形で各探索ステップでの最適ベクトルbestMVを示し、黒丸で各探索回数での探索候補点を示し、白抜き丸で各探索回数での探索済みの点を示している。
 マッチング動き導出部30373は探索を開始する前に探索ステップnumIterを0に初期化する。そして、各探索ステップの開始時点で、最小コストminCostに探索開始点のマッチングコストを設定し、最適候補インデックスbestIdxに初期値(-1)を設定する。
  minCost = mcost (startMV)                   (式STEP-1)
  bestIdx = -1
  bestMV = startMV
 ここでmcost(X)は、探索ベクトルXのマッチングコストを導出する関数である。
 マッチング動き導出部30373は、各探索ステップnumIterにおいて、当該探索開始点を中心とする探索候補点を選択し評価する。具体的には、マッチング動き導出部30373は、各探索候補インデックスIdxについて、探索開始点の座標(位置)startMVにオフセット候補(offsetCandD)の値(offsetCandD[Idx])を足し合わすことで、探索候補点の座標を選択する。
 以下に、図30(a)に示す7x5画素のサーチレンジにおいて、マッチング動き導出部30373における第1の動きベクトル探索部303731がダイヤモンドサーチする一例を示す。
 ブロックレベルの探索を行う第1の動きベクトル探索部303731は、1回目の探索(numIter=0)では、探索開始点のP0を中心にダイヤモンド状に配置される8つの点を順に探索候補点(ここでは図30(a)の一段目の点0~7)として選択する。つまり、探索開始インデックスnDirectStart=0、探索終了インデックスnDirectEnd=7である。続いて、第1の動きベクトル探索部303731は、各探索候補点のマッチングコストを評価する。具体的には
  Idx = nDirectStart..nDirectEnd
について、順に動きベクトル候補candMVを以下の式により導出し、各candMVにおけるマッチングコストを評価する。
  candMV = startMV + offsetCandD[Idx]              (式STEP-2)
 ここで、offsetCandD[Idx]は、探索候補点を設定するために探索開始点の座標に足し合わせるオフセット候補である。第1の動きベクトル探索部303731は、ダイヤモンドサーチのオフセット候補として、
  offsetCandD[8] = {(0,2), (1,1), (2,0), (1,-1), (0,-2), (-1,-1), (-2,0), (-1,1)}
を用いる。
 第1の動きベクトル探索部303731は、ある探索候補インデックスIdxの探索候補点candMV[Idx]のマッチングコスト
  candCost = mcost (candMV[Idx])                (式STEP-3)
が、その時点の最小コストminCost未満(candCost < minCost)であった場合、最適探索候補インデックスbestIdxをIdxに更新して、以下のように、最適コストminCost、最適ベクトルbestMVを更新する。
  bestIdx = Idx                         (式STEP-4)
  minCost = candCost
  bestMV = candMV[Idx]
 全ての探索候補点の処理が終了した時点で、最適ベクトルbestMVの更新があったか否かを判定し、更新がある場合は次のステップ処理を行い、更新がない場合はステップサーチで導出される動きベクトルとして、この時点の最適ベクトルbestMVを選択する。
 最適ベクトルbestMVの更新があった場合、次のステップ処理を行うために、最適ベクトルbestMVが示す探索候補点を、次のステップの探索開始点として用いる。
 例えば、図30(a)では第1の動きベクトル探索部303731は、最初のステップ(numIter=0)で点2が選択されており、これを次のステップの探索開始点(初期ベクトルstartMV)に設定する。
  startMV = bestMV (ここではP(1))              (式STEP-5)
 なお、最適ベクトルbestMVの更新があったか否かの判定は、最適ベクトルbestMVが探索開始点とは異なるか否かの他、bestIdxが初期値(-1)以外の値に更新されたか否か、若しくは、minCostが開始点の初期コスト以外の値に更新された否か等により判定してもよい。なお、最適ベクトルbestMVの位置(最適候補インデックスbestIdx)に依存して、次のステップで利用する探索開始インデックスnDirectStart、探索終了インデックスnDirectEndを、以下の式によって決定すれば、既探索の探索点を再度探索することがなく、効率的な探索が可能となる。
  nStep = 2 - (bestIdx & 1)                  (式STEP-6)
  nDirectStart = bestIdx - nStep
  nDirectEnd = bestIdx + nStep
 次に、図30(a)の二段目に示す2回目の探索(numIter=1)において、第1の動きベクトル探索部303731は、1回目の探索(numIter=0)の最適探索候補であった点2を初期ベクトルstartMV(探索開始点P1)に設定する。そして、探索開始点P1を中心としてダイヤモンド状に配置される複数の点の中から、未探索の候補点のうちの何れかを探索候補点に設定する。
 第1の動きベクトル探索部303731は、図30(a)の二段目では点0~4を探索候補点に設定する。第1の動きベクトル探索部303731は、これらの点を順に選択しマッチングコストを評価する。つまり、
  Idx = nDirectStart..nDirectEnd(ここではnDirectStart = 0, nDirectEnd = 4)
で示される探索候補点のコストを評価する。
 続けて、図30(a)の三段目に示す3回目の探索(numIter=2)において、第1の動きベクトル探索部303731は、2回目の探索(numIter=1)の最適探索候補であった点1を初期ベクトルstartMV(探索開始点P2)に設定する。そして、探索開始点P2を中心としてダイヤモンド状に配置される複数の点の中から、未探索の候補点、かつ、サーチレンジ内に存在する点のうちの何れかを探索候補点に設定する。
 第1の動きベクトル探索部303731は、図30(a)の三段目の点0~2を探索候補点に設定する(つまりnDirectStart=0, nDirectEnd=2の示す探索候補点を評価する)。
 図30(a)の三段目に示す3回目の探索(numIter=2)において評価した探索候補点のマッチングコストが、探索開始点P2のコスト以上である場合、最適ベクトルbestMVを更新されない。最適ベクトルbestMVの更新がない場合、ここで、ステップサーチ処理(ダイヤモンドサーチ)は終了する。
 なお、第1の動きベクトル探索部303731は、ダイヤモンドサーチ以外のステップサーチを行ってもよい。例えば、クロスサーチでは、オフセット候補(offsetCandC)として以下の値を用いる。
 offsetCandC[4] = {(0,1), (1,0), (0,-1), (-1,0)}
 図30(b)は、ダイヤモンドサーチの後に、クロスサーチを実施する例を示している。ここでは、第1の動きベクトル探索部303731は、探索開始点(図30(a)の三段目の探索開始点P2)を中心として、上下左右(十字)の位置の点を探索候補点として順に選択する。例えば、探索開始点P2の上下左右の探索候補点0~3のうち、最も小さいマッチングコストを与える探索候補点(探索開始点P2も含む)がP2の右隣の点である場合、第1の動きベクトル探索部303731は、ブロックの最適ベクトルbestMVとして、P2の右隣の点への動きベクトルを導出する。
 なお、第2の動きベクトル探索部303732も、第1の動きベクトル探索部303731と同様の手順で、サブブロックレベルの動きベクトル探索を実施する。
  (ラスタサーチの具体例)
 続いて、ラスタサーチについて説明する。ラスタサーチによる動き探索では、マッチング動き導出部30373は、サーチレンジ内の探索点を一定間隔で網羅的に選択し、これらのマッチングコストをラスタスキャン(raster scan)順に評価する。ここで、ラスタスキャンとは、サーチレンジの左上を起点とし、左側から右へと右端に到達するまで画素を調べ、右端に到達した場合には、行を1つだけ下がってまた左端から右へと順に画素を調べる網羅的な検索方法である。
 マッチング動き導出部30373は、ラスタスキャン順に設定された開始点から終点までの探索ベクトルの各々について算出したマッチングコストのうち、最も小さいマッチングコストを与える探索ベクトルを選択する。
 ラスタスキャンとは、SRW×SRHのサイズのサーチレンジに対し、最初にY座標y、X座標xを初期値に設定したうえで、xを初期値から終値までスキャンし、xが終値に達したら、xを初期値に戻したうえで、yを増加させ、更新されたyにおいて再度xを初期値から終値までスキャンする処理を繰り返す手順である。疑似コードで示すと、xのループがyのループの内側にあるような以下のような2重ループで行われる。
  for (y = 0; y < SRH; y++) {    // yに関するループ
   for (x = 0; x < SRW; x++) {  // xに関するループ
    ラスタスキャン内の処理
   }
  }
 なお、ラスタスキャンの代わりに、拡張ラスタスキャンを用いてもよい。拡張ラスタスキャンは、ラスタスキャンのようにあらかじめ定められたスキャン順によって、サーチレンジ内の各点を走査するものである。例えば、中心から周辺に向かって渦巻き状に走査するスパイラルスキャンも拡張ラスタスキャンの1つである。
 ラスタサーチにおいても、第1の動きベクトル探索部303731はブロックレベルの動きベクトルを探索し、第2の動きベクトル探索部303732はサブブロックレベルの動きベクトルを探索する。
 一方、図15(b)は、上記マッチング処理のうち、テンプレートマッチング(Template matching)について説明するための図である。
 図15(b)に示すように、テンプレートマッチングでは、対象ピクチャCur_Picにおける対象ブロックCur_blockの動きベクトルを導出するために、一度に1枚の参照ピクチャが参照される。
 より具体的には、例えば参照ピクチャインデックスrefIdxL0によって指定される参照ピクチャRef0(参照ピクチャAと呼ぶ)内の領域であって、
  (xPos0,yPos0)=(xCur+mv0[0],yCur+mv0[1]) (式FRUC-4)
によって特定される左上座標(xPos0,yPos0)を有する参照ブロックBlock_Aが設定される。
 次に、対象ピクチャCur_Picにおいて対象ブロックCur_blockに隣接したテンプレート領域Temp_Curと、参照ピクチャAにおいてBlock_Aに隣接したテンプレート領域Temp_L0とが設定される。図15(b)に示す例において、テンプレート領域Temp_Curは、対象ブロックCur_blockの上側に隣接する領域及び対象ブロックCur_blockの左側に隣接する領域とから構成される。また、テンプレート領域Temp_L0は、Block_Aの上側に隣接する領域及びBlock_Aの左側に隣接する領域とから構成される。
 このテンプレートを用いてバイラテラルマッチングと同様、第1の動きベクトル探索部303731は対象ブロックにおけるブロックレベルの初期ベクトルを導出する。テンプレートマッチングのマッチングコストは、例えば下式のように表される。
  SAD = ΣΣabs(Temp_Cur[xi][yi]-Temp_L0[xi][yi]) (式FRUC-5)
ここで、ΣΣはxiおよびyiについての和であり、Temp_L0[][]は、図15(b)に示す対象ブロックのテンプレートであり、(式FRUC-4)で示される(xPos0,yPos0)を左上座標とするBlock_Aの上側および左側に隣接する領域である。(式FRUC-4)の(mv0[0],mv0[1])には初期ベクトル候補を代入する。その中から、マッチングコストが最小となるベクトルを初期ベクトルとして、(mv0[0],mv0[1])に再度セットする。次に、第2の動きベクトル探索部303732は対象ブロックにおけるブロックレベルのローカルサーチ(局所的探索)を行う。ローカルサーチでは、初期ベクトルを中心とする局所領域(例えば初期ベクトルを中心とする±SR画素の領域)をさらにサーチし、マッチングコストが最小となるベクトルを最終的な対象ブロックの動きベクトルを導出する。
 続いて、第2の動きベクトル探索部303732は対象ブロックに含まれる各サブブロックの動きベクトルを導出する。図15(d)に示すように、対象ブロックにおけるサブブロックのテンプレートを取得する。ブロックレベルにおいて、テンプレートに対象ブロックの上側あるいは左側領域のみセットした場合、サブブロックのテンプレートも同じ形状にする。ブロックレベルの動きベクトル、当該サブブロックの時空間方向の隣接ブロックの動きベクトル、当該サブブロックのATMVPあるいはSTMVPベクトル等を初期ベクトル候補として、マッチングコストが最小となる動きベクトルを各サブブロックの初期ベクトルに決定する(初期ベクトルサーチ)。なお、サブブロックの初期ベクトルサーチに利用するベクトル候補は上述のベクトルに限定されない。
 次に、サブブロックの初期ベクトルを中心とする局所領域(例えば初期ベクトルを中心とする±SR画素の領域)で、ステップサーチ等(ローカルサーチ)を行う。そして、サブブロックの初期ベクトル付近のベクトル候補のマッチングコストを導出し、最小となるベクトルをサブブロックの動きベクトルspMvL0として導出する。
 また、テンプレートマッチングでも、2枚の参照ピクチャRef0、Ref1に対して処理してもよい。この場合、上記に説明した参照ピクチャRef0のマッチングと参照ピクチャRef1のマッチングを順に行う。参照ピクチャインデックスrefIdxL1によって指定される参照ピクチャRef1(参照ピクチャBと呼ぶ)内の領域であって、
  (xPos1,yPos1)=(xCur+mv1[0], yCur+mv1[1]) (式FRUC-6)
によって特定される左上座標(xPos1, yPos1)を有する参照ブロックBlock_Bと、参照ピクチャBにおいてBlock_Bに隣接したテンプレート領域Temp_L1とが設定される。最終的にTemp_CurとTemp_L1とのマッチングコストが最小になる(mv1[0],mv1[1])が決定され、対象ブロックに付与される動きベクトルとなる。この対象ブロックに付与された動きベクトルをもとに、対象ブロックを分割したサブブロック毎に動きベクトルspMvL1を導出する。
  (メモリバンド制約)
 上記のように、マッチング予測部30373は対象ブロック、およびサブブロックにおいて各々初期ベクトルサーチとローカルサーチを実施する。サーチには参照ピクチャメモリ306からの参照ピクチャの読み出しが必要であり、読み出す参照ピクチャの領域が大きい場合、転送するデータ量、つまりメモリバンド幅も大きくなる。
 メモリバンド幅Pは、対象ブロックのサイズ(幅W、高さH)、補間画像生成に使用するフィルタのタップ数NTAP、メモリパターン(m、n)によって以下のようにモデル化できる。メモリパターンは一度にアクセス可能なメモリのサイズであり、m、nはメモリパターンの幅と高さである。
  P = (floor((m-1+W+NTAP-1)/m)*floor((n-1+H+NTAP-1)/n)*m*n)/(W*H) (式MBC-1)
 メモリパターンを用いない場合(m=n=1に相当)は、下記式のように簡略化できる。
  P = (W+NTAP-1)*(H+NTAP-1)/(W*H)         (式MBC-2)
 (ローカルサーチとサーチレンジ)
 マッチング予測部30373のローカルサーチ(ブロックレベルのローカルサーチ、サブブロックレベルのローカルサーチ)では、ある初期ベクトルを中心とする所定の範囲を探索する。より具体的には、ローカルサーチでは、上述のようにダイヤモンドサーチやクロスサーチなどのステップサーチを用いて、初期ベクトルの周囲の探索ベクトル候補のマッチングコストを導出する。コストを最小とする動きベクトルを次の初期ベクトルとして、さらに次のステップサーチを行う。
 図30の場合、ステップ数3のダイヤモンドサーチとステップ数1のクロスサーチによって、ローカルサーチの初期ベクトル(startMV)の示す位置と、3ステップ目のダイヤモンドサーチの最適ベクトル(bestMV)が示す位置との変位の差が最終的な探索範囲(サーチレンジ)に相当する。上記、探索範囲は、探索ステップ数と各ステップでの探索幅から計算できる。例えば、図30の場合、位置の変位が水平方向3、垂直方向1、各ステップで必要な探索範囲が水平および垂直方向±2であるので、最終的に探索する範囲は水平方向7、垂直方向5である。
 上下左右サーチレンジSR内の動きベクトルを候補として探索する場合、探索候補全ての補間画像生成に必要とする画像のサイズは、対象ブロックのサイズをサーチレンジだけ拡大したサイズ、すなわち、W+2*SR、H+2*SRとなる。
 したがって、ローカルサーチに必要なメモリバンド幅MBPは、対象ブロックのサイズ(幅W、高さH)、サーチレンジSR、補間画像生成に使用するフィルタのタップ数NTAP、メモリパターン(m*n)によってモデル化できる。
 逆に、所定のメモリバンド幅MBP_TARGETの範囲内で、対象ブロックのサイズ、サーチレンジ、フィルタのタップ数を適応的に設定して、サーチを実施することができる。
 (m,n)=(1,1)の場合を考える。図16(a-2)のように、所定のブロックサイズ(幅WC、高さHC)、所定のフィルタタップ数NTAPCの動き補償フィルタを用いて、所定のサーチレンジSRC内のサーチをする場合のメモリバンド幅を所定のメモリバンド幅MBP_TARGETに設定する。
  MBP_TARGET = (WC+2*SRC+NTAPC-1)*(HC+2*SRC+NTAPC-1)/(WC*HC) (式MBC-3)
 図16(a-1)のような、対象ブロックのサーチにおけるブロックサイズ(幅WV、高さHV)、サーチレンジSRV、タップ数NTAPVの場合のメモリバンド幅MBP_TESTは以下の式となる。
  MBP_TEST = (WV+2*SRV+NTAPC-1)*(HV+2*SRV+NTAPV-1)/(WV*HV) (式MBC-4)
  対象ブロックメモリバンド幅MBP_TESTがターゲットメモリバンド幅MBP_TARGET以下(MBP_TEST<= MBP_TARGET)を満たすには、以下の式が成り立つ必要がある。
   (WV+2*SRV+NTAPC-1)*(HV+2*SRV+NTAPC-1)/(WV*HV) <= (WC+2*SRC+NTAPV-1)*(HC+2*SRC+NTAPV-1)/(WC*HC) (式MBC-5)
 以下、対象ブロックのサイズ、サーチレンジ、フィルタのタップ数の適応的な設定方法を説明する。以下の方法では、マッチング予測部30373は、対象ブロックサイズに応じて、ブロックレベルのサーチレンジ、及び、サブブロック分割後のサブブロックレベルのサーチレンジの各々を設定してもよい。
 (ターゲットメモリバンド)
 映像符号化標準HEVCの動き補償フィルタのタップ数は8、最小ブロックサイズは4×4であるから、NTAPC=4、WC=HC=4、サーチレンジSRC=0の場合のメモリバンド幅がMBP_TARGET_HEVCが上限とするメモリバンド幅の基本となる。
  MBP_TARGET_HEVC = (4+7)*(4+7)/16 = 7.6 (式MBC-6)
 (適応的設定方法1)ブロックサイズに応じたサーチレンジ設定
 図16(a-1)のように、固定タップ数NTAP=2、ブロックサイズ(幅WV、高さHV)の場合、メモリバンド幅MBP_TESTは以下となる。
  MBP_TEST = (WV+2*SRV+1)*(HV+2*SRV+1)/(WV*HV)  (式MBC-7)
 上記マッチングに必要なメモリバンド幅MBP_TESTが所定のメモリバンド幅(ここではMBP_TARGET_HEVC)を超えないとの条件は以下の式になる。
  (2*SRV+WV+1)*(2*SRV+HV+1)/(WV*HV) <= MBP_TARGET_HEVC (式MBC-8)
 (式MBC-8)を使って、水平・垂直方向を独立に計算した場合のブロックの幅WVとサーチレンジSRVの関係を、図31(a)に示す。
 (式MBC-7)で導出したメモリバンド幅MBP_TESTは、図31(b)に示すようにMBP_TARGET_HEVCを超えない。
 具体的には、マッチング予測部30373は、対象ブロックサイズSに応じて、テーブルルックアップによって、サーチレンジSRVもしくは最大ステップ数を設定してもよい。
  SRV = search_table[log2[S]-2]
ここで、search_table = [3, 6, 13, 27]である。
 また、マッチング予測部30373は、対象ブロックサイズSと四則演算とシフト演算によってサーチレンジSRVもしくは最大ステップ数を設定してもよい。
  SRV = (7*S-4)>>3                     (式MBC-9)
 なお、さらにサーチレンジを所定の範囲にクリップしても良い。
  SRV = Clip3(0, SRMAX, (7*S-4)>>3)            (式MBC-10)
 例えばSRMAX = 16としてもよい。
また、四則演算の定数は上記によらず、マッチング予測部30373は、所定のa, b、cを用いて、下記式を用いてサーチレンジSRVもしくは最大ステップ数を設定してもよい。ブロックのサイズと第1の定数(a)との積に第2の定数(b)を加算、減算した結果を、第3の定数(c)でのシフトする演算を含む処理により、サーチレンジを導出してもよい。
  SRV = (a*S-b)>>c                     (式MBC-11)
 なお、サーチレンジSRV導出に用いる上記対象ブロックサイズSとして幅WVを用いても良い。
 また、上記対象ブロックサイズSとして幅WVと高さHVの最小値min(WV, HV)を用いても良い。
 また、上記対象ブロックサイズSとして幅WVと高さHVの最小値minS=min(WV, HV)と最大値maxS=max(WV, HV)の重み付平均を用いても良い。例えば、S=(3*minS+maxS)>>2である。他に、S=(7*minS+maxS)>>3などでもよい。
 なお、対象ブロックサイズとして幅WVと高さHVの両方を用いても良い。この場合、(式MBC-8)の2次方程式を解くことでサーチレンジSRVは下式で導出できる。マッチング予測部30373は、下記式を用いてサーチレンジSRVもしくは最大ステップ数を設定してもよい。
 SRV = {-b+SQRT(b*b-a*c)}/a              (式MBC-12)
ここで、a=4、b=WV+HV+2、c=(WV+1)*(HV+1)-MBP_TARGET_HEVC*WV*HVである。対象ブロックの幅WV、高さHVに設定した場合の(式MBC-12)で算出したサーチレンジSRVを図31(c)に示す。
 より具体的には、小数点数などの複雑な計算を避けるため、マッチング予測部30373は、対象ブロックサイズに応じて、テーブル参照によって、サーチレンジSRVもしくは最大ステップ数を設定してもよい。
  SRV = search_table[log2(W)-2][log2(H)-2]
ここで、
  search_table[][] = [ [3, 4, 5, 7], [4, 6, 9, 12], [5, 9, 13, 18], [7, 12, 18, 27]
 なお、後述のように、マッチング予測部30373は、対象ブロックサイズに応じて、ステップサーチにおける探索ステップ数の制限(最大ステップ数の設定)を行っても良い。最大ステップサイズの設定は、上述のSRVの導出方法によってstepIterPUを導出してもよい。
 例えば、最大ステップ数stepIterPU(stepIterSubPU)を以下のように設定しても良い。
  stepIterPU = (a*S-b)>>c
 例えば、最大ステップ数stepIterPU(stepIterSubPU)を以下のように設定しても良い。
  stepIterPU = {-b+SQRT(b*b-a*c)}/a
ここで、a=4、b=WV+HV+2、c=(WV+1)*(HV+1)-MBP_TARGET_HEVC*WV*HVである。
 例えば、最大ステップ数stepIterPU(stepIterSubPU)を以下のように設定しても良い。
  stepIterPU = stepIter_table[log2(W)-2][log2(H)-2]
ここで、
 stepIter_table [][] = [ [3, 4, 5, 7], [4, 6, 9, 12], [5, 9, 13, 18], [7, 12, 18, 27]
 このとき、SRVとstepIterPUの関係式に応じて定数倍やシフトなどの補正があってもよい。
 以下、ブロックサイズに応じたサーチレンジ設定の別の例を説明する。
 (式MBC-5)を水平成分と垂直成分の2つの式に分離すると、以下の式が得られる。
   (WV+2*SRV+NTAPV-1)/WV <= (WC+2*SRC+NTAPC-1)/WC (式MBC-13)
   (HV+2*SRV+NTAPV-1)/HV <= (HC+2*SRC+NTAPC-1)/HC
 さらに、変形すると
   (WV+2*SRV+NTAPV-1)*WC <= (WC+2*SRC+NTAPC-1)*WV (式MBC-14)
   (HV+2*SRV+NTAPV-1)*HC <= (HC+2*SRC+NTAPC-1)*HV
 以下、対象ブロックのサイズ、サーチレンジ、フィルタのタップ数の適応的な設定方法を説明する。
 図16(c-1)は、図16(a-2)からタップ数を変更せず(NTAPV=NTAPC)、ブロックサイズを(幅WV、高さHV)に設定した例であるが、(式MVC-14)のサーチレンジSRVは下式で表すことができる。
  WV*(2*SRC+NTAPC-1) >= WC(2*SRV+NTAPC-1) (式MB-1)
  HV*(2*SRC+NTAPC-1) >= HC(2*SRV+NTAPC-1)
例えばWC=HC=4、NTAPC=3の場合、下式が成立する。
  SRV <= WV*(SRC+1)/4-1          (式MB-2)
  SRV <= HV*(SRC+1)/4-1
 図17(a)に、ブロックサイズ(WV、HV)が8x8、16x16、32x32の場合にSRVの取りうる値を示す。図17(a)からブロックサイズが8x8、16x16、32x32に取りうるサーチレンジSRVはブロックサイズが4x4の場合のサーチレンジSRCの約2倍、4倍、8倍である。つまり、マッチング予測部30373は、4x4に対するブロックサイズ(WV,HV)の比と4x4の場合のサーチレンジSRCの積以下に、ブロックサイズ(WV,HV)のサーチレンジを設定してもよい。この場合、所定のメモリバンド幅以内でデータを転送することができる。
 また、本発明は4分木(QT)、2分木(BT)等の符号化ツリー構造を用いて、ピクチャを再帰的に分割している。従って、ブロックサイズは符号化ツリーユニットCTUをルートとするデプス(分割階層)で表現することもできる。ルートのデプスは0である。例えば、符号化ツリーユニットの水平および垂直方向のサイズをCTUSize、QT分割のデプスをQTDepth、BT分割のデプスをBTDepthと表現すると、QT分割の場合のブロックサイズは
  W = H = CTUSize >> QTDepth
である。これをさらにBT分割した場合、水平方向のBT分割では  H = H >> BTDepth
垂直方向のBT分割では
  W = W >> BTDepth
である。従って、マッチング予測部30373は、対象ブロックサイズに応じてサーチレンジを設定するのと同様の方法で、分割階層(デプス)に応じてサーチレンジを設定してもよい。例えば、マッチング予測部30373は、サーチレンジを以下の式で導出してもよい。
  SRV <= (CTUSize >> (QTDepth+BTDepth/2)) * (SRC+1)/4 -1
 (適応的設定方法2)ブロックサイズに応じたフィルタのタップ数設定
 図16(b-1)は、図16(a-2)からサーチレンジを変更せず(SRV=SRC)、ブロックサイズを(幅WV、高さHV)に設定した例であるが、マッチング予測部30373は、(式MBC-14)のフィルタタップ数NTAPVは下式で導出する。
  WV*(2*SRC+NTAPC-1) >= WC(2*SRC+NTAPV-1) (式MB-3)
  HV*(2*SRC+NTAPC-1) >= HC(2*SRC+NTAPV-1)
例えばWC=HC=4、SRC=1の場合、下式で導出する。
  NTAPV <= WV*(NTAPC+1)/4-1       (式MB-4)
  NTAPV <= HV*(NTAPC+1)/4-1
 図17(b)に、ブロックサイズ(WV、HV)が8x8、16x16、32x32の場合にNTAPVの取りうる値を示す。図17(b)からブロックサイズが8x8、16x16、32x32に取りうるフィルタタップ数NTAPVはブロックサイズが4x4の場合のフィルタタップ数NTAPCの約2倍、4倍、8倍である。つまり4x4に対するブロックサイズ(WV,HV)の比以下にフィルタタップ数を設定することにより、所定のメモリバンド幅以内でデータを転送することができる。
 つまり、マッチング予測部30373は、所定のメモリバンド幅を満たす所定のブロックサイズとフィルタタップ数をもとに、ブロックサイズを変更した場合のフィルタタップ数を算出する場合、所定のブロックサイズと変更したブロックサイズとの比と所定のフィルタタップ数の積以下にフィルタタップ数を設定してもよい。これにより、所定のメモリバンド幅以内でデータを転送することができる。
 なお、マッチング予測部30373は、ブロックサイズ応じたフィルタのタップ数の設定と同様に、分割階層(デプス)に応じたフィルタのタップ数の設定を行ってもよい。
 (適応的設定方法3)ブロックサイズに応じたサーチレンジとフィルタのタップ数設定
 図16(a-1)は、図16(a-2)からブロックサイズ(幅WV、高さHV)を変更した例であるが、マッチング予測部30373は、(式MBC-14)のサーチレンジSRVとフィルタタップ数NTAPVを下式で導出する。
  WV*(2*SRC+NTAPC-1) >= WC(2*SRV+NTAPV-1) (式MB-5)
  HV*(2*SRC+NTAPC-1) >= HC(2*SRV+NTAPV-1)
例えばWC=HC=4、NTAPC=3、SRC=1の場合、下式で導出する。
  2*SRV+NTAPV <= WV+1           (式MB-6)
  2*SRV+NTAPV <= HV+1
ブロックサイズを変更した場合、サーチレンジSRVとフィルタタップ数NTAPVの取りうる組み合わせは、(式MB-6)のように、サーチレンジとフィルタタップ数の線形演算で表現できる。そしてブロックサイズが大きくなるにつれて、サーチレンジとフィルタタップ数の取りうる値も、大きく設定することができる。
 つまり、マッチング予測部30373は、所定のメモリバンド幅を満たす所定のブロックサイズ、サーチレンジ、フィルタタップ数をもとに、ブロックサイズを変更した場合のサーチレンジとフィルタタップ数を算出する場合、サーチレンジとフィルタタップ数の線形演算の結果を、変更したブロックサイズ未満又は以下に設定してもよい。これにより、所定のメモリバンド幅以内でデータを転送することができる。
 なお、マッチング予測部30373は、ブロックサイズ応じたサーチレンジとフィルタのタップ数の設定と同様に、分割階層(デプス)に応じたサーチレンジとフィルタのタップ数を設定してもよい。
 (初期ベクトル制約)
 また、マッチング予測部30373は対象ブロック、およびサブブロックにおいて、初期ベクトルサーチを実施する時に、複数の隣接ブロックの動きベクトルを初期ベクトル候補として参照し、マッチングコストが最小となる初期ベクトル(動きベクトル)を導出する。そのため、各動きベクトル候補分シフトした領域の画素値を各参照ピクチャから転送する。これらの候補はマージ候補リストmergeCandList[]={L,A,AR,BL,AL,BR,結合マージ候補、ゼロマージ候補}に含まれている。なお、L,A,AR,BL,AL,BRは図7(b)、(c)の隣接ブロック(位置)を表すものとする。図18(a)は、初期ベクトル候補間の差分値が大きい、つまり大きさや方向がばらばらである例である。図18(c)は、初期ベクトル候補間の差分値が小さい、つまり大きさや方向がよく似ている例である。図18(b)と図18(d)の破線ブロックは、図18(a)と図18(c)の対象ブロックが各々動きベクトル分だけシフトしたブロック位置を表す。また、図18(b)と図18(d)の一点破線で囲んだ領域は、図18(a)と図18(c)のマッチングコスト算出時に、参照ピクチャメモリ306から転送する範囲である。図18(b)は図18(d)に比べ転送範囲が広く、数倍のデータ量を転送することが分かる。
 従って、画像データの転送量を所定のメモリバンド幅以下に抑えるために、初期ベクトルサーチに使用する候補数を制限してもよい。例えば、マッチング予測部30373は、初期ベクトルサーチに使用する動きベクトルを、マージ候補リストあるいは予測ベクトル候補リストリストmvpListLX[]の先頭からCandN個の動きベクトルに限定してもよい。図19(b)は、CandN=3の場合のサーチレンジを示す図である。3個の破線ブロックは、対象ブロックが各々動きベクトル分だけシフトしたブロック位置を示す。一点破線で囲んだ領域は参照ピクチャメモリ306からの転送範囲を示す。参照ピクチャが同じで、動きベクトルの差分が小さい(例えば動きベクトルの差分値が1画素未満)動きベクトルが複数ある場合には、1個としてカウントしてもよい。初期ベクトル候補の個数を削減することで、転送範囲を限定し、メモリバンド幅を削減することができる。
 あるいは、候補リストの動きベクトルの代表ベクトルrepMV(平均値)を算出し、図19(a)に示すように、転送範囲を、代表ベクトルrepMV(平均値MVavg)を中心に水平、垂直方向±Trans画素の範囲に限定してもよい。ここで、代表ベクトルは候補リストの動きベクトルの平均ベクトルであってもよい。候補リストがマージ候補リストの場合、代表ベクトルは下式で表される。
  repMV[0] = avg(mergeCandList[i][0]) i=0..Nmerge-1       (式MB-7)
  repMV[1] = avg(mergeCandList[i][1])
ここで、Nmergeはマージ候補リスト内の動きベクトルの個数である。
候補リストが予測ベクトル候補リストの場合、代表ベクトルは下式で表される。
  repMV[0] = avg(mvpListLX[i][0]) i=0..Npred-1         (式MB-8)
  repMV[1] = avg(mvpListLX[i][1])
ここで、Npredは予測ベクトル候補リスト内の動きベクトルの個数である。
 あるいは、代表ベクトルは候補リストの先頭の動きベクトルであってもよい。候補リストがマージ候補リストの場合、代表ベクトルは下式で表される。
  repMV[0] = mergeCandList[0][0]                 (式MB-9)
  repMV[1] = mergeCandList[0][1]
候補リストが予測ベクトル候補リストの場合、代表ベクトルは下式で表される。
  repMV[0] = mvpListLX[0][0]                 (式MB-10)
  repMV[1] = mvpListLX[0][1]
 あるいは、候補リストの動きベクトルが参照する参照ピクチャをカウントし、最も使用頻度の高い参照ピクチャを参照する動きベクトルのみを初期ベクトルサーチに使用してもよい。つまり、参照ピクチャリストRefPicListX[]のCandP番目のピクチャRefPicListX[CandP]が最も参照されるピクチャである場合、参照ピクチャがRefPicListX[CandP]である動きベクトルのみを初期ベクトルサーチの対象としてもよい。
 あるいはCandP=0とし、参照ピクチャリストRefPicListX[]の0番目のピクチャRefPicListX[0]を使用する、動きベクトルのみを初期ベクトルサーチの対象としてもよい。
 以上のように、マッチング予測部30373は、初期ベクトルを決定するために利用する隣接ブロックの動きベクトルを限定することにより、所定のメモリバンド幅以内でサーチに必要なデータを転送することができる。
 なお、マッチング予測部30373は、サブブロックの初期ベクトルサーチにおいて、ブロックの初期ベクトルサーチに用いたサーチレンジ外の参照を禁止することで、参照ピクチャメモリ306からの画像データの転送をブロックレベルのサーチ時の1回の転送に削減することができる。例えば、動きベクトルをクリッピングすることで、サーチレンジ外の参照を禁止することができる。
 (ブロックレベルの動きベクトルの大きさに応じたサブブロックのサーチレンジあるいはタップ数の制約)
 また、サブブロックのローカルサーチにおいては、ブロックレベルで導出した動きベクトルの大きさに応じて、サーチレンジとフィルタのタップ数を設定してもよい。ブロックレベルの動きベクトルが所定の閾値THMVより大きい時はサーチレンジを大きく、ブロックレベルの動きベクトルが所定の閾値THMV以下の時はサーチレンジを小さく設定する。あるいは、ブロックレベルの動きベクトルが所定の閾値THMVより大きい時はフィルタのタップ数を短く、ブロックレベルの動きベクトルが所定の閾値THMV以下の時はフィルタのタップ数を長く設定する。あるいは、図19(c)に示すように、ブロックレベルの動きベクトルが所定の閾値THMVより大きい時はサーチレンジSRを大きく、フィルタのタップ数NTAPを短く設定してもよい。あるいは、図19(d)に示すように、ブロックレベルの動きベクトルが所定の閾値THMV以下の時はサーチレンジSRを小さく、フィルタのタップ数NTAPを長く設定してもよい。
 あるいはブロックレベルの動きベクトルが所定の閾値THMVより大きい時はフィルタのタップ数を0に設定し、動きベクトルの探索を整数精度に限定してもよい。そして、ブロックレベルの動きベクトルが所定の閾値THMV以下の時はフィルタのタップ数をNTAP(NTAP≠0)に設定し、小数精度の動きベクトルの探索を実施してもよい。
 以上のように、マッチング予測部30373は、ブロックレベルで導出した動きベクトルの大きさに応じて、サーチレンジとフィルタのタップ数を設定することで、データ転送量を適切に制御することができる。
 なお、ブロックレベルの動きベクトルが大きい時、
  (ステップサーチにおける探索ステップ数の制限)
 ステップサーチでは、ブロックレベルの探索ステップの最大値stepIterPUから最大のサーチレンジが定まる。サブレベルの探索を行う場合には、さらに、サブブロックレベルの探索ステップの最大値stepIterSubPUから最大のサーチレンジが定まる。図32はサーチレンジと探索ステップ数の関係を示す図である。第1の動きベクトル探索部303731は、1探索ステップ毎に水平方向に最大でrW、垂直方向に最大でrH、進む。図32の一マスは1/16*1/16画素を表し、動きベクトルを1/4精度で探索する場合を説明する。前述のoffsetCand[8]を用いるダイヤモンドサーチの場合、
  rW = offsetCandD[2][0] = 2
  rH = offsetCandD[0][1] = 2
である。また、前述のオフセット候補offsetCandC[4]を用いるクロスサーチの場合、
  rW = offsetCandC[1][0] = 1
  rH = offsetCandC[0][1] = 1
である。従って、第1の動きベクトル探索部303731は、ブロックレベルの探索ステップの最大値stepIterPUから、サーチレンジSRb(SRWb,SRHb)を次式で設定してもよい。
  SRWb = rW * stepIterPU
  SRHb = rH * stepIterPU
サブブロックレベルの探索ステップの最大値をstepIterSubPUとすると、サーチレンジSRs(SRWs,SRHs)を次式で設定してもよい。
  SRWs = rW * stepIterSubPU
  SRHs = rH * stepIterSubPU
 あるいは、第1の動きベクトル探索部303731は、サーチレンジSR(SRW,SRH)から次式を満たすように探索ステップ数の最大値を設定してもよい。
  SRW = SRWb + SRWs
  SRH = SRHb + SRHs
  stepIterPU = min(SRWb / rW,SRHb / rH)
  stepIterSubPU = min(SRWs / rW,SRHs / rH)
あるいは、まずブロックレベルの探索ステップの最大値stepIterPUを次式で導出してもよい。
  stepIterPU = min(SRWb/rW,SRHb/rH)
その後、サブブロックレベルの探索ステップの最大値stepIterSubPUを次式で導出してもよい。
  SRWs = SRW - abs(bestMVb[0])
  SRHs = SRH - abs(bestMVb[1])
  stepIterSubPU <= min(SRWs / rW,SRHs / rH)
ここで、bestMVbはブロックレベルの探索が終了した時の最適ベクトルである。
 なお、第2の動きベクトル探索部303732も、第1の動きベクトル探索部303731と同様の手順で、サブブロックレベルの探索ステップ数の最大値を決定する。
 以上で説明したように、ステップサーチでは、探索ステップ数を制限することで、あらかじめ定められたサーチレンジ内で動きベクトルを探索することができる。従って、参照ピクチャメモリから追加の画像データを転送する必要が無く、転送に必要なメモリバンド幅を削減することができる。
  (マッチング処理による動きベクトル導出処理)
 マッチングモードにおける動きベクトル導出(パターンマッチベクトル導出)処理の流れについて図20のフローチャートを参照して説明する。
 図20に示す処理は、マッチング予測部30373により実行される。図20(a)はバイラテラルマッチング処理のフローチャートであり、図20(b)はテンプレートマッチング処理のフローチャートである。
 なお、図20(a)に示す各ステップのうち、S3201~S3204は、ブロックレベルで実行されるブロックサーチである。すなわち、パターンマッチを用いて、ブロック(CUまたはPU)全体で動きベクトルを導出する。
 また、S3205~S3208は、サブブロックレベルで実行されるサブブロックサーチである。すなわち、パターンマッチを用いて、ブロックを構成するサブブロック単位で動きベクトルを導出する。
 S3201において、マッチング予測部30373(第1の動きベクトル探索部303731)は、対象ブロックにおけるブロックレベルの初期ベクトル候補を設定する。
 S3202において、マッチング予測部30373(第1の動きベクトル探索部303731)は、初期ベクトル制約を実施しブロックレベルのサーチレンジを制限する。また、上述の適応的設定方法1~3のいずれかの方法で、ブロックレベルのサーチで用いるサーチレンジあるいは動き補償フィルタのタップ数を決定する。
 次に、S3203では、マッチング予測部30373(第1の動きベクトル探索部303731)は、S3202で制約した初期ベクトル候補の中から、マッチングコストが最小となるベクトルをサーチし、初期ベクトルを導出する。
 S3204では、マッチング予測部30373(第1の動きベクトル探索部303731)は、対象ブロックにおけるブロックレベルのローカルサーチを行い、最終的な対象ブロックの動きベクトルを導出する。
 続いて、対象ブロックに含まれる各サブブロックについて、以下の処理を行う(S3205~S3208)。
 S3205では、マッチング予測部30373(第2の動きベクトル探索部303732)は、対象ブロックにおける各サブブロックの初期ベクトル候補を設定する。
 S3206では、マッチング予測部30373(第2の動きベクトル探索部303732)は、サブブロックの初期ベクトルサーチがブロックレベルのサーチレンジを超えないように初期ベクトル候補をクリッピングする。また、各サブブロックのサーチがブロックレベルで用いたサーチレンジ外の画像データを使用しないように、サブブロックレベルのサーチレンジを制限する。
 S3207では、マッチング予測部30373(第2の動きベクトル探索部303732)は、S3206で制約した初期ベクトル候補の中から、マッチングコストが最小となるベクトルをサーチし、サブブロックレベルの初期ベクトルとして設定する。
 次に、S3208では、マッチング予測部30373(第2の動きベクトル探索部303732)は、S3207で選択されたサブブロックの初期ベクトルを中心とするローカルサーチを行い、マッチングコストが最小となるベクトルをサブブロックの動きベクトルとして導出する。
 そして、対象ブロックに含まれる全てのサブブロックについて処理が完了すると、バイラテラルマッチングのパターンマッチベクトル導出処理が終了する。
 次にテンプレートマッチングのパターンマッチベクトル導出処理を、図20(b)を用いて説明する。図20(b)に示す各ステップのうち、S3211~S3204は、ブロックレベルで実行されるブロックサーチである。また、S3205~S3208は、サブブロックレベルで実行されるサブブロックサーチである。なお、図20(a)と同じ処理には同じ番号を付している。
 まず、マッチング予測部30373(第1の動きベクトル探索部303731)は対象ブロックのテンプレートを取得する(S3211)。
 次に、S3201では、マッチング予測部30373(第1の動きベクトル探索部303731)は、対象ブロックにおけるブロックレベルの初期ベクトル候補を設定する。
 S3202において、マッチング予測部30373(第1の動きベクトル探索部303731)は、初期ベクトル制約を実施し、ブロックレベルのサーチレンジを制限する。また、上述の適応的設定方法1~3のいずれかを実施し、ブロックレベルのサーチレンジで用いるサーチレンジ、あるいは、動き補償フィルタのタップ数を決定する。
 次に、S3203では、マッチング予測部30373(第1の動きベクトル探索部303731)は、上記で設定した初期ベクトル候補の中から、マッチングコストが最小となるベクトルをブロックレベルの初期ベクトルとして設定する。
 S3204では、マッチング予測部30373(第1の動きベクトル探索部303731)は、S3203で導出された初期ベクトルを中心とする局所領域をサーチし、マッチングコストが最小となるベクトルを最終的な対象ブロックの動きベクトルとして設定する。
 続いて、対象ブロックに含まれる各サブブロックについて、以下の処理を行う(S3205~S3208)。
 S3205では、マッチング予測部30373(第2の動きベクトル探索部303732)は、対象ブロックにおける各サブブロックの初期ベクトル候補を設定する。
 S3206では、マッチング予測部30373(第2の動きベクトル探索部303732)は、サブブロックの初期ベクトルサーチがブロックレベルのサーチレンジを超えないように初期ベクトル候補をクリッピングする。また、各サブブロックのサーチがブロックレベルで用いたサーチレンジ外の画像データを使用しないように、サブブロックレベルのサーチレンジを制限する。
 S3212では、マッチング予測部30373(第2の動きベクトル探索部303732)は、対象ブロックにおけるサブブロックのテンプレートを取得する。
 S3207では、マッチング予測部30373(第2の動きベクトル探索部303732)は、S3206で制約した初期ベクトルの中から、マッチングコストが最小となるベクトルをサブブロックレベルの初期ベクトルとして設定する。
 次に、S3208では、マッチング予測部30373(第2の動きベクトル探索部303732)は、S3207で設定されたサブブロックの初期ベクトルを中心としたローカルサーチを行い、マッチングコストが最小となるベクトルをサブブロックの動きベクトルとして導出する。
 そして、対象ブロックに含まれる全てのサブブロックについて処理が完了すると、テンプレートマッチングのパターンマッチベクトル導出処理が終了する。
 以上は参照ピクチャがRef0の場合であったが、参照ピクチャをRef1とした場合も、上記と同じ処理でテンプレートマッチングを実施することができる。さらに、参照ピクチャが2枚の場合、導出した2つの動きベクトルを用いて、動き補償部3091では双予測処理を行う。
 動き補償部3091に出力するfruc_merge_idxは下式で導出する。
  fruc_merge_idx = BM_flag + (TM_flag<<1) (式FRUC-7)
 なお、動画像復号装置31でfruc_merge_idxが通知される場合は、パターンマッチベクトル導出処理の前にBM_flagとTM_flagを導出し、フラグの値が真のマッチング処理のみ実施してもよい。
  BM_flag = fruc_merge_idx & 1               (式FRUC-8)
  TM_flag = (fruc_merge_idx & 2)>>1
  (OBMC処理)
 本実施形態に係る動き補償部3091はOBMC処理を用いて予測画像を生成してもよい。ここで、OBMC(Overlapped block motion compensation)処理について説明する。OBMC処理とは、対象ブロックを構成するサブブロックに対して、サブブロック毎に、対象ブロック(対象サブブロック)のインター予測パラメータ(以下、動きパラメータ)を用いて生成される補間画像PredCと、対象サブブロックの隣接ブロック(隣接点)の動きパラメータを用いて生成される第2の補間画像(対象ブロックの補間画像)PredRNを用いて補間画像(対象ブロックの補間画像、動き補償画像)を生成する処理である。より具体的には、ブロック境界との距離が近い対象ブロック内の画素(境界周辺画素)において、対象ブロックの補間画像PredCを隣接ブロックの動きパラメータに基づく補間画像PredRNを用いて補正する処理(補間画像補正)が行われる。当該処理は、サブブロック単位で行われてもよい。
 図22は、本実施形態に係る隣接ブロックの動きパラメータを利用して予測画像を生成する領域の一例を示す図である。図22(a)に示すように、ブロック境界から所定の距離内にある斜線のサブブロックの画素がOBMC処理の適用対象となる。ただし、対象ブロックの右端あるいは下端境界に接する場合にはOBMC処理の適用対象外である。すなわち、対象ブロックを構成するサブブロックの内、サブブロックの右側が対象ブロック外、あるいは、サブブロックの下側が対象ブロック外となる場合には、適用対象外となる。サブブロック予測を行う場合には、対象ブロック内のサブブロックの動きパラメータは互いに異なることがあるため、図22(b)に示すように、サブブロックの上下左右とのサブブロック境界がOBMC処理の適用対象となる。
 なお、対象ブロックと隣接ブロックのサイズによらず、統一した処理とするため、OBMC処理はブロックを分割したサブブロック単位(OBMCブロック単位)で実施する。サブブロックのサイズは4x4、8x8などの値をとしてもよい。
 OBMCでは、対象ブロックのインター予測パラメータに基づいて導出される対象サブブロックの補間画像(第1のOBMC補間画像)、および、隣接ブロックのインター予測パラメータに基づいて導出される補間画像(第2のOBMC補間画像)という、2種類の補間画像を生成し、これらの重み付加算処理により最終的に予測に用いる補間画像を生成する。
 そのため、「OBMC処理を適用する(OBMCオン)」と判定されたブロックあるいはサブブロックでは、対象ブロック(対象サブブロック)の上側及び下側の境界(水平境界)において、境界から垂直方向にNumOBMC個の画素値に対し、2種類の動きベクトルを用いて2種類の補間画像を生成する。続いて、対象ブロック(対象サブブロック)の左側及び右側の境界(垂直境界)において、境界から水平方向にNumOBMC個の画素値に対し、2種類の動きベクトルを用いて2つの補間画像を生成する。
  (OBMC処理の流れ)
 図23は、本実施形態に係るOBMC予測部30374が実施するパラメータ導出処理を示すフローチャートである。
 OBMC予測部30374は、対象サブブロックに対し、上側、左側、下側、右側の各方向に隣接する隣接ブロック(参照ブロック)の有無および利用可能性を判定する。図23では、上、左、下、右の各方向に対し全てのサブブロックのOBMC処理(補間画像補正)を実施したのち、次の方向の処理に移行する方法をとっているが、あるサブブロックに対し全ての方向のOBMC処理(補間画像補正)を実施した後、次のサブブロックの処理に移行する方法をとることもできる。図23において、対象サブブロックに対する隣接ブロックの方向は、i=1(up)は上側、i=2(left)は左側、i=3(bottom)は下側、i=4(right)は右側とする。
 まず、OBMC予測部30374は、OBMC処理の必要性と隣接ブロックの有無をチェックする(S3401)。予測単位がブロック単位で、対象サブブロックがiの示す方向のブロック境界に接していない場合、あるいは、サブブロックがブロックの右あるいは下境界に接する場合は、OBMC処理(補間画像補正)に必要な隣接ブロックがないので(S3401でN)、S3404に進み、フラグobmc_flag[i]を0にする。そうでなければ(予測単位がブロック単位で対象サブブロックがブロック境界に接する場合、あるいは、処理単位がサブブロックの場合)、OBMC処理に必要な隣接ブロックがあるので(S3401でY)、S3402に進む。
 例えば図22(a)のサブブロックSCU1[3][0]は左側、下側、右側はブロック境界に接しないので、obmc_flag[2(left)]=0、obmc_flag[3(bottom)]=0、obmc_flag[4(right)]=0である。また、サブブロックSCU1[0][2]は上側、下側、右側がブロック境界に接しないので、obmc_flag[1(up)]=0、obmc_flag[3(bottom)]=0、obmc_flag[4]=0である。サブブロックSCU2[5][3]の下側はブロックの下境界に接し、上側、左側、右側はブロック境界に接しないので、obmc_flag[1(up)]=0、obmc_flag[2(left)]=0、obmc_flag[3(bottom)]=0、obmc_flag[4(right)]=0である。白色のサブブロックはブロック境界に全く接しないか、下側または右側ブロック境界にのみ接するサブブロックであるので、obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)]=obmc_flag[4]=0である。
 次にOBMC予測部30374は、隣接ブロックの利用可能性として、iで示す方向の隣接ブロックがイントラ予測ブロックであるかをチェックする(S3402)。隣接ブロックがイントラ予測ブロックの場合(S3402でY)、S3404に進み、対応する方向iのobmc_flag[i]を0にセットする。そうでなければ(隣接ブロックがインター予測ブロックの場合)(S3402でN)、S3403に進む。
 例えば、図21(c)及び図22(c)の場合、対象ブロックCU4の対象サブブロックSCU4[3][0]に対し、上側の隣接ブロックはイントラ予測であるので、対象サブブロックSCU4[3][0]のobmc_flag[1(up)]は0にセットする。
 次にOBMC予測部30374は、隣接ブロックの利用可能性として、iが示す方向の隣接ブロックと対象サブブロックの動きパラメータが等しいどうかをチェックする(S3403)。動きパラメータが等しい場合(S3403でY)、S3404に進み、obmc_flag[i]=0にセットする。そうでなければ(動きパラメータが異なる場合)(S3403でN)、S3405に進む。
 サブブロックとその隣接ブロックの動きパラメータが等しいか否かは下式で判定する。
  ((mvLX[0]!=mvLXRN[0]) || (mvLX[1]!=mvLXRN[1]) || (refIdxLX!=refIdxLXRN))? (式OBMC-1)
ここで、対象サブブロックの動きベクトル(mvLX[0],mvLX[1])、参照ピクチャインデックスrefIdxLX、iが示す方向の隣接ブロックの動きベクトル(mvLXRN[0],mvLXRN[1])、参照ピクチャインデックスrefIdxLXRNである。
 例えば、図21(c)及び図22(c)において、対象サブブロックSCU4[0][0]の動きベクトル(mvLX[0],mvLX[1])、参照ピクチャインデックスrefIdxLX、左側隣接ブロックの動きベクトル(mvLXR2[0],mvLXR2[1])、参照ピクチャインデックスrefIdxLXR2とすると、動きベクトルと参照ピクチャインデックスが同じ場合、例えば、((mvLX[0]==mvLXR2[0]) && (mvLX[1]==mvLXR2[1]) && (refIdxLX==refIdxLXR2))が真である場合は、対象サブブロックSCU4[0][0]はobmc_flag[2]=0である。
 なお、上式では動きベクトルと参照ピクチャインデックスを使用したが、下式のように動きベクトルとPOCを用いて判定してもよい。
  ((mvLX[0]!=mvLXRN[0]) || (mvLX[1]!=mvLXRN[1]) || (refPOC!=refPOCRN))?   (式OBMC-2)
ここでrefPOCは対象サブブロックのPOCであり、refPOCRNは隣接ブロックのPOCである。
 OBMC予測部30374は、OBMCオフ条件を判定する(S3405)。OBMCオフ条件が成立する場合(S3405でY)、S3404に進み、obmc_flag[i]=0にセットする。そうでなければ(OBMCオフ条件が成立しない場合)(S3405でN)、S3406に進む。OBMCオフ条件は、下記で説明するOBMCオフ条件0~6、1'~5'のいずれかを使用する。
 OBMC予測部30374は、obmc_flag[i]=1にセットする(S3406)。
 次にOBMC予測部30374は、サブブロックの全ての方向(i=1~4)に対し、上記S3401~S3406の処理を実施した後、終了する。
 OBMC予測部30374は、上記で導出した予測パラメータ(obmc_flagと各サブブロックの隣接ブロックの動きパラメータ)をインター予測画像生成部309に出力し、インター予測画像生成部309はobmc_flagを参照してOBMC処理の要否を判定しながら、対象ブロックに対し、OBMC補間画像を生成する(詳細は(動き補償)で説明する)。
 なお、動画像復号装置31では、動画像符号化装置11から通知されたobmc_flagがあればobmc_flag[i]にセットし、obmc_flag[i]=1の場合にのみ、上記処理を実施してもよい。
 (OBMCメモリバンド低減1)
 OBMCでは、対象ブロックのインター予測パラメータに基づいて導出される対象サブブロックの補間画像(第1のOBMC補間画像)に加えて、隣接ブロックのインター予測パラメータに基づいて導出される補間画像(第2のOBMC補間画像)を生成する。従って、参照ピクチャメモリ306からの画像データの転送量、すなわちメモリバンド幅が増加する。このメモリバンド幅の増加を抑制するため、OBMCオンの判定条件に、転送量のオーバーヘッドが大きさを示す下記の条件のいずれかを追加してもよい。
 OBMCオフ条件0:小ブロックのOBMC禁止
 OBMC予測部30374は、ブロックの幅Wと高さHが所定値OBMC_Sより小さい場合、OBMC処理を禁止する。
  if (W<OBMC_S || H<OBMC_S) obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)]=obmc_flag[4(right)]=0   (式OBMC-3)
もしくは、以下の処理でもよい。
  if (W + H < OBMC_S) obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)] =obmc_flag[4(right)]=0
 上記OBMCオフ条件のいずれかを、OBMCオフの判定処理に追加することで、参照ピクチャメモリ306からの画像データの転送量が多い場合にOBMCをオフにすることができる。従ってメモリバンド幅の増加を抑制することができる。
 OBMCオフ条件1:小サブブロックのOBMC禁止
 OBMC予測部30374は、サブブロック単位の予測において、サブブロックが小サイズの場合(幅BW、あるいは高さBHが所定値OBMC_Sより小さい場合)は、当該サブブロックの特定の方向のOBMC処理を禁止する。
 例えば、OBMCのオンオフを示すフラグobmc_flag[i]を、対象サブブロックに対する隣接サブブロックの方向を、i=1は上側、i=2は左側、i=3は下側、i=4は右側であるとすると、以下の式で導出してもよい。
  if (BW<OBMC_S || BH<OBMC_S) obmc_flag[3(bottom)]=obmc_flag[4(right)]=0   (式OBMC-4)
 なお、小ブロックの条件は、サブブロックの幅BW、あるいは高さBHが所定値OBMC_Sより小さいに限定されず、サブブロックの幅BWと高さBHの和が所定値OBMC_Sより小さいを用いてもよい。
 なお、特定の方向のOBMC処理(例えば、当該サブブロックの左および上方向のOBMC処理)を禁止してもよい。
  if (BW + BH<OBMC_S) obmc_flag[1(up)]=obmc_flag[2(left)]=0
 なお、特定の方向のOBMC処理(例えば、当該サブブロックの右および下方向のOBMC処理)を禁止してもよい。
  if (BW + BH<OBMC_S) obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
 (OBMCのメモリバンド削減2)
 OBMCオフ条件2:隣接サブブロックと動きベクトルの差分が大きい場合、OBMC禁止
  diffMV = abs(mvLX[0]-mvLXRN[0])+abs(mvLX[1]-mvLXRN[1])    (式OBMC-5)
  if (diffMV>OBMC_MV)) obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
なお、特定の方向のOBMC処理(例えば、当該サブブロックの右および下方向のOBMC処理)を禁止してもよい。
  if (((diffMV>OBMC_MV)) obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
 (OBMCのメモリバンド削減1+2)
 OBMCオフ条件2:小サブブロック、かつ、隣接サブブロックと動きベクトルの差分が大きい場合、OBMC禁止
 OBMC予測部30374は、サブブロック単位の予測において、サブブロックのサイズが所定値OBMC_Sより小さい場合、かつ、対象サブブロックの動きベクトルmvLX[]と隣接サブブロックの動きベクトルmvLXRN[]の差が所定値OBMC_MVより大きい場合は、当該サブブロックのOBMC処理を禁止する。
  diffMV = abs(mvLX[0]-mvLXRN[0])+abs(mvLX[1]-mvLXRN[1])    (式OBMC-5)
  if ((BW<OBMC_S || BH<OBMC_S) && (diffMV>OBMC_MV)) obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
なお、特定の方向のOBMC処理(例えば、当該サブブロックの右および下方向のOBMC処理)を禁止してもよい。
  if ((BW<OBMC_S || BH<OBMC_S) && (diffMV>OBMC_MV)) obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
 (OBMCのメモリバンド削減3)
 OBMCオフ条件3:特定のツールとの組み合わせによるOBMC禁止
 対象ブロックがアフィン予測、あるいは、マッチング予測を実施している場合には、対象ブロックや対象サブブロックの動きベクトルは、隣接ブロックや隣接サブブロックの動きベクトルとよく似ており、動きベクトルの差分が小さい。従って、OBMC予測部30374はサブブロック単位の予測において、アフィン予測のオフを示すフラグaffine_flag=0の場合、かつ、マッチング予測のオフを示すフラグfruc_merge_idx=0の場合は、当該サブブロックのOBMC処理を禁止する。
  if (affine_flag=0 && fruc_merge_idx=0) obmc_flag[1(up)]=obmc_flag[2(left)]=obmc_flag[3(bottom)]=obmc_flag[4(right)]=0   (式OBMC-6)
なお、特定の方向のOBMC処理(例えば、当該サブブロックの右および下方向のOBMC処理)を禁止してもよい。
  if (affine_flag=0 && fruc_merge_idx=0) obmc_flag[3(bottom)]=obmc_flag[4(right)]=0
 (OBMCのメモリバンド削減4)
 OBMC処理においては、参照ピクチャメモリ306から補間画像PredRNの生成に必要な画像データを転送することがメモリバンド幅を増加させる原因である。左右にCTUを分割する垂直方向のCTU境界では、左側に位置する1つ前のCTUの処理に使用した画像データを一時的にキャッシュに格納し次のCTUのOBMC処理で使用することで、参照ピクチャメモリ306から転送する画像データを削減する。しかしながら、上下にCTUを分割する水平方向のCTU境界では、1CTUライン終了する間、1CTUライン上のCTUで使用した画像データを格納し続けることはできないため、上側に位置する1つ前のCTUの処理に使用した画像データを一時的にキャッシュに格納し次のCTUのOBMC処理で使用することが難しい。
 OBMCオフ条件4:CTUの上境界におけるOBMC禁止
 OBMC予測部30374は、サブブロックの上側がCTUの境界と重なる場合、上方向のOBMC処理を禁止する。
  if (サブブロックの上側境界がCTUの上側境界) obmc_flag[1(up)] =0    (式OBMC-7)
つまり、CTUの高さをCTUH、対象サブブロックのピクチャ内での位置を(xNb,yNb)とすると、以下の処理で実現してもよい。
  if (yNb%CTUH==0) obmc_flag[1(up)]=0
つまり、OBMC予測部30374は、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは等しい場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正する。CTUの高さをCTUH、対象サブブロックのピクチャ内での位置を(xNb,yNb)、参照ブロックのピクチャ内での位置を(xRefNb, yRefNb)とすると、以下の処理で実現してもよい。
  if (yNb%CTUH!=yRefNb%CTUH) obmc_flag[1(up)]=0
CTU境界の判定は、以下の分岐をおこなっても等価である。
  if ((yNb>>log2(CTUH))<<log2(CTUH)!= (yRefNb>>log2(CTUH))<<log2(CTUH)) obmc_flag[1(up)]=0
あるいは、CTU境界の判定は、以下の分岐をおこなっても等価である。
  if ((yNb < (yRefNb>>log2(CTUH))<<log2(CTUH)) obmc_flag[1(up)]=0
 CTUの上境界に加えて、CTUの左境界でもOBMCを禁止してもよい。
 OBMC予測部30374は、サブブロックの左側がCTUの境界と重なる場合、左方向のOBMC処理を禁止する。
  if (サブブロックの左側境界がCTUの左側境界) obmc_flag[2(left)]=0    (式OBMC-8)
つまり、CTUの幅をCTUW、対象サブブロックのピクチャ内での位置を(xNb,yNb)とすると、以下の処理で実現してもよい。
  if (xNb%CTUW==0) obmc_flag[2(left)]=0
つまり、対象ブロックに属するサブブロックの左側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックの左側の動きパラメータに基づく補間画像PredRNを用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは等しい場合には、サブブロックの左側の動きパラメータに基づく補間画像PredRNを用いて補正する。CTUの幅をCTUW、対象サブブロックのピクチャ内での位置を(xNb,yNb)、参照ブロックのピクチャ内での位置を(xRefNb, yRefNb)とすると、以下の処理で実現してもよい。
  if (xNb%CTUW!=xRefNb%CTUW) obmc_flag[2(left)]=0
CTU境界の判定は、以下の分岐をおこなっても等価である。
  if ((xNb>>log2(CTUW))<<log2(CTUW)!= (xRefNb>>log2(CTUW))<<log2(CTUW)) obmc_flag[2(left)]=0
あるいは、CTU境界の判定は、以下の分岐をおこなっても等価である。
  if ((xNb < (xRefNb>>log2(CTUW))<<log2(CTUW)) obmc_flag[2(left)]=0
 OBMCオフ条件5:CTUの上境界における小サブブロックのOBMC禁止
 OBMC予測部30374は、サブブロックの上側境界がCTUの境界と重なる場合、かつ、サブブロックが小ブロックの場合、上方向のOBMC処理を禁止する。
  if ((サブブロックの上側境界がCTUの上側境界) && (BW<OBMC_S || BH<OBMC_S)) obmc_flag[1(up)] =0    (式OBMC-9)
つまり、CTUの高さをCTUH、対象サブブロックのCTU内での位置を(xNb,yNb)とすると、
  if (yNb%CTUH==0 && (BW<OBMC_S || BH<OBMC_S)) obmc_flag[1(up)]=0
もしくは、以下の処理でもよい。
  if (yNb%CTUH==0 && (BW + BH < OBMC_S)) obmc_flag[1(up)]=0
 もしくは、以下の処理でもよい。
 OBMCオフ条件4’:CTUの上下境界におけるOBMC禁止
サブブロックの上側あるいは下側境界がCTUの境界と重なる場合、右および下方向のOBMC処理を禁止する。
  if (サブブロックの上側境界がCTUの上側境界 || サブブロックの下側境界がCTUの下側境界) obmc_flag[3]=obmc_flag[4]=0    (式OBMC-4')
 OBMCオフ条件5’:CTUの上下境界における小サブブロックのOBMC禁止
サブブロックの上側あるいは下側境界がCTUの境界と重なる場合、かつ、サブブロックの幅BW、あるいは高さBHが所定値OBMC_Sより小さい場合、右および下方向のOBMC処理を禁止する。
  if ((サブブロックの上側境界がCTUの上側境界 || サブブロックの下側境界がCTUの下側境界) && (BW<OBMC_S || BH<OBMC_S)) obmc_flag[3]=obmc_flag[4]=0    (式OBMC-5')
 上記OBMCオフ条件のいずれかを、OBMCオフの判定処理に追加することで、参照ピクチャメモリ306からの画像データの転送量が多い場合にOBMCをオフにすることができる。従ってメモリバンド幅の増加を抑制することができる。
  (BTM)
 BTM予測部3038は、マージ予測パラメータ導出部3036により導出された双方向の動きベクトルを用いて生成された予測画像をテンプレートとし、バイラテラルテンプレートマッチング(BTM)処理を実行することにより、精度の高い動きベクトルを導出する。
  (動きベクトル導出処理の例)
 マージモードにおいて導出した2つの動きベクトルが対象ブロックに対し逆向きであれば、BTM予測部3038はバイラテラルテンプレートマッチング(BTM)処理を行う。
 図24を参照してバイラテラルテンプレートマッチング(BTM)処理を説明する。図24(a)はBTM予測における参照ピクチャとテンプレートとの関係を示す図であり、(b)は処理の流れを示す図であり、(c)はBTM予測におけるテンプレートを説明する図である。
 図24(a)および(c)に示すように、BTM予測部3038は、まず、マージ予測パラメータ導出部3036で導出された複数の動きベクトル(例えばmvL0およびmvL1)から対象ブロックCur_blockの予測ブロックを生成し、これをテンプレートとする。具体的には、mvL0により生成された動き補償画像predL0と、mvL1により生成された動き補償画像predL1から予測ブロックCur_Tempを生成する。
  Cur_Temp[x][y] = Clip3( 0, (1<<bitDepth)-1, (predL0[x][y]+predL1[x][y]+1)>>1) (式BTM-1)
 次に、BTM予測部3038は、mvL0、mvL1(初期ベクトル)を各々中心とするサーチレンジ±SR画素の範囲で、動きベクトル候補を設定し、各動きベクトル候補が生成する動き補償画像PredL0'、PredL1'とテンプレートとのマッチングコストを導出する。そして、マッチングコストが最小となるベクトルmvL0'、mvL1'を対象ブロックの更新された動きベクトルに設定する。
 上記のように、BTM部3038は対象ブロックにおいて初期ベクトルmvL0、mvL1を中心とする±SR画素の範囲でサーチを実施する。このサーチには参照ピクチャメモリ306からの参照ピクチャの読み出しが必要であり、読み出す参照ピクチャの領域が大きい場合、転送するデータ量、つまりメモリバンド幅も大きくなる。
 従って、マッチング予測と同様、対象ブロックのサイズ、サーチレンジ、フィルタのタップ数を適応的に設定する(適応的設定方法1~3のいずれかを用いる)ことで、所定のメモリバンド幅MBP_TARGETの範囲内でサーチを実施することができる。あるいは、初期ベクトルの大きさに応じて、サーチレンジあるいは動き補償フィルタのタップ数を設定してもよい。具体的には、初期ベクトルが大きい時はサーチレンジを大きく、初期ベクトルが小さい時はサーチレンジを小さく設定する。あるいは、初期ベクトルが大きい時はフィルタのタップ数を短く、初期ベクトルが小さい時はフィルタのタップ数を長く設定する。あるいは、図19(c)に示すように、初期ベクトルが大きい時はサーチレンジを大きく、フィルタのタップ数を短く設定してもよい。あるいは、図19(d)に示すように、初期ベクトルが小さい時はサーチレンジを小さく、フィルタのタップ数を長く設定してもよい。
 これらの方法のいずれかを用いて導出したサーチレンジ、フィルタのタップ数を用いて、テンプレート及び動き補償画像を生成する。
 図24(b)を参照してBTM予測の流れを説明する。
 まず、BTM予測部3038はテンプレートを取得する(S3501)。テンプレートは上述した通り、マージ予測パラメータ導出部3036で導出された動きベクトル(例えばmvL0およびmvL1)から生成する。
 BTM予測部3038は、上述の適応的選択方法を用いてサーチレンジSRあるいは動き補償フィルタのタップ数を決定する(S3502)。以降では、ここで決定したサーチレンジSRあるいは動き補償フィルタのタップ数を用いてローカルサーチを実施する。
 次に、BTM予測部3038はローカルサーチを行う。ローカルサーチはS3503~S3506のように、複数の異なる精度のサーチを繰り返すことによって行ってもよい。例えば、ローカルサーチは、M画素精度サーチL0処理(S3503)、N画素精度サーチL0処理(S3504)、M画素精度サーチL1処理(S3505)、N画素精度サーチL1処理(S3506)の順に行う。ここでM>Nであり、例えば、M=1画素精度、N=1/2画素精度とすることができる。
 M画素精度LXサーチ処理(X=0..1)は、mvLXが示す座標を中心としたサーチを実施する。また、N画素精度サーチLX処理は、M画素精度サーチLX処理でマッチングコストが最小となった座標を中心としたサーチを実施する。
 このようにブロックサイズ、あるいは初期ベクトルの大きさをもとに決定したサーチレンジ、あるいは動き補償フィルタのタップ数を用いてBTM予測画像を作成することにより、参照ピクチャメモリ306からの画像データの転送量を所定値以下に制限することができる。従ってメモリバンド幅を削減することができる。
 図6(b)は、本実施形態に係るAMVP予測パラメータ導出部3032の構成を示す概略図である。AMVP予測パラメータ導出部3032は、ベクトル候補導出部3033とベクトル候補選択部3034、およびベクトル候補格納部3036を備える。ベクトル候補導出部3033は、参照ピクチャインデックスrefIdxに基づいて予測パラメータメモリ307が記憶する既に処理済みのブロックの動きベクトルmvLXから予測ベクトル候補を導出し、ベクトル候補格納部3036の予測ベクトル候補リストmvpListLX[]に格納する。
 ベクトル候補選択部3034は、予測ベクトル候補リストmvpListLX[]の予測ベクトル候補のうち予測ベクトルインデックスmvp_lX_idxが示す動きベクトルmvpListLX[mvp_lX_idx]を予測ベクトルmvpLXとして選択する。ベクトル候補選択部3034は、選択した予測ベクトルmvpLXを加算部3035に出力する。
 なお、予測ベクトル候補は、復号処理が完了したブロックであって、復号対象ブロックから予め定めた範囲のブロック(例えば、隣接ブロック)の動きベクトルをスケーリングすることで導出する。なお、隣接ブロックは、復号対象ブロックに空間的に隣接するブロック、例えば、左ブロック、上ブロックの他、復号対象ブロックに時間的に隣接する領域、例えば、表示時刻が異なるピクチャにおいて、復号対象ブロックと同じ位置を含むブロックの予測パラメータから得られた領域を含む。
 加算部3035は、AMVP予測パラメータ導出部3032から入力された予測ベクトルmvpLXとインター予測パラメータ復号制御部3031から入力された差分ベクトルmvdLXを加算して動きベクトルmvLXを算出する。加算部3035は、算出した動きベクトルmvLXを予測画像生成部308および予測パラメータメモリ307に出力する。
 なお、マージ予測パラメータ導出部3036において導出された動きベクトルをそのままインター予測画像生成部309に出力せず、BTM予測部3038を介して出力してもよい。
  (インター予測画像生成部309)
 図14(b)は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、重み予測部3094を含んで構成される。
  (動き補償)
 動き補償部3091は、インター予測パラメータ復号部303から入力された、インター予測パラメータ(予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLX、オンオフフラグ等)に基づいて、参照ピクチャメモリ306から、参照ピ
クチャインデックスrefIdxLXで指定された参照ピクチャRefXにおいて、復号対象ブロックの位置を起点として、動きベクトルmvLXだけシフトした位置にあるブロックを読み出すことによって補間画像(動き補償画像)を生成する。ここで、動きベクトルmvLXの精度が整数精度でない場合には、動き補償フィルタと呼ばれる小数位置の画素を生成するためのフィルタを施して、動き補償画像を生成する。
 動き補償部3091に入力される動きベクトルmvLXまたは動きベクトルmvLXNが1/M画素精度(Mは2以上の自然数)である場合、補間フィルタにより、整数画素位置の参照ピクチャの画素値から、補間画像を生成する。つまり、位相nFracに対応するNTAPタップの補間フィルタ係数mcFilter[nFrac][k](k=0..NTAP-1)と、参照ピクチャの画素の積和演算とから、上述した補間画像Pred[][]を生成する。
 動き補償部3091は、まず、予測ブロック内座標(x, y)に対応する整数位置(xInt, yInt)および位相(xFrac, yFrac)を以下の式で導出する。
  xInt = xb + (mvLX[0] >> (log2(M))) + x   (式INTER-1)
  xFrac = mvLX[0] & (M-1)
  yInt = yb + (mvLX[1] >> (log2(M))) + y
  yFrac = mvLX[1] & (M-1)
ここで、(xb, yb)は、ブロックの左上座標、x=0..W-1、y=0..H-1、Mは、動きベクトルmvLXの精度(1/M画素精度)を示す。
 動き補償部3091は、参照ピクチャrefImgに補間フィルタを用いて水平補間処理を行うことで、一時的画像temp[][]を導出する。以下のΣはk = 0..NTAP-1のkに関する和、shift1は値のレンジを調整する正規化パラメータ、offset1=1<<(shift1-1)である。
 temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP/2+1][yInt]+offset1) >> shift1                     (式INTER-2)
 なお、参照ピクチャ上の画素refImg[xInt+k-NTAP/2+1][yInt]の参照時には後述するパディングを行う。
 続いて、動き補償部3091は、一時的画像temp[][]を垂直補間処理により、補間画像Pred[][]を導出する。以下のΣはk = 0..NTAP-1のkに関する和、shift2は値のレンジを調整する正規化パラメータ、offset2=1<<(shift2-1)である。
  Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2) >> shift2
                     (式INTER-3)
 なお、双予測の場合は、上記のPred[][]をリストL0、L1毎に導出し(補間画像PredL0[][]とPredL1[][]と呼ぶ)、補間画像PredL0[][]と補間画像PredL1[][]から補間画像Pred[][]を生成する。
  (OBMC補間画像生成)
 OBMCでは、対象ブロックのインター予測パラメータに基づいて導出される対象サブブロックの補間画像、および、隣接ブロックのインター予測パラメータに基づいて導出される補間画像という、2種類の補間画像を生成し、これらの重み付加算処理により最終的に予測に用いる補間画像を生成する。ここで、対象ブロックのインター予測パラメータに基づいて導出される対象サブブロックの補間画像を補間画像PredC(第1のOBMC補間画像)、隣接ブロックのインター予測パラメータに基づいて導出される補間画像を補間画像PredRN(第2のOBMC補間画像)と呼ぶ。なお、Nは対象サブブロックの上側(A)、左側(L)、下側(B)、右側(R)のいずれかを示す。OBMC処理を行わない(OBMCオフ)場合には、補間画像PredCがそのまま、対象サブブロックの動き補償画像PredLXとなる。OBMC処理を行う(OBMCオン)場合には、補間画像PredCと補間画像PredRNから対象サブブロックの動き補償画像PredLXが生成される。
 動き補償部3091は、インター予測パラメータ復号部303から入力された対象サブブロックのインター予測パラメータ(予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLX、OBMCフラグobmc_flag)に基づいて、補間画像を生成する。
 (OBMCのメモリバンド削減5)
 上述したように、上下にCTUを分割する水平方向のCTU境界では、画像データを一時的にキャッシュに格納し、次のCTUのOBMC処理で使用することが難しい。そこで、サブブロック予測パラメータ導出部3037において、上下にCTUを分割する水平方向のCTU境界では、サブブロックの水平方向のサイズを大きくすることで、CTU境界に接するサブブロックのサイズと、サブブロックその動きベクトルの個数を削減し、画像データの転送量を削減する。
 補間画像サブブロックの水平方向のサイズを大きくする例を図25に示す。図25(a)はブロック単位で予測する場合、図25(b)はサブブロック単位で予測する場合の例である。ブロック内部のサブブロックサイズは同じであるので、図25のように、CTU境界に接するブロックとそうでないブロックとで、サブブロック予測パラメータ導出部3037は、ブロック毎にサブブロックのサイズを変えてもよい。
 なお、ブロックが水平方向のCTU境界に位置するか否かは(yNb%CTUH==0)の判定式を用いることができる。ブロックが水平方向のCTU境界に位置する場合とは、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合であるから、(yNb%CTUH!=yRefNb%CTUH)の判定式を用いてもよい。
 また、サブブロック単位で動きベクトルを導出する手段は、時空間サブブロック予測部30371(ATMVP予測手段、STMVP予測手段)、アフィン予測部30372(アフィン予測手段)、マッチング動き導出部30373(マッチング予測手段)、OBMC予測部30374のいずれかであってもよい。すなわち、ATMVP予測、STMVP予測、アフィン予測、マッチング予測、OBMC予測のサブブロックサイズを、CTU境界に位置する場合において大きくしてもよい。
 例えば、CTU境界に接しないブロックのサブブロックのサイズを(BW,BH)、CTU境界に接するブロックのサブブロックのサイズを(2*BW,2*BH)としてもよい。
 例えば、CTU境界に接しないブロックのサブブロックのサイズを(BW,BH)、CTU境界に接するブロックのサブブロックのサイズを(2*BW,BH)としてもよい。すなわちCTU境界に接するブロックでは水平に長いサブブロックを用いてもよい。
 また、サブブロックのサイズを、動きベクトルを導出する時点で設定するのではなく、あるサブブロックのサイズで動きベクトルを導出し、導出後に、複数のサブブロックの導出された動きベクトルを統合してもよい。2つ以上のサブブロックの動きベクトルを統合するには、例えば、下記の方法で導出する。
 対象サブブロックの動きベクトルが2個以上存在する場合、
C1)統合したサブブロックの代表サブブロック(例えば、左上サブブロック)の動きベクトルを代表ベクトルとして設定する。
C2)統合したサブブロックに属するサブブロックの動きベクトルの平均ベクトルを、統合サブブロックの代表ベクトルとして設定する。
 隣接サブブロックの動きベクトルが2個以上存在する場合、
R1) 統合した隣接サブブロックの動きベクトルのうち、最左に位置する動きベクトルを隣接サブブロックの代表ベクトルとして設定する。
R2)統合した隣接サブブロックの動きベクトルの平均ベクトルを隣接サブブロックの代表ベクトルとして設定する。
R3)複数個の動きベクトルのうち、対象サブブロックの動きベクトルとの差分値が最小の動きベクトルを、隣接サブブロックの代表ベクトルとして設定する。
 上記サブブロックサイズ設定条件C1)~C3)とR1)~R3)を組み合わせて予測画像を生成することで、参照ピクチャメモリ306からの画像データの転送が転送量を削減することができる。従ってメモリバンド幅の増加を抑制することができる。
 上記は、対象ブロックを複数のサブブロックに分割し、サブブロック単位の動きベクトルを導出するサブブロック予測手段と、導出された上記動きベクトルを用いて補間画像を生成する予測画像生成部を備える動画像復号装置において、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合か否かに応じて、動きベクトルを導出する。また、上記サブブロック予測手段は、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合に、サブブロックサイズに第1のサイズを設定し、それ以外の場合には、第2のサイズを設定することを特徴とする。また、上記サブブロック予測手段は、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックサイズを統合して動きパラメータを導出することを特徴とする。
 図23(b)は、動き補償部3091のOBMC予測での補間画像生成の動作を説明するフローチャートである。
 動き補償部3091は、ブロック境界がCTU境界か否かを判定する(S3411)。ブロック境界がCTU境界である場合(S3411でY)、S3412に進む。そうでない場合、(S3411でN)、S3413に進む。
 動き補償部3091は、対象ブロックのサブブロックを統合してサイズを変更し、上述のC1)~C3)とR1)~R3)のいずれかの組み合わせにより動きベクトルを設定する(S3412)。
 動き補償部3091は、デフォルトのサブブロックサイズと動きベクトル(予測パラメータ)、あるいは、S3412で再設定したサブブロックサイズと動きベクトル(予測パラメータ)に基づいて、サブブロックの第1のOBMC補間画像PredC[x][y](x=0..BW-1, y=0..BH-1)を生成する(S3413)。
 次にobmc_flag[i]=1か否かを判定する(S3414)。obmc_flag[i]=0の場合(S3414でN)、次の方向(i=i+1)に進む。obmc_flag[i]=1の場合(S3414でY)、S3415に進む。
 動き補償部3091は、サブブロックの第2のOBMC補間画像PredRN[x][y]を生成する(S3415)。つまり、obmc_flag[i]=1となるiが示す方向のサブブロックに対してのみ、インター予測パラメータ復号部303から入力された隣接ブロックの予測リスト利用フラグpredFlagLX[xPbN][yPbN]、参照ピクチャインデックスrefIdxLX[xPbN][yPbN]、および、S3412で再設定した動きベクトルmvLX[xPbN][yPbN]とサブブロックサイズとに基づいて、サブブロックの第2のOBMC補間画像PredRN[x][y](x=0..BW-1, y=0..BH-1)を生成する。
動き補償部3091は、サブブロックの第1のOBMC補間画像PredC[x][y]とサブブロックの第2のOBMC補間画像PredRN[x][y]の加重平均処理を実施する(S3416)。
 OBMC処理を行う構成においては、動き補償部3091はサブブロックの第1のOBMC補間画像PredC[x][y]とサブブロックの第2のOBMC補間画像PredRN[x][y]の加重平均処理を行うことにより、補間画像PredC[x][y]を更新する。詳細に説明すると、動き補償部3091は、インター予測パラメータ復号部303から入力されたOBMCフラグobmc_flag[i]=1(OBMC処理が有効)の場合、iが示す方向に垂直な方向のNumOBMC個の画素に対し以下の加重平均処理を行う。
  PredC[x][y]=((w1*PredC[x][y]+w2*PredRN[x][y])+o)>>shift (式INTER-4)
 ここで、加重平均処理における重みw1、w2について説明する。加重平均処理における重みw1、w2は、サブブロック境界からの対象画素の距離(画素数)に応じて決定する。w1+w2=(1<<shift)、o=1<<(shift-1)の関係がある。シフト値shiftは、サブブロック境界からの対象画素の距離に応じて設定してもよいし、固定してもよい。サブブロックサイズ(OBMC処理サイズ)であるBWおよびBHが4であって、シフト値を距離に応じて設定する場合、例えば、
  {w1,w2,o,shift} = {3,1,2,2}
  {w1,w2,o,shift} = {7,1,4,3}
  {w1,w2,o,shift} = {15,1,8,4},
  {w1,w2,o,shift} = {31,1,16,5}
としてもよい。
 OBMC処理では、複数の隣接ブロックの補間画像を用いて予測画像が生成される。ここで、複数の隣接ブロックの動きパラメータから、サブブロックの第1のOBMC補間画像PredC[x][y]を更新する方法を説明する。
 はじめに、動き補償部3091は、obmc_flag[1]=1の場合、対象サブブロックのサブブロックの第1のOBMC補間画像PredC[x][y]に上側隣接ブロックの動きパラメータを用いて作成したサブブロックの第2のOBMC補間画像PredRA[x][y]を適用してPredC[x][y]を更新する。
  PredC[x][y]=((w1*PredC[x][y]+w2*PredRA[x][y])+o)>>shift (式INTER-5)
 次に、動き補償部3091は、obmc_flag[i]=1である方向iに対し、対象サブブロックの左側(i=2)、下側(i=3)および右側(i=4)の隣接ブロックの動きパラメータを用いて作成したサブブロックの第2のOBMC補間画像PredRL[x][y]、PredRL[x][y]、PredRL[x][y]を用いてサブブロックの第1のOBMC補間画像PredC[x][y]を順次更新する。すなわち、以下の式により更新する。
  PredC[x][y]=((w1*PredC[x][y]+w2*PredRL[x][y])+o)>>shift(式INTER-6)
  PredC[x][y]=((w1*PredC[x][y]+w2*PredRB[x][y])+o)>>shift
  PredC[x][y]=((w1*PredC[x][y]+w2*PredRR[x][y])+o)>>shift
 動き補償部3091は、obmc_flag[0]=0の場合、あるいは、i=1~4に対し、上記の処理を実施した後、サブブロックの第1のOBMC補間画像PredC[x][y]を予測画像PredLX[x][y]にセットする(S3417)。
  PredLX[x][y] = PredC[x][y]            (式INTER-7)
 動き補償部3091は対象サブブロックの隣接ブロックの動きパラメータを考慮して予測画像を生成することができるので、OBMC処理では予測精度の高い予測画像を生成することができる。
 また、OBMC処理により更新されるサブブロック境界に垂直な方向の画素数NumOBMCは任意で良い(S=2~BH(ブロックサイズ))。OBMC処理の対象となるサブブロックを含むブロックの分割様式も、2NxN、Nx2N、NxN等の任意の分割様式で良い。
 このように、CTU境界ではサブブロックサイズを大きく設定して予測画像を作成することにより、参照ピクチャメモリ306からの画像データの転送量を所定値以下に制限することができる。従ってメモリバンド幅を削減することができる。
  (重み予測)
 重み予測部3094は、入力される動き補償画像PredLXに重み係数を乗算することにより対象ブロックの予測画像を生成する。予測リスト利用フラグの一方(predFlagL0もしくはpredFlagL1)が1の場合(単予測の場合)で、重み予測を用いない場合には入力された動き補償画像PredLX(LXはL0もしくはL1)を画素ビット数bitDepthに合わせる以下の式の処理を行う。
  Pred[x][y] = Clip3( 0, (1<<bitDepth)-1, (PredLX[x][y]+offset1)>>shift1 )  
                        (式INTER-8)
 ここで、shift1=14-bitDepth、offset1=1<<(shift1-1)である。
また、予測リスト利用フラグの両者(predFlagL0とpredFlagL1)が1の場合(双予測BiPredの場合)で、重み予測を用いない場合には、入力された動き補償画像PredL0、PredL1を平均し画素ビット数に合わせる以下の式の処理を行う。
  Pred[x][y] = Clip3( 0, (1<<bitDepth)-1, (PredL0[x][y]+PredL1[x][y]+offset2)>>shift2 )                    (式INTER-9)
ここで、shift2=15-bitDepth、offset2=1<<(shift2-1)である。
 さらに、単予測の場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0とオフセットo0を符号化データから導出し、以下の式の処理を行う。
  Pred[x][y] = Clip3( 0, (1<<bitDepth)-1, ((PredLX[x][y]*w0+2^(log2WD-1))>>log2WD)+o0 )                    (式INTER-10)
 ここで、log2WDは所定のシフト量を示す変数である。
 さらに、双予測BiPredの場合で、重み予測を行う場合には、重み予測部3094は、重み予測係数w0、w1、o0、o1を符号化データから導出し、以下の式の処理を行う。
  Pred[x][y] = Clip3( 0, (1<<bitDepth)-1, (PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))>>(log2WD+1))(式INTER-11)
  (動画像符号化装置の構成)
 次に、動画像符号化装置11の構成について説明する。以下に一例として、動画像符号化装置11の構成を、図26を用いて説明する。動画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。なお、動画像符号化装置11はループフィルタ107が含まれない構成であってもよい。
 予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットブロックの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象ブロックを起点として動きベクトルが示す参照ピクチャ上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接ブロックの画素値を参照ピクチャメモリ109から読み出し、ブロックの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてブロックの予測画像Pを生成する。予測画像生成部101は、生成したブロックの予測画像Pを減算部102に出力する。
 なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。
 予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにブロックの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。
 予測画像生成部101に含まれる(図示しない)イントラ予測画像生成部は既に説明したイントラ予測画像生成部310と同じ動作である。
 減算部102は、予測画像生成部101から入力されたブロックの予測画像Pの信号値を、画像Tの対応するブロック位置の画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号を変換・量子化部103に出力する。
 変換・量子化部103は、減算部102から入力された予測残差信号に対し周波数変換を行い、変換係数を算出する。変換・量子化部103は、算出した変換係数を量子化して量子化変換係数を求める。変換・量子化部103は、求めた量子化変換係数をエントロピー符号化部104及び逆量子化・逆変換部105に出力する。
 エントロピー符号化部104には、変換・量子化部103から量子化変換係数が入力され、予測パラメータ符号化部111から予測パラメータが入力される。入力される予測パラメータには、例えば、参照ピクチャインデックスref_idx_lX、予測ベクトルインデックスmvp_lX_idx、差分ベクトルmvdLX、予測モードpred_mode_flag、及びマージインデックスmerge_idx等の符号がある。
 エントロピー符号化部104は、入力された分割情報、予測パラメータ、量子化変換係数等をエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。
 逆量子化・逆変換部105は、動画像復号装置31における、逆量子化・逆変換部311(図4)と同じであり、変換・量子化部103から入力された量子化変換係数を逆量子化して変換係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆変換を行い、残差信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。
 加算部106は、予測画像生成部101から入力されたブロックの予測画像Pの信号値と逆量子化・逆変換部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。なお、ループフィルタ107は、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述したQTあるいはBT分割パラメータや予測パラメータやこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてブロックの予測画像Pを生成する。
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化残差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したRDコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。
 予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。
 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。
 また、イントラ予測パラメータ符号化部113は、予測画像生成部101に出力する予測画像の生成に必要な予測パラメータを導出する構成として、イントラ予測パラメータ復号部304がイントラ予測パラメータを導出する構成と、一部同一の構成を含む。
 イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。
  (インター予測パラメータ符号化部の構成)
 次に、インター予測パラメータ符号化部112の構成について説明する。インター予測パラメータ符号化部112は、図5のインター予測パラメータ復号部303に対応する手段であり、図27に構成を示す。
 インター予測パラメータ符号化部112は、インター予測パラメータ符号化制御部1121、AMVP予測パラメータ導出部1122、減算部1123、サブブロック予測パラメータ導出部1125、BTM予測部1126、及び図示しない、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部などを含んで構成され、分割モード導出部、マージフラグ導出部、インター予測識別子導出部、参照ピクチャインデックス導出部、ベクトル差分導出部は各々、PU分割モードpart_mode、マージフラグmerge_flag、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、差分ベクトルmvdLXを導出する。マージインデクス導出部11211、ベクトル候補インデクス導出部11212、AMVP予測パラメータ導出部1122、サブブロック予測パラメータ導出部1125、BTM予測部1126を総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。インター予測パラメータ符号化部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に出力する。
 インター予測パラメータ符号化制御部1121は、マージインデックス導出部11211とベクトル候補インデックス導出部11212を含む。マージインデックス導出部11211は、符号化パラメータ決定部110から入力された動きベクトルと参照ピクチャインデックスを、予測パラメータメモリ108から読み出したマージ候補のブロックが持つ動きベクトルと参照ピクチャインデックスと比較して、マージインデックスmerge_idxを導出し、エントロピー符号化部104に出力する。マージ候補とは、符号化対象となる符号化対象CUから予め定めた範囲にある参照ブロック(例えば、符号化対象ブロックの左下端、左上端、右上端に接する参照ブロック)であって、符号化処理が完了したブロックである。ベクトル候補インデックス導出部11212は予測ベクトルインデックスmvp_lX_idxを導出する。
 サブブロック予測パラメータ導出部1125には、符号化パラメータ決定部110がサブブロック予測モードの使用を決定した場合、subPbMotionFlagの値に従って、空間サブブロック予測、時間サブブロック予測、アフィン予測、マッチング動き導出、OBMC予測のいずれかのサブブロック予測の動きベクトルと参照ピクチャインデックスを導出する。動きベクトルと参照ピクチャインデックスは、動画像装置31の説明で述べたように、隣接ブロック、参照ピクチャブロック等の動きベクトルや参照ピクチャインデックスを予測パラメータメモリ108から読み出し、導出する。サブブロック予測パラメータ導出部1125、および、この中に含まれる時空間サブブロック予測部11251、アフィン予測部11252、マッチング予測部11253、OBMC予測部11254は、インター予測パラメータ復号部303のサブブロック予測パラメータ導出部3037、および、この中に含まれる時空間サブブロック予測部30371、アフィン予測部30372、マッチング予測部30373、OBMC予測部30374と同様の構成を有する。
 AMVP予測パラメータ導出部1122は、アフィン予測部11221を含み、上述のAMVP予測パラメータ導出部3032(図5参照)と同様な構成を有する。
 すなわち、予測モードpredModeがインター予測モードを示す場合、AMVP予測パラメータ導出部1122には符号化パラメータ決定部110から動きベクトルmvLXが入力される。AMVP予測パラメータ導出部1122は、入力された動きベクトルmvLXに基づいて予測ベクトルmvpLXを導出する。AMVP予測パラメータ導出部1122は、導出した予測ベクトルmvpLXを減算部1123に出力する。なお、参照ピクチャインデックスrefIdxLX及び予測ベクトルインデックスmvp_lX_idxは、エントロピー符号化部104に出力される。また、アフィン予測部11221は、上述のAMVP予測パラメータ導出部3032のアフィン予測部30321(図5参照)と同様な構成を有する。
 減算部1123は、符号化パラメータ決定部110から入力された動きベクトルmvLXから、AMVP予測パラメータ導出部1122から入力された予測ベクトルmvpLXを減算して差分ベクトルmvdLXを生成する。差分ベクトルmvdLXはエントロピー符号化部104に出力される。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置は、対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償(OBMC)予測を行い、対象サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第1の補間画像)を生成する第1の予測手段と、隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第2の補間画像)を生成する第2の予測手段と、前記第1の補間画像と前記第2の補間画像の重み付加算処理により、予測画像を生成する予測画像生成手段とを備え、前記第2の予測手段は、所定の条件を満たす場合、前記対象サブブロックの右および下方向境界のOBMC処理を禁止し、前記対象サブブロックの右および下方向の予測画像として前記第1の補間画像を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記所定の条件は、前記対象サブブロックのサイズが第1の所定値よりも小さい場合であることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記所定の条件は、前記対象サブブロックのサイズが第1の所定値よりも小さく、かつ、前記対象サブブロックと隣接サブブロックとの動きベクトルの差分が第2の所定値よりも大きい場合であることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記所定の条件は、サブブロックの上側または下側境界がCTU(符号化ツリーユニット)の境界と重なる場合であることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記所定の条件は、サブブロックの上側あるいは下側境界がCTU(符号化ツリーユニット)の境界と重なり、かつ、対象サブブロックのサイズが第1の所定値よりも小さい場合であることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置は、対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償(OBMC)予測において、対象サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第1の補間画像)を生成する第1の予測手段と、隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第2の補間画像)を生成する第2の予測手段と、第1の補間画像と第2の補間画像の重み付加算処理により予測画像を生成する予測画像生成手段とを備え、前記第2の予測手段は、サブブロックの上側あるいは下側境界がCTU(符号化ツリーユニット)の境界と重なる場合、水平方向に複数のサブブロックで共通の動きベクトルを使用することを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記共通の動きベクトルは、複数のサブブロックの複数個の動きベクトルの平均値であることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記共通の動きベクトルは、複数のサブブロックのうち、最左に位置するサブブロックの動きベクトルであることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置において、前記共通の動きベクトルは、複数のサブブロックのうち、対象サブブロックの動きベクトルとの差分値が最小の動きベクトルであることを特徴とする。
 本発明の一態様に係る動画像復号装置、あるいは動画像符号化装置は、対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償(OBMC)予測において、対象サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第1の補間画像)を生成する第1の予測手段と、隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの補間画像(第2の補間画像)を生成する第2の予測手段と、前記第1の補間画像と前記第2の補間画像の重み付加算処理により予測画像を生成する予測画像生成手段とを備え、前記第2の予測手段は、前記第1の予測手段と前記第2の予測手段が、アフィン予測を使用していない場合、OBMC処理を禁止し、前記対象サブブロックの予測画像として前記第1の補間画像を設定することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置は、マッチング処理により対象ブロックの動きベクトルをサーチする第1の動きベクトルサーチ部と、前記第1の動きベクトルサーチ部により選択された動きベクトルを参照して、前記対象ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルをサーチする第2の動きベクトルサーチ部と、を備え、前記第1の動きベクトルサーチ部は、対象ブロックに関する初期ベクトルサーチを行ったうえで、局所的サーチを行うことにより動きベクトルをサーチするものであり、前記第2の動きベクトルサーチ部は、サブブロックに関する初期ベクトルサーチを行ったうえで、局所的サーチを行うことにより動きベクトルをサーチするものであり、前記第1の動きベクトルサーチ部、あるいは、前記第2の動きベクトルサーチ部において、所定の条件に基づきサーチレンジあるいは動き補償フィルタのタップ数を変更することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置は、前記第1の動きベクトルサーチ部、あるいは、前記第2の動きベクトルサーチ部において、前記所定の条件は対象ブロックのサイズであることを特徴とする。
 本発明の一態様に係る動きベクトル導出装置は、前記第2の動きベクトルサーチ部において、前記所定の条件は、前記第1の動きベクトルサーチ部でサーチされた動きベクトルの大きさであることを特徴とする。
 本発明の一態様に係る動きベクトル導出装置において、前記第1の動きベクトルサーチ部の初期ベクトルサーチは、予測ベクトル候補リストに格納された、前記予測ブロックの隣接ブロックの動きベクトルを所定値以内にクリッピングしたベクトルを、初期ベクトルサーチに使用することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置において、前記所定値は、前記予測ベクトル候補リストの先頭からN個の動きベクトルを用いて決定することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置において、前記所定値は、前記予測ベクトル候補リストに格納された動きベクトルの平均値を用いて決定することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置において、前記所定値は、参照ピクチャリストの先頭ピクチャを用いる動きベクトルのみを用いて決定することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置は、前記対象ブロックの隣接ブロックをサーチし、利用可能な隣接ブロックの有する動きベクトルと参照ピクチャを、前記対象ブロックのブロックレベルの動きベクトル(第1の動きベクトル)と参照ピクチャ(第1の参照ピクチャ)として設定する設定手段と、第1の動きベクトルと第1の参照ピクチャを用いて、コロケートブロックのサブブロックベースの動きベクトル(第2の動きベクトル)と参照ピクチャ(第2の参照ピクチャ)を取得する取得手段と、前記対象ブロックのサブブロックレベルの参照ピクチャ(第3の参照ピクチャ)に対応する、前記対象ブロックのサブブロックベースの動きベクトル(第3の動きベクトル)を、第2の参照ピクチャを用いて第2の動きベクトルをスケーリングすることにより導出する導出手段とを備え、スケーリングによって導出された第3の動きベクトルが所定値より大きい場合、第3の動きベクトルをクリッピングすることを特徴とする。
 本発明の一態様に係る動きベクトル導出装置は、マッチング処理により対象ブロックの動きベクトルをサーチする第1の動きベクトルサーチ部と、前記第1の動きベクトルサーチ部により選択された動きベクトルを参照して、前記対象ブロック内に含まれる複数のサブブロックの各々について、マッチング処理により動きベクトルをサーチする第2の動きベクトルサーチ部と、を備え、前記第1の動きベクトルサーチ部は、対象ブロックに関する初期ベクトルサーチを行ったうえで、局所的サーチを行うことにより動きベクトルをサーチするものであり、前記第2の動きベクトルサーチ部は、サブブロックに関する初期ベクトルサーチを行ったうえで、局所的サーチを行うことにより動きベクトルをサーチするものであり、前記第1の動きベクトルサーチ部、あるいは、前記第2の動きベクトルサーチ部は、ステップサーチを用いて、所定のサーチレンジ内の動きベクトルを探索するものであり、ステップサーチの探索ステップ数は前記所定のサーチレンジから導出することを特徴とする。
 本発明の一態様に係る動きベクトル導出装置において、前記第1の動きベクトルサーチ部は、前記所定のサーチレンジから第1の動きベクトルサーチ部で使用する探索ステップ数を導出し、前記第2の動きベクトルサーチ部は、前記所定のサーチレンジと前記第1の動きベクトルサーチ部で使用する探索ステップ数から、第2の動きベクトルサーチ部で使用する探索ステップ数を導出することを特徴とする。
 本発明の一態様に係る動画像復号装置は、対象ブロックを複数のサブブロックに分割し、サブブロック単位の動きベクトルを導出するサブブロック予測手段と、上記導出された動きベクトルを用いて補間画像を生成する予測画像生成部を備え、サブブロック予測手段サブブロック毎の動きベクトルを所定の範囲に制限することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、2つ以上の基準動きベクトルを用いて上記サブブロックの動きベクトルを導出するアフィン予測手段であることを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、対象ブロックに対応する位置にある参照ピクチャ上のブロックを分割して得られる点の動きベクトルを用いて上記サブブロックの動きベクトルを導出するATMVP予測手段であることを特
徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、対象ブロックに隣接する隣接動きベクトルと、対象ブロックに対応する位置にある参照ピクチャ上のブロックを分割して得られる点の動きベクトルを用いて上記サブブロックの動きベクトルを導出するSTMVP予測手段であることを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、対象ブロック単位でマッチングによりブロック単位の動きベクトルを導出し、さらに上記サブブロック単位で上記ブロック単位の動きベクトルを初期動きベクトルとしてマッチングによる動きベクトルを導出するマッチング予測手段であることを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、ブロックの代表動きベクトルを導出し、ブロックの代表動きベクトルからの差分値が所定の範囲に入るように、各サブブロックの動きベクトルをクリップすることを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、ブロックの代表動きベクトルを導出し、ブロックの代表動きベクトルからの差分値が所定の範囲に入るように、各サブブロックの動きベクトルをクリップすることを特徴とする。
 本発明の一態様に係る動画像復号装置は、マッチング処理により対象ブロックの動きベクトルを導出するマッチング予測部を備え、上記マッチング予測部は、ブロックのサイズに応じてサーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記マッチング予測部は、ブロックのサイズと第1の定数との積に第2の定数を加算、減算した結果を、第3の定数でのシフトする演算を含む処理により、サーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記マッチング予測部は、ブロックのサイズに応じてテーブル参照によりサーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記マッチング予測部は、ブロックの幅と高さの最小値に応じて、サーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記マッチング予測部は、ブロックの幅と高さの最小値と最大値の重み付平均に応じて、サーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置は、マッチング処理により対象ブロックの動きベクトルを導出し、補間画像生成のタップ数を選択するマッチング予測部を備え、上記マッチング予測部は、ブロックのサイズに応じて上記補間画像生成のタップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置は、マッチング処理により対象ブロックの動きベクトルを導出し、補間画像生成のタップ数を選択するマッチング予測部を備え、上記マッチング予測部は、サーチレンジもしくはサーチの最大ステップ数に応じて上記補間画像生成のタップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、マッチング処理により対象ブロックの動きベクトルを導出し、補間画像生成のタップ数を選択するマッチング予測部を備え、上記マッチング予測部は、上記補間画像生成のタップ数に応じて、サーチレンジもしくはサーチの最大ステップ数を設定することを特徴とする。
 本発明の一態様に係る動画像復号装置は、対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく補間画像PredC(第1の補間画像)を隣接ブロックの動きパラメータに基づく補間画像PredRN(第2の補間画像)で補正する処理(補間画像補正)を行うOBMC予測部を備え、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTU(符号化ツリーユニット)とは異なるCTUに属する場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUと等しい場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記OBMC予測部は、対象ブロックに属するサブブロックの左側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックの左側の動きパラメータに基づく補間画像PredRNを用いて補正せず、対象ブロックに属するサブブロックの左側が、対象ブロックの属するCTUとは等しい場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記OBMC予測部は、対象ブロックまたはサブブロックが小サイズの場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正せず、それ以外の場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記OBMC予測部は、対象サブブロックが小サイズの場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正せず、それ以外の場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記OBMC予測部は、対象ブロック内のサブブロックの動きベクトルの差分が大きい場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正せず、それ以外の場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記OBMC予測部は、対象ブロック内のサブブロックの動きベクトルが所定の導出方法の場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正せず、それ以外の場合には、参照ブロックの動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
 本発明の一態様に係る動画像復号装置は、対象ブロックを複数のサブブロックに分割し、サブブロック単位の動きベクトルを導出するサブブロック予測手段と、上記導出された動きベクトルを用いて補間画像を生成する予測画像生成部とを備え、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合か否かに応じて、動きベクトルを導出することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合に、サブブロックサイズに第1のサイズを設定し、それ以外の場合には、第2のサイズを設定することを特徴とする。
 本発明の一態様に係る動画像復号装置において、上記サブブロック予測手段は、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックサイズを統合して動きパラメータを導出することを特徴とする。
 本発明の一態様に係る動画像符号化装置は、対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく補間画像PredCを隣接ブロックの動きパラメータに基づく補間画像PredRNで補正する処理(補間画像補正)を行うOBMC予測部を備え、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUとは異なるCTUに属する場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属するCTUと等しい場合には、サブブロックの上側の動きパラメータに基づく補間画像PredRNを用いて補正することを特徴とする。
  (ソフトウェアによる実現例)
 なお、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、動画像符号化装置11、動画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
 また、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。動画像符号化装置11、動画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
 以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。
  〔応用例〕
 上述した動画像符号化装置11及び動画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
 まず、上述した動画像符号化装置11及び動画像復号装置31を、動画像の送信及び受信に利用できることを、図28を参照して説明する。
 図28(a)は、動画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図28(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した動画像符号化装置11は、この符号化部PROD_A1として利用される。
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部PRED_A7を更に備えていてもよい。図28(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。
 図28(b)は、動画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図28(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した動画像復号装置31は、この復号部PROD_B3として利用される。
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図28(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。
 次に、上述した動画像符号化装置11及び動画像復号装置31を、動画像の記録及び再生に利用できることを、図29を参照して説明する。
 図29(a)は、上述した動画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図29(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置11は、この符号化部PROD_C1として利用される。
 なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図29(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4または受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5または画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3または受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。
 図29(b)は、上述した動画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図29(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置31は、この復号部PROD_D2として利用される。
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図29(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部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の一例である。
  (ハードウェア的実現およびソフトウェア的実現)
 また、上述した動画像復号装置31および動画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray (登録商標)Disc)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(FieldProgrammable Gate Array)等の論理回路類などを用いることができる。
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを、通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services DigitalNetwork)、VAN(Value-Added Network)、CATV(Community Antenna television/CableTelevision)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital SubscriberLine)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(登録商標)(Digital Living Network Alliance)、携帯電話
網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。
 本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
(関連出願の相互参照)
 本出願は、2017年11月13日に出願された日本国特許出願:特願2017-218056、および、2017年12月19日に出願された日本国特許出願:特願2017-242466に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
 本発明の実施形態は、画像データが符号化された符号化データを復号する動画像復号装置、および、画像データが符号化された符号化データを生成する動画像符号化装置に好適に適用することができる。また、動画像符号化装置によって生成され、動画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。
41 動画像表示装置
31 動画像復号装置
11 動画像符号化装置
3037 サブブロック予測パラメータ導出部(サブブロック予測手段、動きベクトル導出装置)
30371 時空間サブブロック予測部(ATMVP予測手段、STMVP予測手段)
30372 アフィン予測部 (アフィン予測手段)
30373 マッチング動き導出部 (マッチング予測手段、動きベクトル導出装置)
30374 OBMC予測部

Claims (11)

  1.  対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく第1の補間画像を隣接ブロックの動きパラメータに基づく第2の補間画像で補正する処理を行うOBMC予測部を備える動画像復号装置において、
     対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットとは異なる符号化ツリーユニットに属する場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットと等しい場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正することを特徴とする動画像復号装置。
  2.  上記OBMC予測部は、対象ブロックまたはサブブロックが小サイズの場合には、参照ブロックの動きパラメータに基づく第2の補間画像を用いて補正せず、それ以外の場合には、参照ブロックの動きパラメータに基づく第2の補間画像を用いて補正することを特徴とする請求項1に記載の動画像復号装置。
  3.  対象ブロックを複数のサブブロックに分割し、サブブロック単位の動きベクトルを導出するサブブロック予測手段と、
     導出された上記動きベクトルを用いて補間画像を生成する予測画像生成部とを備える動画像復号装置において、
     対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットとは異なる符号化ツリーユニットに属するか否かに応じて、動きベクトルを導出することを特徴とする動画像復号装置。
  4.  対象ブロックをサブブロックに分割し、サブブロック単位で対象ブロックの動きパラメータに基づく第1の補間画像を隣接ブロックの動きパラメータに基づく第2の補間画像で補正する処理を行うOBMC予測部を備える動画像符号化装置において、
     対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットとは異なる符号化ツリーユニットに属する場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正せず、対象ブロックに属するサブブロックの上側が、対象ブロックの属する符号化ツリーユニットと等しい場合には、サブブロックの上側の動きパラメータに基づく第2の補間画像を用いて補正することを特徴とする動画像符号化装置。
  5.  対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償予測を行う動画像復号装置において、
     対象サブブロックのインター予測パラメータに基づいて対象サブブロックの第1の補間画像を生成する第1の予測手段と、
     隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの第2の補間画像を生成する第2の予測手段と、
     前記第1の補間画像と前記第2の補間画像の重み付加算処理により、予測画像を生成する予測画像生成手段とを備え、
     前記第2の予測手段は、所定の条件を満たす場合、前記対象サブブロックの右および下方向境界のオーバーラップ動き補償処理を禁止し、前記対象サブブロックの右および下方向の予測画像として前記第1の補間画像を設定することを特徴とする動画像復号装置。
  6.  前記所定の条件は、前記対象サブブロックのサイズが第1の所定値よりも小さい場合であることを特徴とする請求項5に記載の動画像復号装置。
  7.  前記所定の条件は、前記対象サブブロックのサイズが第1の所定値よりも小さく、かつ、前記対象サブブロックと隣接サブブロックとの動きベクトルの差分が第2の所定値よりも大きい場合であることを特徴とする請求項5に記載の動画像復号装置。
  8.  前記所定の条件は、サブブロックの上側または下側境界が符号化ツリーユニットの境界と重なる場合であることを特徴とする請求項5に記載の動画像復号装置。
  9.  対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償予測を行う動画像符号化装置において、
     対象サブブロックのインター予測パラメータに基づいて対象サブブロックの第1の補間画像を生成する第1の予測手段と、
     隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの第2の補間画像を生成する第2の予測手段と、
     前記第1の補間画像と前記第2の補間画像の重み付加算処理により、予測画像を生成する予測画像生成手段とを備え、
     前記第2の予測手段は、所定の条件を満たす場合、前記対象サブブロックの右および下方向境界のオーバーラップ動き補償処理を禁止し、前記対象サブブロックの右および下方向の予測画像として前記第1の補間画像を設定することを特徴とする動画像符号化装置。
  10.  対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償予測を行う動画像復号装置において、
     対象サブブロックのインター予測パラメータに基づいて対象サブブロックの第1の補間画像を生成する第1の予測手段と、
     隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの第2の補間画像を生成する第2の予測手段と、
     前記第1の補間画像と前記第2の補間画像の重み付加算処理により予測画像を生成する予測画像生成手段とを備え、
     前記第2の予測手段は、前記第1の予測手段と前記第2の予測手段が、アフィン予測を使用していない場合、オーバーラップ動き補償処理を禁止し、前記対象サブブロックの予測画像として前記第1の補間画像を設定することを特徴とする動画像復号装置。
  11.  対象サブブロックと隣接サブブロックのインター予測パラメータに基づいて、サブブロック境界の予測画像を生成するオーバーラップ動き補償予測を行う動画像符号化装置において、
     対象サブブロックのインター予測パラメータに基づいて対象サブブロックの第1の補間画像を生成する第1の予測手段と、
     隣接サブブロックのインター予測パラメータに基づいて対象サブブロックの第2の補間画像を生成する第2の予測手段と、
     前記第1の補間画像と前記第2の補間画像の重み付加算処理により予測画像を生成する予測画像生成手段とを備え、
     前記第2の予測手段は、前記第1の予測手段と前記第2の予測手段が、アフィン予測を使用していない場合、オーバーラップ動き補償処理を禁止し、前記対象サブブロックの予測画像として前記第1の補間画像を設定することを特徴とする動画像符号化装置。
PCT/JP2018/042009 2017-11-13 2018-11-13 動画像符号化装置および動画像復号装置 WO2019093523A1 (ja)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2017-218056 2017-11-13
JP2017218056A JP2021016018A (ja) 2017-11-13 2017-11-13 動画像符号化装置、動画像復号装置および動きベクトル導出装置
JP2017242466A JP2021016021A (ja) 2017-12-19 2017-12-19 動画像符号化装置、動画像復号装置および動きベクトル導出装置
JP2017-242466 2017-12-19

Publications (1)

Publication Number Publication Date
WO2019093523A1 true WO2019093523A1 (ja) 2019-05-16

Family

ID=66438051

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/042009 WO2019093523A1 (ja) 2017-11-13 2018-11-13 動画像符号化装置および動画像復号装置

Country Status (1)

Country Link
WO (1) WO2019093523A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016123068A1 (en) * 2015-01-26 2016-08-04 Qualcomm Incorporated Overlapped motion compensation for video coding
WO2017165375A1 (en) * 2016-03-21 2017-09-28 Qualcomm Incorporated Decoding video data using a two-level multi-type-tree framework

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016123068A1 (en) * 2015-01-26 2016-08-04 Qualcomm Incorporated Overlapped motion compensation for video coding
WO2017165375A1 (en) * 2016-03-21 2017-09-28 Qualcomm Incorporated Decoding video data using a two-level multi-type-tree framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUANBANG CHEN: "Harmonization of AFFINE, OBMC and DBF", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-B0038_RL, 2ND MEETING, vol. 02, 2016, San Diego, USA, pages 1 - 4 *
JIANLE CHEN ET AL.: "Algorithm Description of Joint Exploration Test Model 7 (JEM 7", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-G1001-V1, 7TH MEETING, August 2017 (2017-08-01), Torino, IT, pages 16 - 17 *

Similar Documents

Publication Publication Date Title
JP7421586B2 (ja) 復号装置および符号化装置
JP7223886B2 (ja) 画像復号方法
WO2019004283A1 (ja) 動画像符号化装置及び動画像復号装置
WO2019054300A1 (ja) 画像符号化装置及び画像復号装置
CN110574374B (zh) 图像解码装置
JP2021016016A (ja) 動画像符号化装置及び動画像復号装置
WO2018116802A1 (ja) 画像復号装置、画像符号化装置、及び画像予測装置
WO2019139013A1 (ja) 動きベクトル導出装置、動画像復号装置および動画像符号化装置
JP2021010046A (ja) 画像符号化装置及び画像復号装置
WO2018230493A1 (ja) 動画像復号装置、動画像符号化装置、予測画像生成装置及び動きベクトル導出装置
WO2020184487A1 (ja) 動画像復号装置
WO2020116456A1 (ja) 動画像復号装置
WO2018110180A1 (ja) 動きベクトル生成装置、予測画像生成装置、動画像復号装置、および動画像符号化装置
JP2020043500A (ja) 動画像符号化装置及び動画像復号装置
JP2020145650A (ja) 画像復号装置および画像符号化装置
JP2020088660A (ja) 動画像符号化装置、動画像復号装置
WO2018061550A1 (ja) 画像復号装置及び画像符号化装置
JP2020108012A (ja) 画像復号装置および画像符号化装置
JP2021016018A (ja) 動画像符号化装置、動画像復号装置および動きベクトル導出装置
WO2019093523A1 (ja) 動画像符号化装置および動画像復号装置
JP2021057621A (ja) 動画像符号化装置、動画像復号装置および予測画像生成装置
WO2019131349A1 (ja) 画像復号装置、画像符号化装置
JP2020145486A (ja) 動画像符号化装置及び動画像復号装置
JP2020022116A (ja) 動画像符号化装置及び動画像復号装置
JP2020145488A (ja) 動画像符号化装置及び動画像復号装置

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: 18875654

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: 18875654

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP