Image decoding device, image encoding device, and recording medium

The image decoding and encoding devices manage MMVD mode availability through flags and indices, enhancing coding efficiency by addressing the limited merge candidate options in existing video coding methods.

JP7714762B2Active Publication Date: 2025-07-29SHARP KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024174470
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-07-24
Filing Date
2024-10-03
Publication Date
2025-07-29
Estimated Expiration
2040-07-21

AI Technical Summary

Technical Problem

In existing video coding methods, the MMVD mode is not available, leading to a limited number of merge candidate options and decreased coding efficiency.

Method used

An image decoding apparatus and encoding device that manage MMVD mode availability through flags and indices, ensuring efficient decoding and encoding of inter prediction parameters by checking MMVD available flags and adjusting merge indices based on candidate availability.

Benefits of technology

Enhances coding efficiency by managing MMVD mode effectively, addressing the issue of limited merge candidates and improving overall video coding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007714762000001
    Figure 0007714762000001
  • Figure 0007714762000002
    Figure 0007714762000002
  • Figure 0007714762000003
    Figure 0007714762000003
Patent Text Reader

Abstract

To provide an image decoding device, an image coding device, and a recording medium, capable of selectively using a marge mode even in the case where an MMVD mode cannot be used.SOLUTION: An image decoding device checks an MMVD available flag indicating whether or not an MMVD mode is in valid in the case where a value of a regular marge flag indicating whether or not a regular marge mode is used in an inter prediction is one, decodes an MMVD marge flag indicating whether or not the MMVD is used to generation an inter-prediction parameter of an objective coding unit in the case where the value of the MMVD available flag is one, estimates the MMVD marge flag in the case where the value of the MMVD available flag is 0, decodes a marge index that is an index of a marge candidate list in the case where the value of the MMVD available flag is 0 and the number of marge candidates is larger than 1, and estimates the value of the marge index to 0 in the case where the value of the MMVD available flag is 0 and the number of the marge candidates is 1 or less.SELECTED DRAWING: Figure 19
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] FIELD Embodiments of the present invention relate to an image decoding device, an image encoding device, and a recording medium. [Background technology]

[0002] In order to efficiently transmit or record moving images, a moving image encoding device is used that generates encoded data by encoding moving images, and a moving image decoding device is used that generates a decoded image by decoding the encoded data.

[0003] Specific video encoding methods include, for example, H.264 / AVC and HEVC (High-Efficiency Video Coding) methods.

[0004] In such a video coding method, images (pictures) constituting a video are managed in a hierarchical structure consisting of slices obtained by dividing images, coding tree units (CTUs) obtained by dividing slices, coding units (sometimes called coding units: CUs) obtained by dividing coding tree units, and transform units (TUs) obtained by dividing coding units, and are coded / decoded for each CU.

[0005] In such a video coding method, a predicted image is usually generated based on a locally decoded image obtained by encoding / decoding an input image, and a prediction error (sometimes called a "difference image" or "residual image") obtained by subtracting the predicted image from the input image (original image) is coded. Methods for generating a predicted image include inter-prediction and intra-prediction.

[0006] In Non-Patent Document 1, a technique is disclosed in which a regular merge flag is introduced, and the inter-prediction mode from the encoded data is divided into two groups: 1) merge mode, merge plus distance mode (MMVD mode), and 2) intra-inter mode (CIIP mode), triangle mode, and then selected.

Prior Art Documents

Non-Patent Documents

[0007]

Non-Patent Document 1

Non-Patent Document 2

Summary of the Invention

Problems to be Solved by the Invention

[0008] In Non-Patent Document 1, when the MMVD mode is not available, there is a problem that the number of merge candidate options is small and the coding efficiency decreases.

Means for Solving the Problems

[0009] In order to solve the above problems, an image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes parameters for generating a predicted image, and decodes a regular merge flag indicating whether the regular merge mode is used in inter prediction from merge data, and decodes an MMVD merge flag indicating whether the MMVD mode is used for generating inter prediction parameters of a target coding unit from the merge data, and includes a parameter decoding unit that decodes a merge index that is an index of a merge candidate list from the merge data, and when the value of the regular merge flag is 1, the parameter decoding unit checks an MMVD available flag indicating whether the MMVD mode is valid, which is notified in a sequence parameter set, and when the value of the MMVD available flag is 1, decodes the MMVD merge flag, and when the value of the MMVD available flag is 0, estimates the MMVD merge flag, and when the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1, decodes the merge index, and when the value of the MMVD available flag is 0 and the number of merge candidates is 1 or less, estimates the value of the merge index to be 0.

[0010] An image encoding device according to an aspect of the present invention is an image encoding device that encodes parameters for generating a predicted image. The device encodes a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data, encodes an MMVD merge flag indicating whether an MMVD mode is used for generating inter prediction parameters of a target encoding unit from the merge data, and includes a parameter encoding unit that encodes a merge index which is an index of a merge candidate list from the merge data. When the value of the regular merge flag is 1, the parameter encoding unit checks an MMVD available flag indicating whether the MMVD mode is valid, which is notified in a sequence parameter set. When the value of the MMVD available flag is 1, the parameter encoding unit encodes the MMVD merge flag. When the value of the MMVD available flag is 0, the parameter encoding unit sets the MMVD merge flag. When the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1, the parameter encoding unit encodes the merge index. When the value of the MMVD available flag is 0 and the number of merge candidates is 1 or less, the parameter encoding unit sets the value of the merge index to 0.

[0011] A recording medium according to an aspect of the present invention is a computer-readable recording medium recording a program for causing a computer to decode parameters for generating a prediction image, wherein the program causes the computer to perform the steps of: decoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; checking an MMVD available flag indicating whether an MMVD mode notified in a sequence parameter set is effective when the value of the regular merge flag is 1; decoding an MMVD merge flag indicating whether the MMVD mode is used for generating inter prediction parameters of a target coding unit when the value of the MMVD available flag is 1; estimating the MMVD merge flag when the value of the MMVD available flag is 0; decoding a merge index which is an index of a merge candidate list when the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1; and estimating the value of the merge index to be 0 when the value of the MMVD available flag is 0 and the number of merge candidates is 1 or less.

[0012] A computer-readable recording medium according to an aspect of the present invention records a program for causing a computer to encode parameters for generating a predicted image. The program causes the computer to perform steps of: encoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; checking an MMVD available flag indicating whether an MMVD mode is effective, which is notified in a sequence parameter set, when the value of the regular merge flag is 1; encoding an MMVD merge flag indicating whether the MMVD mode is used for generating inter prediction parameters of a target encoding unit when the value of the MMVD available flag is 1; setting the MMVD merge flag when the value of the MMVD available flag is 0; encoding a merge index, which is an index of a merge candidate list, when the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1; and setting the value of the merge index to 0 when the value of the MMVD available flag is 0 and the number of merge candidates is 1 or less.

Effect of the Invention

[0013] According to an aspect of the present invention, the above problem can be solved.

Brief Description of the Drawings

[0014]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Mode for Carrying Out the Invention

[0015] (First Embodiment) Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[0016] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to the present embodiment.

[0017] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding a target image and decodes the transmitted encoded stream to display an image. The image transmission system 1 includes a moving image encoding device (image encoding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41.

[0018] An image T is input to the moving image encoding device 11.

[0019] The network 21 transmits the encoded stream Te generated by the moving image encoding device 11 to the moving image decoding device 31. The network 21 is the Internet, a wide area network (WAN: Wide Area Network), a local area network (LAN: Local Area Network), or a combination thereof. The network 21 is not necessarily limited to a bidirectional communication network and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. Further, the network 21 may be replaced by a storage medium that records the encoded stream Te such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).

[0020] The moving image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td obtained by decoding.

[0021] The video display device 41 displays all or part of one or more decoded images Td generated by the video decoding device 31. The video display device 41 includes a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. The display may be in the form of a stationary display, a mobile display, an HMD, or the like. If the video decoding device 31 has high processing power, it displays high-quality images, and if it has only low processing power, it displays images that do not require high processing power or display power.

[0022] <operator> The operators used in this specification are listed below.

[0023] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, |= is the OR assignment operator, and || indicates logical sum.

[0024] x?y:z is a ternary operator that takes y if x is true (non-zero) and z if x is false (zero).

[0025] Clip3(a,b,c) is a function that clips c to a value between a and b, and<aの場合にはaを返し、c> A function that returns b if a<=b, and returns c otherwise (where a<=b).

[0026] abs(a) is a function that returns the absolute value of a.

[0027] Int(a) is a function that returns the integer value of a.

[0028] floor(a) is a function that returns the largest integer less than or equal to a.

[0029] ceil(a) is a function that returns the smallest integer greater than or equal to a.

[0030] a / d represents the division of a by d (rounded down to the nearest integer).

[0031] <Structure of the coded stream Te> Before proceeding to a detailed description of the video encoding device 11 and video decoding device 31 according to this embodiment, the data structure of the encoded stream Te generated by the video encoding device 11 and decoded by the video decoding device 31 will be described.

[0032] Fig. 4 is a diagram showing a hierarchical structure of data in a coded stream Te. The coded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (a) to (f) of Fig. 4 show a coded video sequence that defines the sequence SEQ, a coded picture that defines the picture PICT, a coded slice that defines the slice S, coded slice data that defines the slice data, a coding tree unit included in the coded slice data, and a coding unit included in the coding tree unit, respectively.

[0033] (Coded Video Sequence) The coded video sequence defines a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed. As shown in Fig. 4, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).

[0034] The video parameter set VPS specifies a set of coding parameters common to multiple videos composed of multiple layers, as well as a set of coding parameters related to multiple layers included in the video and each individual layer.

[0035] The sequence parameter set SPS defines a set of coding parameters that the video decoding device 31 references to decode the target sequence. For example, the width and height of a picture are defined. Note that there may be multiple SPSs. In this case, one of the multiple SPSs is selected from the PPS.

[0036] The picture parameter set PPS defines a set of coding parameters that the video decoding device 31 references to decode each picture in the target sequence. For example, the picture parameter set PPS includes a reference value of the quantization width used in decoding the picture (pic_init_qp_minus26) and a flag indicating the application of weighted prediction (weighted_pred_flag). Note that there may be multiple PPSs. In this case, one of the multiple PPSs is selected for each picture in the target sequence.

[0037] (encoded picture) A coded picture defines a set of data that the video decoding device 31 refers to in order to decode a picture PICT to be processed. As shown in Fig. 4, the picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).

[0038] In the following description, when there is no need to distinguish between slices 0 to NS-1, the subscripts of the symbols may be omitted. This also applies to other data that are included in the coded stream Te described below and have subscripts.

[0039] (encoded slice) A coded slice defines a set of data that the video decoding device 31 refers to in order to decode a target slice S. As shown in Fig. 4, a slice includes a slice header and slice data.

[0040] The slice header includes a group of coding parameters that the moving image decoding device 31 refers to in order to determine the decoding method of the target slice. The slice type specification information (slice_type) that specifies the slice type is an example of the coding parameters included in the slice header.

[0041] Examples of slice types that can be specified by the slice type specification information include: (1) an I slice that uses only intra prediction during encoding; (2) a P slice that uses either uni-directional prediction or intra prediction during encoding; (3) a B slice that uses uni-directional prediction, bi-directional prediction, or intra prediction during encoding, etc. Note that inter prediction is not limited to uni-prediction and bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, when referring to P and B slices, it refers to a slice including a block that can use inter prediction.

[0042] Note that the slice header may include a reference (pic_parameter_set_id) to the picture parameter set PPS.

[0043] (Encoded slice data) The encoded slice data defines a set of data that the moving image decoding device 31 refers to in order to decode the slice data to be processed. As shown in FIG. 4(d), the slice data includes CTUs. A CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes also referred to as the largest coding unit (LCU).

[0044] (Coding tree unit) FIG. 4 defines a set of data that the moving image decoding apparatus 31 refers to in order to decode a CTU to be processed. The CTU is divided into coding units (CUs), which are the basic units of the encoding process, by recursive quadtree partitioning (QT (Quad Tree) partitioning), binary tree partitioning (BT (Binary Tree) partitioning), or ternary tree partitioning (TT (Ternary Tree) partitioning). The combination of BT partitioning and TT partitioning is called multi-tree partitioning (MT (Multi Tree) partitioning). Nodes of the tree structure obtained by recursive quadtree partitioning are called coding nodes. Intermediate nodes of the quadtree, binary tree, and ternary tree are coding nodes, and the CTU itself is defined as the topmost coding node.

[0045] For CT, as CT information, it includes a CU partitioning flag (split_cu_flag) indicating whether to perform CT partitioning, a QT partitioning flag (qt_split_cu_flag) indicating whether to perform QT partitioning, an MT partitioning direction (mtt_split_cu_vertical_flag) indicating the partitioning direction of MT partitioning, and an MT partitioning type (mtt_split_cu_binary_flag) indicating the partitioning type of MT partitioning. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each coding node.

[0046] When split_cu_flag is 1 and qt_split_cu_flag is 1, the coding node is divided into four coding nodes (FIG. 5(b)).

[0047] When split_cu_flag is 0, the coding node is not divided and has one CU as a node (FIG. 5(a)). The CU is the terminal node of the coding node and is not further divided. The CU is the basic unit of the encoding process.

[0048] When split_cu_flag is 1 and qt_split_cu_flag is 0, the encoding node is MT split as follows. When mtt_split_cu_binary_flag is 1 and mtt_split_cu_vertical_flag is 0, the encoding node is horizontally split into two encoding nodes (Figure 5(d)). When mtt_split_cu_vertical_flag is 1, the encoding node is vertically split into two encoding nodes (Figure 5(c)). Also, when mtt_split_cu_binary_flag is 0, and mtt_split_cu_vertical_flag is 0, the encoding node is horizontally split into three encoding nodes (Figure 5(f)). When mtt_split_cu_vertical_flag is 1, the encoding node is vertically split into three encoding nodes (Figure 5(e)). These are shown in Figure 5(g).

[0049] Also, when the CTU size is 64x64 pixels, the CU size can be any of 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, and 4x4 pixels.

[0050] Trees different for luminance and color difference may be used. The type of tree is indicated by treeType. For example, when a common tree is used for luminance (Y, cIdx = 0) and color difference (Cb / Cr, cIdx = 1, 2), the common single tree is indicated by treeType = SINGLE_TREE. When two different trees (DUAL tree) are used for luminance and color difference, the luminance tree is indicated by treeType = DUAL_TREE_LUMA, and the color difference tree is indicated by treeType = DUAL_TREE_CHROMA.

[0051] (Encoding Unit) FIG. 4 defines a set of data that a moving image decoding apparatus 31 refers to in order to decode an encoding unit to be processed. Specifically, a CU is composed of a CU header CUH, prediction parameters, conversion parameters, quantization conversion coefficients, etc. The prediction mode and the like are defined in the CU header.

[0052] The prediction process may be performed in units of CUs or in units of sub-CUs obtained by further dividing a CU. When the sizes of a CU and a sub-CU are equal, there is one sub-CU in the CU. When a CU is larger than the size of a sub-CU, the CU is divided into sub-CUs. For example, when a CU is 8x8 and a sub-CU is 4x4, the CU is divided into four sub-CUs that are horizontally divided into two and vertically divided into two.

[0053] There are two types of prediction (prediction modes): intra prediction and inter prediction. Intra prediction is prediction within the same picture, and inter prediction refers to a prediction process performed between different pictures (for example, between display times, between layer images).

[0054] The conversion and quantization processes are performed in units of CUs, but the quantization conversion coefficients may be entropy encoded in units of sub-blocks such as 4x4.

[0055] (Prediction Parameters) The predicted image is derived by prediction parameters associated with the block. The prediction parameters include intra prediction parameters and inter prediction parameters.

[0056] The prediction parameters for inter prediction will be described below. The inter prediction parameters are composed of the prediction list usage flags predFlagL0 and predFlagL1, the reference picture indices refIdxL0 and refIdxL1, and the motion vectors mvL0 and mvL1. predFlagL0 and predFlagL1 are flags indicating whether the reference picture lists (L0 list, L1 list) are used. When the value is 1, the corresponding reference picture list is used. In this specification, when it is described as "a flag indicating whether XX", if the flag is other than 0 (for example, 1), it is considered that XX is the case, and if the flag is 0, it is considered that XX is not the case. In logical negation, logical product, etc., 1 is treated as true and 0 is treated as false (the same applies hereinafter). However, in actual devices and methods, other values can also be used as true values and false values.

[0057] Syntax elements for deriving inter prediction parameters include, for example, the affine flag affine_flag used in the merge mode, the merge flag merge_flag, the merge index merge_idx, the MMVD flag mmvd_flag, the inter prediction identifier inter_pred_idc for selecting a reference picture used in the AMVP mode, the reference picture index refIdxLX, the prediction vector index mvp_LX_idx for deriving a motion vector, the differential vector mvdLX, and the motion vector precision mode amvr_mode.

[0058] (Reference Picture List) The reference picture list is a list consisting of reference pictures stored in the reference picture memory 306. FIG. 6 is a conceptual diagram showing an example of a reference picture and a reference picture list. In FIG. 6(a), the rectangle represents a picture, the arrow represents the reference relationship between pictures, the horizontal axis represents time, I, P, and B in the rectangle represent an intra picture, a single-predicted picture, and a bi-predicted picture respectively, and the numbers in the rectangle indicate the decoding order. As shown in the figure, the decoding order of the pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, P1. FIG. 6(b) shows an example of the reference picture list of the picture B3 (target picture). The reference picture list is a list representing candidates for reference pictures, and one picture (slice) may have one or more reference picture lists. In the example of the figure, the target picture B3 has two reference picture lists, the L0 list RefPicList0 and the L1 list RefPicList1. For each individual CU, refIdxLX is used to specify which picture in the reference picture list RefPicListX (X = 0 or 1) is actually referenced. The figure shows an example where refIdxL0 = 2 and refIdxL1 = 0. Note that LX is a description method used when not distinguishing between L0 prediction and L1 prediction. Hereinafter, by replacing LX with L0 and L1, the parameters for the L0 list and the parameters for the L1 list are distinguished.

[0059] (Merge Prediction and AMVP Prediction) The decoding (encoding) method of prediction parameters includes a merge prediction mode and an AMVP (Advanced Motion Vector Prediction) mode, and merge_flag is a flag for identifying these. The merge prediction mode is a mode that derives the prediction parameters of a target block from the prediction parameters of neighboring blocks that have already been processed without including the prediction list usage flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. The AMVP mode is a mode that includes inter_pred_idc, refIdxLX, and mvLX in the encoded data. Note that mvLX is encoded as an mvp_LX_idx for identifying the prediction vector mvpLX and a differential vector mvdLX. In addition to the merge prediction mode, there may be an affine prediction mode and an MMVD prediction mode.

[0060] inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of the values PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate single prediction using one reference picture managed in the L0 list and the L1 list, respectively. PRED_BI indicates bi-prediction using two reference pictures managed in the L0 list and the L1 list.

[0061] merge_idx is an index indicating which prediction parameter among the prediction parameter candidates (merge candidates) derived from the blocks for which the processing has been completed is to be used as the prediction parameter of the target block.

[0062] (Motion Vector) mvLX indicates the shift amount between blocks on two different pictures. The prediction vector and the differential vector regarding mvLX are called mvpLX and mvdLX, respectively.

[0063] (Inter-prediction identifier inter_pred_idc and prediction list usage flag predFlagLX) The relationship between inter_pred_idc, predFlagL0, and predFlagL1 is as follows and they are mutually convertible.

[0064] inter_pred_idc = (predFlagL1<<1)+predFlagL0 predFlagL0 = inter_pred_idc & 1 predFlagL1 = inter_pred_idc >> 1 Note that for the inter prediction parameters, either the prediction list usage flag or the inter prediction identifier may be used. Also, the determination using the prediction list usage flag may be replaced by the determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced by the determination using the prediction list usage flag.

[0065] (Determination of bi - prediction) The flag biPred indicating whether it is a bi - prediction can be derived based on whether both of the two prediction list usage flags are 1. For example, it can be derived by the following formula.

[0066] biPred = (predFlagL0==1 && predFlagL1==1) Alternatively, biPred can also be derived based on whether the inter prediction identifier indicates a value that uses two prediction lists (reference pictures). For example, it can be derived by the following formula.

[0067] biPred = (inter_pred_idc==PRED_BI)? 1 : 0 (Intra prediction parameters) The intra prediction parameters are described below. The intra prediction parameters are composed of the luminance prediction mode IntraPredModeY and the chrominance prediction mode IntraPredModeC. For example, planar prediction (0), DC prediction (1), Angular prediction (others). Furthermore, for chrominance, the CCLM mode (81 - 83) may be added.

[0068] (Configuration of video decoding device) The configuration of a video decoding device 31 (FIG. 7) according to this embodiment will be described.

[0069] The video decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, an inverse quantization and inverse transform unit 311, an adder 312, and a prediction parameter derivation unit 320. Note that the video decoding device 31 may also be configured without including the loop filter 305, in accordance with the video coding device 11 described below.

[0070] The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022 (prediction mode decoding unit), and the CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice header (slice information) from the encoded data. The CT information decoding unit 3021 decodes the CT from the encoded data. The CU decoding unit 3022 decodes the CU from the encoded data. The TU decoding unit 3024 decodes QP update information (quantization correction value) and quantization prediction error (residual_coding) from the encoded data when a prediction error is included in the TU.

[0071] In cases other than the skip mode (skip_mode==0), the TU decoding unit 3024 decodes the QP update information and the quantized prediction error from the encoded data. More specifically, in cases of skip_mode==0, the TU decoding unit 3024 decodes a flag cu_cbp indicating whether or not the current block includes a quantized prediction error, and decodes the quantized prediction error when cu_cbp is 1. When cu_cbp does not exist in the encoded data, it derives 0.

[0072] The TU decoding unit 3024 decodes an index mts_idx indicating a transformation base from the coded data. The TU decoding unit 3024 also decodes an index stIdx indicating the use of a secondary transformation and a transformation base from the coded data. When stIdx is 0, it indicates no application of a secondary transformation, when it is 1, it indicates one transformation of a set (pair) of secondary transformation bases, and when it is 2, it indicates the other transformation of the pair.

[0073] Furthermore, the TU decoding unit 3024 may decode a sub-block transform flag cu_sbt_flag. When cu_sbt_flag is 1, the CU is divided into a plurality of sub-blocks, and the residual of only one specific sub-block is decoded. Furthermore, the TU decoding unit 3024 may decode a flag cu_sbt_quad_flag indicating whether the number of sub-blocks is 4 or 2, cu_sbt_horizontal_flag indicating the division direction, and cu_sbt_pos_flag indicating a sub-block including a non-zero transform coefficient.

[0074] The predicted image generating unit 308 includes an inter predicted image generating unit 309 and an intra predicted image generating unit 310 .

[0075] The prediction parameter derivation unit 320 is configured to include an inter prediction parameter derivation unit 303 and an intra prediction parameter derivation unit 304 .

[0076] In the following, an example will be described in which CTUs and CUs are used as processing units, but this is not limiting and processing may be performed in sub-CU units. Alternatively, CTUs and CUs may be read as blocks, and sub-CUs as sub-blocks, and processing may be performed in block or sub-block units.

[0077] The entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside to decode individual codes (syntax elements). For entropy encoding, there are a method of performing variable-length encoding of syntax elements using a context (probability model) adaptively selected according to the type of syntax element and the surrounding situation, and a method of performing variable-length encoding of syntax elements using a predefined table or calculation formula. The former CABAC (Context Adaptive Binary Arithmetic Coding) stores the CABAC state of the context (the type of the dominant symbol (0 or 1) and the probability state index pStateIdx specifying the probability) in the memory. The entropy decoding unit 301 initializes all CABAC states at the beginning of a segment (tile, CTU row, slice). The entropy decoding unit 301 converts the syntax element into a binary string (Bin String) and decodes each bit of the Bin String. When using a context, a context index ctxInc is derived for each bit of the syntax element, the bit is decoded using the context, and the CABAC state of the used context is updated. Bits not using a context are decoded with equal probability (EP, bypass), and ctxInc derivation and CABAC state are omitted. The decoded syntax elements include prediction information for generating a predicted image, prediction errors for generating a differential image, and the like.

[0078] The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. The decoded code is, for example, the prediction mode predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode, etc. The control of which code to decode is performed based on the instruction of the parameter decoding unit 302.

[0079] (Basic flow) FIG. 8 is a flowchart for explaining the schematic operation of the moving image decoding apparatus 31.

[0080] (S1100: Decode Parameter Set Information) The header decoding unit 3020 decodes parameter set information such as the VPS, SPS, and PPS from the encoded data.

[0081] (S1200: Decode slice information) The header decoding unit 3020 decodes the slice header (slice information) from the encoded data.

[0082] Thereafter, the video decoding device 31 repeats the processes from S1300 to S5000 for each CTU included in the target picture to derive a decoded image of each CTU.

[0083] (S1300: Decode CTU Information) The CT information decoding unit 3021 decodes the CTU from the encoded data.

[0084] (S1400: Decode CT Information) The CT information decoding unit 3021 decodes the CT from the encoded data.

[0085] (S1500: CU Decoding) The CU decoding unit 3022 performs S1510 and S1520 to decode the CU from the encoded data.

[0086] (S1510: Decoding CU information) The CU decoding unit 3022 decodes the CU information, prediction information, the TU split flag split_transform_flag, the CU residual flags cbf_cb, cbf_cr, cbf_luma, and the like from the encoded data.

[0087] (S1520: TU information decoding) When a prediction error is included in a TU, the TU decoding unit 3024 decodes the QP update information, the quantization prediction error, and the transform index mts_idx from the coded data. Note that the QP update information is a difference value from the quantization parameter predicted value qPpred, which is a predicted value of the quantization parameter QP.

[0088] (S2000: Generation of predicted image) The predicted image generation unit 308 generates a predicted image for each block included in the current CU based on the prediction information.

[0089] (S3000: Inverse Quantization and Inverse Transformation) The inverse quantization and inverse transformation unit 311 executes inverse quantization and inverse transform processing on each TU included in the target CU.

[0090] (S4000: Generate decoded image) The addition unit 312 generates a decoded image of the current CU by adding the predicted image supplied from the predicted image generation unit 308 and the prediction error supplied from the inverse quantization and inverse transform unit 311.

[0091] (S5000: Loop filter) The loop filter 305 applies a loop filter such as a deblocking filter, SAO, or ALF to the decoded image to generate a decoded image.

[0092] (Configuration of the inter-prediction parameter derivation unit) The inter prediction parameter derivation unit 303 derives inter prediction parameters by referring to prediction parameters stored in the prediction parameter memory 307, based on the syntax elements input from the parameter decoding unit 302. The inter prediction parameter derivation unit 303 also outputs the inter prediction parameters to the inter prediction image generation unit 309 and the prediction parameter memory 307. As shown in FIG. 9 , the inter prediction parameter derivation unit 303 and its internal elements, namely, the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the affine prediction unit 30372, the MMVD prediction unit 30373, the triangle prediction unit 30377, the DMVR unit 30537, and the MV addition unit 3038, are means common to the video encoding device and the video decoding device, and therefore may be collectively referred to as a motion vector derivation unit (motion vector derivation device).

[0093] 15 is a diagram showing the flow of the process of deriving a prediction mode for inter prediction. The parameter decoding unit 302 decodes the skip flag (cu_skip_flag) (S1600).

[0094] The inter prediction parameter derivation unit 303 determines whether the skip flag is 0 (S1602).

[0095] When the skip flag is 0, the parameter decoding unit 302 decodes the merge flag (general_merge_flag) (S1604). On the other hand, when the skip flag is not 0, the inter-prediction parameter derivation unit 303 sets the merge flag to 1 (S1606).

[0096] The parameter decoding unit 302 determines whether the merge flag is 1 (S1608).

[0097] When the merge flag is 1, the parameter decoding unit 302 determines that the target block is a merge prediction, and derives information related to the merge prediction (S1610). When the merge flag is not 1, the inter-prediction parameter derivation unit 303 determines that the target block is an AMVP prediction, and derives information related to the AMVP prediction (S1612).

[0098] FIG. 16 shows the syntax of information related to the merge prediction. SYN0001 is the syntax of the merge prediction in units of sub-blocks, and SYN0002 is the syntax of the merge prediction in units of blocks. SYN0002 will be described with reference to FIG. 17.

[0099] (Syntax Decoding of Regular Merge Flag) FIG. 17 is a diagram for explaining the regular merge flag (regular_merge_flag). The regular merge flag is a flag that divides the merge prediction in the inter-prediction mode into 1) (narrow sense) merge mode, merge plus distance mode (MMVD mode), and 2) intra-inter mode (CIIP mode), triangle mode groups. By arranging a plurality (here, four) of prediction modes on the tree in a well-balanced manner, there are characteristics that the bit cost does not increase, the coding efficiency is high, the tree does not become deep, and the processing delay is small. The two modes of 1) may be collectively referred to as the regular merge mode.

[0100] (Embodiment 1) Referring to FIG. 18, the flow of the prediction mode selection process will be described. FIG. 18 is a flowchart showing the flow of the prediction mode derivation process in the parameter decoding unit 302 and the inter-prediction parameter derivation unit 303.

[0101] The parameter decoding unit 302 decodes the regular_merge_flag (S1301). When regular_merge_flag == 1 (YES in S1302), the value of sps_mmvd_enabled_flag is checked (S1303). The sps_mmvd_enabled_flag is a flag indicating whether MMVD prediction can be used, which is notified in the sequence parameter set (SPS), etc. When sps_mmvd_enabled_flag == 1, that is, when MMVD prediction is available (YES in S1303), the parameter decoding unit 302 decodes the MMVD flag (mmvd_merge_flag) from the encoded data (S1304).

[0102] When mmvd_merge_flag is 1, it indicates that the MMVD mode is used to generate the inter-prediction parameters of the target CU. When mmvd_merge_flag is 0, it indicates that the MMVD mode is not used to generate the inter-prediction parameters of the target CU. When mmvd_merge_flag is not notified, it is set to 0. For example, when sps_mmvd_enabled_flag == 0, that is, when MMVD prediction is not available, mmvd_merge_flag is set to 0.

[0103] If mmvd_merge_flag == 1, that is, when the MMVD flag indicates the MMVD mode (YES in S1305), the parameter decoding unit 302 decodes the parameters of the MMVD mode from the encoded data (S1309). Specifically, the parameter decoding unit 302 decodes mmvd_cand_flag, mmvd_distance_idx, and mmvd_direction_idx. As shown in FIG. 14(a), mmvd_cand_flag indicates which of the first and second candidates in the merge candidate list is used for MMVD prediction. mmvd_distance_idx indicates the distance of the differential vector as shown in FIG. 14(c). mmvd_direction_idx indicates the direction of the differential vector as shown in FIG. 14(d).

[0104] When the number of candidates for MMVD prediction MaxNumMergeCand is 1 or less, the inter-prediction parameter derivation unit 303 may set 0 to mmvd_cand_flag.

[0105] If mmvd_merge_flag == 0, that is, when the MMVD flag does not indicate the MMVD mode (NO in S1305), and when the number of merge candidates MaxNumMergeCand is greater than 1 (YES in S1306), the parameter decoding unit 302 decodes merge_idx (S1307).

[0106] When sps_mmvd_enabled_flag == 0 (NO in S1303), or when MaxNumMergeCand is 1 or less (NO in S1306), that is, when merge_idx does not appear, the inter-prediction parameter derivation unit 303 sets (infers) merge_idx to 0.

[0107] The inter-prediction parameter derivation unit 303 activates the MMVD prediction unit 30373 in the MMVD mode and activates the merge prediction parameter derivation unit 3036 in the merge mode.

[0108] When regular_merge_flag == 0, that is, when not in regular merge mode (NO in S1302), the parameter decoding unit 302 decodes the CIIP flag (ciip_flag) (S1310). If ciip_flag == 1 (YES in S1311), it decodes the CIIP parameters from the encoded data (S1312). In CIIP parameter decoding, merge_idx may be decoded. The inter-prediction parameter derivation unit 303 outputs these parameters to the inter-prediction image generation unit 309.

[0109] If ciip_flag == 0 (NO in S1311), the inter-prediction parameter derivation unit 303 determines that the target block is in triangle mode, and the parameter decoding unit 302 decodes the triangle parameters (S1313). For example, as triangle parameters, it may decode merge_triangle_split_dir, which is a method of splitting a CU into two, merge_triangle_idx0, which is one merge_idx of the blocks obtained by splitting the CU into two, and merge_triangle_idx1, which is the other merge_idx. In the case of triangle mode, the inter-prediction parameter derivation unit 303 activates the triangle prediction unit 30377.

[0110] In Embodiment 1, by using the regular merge flag, a plurality of prediction modes can be arranged on the tree in a well-balanced manner. As a result, the bit cost does not increase, the encoding efficiency is improved, and since the tree does not become deep, the processing delay can be reduced.

[0111] (Embodiment 2) Referring to FIGS. 19 and 20, the flow of the prediction mode derivation process in the parameter decoding unit 302 and the inter-prediction parameter derivation unit 303 according to another embodiment of the present invention will be described. FIG. 19 is a flowchart showing the flow of the prediction mode derivation process in the inter-prediction parameter derivation unit 303. FIG. 20 is a diagram showing the syntax of the prediction mode according to the present embodiment. The process corresponding to a part of the syntax of FIG. 20 is shown in FIG. 19.

[0112] In the flowchart of FIG. 19 and the syntax of FIG. 20, even when the MMVD prediction is not valid (sps_mmvd_enabled_flag = 0) due to the sps_mmvd_enabled_flag, the merge_idx is decoded, and when merge_idx = 1, prediction is performed in the merge mode.

[0113] The difference between FIG. 19 and FIG. 18 is the operation in the regular merge mode (from S1403 to S1409). Therefore, the operation of the regular merge mode will be described below. The operation when it is not in the regular merge mode is the same as that in Embodiment 1.

[0114] The inter-prediction parameter derivation unit 303 checks the value of the sps_mmvd_enabled_flag (S1403). When sps_mmvd_enabled_flag == 1, that is, when the MMVD prediction is available (YES in S1403), the parameter decoding unit 302 decodes the MMVD flag (mmvd_merge_flag) from the encoded data (S1404).

[0115] When mmvd_merge_flag == 1, that is, when the MMVD flag indicates the MMVD mode (YES in S1405), the parameter decoding unit 302 decodes the parameters of the MMVD mode from the encoded data (S1409).

[0116] When mmvd_merge_flag == 0 (NO in S1403) or sps_mmvd_enabled_flag == 0 (NO in S1405) (the MMVD flag is not in the MMVD mode), and when the number of merge candidates MaxNumMergeCand is greater than 1 (YES in S1406), the parameter decoding unit 302 decodes merge_idx (S1407).

[0117] When MaxNumMergeCand is 1 or less (NO in S1406), that is, when merge_idx does not appear, the inter prediction parameter derivation unit 303 sets (infers) merge_idx to 0.

[0118] The inter prediction parameter derivation unit 303 activates the MMVD prediction unit 30373 in the MMVD mode and activates the merge prediction parameter derivation unit 3036 in the merge mode.

[0119] In Embodiment 2, using the regular merge flag, after dividing into two groups of 1) merge mode, MMVD mode, and 2) intra - inter mode (CIIP mode), triangle mode, in the branch of 1), using sps_mmvd_enabled_flag decoded from the parameter set and mmvd_merge_flag decoded in the CU unit, it is selected whether the target CU uses MMVD prediction or is in the merge mode that does not use MMVD. And in addition to the case where mmvd_merge_flag is 0, even when sps_mmvd_enabled_flag == 0, if the number of merge candidates is greater than 1, the merge index is decoded. Therefore, even when the MMVD mode is prohibited by the upper - level syntax, the merge mode can be selectively used, achieving the effect of high coding efficiency.

[0120] When affine_flag is 1, that is, when indicating the affine prediction mode, the affine prediction unit 30372 derives the inter prediction parameter in the sub - block unit.

[0121] When mmvd_flag is 1, that is, when indicating the MMVD prediction mode, the MMVD prediction unit 30373 derives an inter-prediction parameter from the merge candidate and the difference vector derived by the merge prediction parameter derivation unit 3036.

[0122] When TriangleFlag is 1, that is, when indicating the Traiangle prediction mode, the Triangle prediction unit 30377 derives a Triangle prediction parameter.

[0123] When merge_flag is 1, that is, when indicating the merge prediction mode, merge_idx is derived and output to the merge prediction parameter derivation unit 3036.

[0124] When merge_flag is 0, that is, when indicating the AMVP prediction mode, the AMVP prediction parameter derivation unit 3032 derives mvpLX from inter_pred_idc, refIdxLX or mvp_LX_idx.

[0125] (MV addition unit) In the MV addition unit 3038, the derived mvpLX and mvdLX are added to derive mvLX.

[0126] (Affine prediction unit) The affine prediction unit 30372: 1) derives the motion vectors of two control points CP0, CP1 or three control points CP0, CP1, CP2 of the target block, 2) derives the affine prediction parameters of the target block, and 3) derives the motion vectors of each sub-block from the affine prediction parameters.

[0127] In the case of merge affine prediction, the motion vectors cpMvLX[] of each control point CP0, CP1, CP2 are derived from the motion vectors of the adjacent blocks of the target block. In the case of inter-affine prediction, the cpMvLX[] of each control point is derived from the sum of the prediction vectors of each control point CP0, CP1, CP2 and the difference vector mvdCpLX[] derived from the encoded data.

[0128] The motion vector spMvLX of each sub-block that constitutes the current block (bW*bH) is derived as the motion vector of the point (xPosCb, yPosCb) located at the center of each sub-block.

[0129] The affine prediction unit 30372 derives affine prediction parameters (mvScaleHor, mvScalerVer, dHorX, dHorY, dHorX, dVerY) of the current block from the motion vector of the control point.

[0130] The affine prediction unit 30372 derives spMvLX[i][j] (i=0, 1, 2, ..., (bW / sbW)-1, j=0, 1, 2, ..., (bH / sbH)-1) in the current block based on the affine prediction parameters of the current block.

[0131] Furthermore, at the coordinates (xSb, ySb) of the upper left block of the sub-block, spMvLX[i][j] is assigned to the mvLX in the corresponding screen.

[0132] (Merge prediction) 10(a) is a schematic diagram showing the configuration of the merge prediction parameter derivation unit 3036 according to this embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362. Note that a merge candidate includes prediction parameters (predFlagLX, mvLX, refIdxLX) and is stored in a merge candidate list. An index is assigned to each merge candidate stored in the merge candidate list according to a predetermined rule.

[0133] The merge candidate derivation unit 30361 derives merge candidates by directly using the motion vectors and refIdxLX of decoded neighboring blocks. In addition, the merge candidate derivation unit 30361 may apply a spatial merge candidate derivation process, a temporal merge candidate derivation process, a pairwise merge candidate derivation process, and a zero merge candidate derivation process, which will be described later.

[0134] As the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads out the prediction parameters stored in the prediction parameter memory 307 according to a predetermined rule and sets them as merge candidates. The method of specifying the reference picture is, for example, the prediction parameters related to each of the adjacent blocks (for example, all or part of the blocks adjacent to the left A1, right B1, upper right B0, lower left A0, and upper left B2 of the target block) within a predetermined range from the target block. Each merge candidate is called A1, B1, B0, A0, B2. Here, A1, B1, B0, A0, B2 are motion information derived from blocks including the following coordinates respectively. The positions of A1, B1, B0, A0, B2 are shown in FIG. 14(b).

[0135] A1: (xCb - 1, yCb + cbHeight - 1) B1: (xCb + cbWidth - 1, yCb - 1) B0: (xCb + cbWidth, yCb - 1) A0: (xCb - 1, yCb + cbHeight) B2: (xCb - 1, yCb - 1) Let the upper left coordinates of the target block be (xCb, yCb), the width be cbWidth, and the height be cbHeight.

[0136] As the temporal merge derivation process, the merge candidate derivation unit 30361 reads out the prediction parameters of the block C in the reference picture including the lower right CBR or the central coordinates of the target block from the prediction parameter memory 307 as the merge candidate Col and stores it in the merge candidate list mergeCandList[].

[0137] The pairwise candidate derivation unit derives the pairwise candidate avgK from the average of two merge candidates (p0Cand, p1Cand) stored in mergeCandList and stores it in mergeCandList[].

[0138] mvLXavgK[0] = (mvLXp0Cand[0]+mvLXp1Cand[0]) / 2 mvLXavgK[1] = (mvLXp0Cand[1]+mvLXp1Cand[1]) / 2 The merge candidate derivation unit 30361 derives zero merge candidates Z0, …, ZM where refIdxLX is 0…M and both the X component and Y component of mvLX are 0, and stores them in the merge candidate list.

[0139] The order of storing in mergeCandList[] is, for example, spatial merge candidates (A1, B1, B0, A0, B2), temporal merge candidate Col, pairwise candidate avgK, and zero merge candidate ZK. Note that reference blocks that are not available (such as when the block is intra predicted, etc.) are not stored in the merge candidate list. i = 0 if( availableFlagA1 ) mergeCandList[ i++ ] = A1 if( availableFlagB1 ) mergeCandList[ i++ ] = B1 if( availableFlagB0 ) mergeCandList[ i++ ] = B0 if( availableFlagA0 ) mergeCandList[ i++ ] = A0 if( availableFlagB2 ) mergeCandList[ i++ ] = B2 if( availableFlagCol ) mergeCandList[ i++ ] = Col if( availableFlagAvgK ) mergeCandList[ i++ ] = avgK if( i < MaxNumMergeCand ) mergeCandList[ i++ ] = ZK The merge candidate selection unit 30362 selects the merge candidate N indicated by merge_idx from among the merge candidates included in the merge candidate list according to the following formula.

[0140] N = mergeCandList[merge_idx] Here, N is a label indicating a merge candidate, and takes values such as A1, B1, B0, A0, B2, Col, avgK, ZK. The motion information of the merge candidate indicated by label N is indicated by (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN.

[0141] The selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN are selected as the inter prediction parameters of the target block. The merge candidate selection unit 30362 stores the inter prediction parameters of the selected merge candidate in the prediction parameter memory 307 and outputs them to the inter prediction image generation unit 309.

[0142] (MMVD prediction unit 30373) The MMVD prediction unit 30373 obtains mvLX by adding mvdLX in a predetermined distance and a predetermined direction to the central vector mvpLX (the motion vector mvLXN of the merge candidate N) derived by the merge candidate derivation unit 30361. The MMVD prediction unit 30373 derives the central vector mvLX[] using the syntax element mmvd_cand_flag of the encoded data (Fig. 14(a)), and derives the differential vector mvpLX[] from mmvd_direction_idx (Fig. (d)) indicating the index of the direction table and mmvd_distance_idx (Fig. (c)) indicating the index of the distance table.

[0143] The MMVD prediction unit 30373 selects the central vector mvLXN[] using mmvd_cand_flag.

[0144] N = mergeCandList[mmvd_cand_flag] The MMVD prediction unit 30373 derives the direction (MmvdSign[0], MmvdSign[1]) from mmvd_direction_idx and derives the distance MmvdDistance from mmvd_distance_idx. Note that the table DistanceTable for deriving MmvdDistance is switched by the flag slice_fpel_mmvd_enabled_flag indicating whether to set the accuracy of the motion vector to integer accuracy at the slice level. Specifically, when slice_fpel_mmvd_enabled_flag is 0, DistanceTable[] = { 1, 2, 4, 8, 16, 32, 64, 128} when slice_fpel_mmvd_enabled_flag is 1, DistanceTable[] = { 4, 8, 16, 32, 64, 128, 256, 512} is set.

[0145] dir_table_x[] = { 1, -1, 0, 0} dir_table_y[] = { 0, 0, 1, -1} MmvdSign[0] = dir_table_x[mmvd_direction_idx] MmvdSign[1] = dir_table_y[mmvd_direction_idx] MmvdDistance = DistanceTable[mmvd_distance_idx] The MMVD prediction unit 30373 derives the differential vector refineMv[] using the product of (MmvdSign[0], MmvdSign[1]) and MmvdDistance.

[0146] firstMv[0] = (MmvdDistance<<shiftMMVD) * MmvdSign[0] firstMv[1] = (MmvdDistance<<shiftMMVD) * MmvdSign[1] Here, shiftMMVD is a value that adjusts the magnitude of the differential vector so as to match the accuracy MVPREC of the motion vector in the motion compensation unit 3091 (interpolation unit). refineMvL0[0] = firstMv[0] refineMvL0[1] = firstMv[1] refineMvL1[0] = -firstMv[0] refineMvL1[1] = -firstMv[1] Finally, the MMVD prediction unit 30373 derives the motion vector of the MMVD merge candidate from refineMvLX and the center vector mvLXN as follows.

[0147] mvL0[0] = mvL0N[0] + refineMvL0[0] mvL0[1] = mvL0N[1] + refineMvL0[1] mvL1[0] = mvL1N[0] + refineMvL1[0] mvL1[1] = mvL1N[1] + refineMvL1[1] (Triangle Prediction) Next, the Triangle prediction will be described. In the Triangle prediction, the target CU is divided into two triangle prediction units with the diagonal or anti-diagonal as the boundary. The predicted image in each triangle prediction unit is derived by performing weighted mask processing according to the pixel position on each pixel of the predicted image of the target CU (rectangular block including the triangle prediction unit). Intuitively, a triangle image can be derived from the rectangular image by multiplying a mask with 1 at the upper left and 0 at the lower right. The adaptive weighting process of the predicted image is applied to both regions sandwiching the diagonal, and one predicted image of the target CU (rectangular block) is derived by the adaptive weighting process using the two predicted images. This process is called the Triangle synthesis process. The transformation (inverse transformation) and quantization (inverse quantization) processes are applied to the entire target CU. Note that the Triangle prediction is applied only in the case of the merge prediction mode or the skip mode.

[0148] The Triangle prediction unit 30377 derives prediction parameters corresponding to two triangle regions used for Triangle prediction in the case of the triangle mode, and supplies them to the inter-prediction image generation unit 309. In Triangle prediction, a configuration that does not use dual prediction may be used for simplification of processing. In this case, the inter-prediction parameters of uni-directional prediction are derived in one triangle region. Note that the derivation of two prediction images and the synthesis using the prediction images are performed by the motion compensation unit 3091 and the Triangle synthesis unit 30952.

[0149] (DMVR) Next, the DMVR (Decoder side Motion Vector Refinement) process performed by the DMVR unit 30375 will be described. When the merge_flag is 1 or the skip flag skip_flag is 1 for the target CU, the DMVR unit 30375 corrects the mvLX of the target CU derived by the merge prediction unit 30374 using the reference image. Specifically, when the prediction parameters derived by the merge prediction unit 30374 are dual prediction, the motion vector is corrected using the prediction images derived from the motion vectors corresponding to two reference pictures. The corrected mvLX is supplied to the inter-prediction image generation unit 309.

[0150] (AMVP prediction) FIG. 10(b) 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 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 derives prediction vector candidates from the motion vectors of the decoded adjacent blocks stored in the prediction parameter memory 307 based on refIdxLX, and stores them in the prediction vector candidate list mvpListLX[].

[0151] The vector candidate selection unit 3034 selects the motion vector mvpListLX[mvp_LX_idx] indicated by mvp_LX_idx from among the predicted vector candidates in mvpListLX[] as mvpLX. The vector candidate selection unit 3034 outputs the selected mvpLX to the MV addition unit 3038.

[0152] (MV addition unit) The MV addition unit 3038 adds the mvpLX input from the AMVP prediction parameter derivation unit 3032 and the decoded mvdLX to calculate mvLX. The addition unit 3038 outputs the calculated mvLX to the inter prediction image generation unit 309 and the prediction parameter memory 307.

[0153] mvLX[0] = mvpLX[0]+mvdLX[0] mvLX[1] = mvpLX[1]+mvdLX[1] (Accuracy of motion vector) amvr_mode is a syntax element that switches the accuracy of the motion vector derived in the AMVP mode. For example, at amvr_mode = 0, 1, 2, the accuracy is switched between 1 / 4 pixel, 1 pixel, and 4 pixels. Instead of amvr_mode, a flag amvr_flag indicating whether it is 1 / 4 and a flag amvr_precision_flag that switches between 1 / 16 and 1 may be used.

[0154] When the accuracy of the motion vector is 1 / 16 accuracy, in order to change the motion vector differences of 1 / 4, 1, and 4 pixel accuracies to the motion vector differences of 1 / 16 pixel accuracy, inverse quantization may be performed using MvShift (=1<<amvr_mode =(amvr_flag+amvr_precision_flag)<<1) derived from amvr_mode as follows.

[0155] MvdLX[0] = MvdLX[0] << (MvShift + 2) MvdLX[1] = MvdLX[1] << (MvShift + 2) Similarly, when affine_flag is 1, it is derived by the following formula.

[0156] MvShift = amvr_precision_flag? (amvr_precision_flag << 1) : (-(amvr_flag << 1))) MvdCpLX[cpIdx][0] = MvdLX[cpIdx][0] << (MvShift + 2) MvdCpLX[cpIdx][1] = MvdLX[cpIdx][1] << (MvShift + 2) Note that the parameter decoding unit 302 may also decode and derive the mvdLX[] before shifting by the above MvShift using the following syntax elements. ·abs_mvd_greater0_flag ·abs_mvd_minus2 ·mvd_sign_flag Then, the parameter decoding unit 302 decodes the differential vector lMvd[] from the syntax elements by using the following formula.

[0157] lMvd[compIdx] = abs_mvd_greater0_flag[compIdx] * (abs_mvd_minus2[compIdx]+2) * (1-2*mvd_sign_flag[compIdx]) Furthermore, lMvd[] is set to MvdLX in the case of translational MVD (MotionModelIdc == 0), and is set to MvdCpLX in the case of control point MVD (MotionModelIdc!= 0).

[0158] if (MotionModelIdc == 0) MvdLX[compIdx] = lMvd[compIdx] else MvdCpLX[cpIdx][compIdx] = lMvd[cpIdx][compIdx] where compIdx = 0, 1 and cpIdx = 0, 1, 2.

[0159] (Motion Vector Scaling) A method for deriving motion vector scaling will now be described. Given a motion vector Mv (reference motion vector), a picture PicMv containing a block having Mv, a reference picture PicMvRef of Mv, a motion vector after scaling sMv, a picture CurPic containing a block having sMv, and a reference picture CurPicRef referenced by sMv, the derivation function MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef) of sMv is expressed by the following equation:

[0160] sMv = MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) = Clip3(-R1,R1-1,sign(distScaleFactor*Mv)*((abs(distScaleFactor*Mv)+round1-1)>>shift1)) distScaleFactor = Clip3(-R2,R2-1,(tb*tx+round2)>>shift2) tx = (16384+abs(td)>>1) / td td = DiffPicOrderCnt(PicMv,PicMvRef) tb = DiffPicOrderCnt(CurPic,CurPicRef) Here, round1, round2, shift1, and shift2 are round and shift values for division using reciprocals, for example, round1=1<<(shift1-1), round2=1<<(shift2-1), shift1=8, shift2=6. DiffPicOrderCnt(Pic1,Pic2) is a function that returns the difference in time information (e.g., POC) between Pic1 and Pic2. R1 and R2 limit the value range to perform processing with limited precision, for example, R1=32768, R2=4096.

[0161] Also, the scaling function MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef) may be expressed by the following equation.

[0162] MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef) = Mv * DiffPicOrderCnt(CurPic, CurPicRef) / DiffPicOrderCnt(PicMv, PicMvRef) That is, Mv may be scaled according to the ratio of the difference in time information between CurPic and CurPicRef and the difference in time information between PicMv and PicMvRef.

[0163] (Configuration of Intra Prediction Parameter Derivation Unit 304) Based on the input from the parameter decoding unit 302, the intra prediction parameter derivation unit 304 refers to the prediction parameters stored in the prediction parameter memory 307 to derive intra prediction parameters, for example, the intra prediction mode IntraPredMode. The intra prediction parameter derivation unit 304 outputs the intra prediction parameters to the predicted image generation unit 308 and stores them in the prediction parameter memory 307. The intra prediction parameter derivation unit 304 may derive different intra prediction modes for luminance and color difference.

[0164] The loop filter 305 is a filter provided within the encoding loop, which removes block distortion and ringing distortion and improves the image quality. The loop filter 305 applies filters such as a deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF) to the decoded image of the CU generated by the addition unit 312.

[0165] The reference picture memory 306 stores the decoded image of the CU at a predetermined position for each target picture and target CU.

[0166] The prediction parameter memory 307 stores prediction parameters at a predetermined location for each CTU or CU. Specifically, the prediction parameter memory 307 stores parameters decoded by the parameter decoding unit 302, parameters derived by the prediction parameter derivation unit 320, and the like.

[0167] The predicted image generation unit 308 receives as input the parameters derived by the prediction parameter derivation unit 320. The predicted image generation unit 308 also reads a reference picture from the reference picture memory 306. The predicted image generation unit 308 generates a predicted image of a block or sub-block using the parameters and a reference picture (reference picture block) in the prediction mode indicated by predMode. Here, the reference picture block is a set of pixels on the reference picture (usually rectangular, and therefore called a block), and is an area referenced to generate a predicted image.

[0168] (Inter-prediction image generation unit 309) When predMode indicates inter prediction mode, the inter prediction image generation unit 309 generates a prediction image of a block or sub-block by inter prediction using the inter prediction parameters input from the inter prediction parameter derivation unit 303 and the reference picture.

[0169] 11 is a schematic diagram showing the configuration of an inter-prediction image generation unit 309 included in the prediction image generation unit 308 according to this embodiment. The inter-prediction image generation unit 309 includes a motion compensation unit (prediction image generation device) 3091 and a synthesis unit 3095. The synthesis unit 3095 includes an IntraInter synthesis unit 30951 that generates a prediction image for intra-inter prediction (CIIP mode), a Triangle synthesis unit 30952, a BIO unit 30954, and a weight prediction unit 3094.

[0170] (motion compensation) The motion compensation unit 3091 (interpolation image generation unit 3091) generates an interpolation image (motion compensation image) by reading a reference block from the reference picture memory 306 based on the inter-prediction parameters (predFlagLX, refIdxLX, mvLX) input from the inter-prediction parameter derivation unit 303. The reference block is a block at a position shifted by mvLX from the position of the target block on the reference picture RefPicLX specified by refIdxLX. Here, when mvLX does not have integer precision, a filter for generating pixels at fractional positions called a motion compensation filter is applied to generate the interpolation image.

[0171] The motion compensation unit 3091 first derives the integer position (xInt, yInt) and phase (xFrac, yFrac) corresponding to the coordinates (x, y) within the prediction block using the following equations.

[0172] xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x xFrac = mvLX[0]&(MVPREC-1) yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y yFrac = mvLX[1]&(MVPREC-1) Here, (xPb, yPb) is the upper left coordinate of a block of size bW*bH, where x = 0…bW-1 and y = 0…bH-1, and MVPREC indicates the precision of mvLX (1 / MVPREC pixel precision). For example, MVPREC = 16.

[0173] The motion compensation unit 3091 performs horizontal interpolation processing on the reference picture refImg using an interpolation filter to derive a temporary image temp[][]. The following Σ is the sum over k for k = 0..NTAP-1, shift1 is a normalization parameter for adjusting the value range, and offset1 = 1<<(shift1-1).

[0174] temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP / 2+1][yInt]+offset1)>>shift1 Subsequently, the motion compensation unit 3091 derives an interpolated image Pred[][] from the temporary image temp[][] through vertical interpolation processing. The following Σ is the sum with respect to k where k = 0..NTAP-1, shift2 is a normalization parameter for adjusting the value range, and offset2 = 1<<(shift2-1).

[0175] Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP / 2+1]+offset2)>>shift2. In the case of dual prediction, the above Pred[][] is derived for each of the L0 list and the L1 list (referred to as the interpolated images PredL0[][] and PredL1[]), and the interpolated image Pred[][] is generated from PredL0[][] and PredL1[][].

[0176] The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a Triangle synthesis unit 30952, a weight prediction unit 3094, and a BIO unit 30954.

[0177] (IntraInter Synthesis Processing) When ciip_flag is 1, the intra prediction image generation unit 310 sets to planar prediction (IntraPredModeY = INTRA_PLANAR) and generates a prediction image predSamplesIntra[][].

[0178] When ciip_flag is 1, the inter prediction image generation unit 309 performs motion compensation using the motion vectors obtained by merge prediction and generates a prediction image predSamplesInter[][].

[0179] When the ciip_flag is 1, the IntraInter synthesis unit 30951 generates a predicted image predSamplesComb[][] by weighted summation of the inter-predicted image predSamplesInter[][] and the intra-predicted image predSamplesIntra[][], and outputs it to the addition unit 312.

[0180] predSamplesComb[x][y] = (w * predSamplesIntra[x][y] + (4 - w) * predSamplesInter[x][y] + 2) >> 2 Here, w is set to 3 when both the upper and left adjacent blocks of the target CU are in the intra mode, 1 when both are in modes other than the intra mode, and 2 otherwise.

[0181] (Triangle synthesis process) The Triangle synthesis unit 30952 generates a predicted image using the above-described Triangle prediction.

[0182] (BIO prediction) Next, the details of the BIO prediction (Bi-Directional Optical Flow, BDOF process) performed by the BIO unit 30954 will be described. The BIO unit 30954 generates a predicted image with reference to two predicted images (the first predicted image and the second predicted image) and a gradient correction term in the bi-prediction mode.

[0183] When the inter prediction parameter decoding unit 303 determines it is a unidirectional prediction of L0, the motion compensation unit 3091 generates PredL0[x][y]. When the inter prediction parameter decoding unit 303 determines it is a unidirectional prediction of L1, the motion compensation unit 3091 generates PredL1[x][y]. On the other hand, when the inter prediction parameter decoding unit 303 determines it is in the bi-prediction mode, the synthesis unit 3095 refers to bioAvailableFlag indicating whether to perform BIO processing and determines the necessity of BIO processing. If bioAvailableFlag indicates TRUE, the BIO unit 30954 executes BIO processing to generate a bi-directional prediction image. If it indicates FALSE, the synthesis unit 3095 generates a prediction image by normal bi-prediction image generation.

[0184] The inter prediction parameter decoding unit 303 may derive TRUE for bioAvailableFlag when the L0 reference image refImgL0 and the L1 reference image refImgL1 are different reference images and two pictures are in opposite directions with respect to the target picture.

[0185] (Weighted Prediction) The weighted prediction unit 3094 generates a prediction image of a block by multiplying a weight coefficient to the interpolated image PredLX. When one of the prediction list utilization flags (predFlagL0 or predFlagL1) is 1 (unidirectional prediction) and weighted prediction is not used, the following processing of the formula for adjusting PredLX (LX is L0 or L1) to the pixel bit number bitDepth is performed.

[0186] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)>>shift1) Here, shift1 = 14 - bitDepth, offset1 = 1<<(shift1 - 1). Also, when both of the prediction list utilization flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI) and weighted prediction is not used, the following processing of the formula for averaging PredL0 and PredL1 and adjusting to the pixel bit number is performed.

[0187] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]+PredL1[x][y]+offset2)>>shift2) Here, shift2 = 15 - bitDepth and offset2 = 1<<(shift2 - 1).

[0188] Furthermore, when performing single prediction and weighted prediction, the weight prediction unit 3094 derives the weight prediction coefficient w0 and the offset o0 from the encoded data and performs the following equation processing.

[0189] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,((PredLX[x][y]*w0+2^(log2WD - 1))>>log2WD)+o0) Here, log2WD is a variable indicating a predetermined shift amount.

[0190] Furthermore, when performing bi - prediction PRED_BI and weighted prediction, the weight prediction unit 3094 derives the weight prediction coefficients w0, w1, o0, and o1 from the encoded data and performs the following equation processing.

[0191] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))>>(log2WD + 1)) The inter - prediction image generation unit 309 outputs the predicted image of the generated block to the addition unit 312.

[0192] (Intra - prediction image generation unit 310) When predMode indicates the intra - prediction mode, the intra - prediction image generation unit 310 performs intra - prediction using the intra - prediction parameters input from the intra - prediction parameter derivation unit 304 and the reference pixels read from the reference picture memory 306.

[0193] Specifically, the intra-prediction image generation unit 310 reads adjacent blocks within a predetermined range from the target block on the target picture from the reference picture memory 306. The predetermined range refers to the adjacent blocks to the left, upper left, upper, and upper right of the target block, and the areas referred to vary depending on the intra-prediction mode.

[0194] The intra-prediction image generation unit 310 generates a predicted image of the target block with reference to the read decoded pixel values and the prediction mode indicated by IntraPredMode. The intra-prediction image generation unit 310 outputs the generated predicted image of the block to the addition unit 312.

[0195] The generation of the predicted image based on the intra-prediction mode will be described below. In Planar prediction, DC prediction, and Angular prediction, the decoded peripheral area adjacent (proximate) to the prediction target block is set as the reference area R. Then, the predicted image is generated by extrapolating the pixels on the reference area R in a specific direction. For example, the reference area R may be set as an L-shaped area including the left and upper (or further, upper left, upper right, lower left) of the prediction target block.

[0196] In Planar prediction, a temporary predicted image is generated by linearly adding the reference samples s[x][y] according to the distance between the prediction target pixel position and the reference pixel position.

[0197] The inverse quantization and inverse transformation unit 311 inverse quantizes the quantized transformation coefficients input from the parameter decoding unit 302 to obtain the transformation coefficients.

[0198] The addition unit 312 adds the predicted image of the block input from the prediction image generation unit 308 and the prediction error input from the inverse quantization and inverse transformation unit 311 on a pixel-by-pixel basis to generate the decoded image of the block. The addition unit 312 stores the decoded image of the block in the reference picture memory 306 and also outputs it to the loop filter 305.

[0199] (Configuration of the moving image encoding device) Next, the configuration of the moving image encoding apparatus 11 according to the present embodiment will be described. FIG. 12 is a block diagram showing the configuration of the moving image encoding apparatus 11 according to the present embodiment. The moving image encoding apparatus 11 includes a prediction image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, a prediction parameter 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, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.

[0200] The prediction image generation unit 101 generates a prediction image for each CU. The prediction image generation unit 101 includes the inter-prediction image generation unit 309 and the intra-prediction image generation unit 310 which have been described above, and the description thereof will be omitted.

[0201] The subtraction unit 102 subtracts the pixel value of the prediction image of the block input from the prediction image generation unit 101 from the pixel value of the image T to generate a prediction error. The subtraction unit 102 outputs the prediction error to the transform / quantization unit 103.

[0202] The transform / quantization unit 103 calculates transform coefficients for the prediction error input from the subtraction unit 102 by frequency conversion, and derives quantized transform coefficients by quantization. The transform / quantization unit 103 outputs the quantized transform coefficients to the parameter encoding unit 111 and the inverse quantization / inverse transform unit 105.

[0203] The inverse quantization / inverse transform unit 105 is the same as the inverse quantization / inverse transform unit 311 (FIG. 7) in the moving image decoding apparatus 31, and the description thereof will be omitted. The calculated prediction error is output to the addition unit 106.

[0204] The parameter encoding unit 111 includes a header encoding unit 1110, a CT information encoding unit 1111, and a CU encoding unit 1112 (prediction mode encoding unit). The CU encoding unit 1112 further includes a TU encoding unit 1114. Hereinafter, the schematic operations of each module will be described.

[0205] The header encoding unit 1110 performs encoding processing on parameters such as header information, segmentation information, prediction information, and quantized transform coefficients.

[0206] The CT information encoding unit 1111 encodes QT, MT (BT, TT) segmentation information, etc.

[0207] The CU encoding unit 1112 encodes CU information, prediction information, segmentation information, etc.

[0208] When the TU contains prediction error, the TU encoding unit 1114 encodes QP update information and quantized prediction error.

[0209] The CT information encoding unit 1111 and the CU encoding unit 1112 supply syntax elements such as inter prediction parameters (predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX), intra prediction parameters (intra_luma_mpm_flag, intra_luma_mpm_idx, intra_luma_mpm_reminder, intra_chroma_pred_mode), and quantized transform coefficients to the parameter encoding unit 111.

[0210] The entropy encoding unit 104 receives the quantized transform coefficients and encoding parameters (segmentation information, prediction parameters) from the parameter encoding unit 111. The entropy encoding unit 104 entropy-encodes these to generate and output an encoded stream Te.

[0211] The prediction parameter derivation unit 120 is a means including an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113, and derives intra prediction parameters and intra prediction parameters from the parameters input from the encoding parameter determination unit 110. The derived intra prediction parameters and intra prediction parameters are output to the parameter encoding unit 111.

[0212] (Configuration of Inter Prediction Parameter Encoding Unit) As shown in FIG. 13, the inter prediction parameter encoding unit 112 includes a parameter encoding control unit 1121 and an inter prediction parameter derivation unit 303. The inter prediction parameter derivation unit 303 has the same configuration as that of the moving image decoding apparatus. The parameter encoding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212.

[0213] The merge index derivation unit 11211 derives merge candidates and the like, and outputs them to the inter prediction parameter derivation unit 303. The vector candidate index derivation unit 11212 derives prediction vector candidates and the like, and outputs them to the inter prediction parameter derivation unit 303 and the parameter encoding unit 111.

[0214] (Configuration of Intra Prediction Parameter Encoding Unit 113) The intra prediction parameter encoding unit 113 includes a parameter encoding control unit 1131 and an intra prediction parameter derivation unit 304. The intra prediction parameter derivation unit 304 has the same configuration as that of the moving image decoding apparatus.

[0215] The parameter encoding control unit 1131 derives IntraPredModeY and IntraPredModeC. Further, it determines intra_luma_mpm_flag with reference to mpmCandList[]. These prediction parameters are output to the intra prediction parameter derivation unit 304 and the parameter encoding unit 111.

[0216] However, different from the moving image decoding apparatus, the inputs to the inter prediction parameter derivation unit 303 and the intra prediction parameter derivation unit 304 are the encoding parameter determination unit 110 and the prediction parameter memory 108, and they are output to the parameter encoding unit 111.

[0217] The addition unit 106 adds the pixel values of the predicted block input from the predicted image generation unit 101 and the prediction error input from the inverse quantization and inverse transformation unit 105 for each pixel to generate a decoded image. The addition unit 106 stores the generated decoded image in the reference picture memory 109.

[0218] The loop filter 107 performs a deblocking filter, SAO, and ALF on the decoded image generated by the addition unit 106. Note that the loop filter 107 does not necessarily include the above three types of filters, and for example, it may have a configuration including only the deblocking filter.

[0219] The prediction parameter memory 108 stores the prediction parameters generated by the encoding parameter determination unit 110 at predetermined positions for each target picture and CU.

[0220] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at predetermined positions for each target picture and CU.

[0221] The encoding parameter determination unit 110 selects one set from a plurality of sets of encoding parameters. The encoding parameters are the QT, BT, or TT splitting information, prediction parameters, or parameters to be encoded generated in relation to these as described above. The predicted image generation unit 101 generates a predicted image using these encoding parameters.

[0222] The symbolic parameter determination unit 110 calculates an RD cost value indicating the amount of information and the coding error for each of a plurality of sets. The RD cost value is, for example, the sum of the amount of code and the value obtained by multiplying the squared error by a coefficient λ. The amount of code is the amount of information of the coded stream Te obtained by entropy-coding the quantization error and the coding parameters. The squared error is the sum of the squares of the prediction errors calculated in the subtraction unit 102. The coefficient λ is a real number greater than zero set in advance. The symbolic parameter determination unit 110 selects the set of coding parameters that minimizes the calculated cost value. The symbolic parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111 and the prediction parameter derivation unit 120. [[ID=E1]] [[ID=E2]]

[0223] [[ID=E3]] Note that a part of the moving image encoding device 11 and the moving image decoding device 31 in the above-described embodiment, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse transformation unit 311, the addition unit 312, the predicted parameter derivation unit 320, the predicted image generation unit 101, the subtraction unit 102, the transformation / quantization unit 103, the entropy encoding unit 104, the inverse quantization / inverse transformation unit 105, the loop filter 107, the encoding parameter determination unit 110, the parameter encoding unit 111, and the predicted parameter derivation unit 120 may be realized by a computer. In that case, a program for realizing this control function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed to be realized. Here, the "computer system" refers to a computer system built in either the moving image encoding device 11 or the moving image decoding device 31, including hardware such as an OS and peripheral devices. Further, the "computer-readable recording medium" refers to 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. Furthermore, the "computer-readable recording medium" also includes, like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, a medium that dynamically holds a program for a short time, and a volatile memory inside a computer system serving as a server or a client in that case, which holds a program for a certain period of time. Also, the above program may be for realizing a part of the above-described functions, and may further be realized in combination with a program already recorded in the computer system for realizing the above-described functions.

[0224] Further, part or all of the moving image encoding device 11 and the moving image decoding device 31 in the above-described embodiments may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the moving image encoding device 11 and the moving image decoding device 31 may be individually processed by a processor, or part or all of them may be integrated and processed by a processor. Further, the method of integrating into an integrated circuit is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, when a technology for integrating into an integrated circuit that replaces LSI appears due to the progress of semiconductor technology, an integrated circuit using such technology may be used.

[0225] As described above, an embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the gist of the present invention.

[0226] 〔Application Example〕 The above-described moving image encoding device 11 and moving image decoding device 31 can be mounted and used in various devices that transmit, receive, record, and play back 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.

[0227] First, the fact that the above-described moving image encoding device 11 and moving image decoding device 31 can be used for transmitting and receiving moving images will be described with reference to FIG. 2.

[0228] FIG. 2(a) is a block diagram showing the configuration of a transmission device PROD_A equipped with the moving image encoding device 11. As shown in the figure, the transmission device PROD_A includes an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, a modulation unit PROD_A2 that obtains a modulation signal by modulating a carrier wave with the encoded data obtained by the encoding unit PROD_A1, and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2. The above-described moving image encoding device 11 is used as this encoding unit PROD_A1.

[0229] The transmission device PROD_A may further include a camera PROD_A4 for capturing a moving image, a recording medium PROD_A5 for recording a moving image, an input terminal PROD_A6 for inputting a moving image from the outside, and an image processing unit A7 for generating or processing an image, as a source of the moving image input to the encoding unit PROD_A1. In the figure, a configuration in which the transmission device PROD_A includes all of these is illustrated, but a part of them may be omitted.

[0230] Note that the recording medium PROD_A5 may record an unencoded moving image, or may record a moving image encoded by a recording encoding method different from the transmission encoding method. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 according to the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.

[0231] FIG. 2(b) is a block diagram showing the configuration of the receiving device PROD_B equipped with the moving image decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 for receiving a modulated signal, a demodulating unit PROD_B2 for obtaining encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a decoding unit PROD_B3 for obtaining a moving image by decoding the encoded data obtained by the demodulating unit PROD_B2. The above-described moving image decoding device 31 is used as this decoding unit PROD_B3.

[0232] The receiving device PROD_B may further include a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal PROD_B6 for outputting a moving image to the outside, as a destination of the moving image output from the decoding unit PROD_B3. In the figure, a configuration in which the receiving device PROD_B includes all of these is illustrated, but a part of them may be omitted.

[0233] Note that the recording medium PROD_B5 may be for recording unencoded moving images, or may be encoded using an encoding method for recording different from the encoding method for transmission. In the latter case, an encoding unit (not shown) for encoding the moving image obtained from the decoding unit PROD_B3 according to the encoding method for recording may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.

[0234] Note that the transmission medium for transmitting the modulation signal may be wireless or wired. Also, the transmission mode for transmitting the modulation signal may be broadcasting (here, referring to a transmission mode where the transmission destination is not specified in advance), or communication (here, referring to a transmission mode where the transmission destination is specified in advance). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.

[0235] For example, a broadcasting station (broadcasting facilities, etc.) / reception station (television receiver, etc.) for terrestrial digital broadcasting is an example of the transmission device PROD_A / reception device PROD_B that transmits and receives the modulation signal by wireless broadcasting. Also, a broadcasting station (broadcasting facilities, etc.) / reception station (television receiver, etc.) for cable television broadcasting is an example of the transmission device PROD_A / reception device PROD_B that transmits and receives the modulation signal by wired broadcasting.

[0236] Also, a server (workstation, etc.) / client (television receiver, personal computer, smartphone, etc.) for a VOD (Video On Demand) service or video sharing service using the Internet is an example of the transmission device PROD_A / reception device PROD_B that transmits and receives the modulation signal by communication (usually, either wireless or wired is used as the transmission medium in a LAN, and wired is used as the transmission medium in a WAN). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Also, smartphones include multifunctional mobile phone terminals.

[0237] In addition, the client of the video sharing service has a function of decoding the encoded data downloaded from the server and displaying it on the display, and also has a function of encoding the moving images captured by the camera and uploading them to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.

[0238] Next, with reference to FIG. 3, it will be described that the above-described moving image encoding device 11 and moving image decoding device 31 can be used for recording and playing back moving images.

[0239] FIG. 3(a) is a block diagram showing the configuration of the recording device PROD_C equipped with the above-described moving image encoding device 11. As shown in the figure, the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding moving images, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 to the recording medium PROD_M. The above-described moving image encoding device 11 is used as this encoding unit PROD_C1.

[0240] Note that the recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) an HDD (Hard Disk Drive) or an SSD (Solid State Drive), or may be of a type connected to the recording device PROD_C, such as (2) an SD memory card or a USB (Universal Serial Bus) flash memory, or may be loaded into a drive device (not shown) built into the recording device PROD_C, such as (3) a DVD (Digital Versatile Disc: registered trademark) or a BD (Blu-ray Disc: registered trademark).

[0241] In addition, the recording device PROD_C may further include a camera PROD_C3 that captures a moving image, an input terminal PROD_C4 for inputting a moving image from the outside, a receiving unit PROD_C5 for receiving a moving image, and an image processing unit PROD_C6 for generating or processing an image, as a supply source of the moving image input to the encoding unit PROD_C1. In the figure, a configuration in which the recording device PROD_C includes all of these is illustrated, but a part of them may be omitted.

[0242] Note that the receiving unit PROD_C5 may receive an unencoded moving image, or may receive encoded data encoded by a transmission encoding method different from the recording encoding method. In the latter case, a transmission decoding unit (not shown) for decoding the encoded data encoded by the transmission encoding method may be interposed between the receiving unit PROD_C5 and the encoding unit PROD_C1.

[0243] Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, etc. (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 serves as the main supply source of the moving image). In addition, a camcorder (in this case, the camera PROD_C3 serves as the main supply source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 serves as the main supply source of the moving image), a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 serves as the main supply source of the moving image), etc. are also examples of such a recording device PROD_C.

[0244] Figure 3(b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-described moving image decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads the encoded data written on the recording medium PROD_M, and a decoding unit PROD_D2 that obtains a moving image by decoding the encoded data read by the reading unit PROD_D1. The above-described moving image decoding device 31 is used as this decoding unit PROD_D2.

[0245] Note that the recording medium PROD_M may be of a type built into the playback device PROD_D, such as an HDD or SSD, (1); may be of a type connected to the playback device PROD_D, such as an SD memory card or a USB flash memory, (2); or may be loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or a BD, (3).

[0246] The playback device PROD_D may further include a display PROD_D3 for displaying a moving image, an output terminal PROD_D4 for outputting the moving image externally, and a transmission unit PROD_D5 for transmitting the moving image, as destinations for the moving image output by the decoding unit PROD_D2. In the figure, a configuration in which the playback device PROD_D includes all of these is illustrated, but some of them may be omitted.

[0247] Note that the transmission unit PROD_D5 may transmit an unencoded moving image or may transmit encoded data encoded by a transmission encoding method different from the recording encoding method. In the latter case, an encoding unit (not shown) for encoding the moving image by the transmission encoding method may be interposed between the decoding unit PROD_D2 and the transmission unit PROD_D5.

[0248] Examples of such a playback device PROD_D include, for example, a DVD player, a BD player, an HDD player, etc. (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected becomes the main supply destination of the moving image). Also, a television receiver (in this case, the display PROD_D3 becomes the main supply destination of the moving image), a digital signage (also referred to as an electronic billboard or an electronic bulletin board, etc., and the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the moving image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 becomes the main supply destination of the moving image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the moving image), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 becomes the main supply destination of the moving image), etc. are also examples of such a playback device PROD_D.

[0249] (Hardware implementation and software implementation) Also, each block of the above-described moving image decoding device 31 and moving image encoding device 11 may be implemented hardware-wise by a logic circuit formed on an integrated circuit (IC chip), or may be implemented software-wise using a CPU (Central Processing Unit).

[0250] In the latter case, each of the above devices includes a CPU that executes instructions of a program for realizing each function, a ROM (Read Only Memory) that stores the above program, a RAM (Random Access Memory) that expands the above program, a storage device (recording medium) such as a memory that stores the above program and various data, etc. And the object of the embodiment of the present invention can also be achieved by supplying a recording medium in which program codes (executable format program, intermediate code program, source program) of control programs of each of the above devices, which are software for realizing the above-described functions, are recorded in a computer-readable manner to each of the above devices, and having the computer (or CPU or MPU) read and execute the program codes recorded in the recording medium.

[0251] Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and optical disks including optical disks such as CD-ROM (Compact Disc Read-Only Memory) / MO disk (Magneto-Optical disc) / MD (Mini Disc) / DVD (Digital Versatile Disc: registered trademark) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray Disc: registered trademark); cards such as IC cards (including memory cards) / optical cards; semiconductor memories such as mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) / flash ROM; or logic circuits such as PLD (Programmable logic device) and FPGA (Field Programmable Gate Array).

[0252] Alternatively, each of the above devices may be configured to be connectable to a communication network, and the above program code may be supplied via the communication network. This communication network only needs to be capable of transmitting the program code and is not particularly limited. For example, the Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / Cable Television) communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, etc. can be used. Also, the transmission medium constituting this communication network only needs to be a medium capable of transmitting the program code and is not limited to a specific configuration or type. For example, it can be wired such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc., or wireless such as infrared rays like IrDA (Infrared Data Association) and remote controls, Bluetooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcast network, etc. Note that the embodiments of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave, in which the above program code is embodied by electronic transmission.

[0253] The embodiments of the present invention are not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims. That is, embodiments obtained by combining appropriately modified technical means within the scope shown in the claims are also included in the technical scope of the present invention.

Industrial Applicability

[0254] Embodiments of the present invention can be suitably applied to a moving image decoding apparatus that decodes encoded data in which image data is encoded, and a moving image encoding apparatus that generates encoded data in which image data is encoded. Further, it can be suitably applied to the data structure of the encoded data generated by the moving image encoding apparatus and referred to by the moving image decoding apparatus.

[0255] (Summary) An image decoding apparatus according to an aspect of the present invention includes a parameter decoding unit that decodes parameters for generating a predicted image. When a regular merge flag indicates a regular merge mode, it checks a flag indicating whether MMVD prediction notified by a sequence parameter set or the like is available. When the MMVD prediction is not available, it decodes motion vector information obtained from merge candidates.

[0256] An image decoding apparatus according to an aspect of the present invention, when the regular merge flag indicates a regular merge mode, decodes a flag sps_mmvd_enabled_flag indicating whether MMVD prediction notified by the sequence parameter set or the like is available, and a flag mmvd_merge_flag indicating whether to use MMVD prediction in CU units. When mmvd_merge_flag == 0 or sps_mmvd_enabled_flag == 0, and when the number of merge candidates MaxNumMergeCand is greater than 1, the parameter decoding unit decodes an index merge_idx for selecting from merge candidates as the motion vector information.

[0257] An image encoding apparatus according to an aspect of the present invention has parameter encoding for encoding parameters for generating a predicted image, and when a regular merge flag indicates a regular merge mode, checks a flag indicating whether MMVD prediction notified in a sequence parameter set or the like is available, and when the MMVD prediction is not available, encodes motion vector information obtained from merge candidates.

[0258] An image encoding apparatus according to an aspect of the present invention, when the regular merge flag indicates a regular merge mode, encodes a flag sps_mmvd_enabled_flag indicating whether MMVD prediction notified in the sequence parameter set or the like is available, and a flag mmvd_merge_flag indicating whether to use MMVD prediction in CU units. When mmvd_merge_flag == 0 or sps_mmvd_enabled_flag == 0, and when the number of merge candidates MaxNumMergeCand is greater than 1, the parameter encoding unit encodes an index merge_idx for selecting from merge candidates as the motion vector information.

[0259] By adopting such a configuration, even when the MMVD mode is prohibited in the upper syntax, the merge mode can be selectively used, thereby realizing high encoding efficiency.

[0260] An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes parameters for generating a predicted image, and includes a parameter decoding unit that decodes a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data. When the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter decoding unit checks a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid. When the value of the flag is 1, the parameter decoding unit decodes an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target coding unit, and decodes a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0261] In the image decoding apparatus according to an aspect of the present invention, the merge index is decoded when the MMVD merge flag indicates that the motion vector of the merge candidate is not used for generating the inter prediction parameters and the number of merge candidates is greater than 1.

[0262] In the image decoding apparatus according to an aspect of the present invention, when the value of the MMVD merge flag is 0, the value of the merge index is estimated to be 0.

[0263] An image encoding apparatus according to one aspect of the present invention is an image encoding apparatus that encodes parameters for generating a predicted image, and includes a parameter encoding unit that encodes a regular merge flag indicating whether the regular merge mode is used in inter prediction from merge data. When the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter encoding unit checks a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid. When the value of the flag is 1, the parameter encoding unit encodes an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target encoding unit, and encodes a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0264] An image decoding method according to one aspect of the present invention is an image decoding method that decodes parameters for generating a predicted image, and includes at least steps of decoding a regular merge flag indicating whether the regular merge mode is used in inter prediction from merge data, checking a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid when the regular merge flag indicates that the regular merge mode is used in inter prediction, decoding an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target encoding unit when the value of the flag is 1, and decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0265] (Cross-reference to related applications) This application claims the benefit of priority to Japanese Patent Application No. 2019-135746, filed on Jul. 24, 2019, the entire contents of which are incorporated herein by reference.

[0266] (Supplementary matter) The above-described embodiment can also be expressed as follows. An image decoding apparatus according to an aspect of the present invention is an image decoding apparatus that decodes parameters for generating a predicted image, and includes a parameter decoding unit that decodes a regular merge flag indicating whether the regular merge mode is used in inter prediction from merge data. When the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter decoding unit checks a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid. When the value of the flag is 1, the parameter decoding unit decodes an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target coding unit, and decodes a merge index that is an index of a merge candidate list using the MMVD merge flag.

[0267] In the image decoding apparatus according to an aspect of the present invention, the merge index is decoded when the MMVD merge flag indicates that the motion vector of the merge candidate is not used for generating the inter prediction parameters and the number of merge candidates is greater than 1.

[0268] In the image decoding apparatus according to an aspect of the present invention, when the value of the MMVD merge flag is 0, the value of the merge index is estimated to be 0.

[0269] An image encoding apparatus according to an aspect of the present invention is an image encoding apparatus that encodes parameters for generating a predicted image, and includes a parameter encoding unit that encodes a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data. When the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter encoding unit checks a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid. When the value of the flag is 1, the parameter encoding unit encodes an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target encoding unit, and encodes a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0270] An image decoding method according to an aspect of the present invention is an image decoding method that decodes parameters for generating a predicted image, and includes at least: a step of decoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; a step of checking a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid when the regular merge flag indicates that the regular merge mode is used in inter prediction; a step of decoding an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target encoding unit when the value of the flag is 1; and a step of decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag. 〔Configuration 1〕 An image decoding apparatus that decodes parameters for generating a predicted image, comprises a parameter decoding unit that decodes a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data, wherein the parameter decoding unit When the regular merge flag indicates that the regular merge mode is used in inter prediction, check a flag indicating whether the motion vector of the merge candidate notified in the sequence parameter set is valid, When the value of the flag is 1, decode an MMVD merge flag indicating whether the motion vector of the merge candidate is used to generate the inter prediction parameter of the target coding unit, An image decoding apparatus characterized by decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0271] 〔Configuration 2〕 The image decoding apparatus according to Configuration 1, wherein the merge index indicates that the MMVD merge flag does not use the motion vector of the merge candidate to generate the inter prediction parameter, and is decoded when the number of merge candidates is greater than 1.

[0272] 〔Configuration 3〕 The image decoding apparatus according to Configuration 1, wherein when the value of the MMVD merge flag is 0, the value of the merge index is estimated to be 0.

[0273] 〔Configuration 4〕 An image encoding apparatus that encodes parameters for generating a predicted image, Comprising a parameter encoding unit that encodes a regular merge flag indicating whether the regular merge mode is used in inter prediction from merge data, The parameter encoding unit, When the regular merge flag indicates that the regular merge mode is used in inter prediction, check a flag indicating whether the motion vector of the merge candidate notified in the sequence parameter set is valid, When the value of the flag is 1, encode an MMVD merge flag indicating whether the motion vector of the merge candidate is used to generate the inter prediction parameter of the target coding unit, An image encoding apparatus characterized by encoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag.

[0274] 〔Configuration 5〕 An image decoding method for decoding parameters for generating a predicted image, comprising: decoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; when the regular merge flag indicates that the regular merge mode is used in inter prediction, checking a flag indicating whether a motion vector of a merge candidate notified in a sequence parameter set is valid; when the value of the flag is 1, decoding an MMVD merge flag indicating whether the motion vector of the merge candidate is used for generating inter prediction parameters of a target encoding unit; decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag. An image decoding method characterized by at least including the steps.

Explanation of Signs

[0275] 31 Image decoding apparatus 301 Entropy decoding unit 302 Parameter decoding unit 303 Inter prediction parameter derivation unit 304 Intra prediction parameter derivation unit 305, 107 Loop filter 306, 109 Reference picture memory 307, 108 Prediction parameter memory 308, 101 Predicted image generation unit 309 Inter prediction image generation unit 310 Intra prediction image generation unit 311, 105 Inverse quantization and inverse transform unit 312, 106 Addition unit 320 Prediction parameter derivation unit 11 Image Encoding Device 102 Subtraction Unit 103 Conversion and Quantization Unit 104 Entropy Encoding Unit 110 Encoding Parameter Determination Unit 111 Parameter Encoding Unit 112 Inter-Prediction Parameter Encoding Unit 113 Intra-Prediction Parameter Encoding Unit 120 Prediction Parameter Derivation Unit

Claims

1. An image decoding apparatus that decodes parameters for generating a predicted image, comprising: decoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; decoding an MMVD merge flag indicating whether an MMVD mode is used for generating inter prediction parameters of a target coding unit from the merge data; a parameter decoding unit that decodes a merge index, which is an index of a merge candidate list, from the merge data; the parameter decoding unit: when the value of the regular merge flag is 1, checks an MMVD available flag indicating whether the MMVD mode is valid, which is notified in a sequence parameter set; when the value of the MMVD available flag is 1, decodes the MMVD merge flag; when the value of the MMVD available flag is 0, estimates the MMVD merge flag; when the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1, decodes the merge index; an image decoding apparatus, characterized in that when the value of the MMVD available flag is 0 and the number of merge candidates is 1 or less, the value of the merge index is estimated to be 0.

2. An image encoding apparatus that encodes parameters for generating a predicted image, comprising: encoding a regular merge flag indicating whether a regular merge mode is used in inter prediction from merge data; encoding an MMVD merge flag indicating whether an MMVD mode is used for generating inter prediction parameters of a target coding unit from the merge data; a parameter encoding unit that encodes a merge index, which is an index of a merge candidate list, from the merge data; the parameter encoding unit: when the value of the regular merge flag is 1, checks an MMVD available flag indicating whether the MMVD mode is valid, which is notified in a sequence parameter set; when the value of the MMVD available flag is 1, encodes the MMVD merge flag; when the value of the MMVD available flag is 0, sets the MMVD merge flag; when the value of the MMVD available flag is 0 and the number of merge candidates is greater than 1, encodes the merge index; An image encoding apparatus characterized in that when the value of the MMVD enable flag is 0 and the number of merge candidates is 1 or less, the value of the merge index is set to 0. **Claim 3** A computer-readable recording medium having recorded thereon a program for causing a computer to decode parameters for generating a prediction image, wherein the program causes the computer to decode a regular merge flag indicating whether the regular merge mode is used in inter prediction from the merge data; when the value of the regular merge flag is 1, check an MMVD enable flag indicating whether the MMVD mode is effective, which is notified in the sequence parameter set; when the value of the MMVD enable flag is 1, decode an MMVD merge flag indicating whether the MMVD mode is used for generating inter prediction parameters of a target encoding unit; when the value of the MMVD enable flag is 0, estimate the MMVD merge flag; when the value of the MMVD enable flag is 0 and the number of merge candidates is greater than 1, decode a merge index which is an index of a merge candidate list; when the value of the MMVD enable flag is 0 and the number of merge candidates is 1 or less, estimate the value of the merge index to be 0; and cause the above to be executed. **Claim 4** A computer-readable recording medium having recorded thereon a program for causing a computer to encode parameters for generating a prediction image, wherein the program causes the computer to encode a regular merge flag indicating whether the regular merge mode is used in inter prediction from the merge data; when the value of the regular merge flag is 1, check an MMVD enable flag indicating whether the MMVD mode is effective, which is notified in the sequence parameter set; when the value of the MMVD enable flag is 1, encode an MMVD merge flag indicating whether the MMVD mode is used for generating inter prediction parameters of a target encoding unit; when the value of the MMVD enable flag is 0, set the MMVD merge flag; When the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1, a step of encoding a merge index, which is an index of the merge candidate list; When the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, a step of setting the value of the merge index to 0; A recording medium that causes the above to be executed.

Citation Information

Patent Citations

  • Image decoder and image encoder

    JP2015076806A

  • Image coding method and image coding device

    JP2017127033A

  • Image decoding device and image encoding device

    WO2014104242A1