Image decoding device, image coding device, and recording medium
The image decoding and encoding devices manage merge candidates using a regular merge mode to enhance encoding efficiency in video encoding methods, addressing the limited options in MMVD mode and maintaining efficiency without increased bit cost.
Patent Information
- Application Number
- JP2024174470
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-07-24
- Filing Date
- 2024-10-03
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-07-21
AI Technical Summary
In video encoding methods like H.264/AVC and HEVC, when the MMVD mode is not available, there are limited merging candidates, leading to decreased encoding efficiency.
An image decoding device and encoding device that utilize a regular merge mode in inter prediction, decoding/encoding a regular merge flag and MMVD merge flag to determine inter prediction parameters, and adjusting the merge index based on the availability and number of merge candidates.
Improves encoding efficiency by effectively managing merge candidates and reducing processing delay without increasing bit cost, even when MMVD mode is not available.
Smart Images

Figure 2025000979000001_ABST
Abstract
Description
[Technical field]
[0001] An embodiment of the present invention relates 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 examples of video encoding methods include H.264 / AVC and High-Efficiency Video Coding (HEVC).
[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 addition, non-patent document 1 discloses a technology that introduces a regular merge flag and selects inter-prediction modes from encoded data into the following groups: 1) merge mode, merge plus distance mode (MMVD mode), and 2) intra-inter mode (CIIP mode), triangle mode. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] "Versatile Video Coding (Draft 6)", JVET-O2001-v9, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 [Non-Patent Document 2] "Non-CE4: Merge mode signaling overhead reduction", JVET-O0309-v3, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2019-07-22 Summary of the Invention [Problem 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 options for merging candidates is small, resulting in reduced coding efficiency. [Means for solving the problem]
[0009] In order to solve the above problem, an image decoding device according to one embodiment of the present invention is an image decoding device that decodes parameters for generating a predicted image, and is equipped with a parameter decoding unit that decodes, from merge data, a regular merge flag indicating whether or not a regular merge mode is used in inter prediction, decodes, from the merge data, an MMVD merge flag indicating whether or not an MMVD mode is used to generate inter prediction parameters of a target coding unit, and decodes, from the merge data, a merge index, which is an index of a merge candidate list, and is characterized in that, when the value of the regular merge flag is 1, the parameter decoding unit checks an MMVD possible flag that indicates whether or not an MMVD mode is enabled, which is notified in a sequence parameter set, and when the value of the MMVD possible flag is 1, decodes the MMVD merge flag, and when the value of the MMVD possible flag is 0, estimates the MMVD merge flag, and when the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1, decodes the merge index, and when the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, estimates the value of the merge index to 0.
[0010] An image coding device according to one embodiment of the present invention is an image coding device that codes parameters for generating a predicted image, and is equipped with a parameter coding unit that codes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data, codes an MMVD merge flag indicating whether or not an MMVD mode is used to generate inter prediction parameters of a target coding unit from the merge data, and codes a merge index, which is an index of a merge candidate list, from the merge data. The parameter coding unit is characterized in that, when the value of the regular merge flag is 1, it checks an MMVD possible flag that indicates whether an MMVD mode is enabled or not, which is notified in a sequence parameter set, and, when the value of the MMVD possible flag is 1, it codes the MMVD merge flag, and when the value of the MMVD possible flag is 0, it sets the MMVD merge flag, and when the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1, it codes the merge index, and when the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, it sets the value of the merge index to 0.
[0011] A recording medium according to one aspect of the present invention is a computer-readable recording medium having recorded thereon a program for causing a computer to decode parameters for generating a predicted image, the program causing the computer to execute the following steps: decoding a regular merge flag from merge data indicating whether or not a regular merge mode is used in inter prediction; if the value of the regular merge flag is 1, checking an MMVD possible flag notified in a sequence parameter set indicating whether or not an MMVD mode is enabled; if the value of the MMVD possible flag is 1, decoding an MMVD merge flag indicating whether or not an MMVD mode is used to generate inter prediction parameters of a target coding unit; if the value of the MMVD possible flag is 0, estimating the MMVD merge flag; if the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1, decoding a merge index, which is an index of a merge candidate list; and if the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, estimating the value of the merge index to 0.
[0012] A recording medium according to one aspect of the present invention is a computer-readable recording medium having recorded thereon a program for causing a computer to encode parameters for generating a predicted image, the program causing the computer to execute the following steps: encoding a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data; if the value of the regular merge flag is 1, checking an MMVD possible flag indicating whether or not an MMVD mode is enabled, which is notified in a sequence parameter set; if the value of the MMVD possible flag is 1, encoding an MMVD merge flag indicating whether or not an MMVD mode is used to generate inter prediction parameters of a target coding unit; if the value of the MMVD possible flag is 0, setting the MMVD merge flag; if the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1, encoding a merge index, which is an index of a merge candidate list; and if the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, setting the value of the merge index to 0. Effect of the Invention
[0013] According to one aspect of the present invention, the above problem can be solved. [Brief description of the drawings]
[0014] [Figure 1] 1 is a schematic diagram showing a configuration of an image transmission system according to an embodiment of the present invention. [Diagram 2] 1 is a diagram showing the configuration of a transmitting device equipped with a video encoding device according to the present embodiment, and a receiving device equipped with a video decoding device, where (a) shows the transmitting device equipped with the video encoding device, and (b) shows the receiving device equipped with the video decoding device. [Diagram 3]1 is a diagram showing the configuration of a recording device equipped with a video encoding device according to the present embodiment, and a playback device equipped with a video decoding device, where (a) shows the configuration of a recording device equipped with a video encoding device, and (b) shows the configuration of a playback device equipped with a video decoding device. [Figure 4] FIG. 2 is a diagram showing a hierarchical structure of data in an encoded stream. [Diagram 5] FIG. 13 is a diagram illustrating an example of division of a CTU. [Figure 6] FIG. 2 is a conceptual diagram showing an example of a reference picture and a reference picture list. [Figure 7] FIG. 1 is a schematic diagram showing a configuration of a video decoding device. [Figure 8] 11 is a flowchart illustrating a schematic operation of the video decoding device. [Figure 9] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction parameter derivation unit. [Figure 10] 1 is a schematic diagram showing the configuration of a merge prediction parameter derivation unit and an AMVP prediction parameter derivation unit. [Figure 11] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction image generating unit. [Figure 12] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 13] 13 is a schematic diagram showing a configuration of an inter-prediction parameter encoding unit. [Figure 14] FIG. 1 is a diagram for explaining MMVD. [Figure 15] FIG. 13 is a diagram showing the flow of a prediction mode derivation process for inter prediction. [Figure 16] 11 is a diagram showing syntax indicating a prediction mode selection process according to the embodiment. FIG. [Figure 17] FIG. 13 is a diagram illustrating a regular merge flag. [Figure 18] 13 is a flowchart showing the flow of a prediction mode selection process in the video decoding device. [Figure 19] 13 is a flowchart showing the flow of a prediction mode selection process in the video decoding device. [Figure 20]11 is a diagram showing syntax indicating a prediction mode selection process according to the embodiment. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] (First embodiment) Hereinafter, an embodiment 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 this embodiment.
[0017] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding a target image, decodes the transmitted encoded stream, and displays an image. The image transmission system 1 includes a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, and a video display device (image display device) 41.
[0018] An image T is input to the video encoding device 11 .
[0019] The network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31. The network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination of these. The network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may also be replaced by a storage medium on which the encoded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).
[0020] The video decoding device 31 decodes each of the coded streams Te transmitted by the network 21, and generates one or more decoded images Td.
[0021] The moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31. The moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. Examples of the form of the display include stationary, mobile, and HMD. Further, when the moving image decoding device 31 has high processing power, an image with high image quality is displayed, and when it has only low processing power, an image that does not require high processing power and display ability is displayed.
[0022] <Operator> The operators used in this specification are described below.
[0023] [[ID=11>> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, |= is an OR assignment operator, and || indicates a logical OR.
[0024] x?y:z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).
[0025] Clip3(a, b, c) is a function that clips c to a value between a and b (inclusive). If c < a, it returns a; if c > b, it returns b; otherwise, it returns c (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 (rounding down the decimal part).
[0031] <Structure of the coding stream Te> Before describing in detail the video encoding device 11 and the 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 an encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (a) to (f) of Fig. 4 show an encoded video sequence that defines a sequence SEQ, an encoded picture that defines a picture PICT, an encoded slice that defines a slice S, encoded slice data that defines slice data, an encoding tree unit included in the encoded slice data, and an encoding unit included in the encoding tree unit, respectively.
[0033] (Coded Video Sequence) In the coded video sequence, a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed is specified. As shown in Fig. 4, the sequence SEQ includes a 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 and each individual layer included in the video.
[0035] The sequence parameter set SPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode the target sequence. For example, the width and height of a picture are specified. Note that there may be multiple SPSs. In that case, one of the multiple SPSs is selected from the PPS.
[0036] The picture parameter set PPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode each picture in the target sequence. For example, the picture parameter set PPS includes a reference value of the quantization width (pic_init_qp_minus26) used in decoding the picture and a flag (weighted_pred_flag) indicating the application of weighted prediction. Note that there may be multiple PPSs. In that 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 to be referenced by the video decoding device 31 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. The same applies to other data that are included in the coded stream Te and that are to be described below and that are to be given subscripts.
[0039] (Coded Slice) A coded slice defines a set of data to be referenced by the video decoding device 31 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 to be referred to by the video decoding device 31 in order to determine a decoding method for the current slice. Slice type designation information (slice_type) that designates the slice type is an example of a coding parameter included in the slice header.
[0041] Slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction when encoding, (2) a P slice that uses unidirectional prediction or intra prediction when encoding, and (3) a B slice that uses unidirectional prediction, bidirectional prediction, or intra prediction when encoding. Note that inter prediction is not limited to uni-prediction or bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, when referring to P or B slice, it refers to a slice including a block that can use inter prediction.
[0042] In addition, the slice header may include a reference to a picture parameter set PPS (pic_parameter_set_id).
[0043] (Encoded slice data) The coded slice data defines a set of data to be referenced by the video decoding device 31 in order to decode the slice data to be processed. As shown in Fig. 4(d), the slice data includes a CTU. A CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice, and is also called a Largest Coding Unit (LCU).
[0044] (coding tree unit) 4 specifies a set of data that the video decoding device 31 refers to in order to decode a CTU to be processed. The CTU is divided into coding units CU, which are basic units of encoding processing, by recursive quad tree division (QT (Quad Tree) division), binary tree division (BT (Binary Tree) division), or ternary tree division (TT (Ternary Tree) division). BT division and TT division are collectively called multi tree division (MT (Multi Tree) division). A node of a tree structure obtained by recursive quad tree division is called a coding node. Intermediate nodes of a quad tree, binary tree, and ternary tree are coding nodes, and the CTU itself is specified as the top coding node.
[0045] CT includes, as CT information, a CU split flag (split_cu_flag) indicating whether CT splitting is performed, a QT split flag (qt_split_cu_flag) indicating whether QT splitting is performed, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of MT splitting, and an MT split type (mtt_split_cu_binary_flag) indicating the split type of MT splitting. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.
[0046] When split_cu_flag is 1 and qt_split_cu_flag is 1, the coding node is split into four coding nodes (Figure 5(b)).
[0047] When split_cu_flag is 0, the coding node is not split and has one CU as a node (Figure 5(a)). The CU is the terminal node of the coding node and is not split any further. The CU is the basic unit of the coding process.
[0048] When split_cu_flag is 1 and qt_split_cu_flag is 0, the coding node is MT-split as follows: When mtt_split_cu_binary_flag is 1, the coding node is split horizontally into two coding nodes when mtt_split_cu_vertical_flag is 0 (Fig. 5(d)), and when mtt_split_cu_vertical_flag is 1, the coding node is split vertically into two coding nodes (Fig. 5(c)). When mtt_split_cu_binary_flag is 0, the coding node is split horizontally into three coding nodes when mtt_split_cu_vertical_flag is 0 (Fig. 5(f)), and when mtt_split_cu_vertical_flag is 1, the coding node is split vertically into three coding nodes (Fig. 5(e)). These are shown in Fig. 5(g).
[0049] Also, when the size of the CTU is 64x64 pixels, the size of the CU can be any of the following: 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] Different trees may be used for luminance and chrominance. The type of tree is indicated by treeType. For example, when using a common tree for luminance (Y, cIdx=0) and chrominance (Cb / Cr, cIdx=1,2), the common single tree is indicated by treeType=SINGLE_TREE. When using two different trees (DUAL trees) for luminance and chrominance, the luminance tree is indicated by treeType=DUAL_TREE_LUMA and the chrominance tree is indicated by treeType=DUAL_TREE_CHROMA.
[0051] (Encoding Unit) 4 specifies a set of data to be referred to by the video decoding device 31 in order to decode a coding unit to be processed. Specifically, a CU is composed of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The CU header specifies a prediction mode, etc.
[0052] The prediction process may be performed on a CU basis, or on a sub-CU basis by further dividing a CU. If the size of a CU and a sub-CU are equal, there is one sub-CU in the CU. If the size of a CU is larger than that of a sub-CU, the CU is divided into sub-CUs. For example, if the CU is 8x8 and the sub-CU is 4x4, the CU is divided into 2 parts horizontally and 2 parts vertically, into 4 sub-CUs.
[0053] There are two types of prediction (prediction modes): intra prediction and inter prediction. Intra prediction is a prediction within the same picture, while inter prediction refers to a prediction process performed between different pictures (for example, between display times or between layer images).
[0054] The transform and quantization processes are performed in units of CUs, but the quantized transform coefficients may be entropy coded in units of sub-blocks such as 4x4.
[0055] (Prediction parameters) The predicted image is derived from prediction parameters associated with the block, which include intra-prediction and inter-prediction parameters.
[0056] Hereinafter, prediction parameters of inter prediction will be described. Inter prediction parameters are composed of prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. predFlagL0 and predFlagL1 are flags indicating whether or not a reference picture list (L0 list, L1 list) is used, and when the value is 1, the corresponding reference picture list is used. Note that in this specification, when "a flag indicating whether or not XX" is written, a flag other than 0 (for example, 1) is XX, 0 is not XX, and 1 is treated as true and 0 is treated as false in logical negation, logical product, etc. (similarly below). However, in an actual device or method, other values can be used as true and false values.
[0057] Syntax elements for deriving inter-prediction parameters include, for example, an affine flag affine_flag used in merge mode, a merge flag merge_flag, a merge index merge_idx, an MMVD flag mmvd_flag, an inter-prediction identifier inter_pred_idc for selecting a reference picture to be used in AMVP mode, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx for deriving a motion vector, a difference vector mvdLX, and a motion vector precision mode amvr_mode.
[0058] (Reference picture list) The reference picture list is a list 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), a rectangle indicates a picture, an arrow indicates a reference relationship between pictures, the horizontal axis indicates time, I, P, and B in the rectangle indicate an intra picture, a uni-predictive picture, and a bi-predictive picture, respectively, and numbers in the rectangle indicate a decoding order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 6(b) shows an example of a reference picture list of a picture B3 (target picture). A reference picture list is a list indicating candidates for a reference picture, and one picture (slice) may have one or more reference picture lists. In the example shown in the figure, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. In each CU, refIdxLX specifies which picture in the reference picture list RefPicListX (X=0 or 1) is actually referenced. The diagram shows an example where refIdxL0=2 and refIdxL1=0. Note that LX is a description method used when there is no distinction between L0 prediction and L1 prediction, and hereinafter, parameters for the L0 list and parameters for the L1 list are distinguished by replacing LX with L0 and L1.
[0059] (Merge prediction and AMVP prediction) The prediction parameter decoding (encoding) method 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 in which the prediction parameters of the target block are derived from the prediction parameters of the 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 in which inter_pred_idc, refIdxLX, and mvLX are included in the encoded data. Note that mvLX is encoded as mvp_LX_idx, which identifies the prediction vector mvpLX, and the difference 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 uni-prediction using one reference picture managed in the L0 list and L1 list, respectively. PRED_BI indicates bi-prediction using two reference pictures managed in the L0 list and L1 list.
[0061] The merge_idx is an index indicating which prediction parameter is to be used as the prediction parameter of the current block among prediction parameter candidates (merge candidates) derived from blocks for which processing has been completed.
[0062] (Motion Vector) mvLX indicates the amount of shift between blocks on two different pictures. A prediction vector and a difference vector related to 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 In addition, the inter prediction parameter may use a prediction list usage flag or an inter prediction identifier. Furthermore, the determination using the prediction list usage flag may be replaced with a determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with a determination using the prediction list usage flag.
[0065] (Bi-predictive biPred decision) The flag biPred indicating whether or not the prediction is performed can be derived based on whether or not two prediction list usage flags are both 1. For example, the flag can be derived by the following formula.
[0066] biPred = (predFlagL0==1 && predFlagL1==1) Alternatively, biPred can be derived based on whether the inter prediction identifier is a value indicating the use of two prediction lists (reference pictures). For example, biPred can be derived using the following formula:
[0067] biPred = (inter_pred_idc==PRED_BI) ? 1 : 0 (Intra prediction parameters) The prediction parameters of intra prediction will be described below. The intra prediction parameters are configured of a luminance prediction mode IntraPredModeY and a color difference prediction mode IntraPredModeC. For example, they are planar prediction (0), DC prediction (1), and angular prediction (others). Furthermore, CCLM modes (81 to 83) may be added for color difference.
[0068] (Configuration of a 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 generating unit (prediction image generating device) 308, an inverse quantization and inverse transform unit 311, an adder 312, and a prediction parameter derivation unit 320. Note that, in accordance with the video encoding device 11 described below, the video decoding device 31 may also be configured not to include the loop filter 305.
[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 addition, although an example in which CTU and CU are used as processing units will be described below, the present invention is not limited to this example, and processing may be performed in sub-CU units. Alternatively, CTU and CU may be read as blocks, and sub-CU 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 externally inputted coded stream Te to decode each code (syntax element). There are two types of entropy coding: a method of variable-length coding the syntax element using a context (probability model) adaptively selected according to the type of syntax element and surrounding circumstances, and a method of variable-length coding the syntax element using a predetermined table or formula. The former CABAC (Context Adaptive Binary Arithmetic Coding) stores the CABAC state of the context (probability state index pStateIdx that specifies the type (0 or 1) and probability of the most probable symbol) in 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 a context is used, 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 that do not use a context are decoded with equal probability (EP, bypass), and the derivation of ctxInc and the CABAC state are omitted. The decoded syntax elements include prediction information for generating a predicted image and a prediction error for generating a difference image.
[0078] The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. The decoded code is, for example, a prediction mode predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode, etc. Control of which code to decode is performed based on an instruction from the parameter decoding unit 302.
[0079] (Basic flow) FIG. 8 is a flowchart illustrating a schematic operation of the video decoding device 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 encoded 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 transform unit 311 executes inverse quantization and inverse transform processing for each TU included in the target CU.
[0090] (S4000: Generate decoded image) The adder 312 adds 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 to generate a decoded image of the current CU.
[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 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. Also, the inter prediction parameters are output 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, that is, 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 a process of derivation of a prediction mode for inter prediction. The parameter decoding unit 302 decodes a skip flag (cu_skip_flag) (S1600).
[0094] The inter prediction parameter derivation unit 303 determines whether the skip flag is 0 or not (S1602).
[0095] If the skip flag is 0, the parameter decoding unit 302 decodes the merge flag (general_merge_flag) (S1604). On the other hand, if 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 or not (S1608).
[0097] If the merge flag is 1, the parameter decoding unit 302 determines that the current block is merge predicted, and derives information related to the merge prediction (S1610). If the merge flag is not 1, the inter prediction parameter derivation unit 303 determines that the current block is AMVP predicted, and derives information related to the AMVP prediction (S1612).
[0098] 16 shows the syntax of information related to merge prediction. SYN0001 is the syntax for sub-block unit merge prediction, and SYN0002 is the syntax for block unit merge prediction. SYN0002 will be explained 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 for dividing the merge prediction in the inter prediction mode into a group of 1) merge mode (narrow sense), merge plus distance mode (MMVD mode), and 2) intra-inter mode (CIIP mode), triangle mode. By arranging multiple (four here) prediction modes in a well-balanced manner on the tree, the bit cost is not large and the coding efficiency is high, and the tree is not deep, so the processing delay is small. The two modes of 1) may be collectively called regular merge mode.
[0100] (Embodiment 1) The flow of prediction mode selection processing will be described with reference to Fig. 18. Fig. 18 is a flowchart showing the flow of prediction mode derivation processing in the parameter decoding unit 302 and the inter prediction parameter derivation unit 303.
[0101] The parameter decoding unit 302 decodes regular_merge_flag (S1301). If regular_merge_flag==1 (YES in S1302), the value of sps_mmvd_enabled_flag is checked (S1303). sps_mmvd_enabled_flag is a flag notified by a sequence parameter set (SPS) or the like, and indicates whether or not MMVD prediction is available. If sps_mmvd_enabled_flag==1, that is, if 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 inter prediction parameters of the target CU. When mmvd_merge_flag is 0, it indicates that the MMVD mode is not used to generate 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] When 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 difference vector as shown in Fig. 14(c). mmvd_direction_idx indicates the direction of the difference vector as shown in 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, if the MMVD flag does not indicate the MMVD mode (NO in S1305), and if the number of merge candidates MaxNumMergeCand is greater than 1 (YES in S1306), the parameter decoding unit 302 decodes merge_idx (S1307).
[0106] If sps_mmvd_enabled_flag==0 (NO in S1303) or if MaxNumMergeCand is equal to or smaller than 1 (NO in S1306), that is, if merge_idx does not appear, the inter prediction parameter derivation unit 303 sets merge_idx to 0 (infers it).
[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] If regular_merge_flag==0, that is, if the mode is not the 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), the CIIP parameters are decoded from the encoded data (S1312). In the 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 current block is in triangle mode, and the parameter decoding unit 302 decodes the triangle parameters (S1313). For example, as the triangle parameters, the method of splitting a CU into two, merge_triangle_split_dir, which is the merge_idx of one of the blocks obtained by splitting a CU into two, and merge_triangle_idx1, which is the merge_idx of the other, may be decoded. In the case of triangle mode, the inter prediction parameter derivation unit 303 starts up the triangle prediction unit 30377.
[0110] In the first embodiment, by using the regular merge flag, it is possible to arrange a plurality of prediction modes in a well-balanced manner on the tree. This has the effect of improving the coding efficiency without increasing the bit cost, and reducing the processing delay because the tree is not deep.
[0111] (Embodiment 2) The flow of prediction mode derivation processing 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 with reference to Fig. 19 and Fig. 20. Fig. 19 is a flowchart showing the flow of prediction mode derivation processing in the inter prediction parameter derivation unit 303. Fig. 20 is a diagram showing the syntax of prediction modes according to this embodiment. Fig. 19 shows processing corresponding to a part of the syntax in Fig. 20.
[0112] In the flowchart in FIG. 19 and the syntax in FIG. 20, even if MMVD prediction is not enabled by sps_mmvd_enabled_flag (sps_mmvd_enabled_flag=0), merge_idx is decoded, and if merge_idx=1, prediction in the merge mode is performed.
[0113] 19 and 18 are operations in the regular merge mode (S1403 to S1409), so the operations in the regular merge mode will be described below. Operations in cases other than the regular merge mode are the same as those in the first embodiment.
[0114] The inter prediction parameter derivation unit 303 checks the value of sps_mmvd_enabled_flag (S1403). If sps_mmvd_enabled_flag==1, that is, if 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] If mmvd_merge_flag==1, that is, if the MMVD flag indicates the MMVD mode (YES in S1405), the parameter decoding unit 302 decodes the MMVD mode parameters from the encoded data (S1409).
[0116] If mmvd_merge_flag==0 (NO in S1403) or sps_mmvd_enabled_flag==0 (NO in S1405) (MMVD flag is not MMVD mode) and if the number of merge candidates MaxNumMergeCand is greater than 1 (YES in S1406), the parameter decoding unit 302 decodes merge_idx (S1407).
[0117] If MaxNumMergeCand is equal to or smaller than 1 (NO in S1406), that is, if merge_idx does not appear, the inter prediction parameter derivation unit 303 sets merge_idx to 0 (infers it).
[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 the second embodiment, the regular merge flag is used to divide the modes into two groups: 1) merge mode and MMVD mode, and 2) intra-inter mode (CIIP mode) and triangle mode. In the branch of 1), sps_mmvd_enabled_flag decoded from the parameter set and mmvd_merge_flag decoded on a CU-by-CU basis are used to select whether the target CU uses MMVD prediction or is in a merge mode that does not use MMVD. In addition to the case where mmvd_merge_flag is 0, even if sps_mmvd_enabled_flag==0, the merge index is decoded if the number of merge candidates is greater than 1. Therefore, even if the MMVD mode is prohibited by the upper syntax, the merge mode can be selectively used, which has the effect of realizing high coding efficiency.
[0120] When affine_flag is 1, that is, when affine prediction mode is indicated, the affine prediction unit 30372 derives inter prediction parameters on a sub-block basis.
[0121] When mmvd_flag is 1, that is, when it indicates the MMVD prediction mode, the MMVD predictor 30373 derives inter prediction parameters from the merge candidates and difference vectors derived by the merge prediction parameter derivation unit 3036.
[0122] When TriangleFlag is 1, that is, when it indicates a triangle prediction mode, the triangle prediction unit 30377 derives triangle prediction parameters.
[0123] When merge_flag is 1, that is, when it indicates 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 it indicates 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 section) The MV adder 3038 adds the derived mvpLX and mvdLX to derive mvLX.
[0126] (Affine prediction part) The affine prediction unit 30372 1) derives motion vectors for two control points CP0 and CP1, or three control points CP0, CP1, and CP2 of the target block, 2) derives affine prediction parameters for the target block, and 3) derives motion vectors for each sub-block from the affine prediction parameters.
[0127] In the case of merge affine prediction, the motion vector cpMvLX[] of each control point CP0, CP1, CP2 is derived from the motion vector of the block adjacent to the target block. In the case of inter-affine prediction, the cpMvLX[] of each control point is derived from the sum of the predicted vector 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 subblock, 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 the merge candidates 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 the decoded adjacent 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 a spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads out prediction parameters stored in the prediction parameter memory 307 according to a predetermined rule, and sets them as merge candidates. The method of designating the reference picture is, for example, prediction parameters related to each of adjacent blocks within a predetermined range from the target block (for example, all or part of blocks adjacent to the left A1, right B1, upper right B0, lower left A0, and upper left B2 of the target block). Each merge candidate is called A1, B1, B0, A0, and B2. Here, A1, B1, B0, A0, and B2 are motion information derived from blocks including the following coordinates. The positions of A1, B1, B0, A0, and 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) The upper left coordinates of the target block are (xCb, yCb), its width is cbWidth, and its height is cbHeight.
[0136] As a temporal merge derivation process, the merge candidate derivation unit 30361 reads prediction parameters of the lower right CBR of the target block or block C in the reference image including the center coordinates from the prediction parameter memory 307, sets it as a merge candidate Col, and stores it in the merge candidate list mergeCandList[ ].
[0137] The pairwise candidate derivation unit derives a pairwise candidate avgK from the average of the two merge candidates (p0Cand, p1Cand) already stored in mergeCandList, and stores it in mergeCandList[].
[0138] mvLXavgK[0] = (mvLXp0Cand[0]+mvLXp1Cand[0]) / 2 mvLXavgK[1] = (mvLXp0Cand[1]+mvLXp1Cand[1]) / 2 The merging candidate derivation unit 30361 derives zero merging candidates Z0, . . . , ZM, in which refIdxLX is 0...M and the X and Y components of mvLX are both 0, and stores them in the merging candidate list.
[0139] The order of storing the mergeCandList[] is, for example, spatial merge candidates (A1, B1, B0, A0, B2), temporal merge candidates Col, pairwise candidates avgK, and zero merge candidates ZK. Note that reference blocks that are unavailable (e.g., blocks that are intra-predicted) 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 merging candidate selection unit 30362 selects a merging candidate N indicated by merge_idx from among the merging candidates included in the merging candidate list, using the following formula.
[0140] N = mergeCandList[merge_idx] Here, N is a label indicating a merging candidate, and can be A1, B1, B0, A0, B2, Col, avgK, ZK, etc. The motion information of the merging candidate indicated by label N is indicated by (mvLXN[0], mvLXN[0]), predFlagLXN, refIdxLXN.
[0141] The merging candidate selection unit 30362 selects the selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN as inter prediction parameters for the current block. The merging candidate selection unit 30362 stores the inter prediction parameters of the selected merging candidate in the prediction parameter memory 307, and also outputs them to the inter predicted image generation unit 309.
[0142] (MMVD Prediction Section 30373) The MMVD prediction unit 30373 obtains mvLX by adding mvdLX of a predetermined distance and a predetermined direction to the central vector mvpLX (motion vector mvLXN of merging candidate N) derived by the merging candidate derivation unit 30361. The MMVD prediction unit 30373 derives the central vector mvLX[] using the syntax element mmvd_cand_flag (FIG. 14(a)) of the encoded data, and derives the difference vector mvpLX[] from mmvd_direction_idx (FIG. 14(d)) indicating an index in the direction table and mmvd_distance_idx (FIG. 14(c)) indicating an index in 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 that derives MmvdDistance is switched by a flag slice_fpel_mmvd_enabled_flag that indicates whether or not to set the precision of the motion vector to integer precision at the slice level. Specifically, when slice_fpel_mmvd_enabled_flag is 0, DistanceTable[] = { 1, 2, 4, 8, 16, 32, 64, 128} If slice_fpel_mmvd_enabled_flag is 1, DistanceTable[] = { 4, 8, 16, 32, 64, 128, 256, 512} Let us assume that.
[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 difference 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 for adjusting the magnitude of the difference vector so that it matches 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 a motion vector of the MMVD merging candidate from refineMvLX and the central 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 forecast) Next, the triangle prediction will be described. In the triangle prediction, the target CU is divided into two triangular prediction units with a diagonal or anti-diagonal as a boundary. The predicted image in each triangular prediction unit is derived by applying a weighting mask process to each pixel of the predicted image of the target CU (rectangular block including the triangular prediction unit) according to the pixel position. Intuitively, a triangular image can be derived from a rectangular image by multiplying the upper left with a mask of 1 and the lower right with 0. The adaptive weighting process of the predicted image is applied to both areas on either side of 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 a triangle synthesis process. The transform (inverse transform) and quantization (inverse quantization) processes are applied to the entire target CU. Note that the triangle prediction is applied only in the merge prediction mode or the skip mode.
[0148] In the case of triangle mode, the triangle prediction unit 30377 derives prediction parameters corresponding to two triangular regions used in triangle prediction, and supplies them to the inter-prediction image generation unit 309. In order to simplify the process, the triangle prediction may be configured not to use bi-prediction. In this case, the inter-prediction parameters of unidirectional prediction are derived in one triangular region. Note that the derivation of the two predicted images and the synthesis using the predicted images are performed by the motion compensation unit 3091 and the triangle synthesis unit 30952.
[0149] (DMVR) Next, a DMVR (Decoder side Motion Vector Refinement) process performed by the DMVR unit 30375 will be described. When merge_flag is 1 for a target CU, or when skip_flag is 1, the DMVR unit 30375 corrects the mvLX of the target CU derived by the merge prediction unit 30374 using a reference image. Specifically, when the prediction parameters derived by the merge prediction unit 30374 are bi-predictive, the DMVR unit 30375 corrects the motion vector using a predicted image derived from a motion vector corresponding to two reference pictures. The corrected mvLX is supplied to the inter-prediction image generation unit 309.
[0150] (AMVP Prediction) 10B is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 derives a prediction vector candidate from the motion vector of the decoded adjacent block stored in the prediction parameter memory 307 based on refIdxLX, and stores it in a 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, it switches between 1 / 4 pixel, 1 pixel, and 4 pixel accuracy. 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 difference 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 using 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) Furthermore, the parameter decoding unit 302 may derive mvdLX[] before being shifted by the above MvShift by decoding the following syntax elements. abs_mvd_greater0_flag abs_mvd_minus2 mvd_sign_flag Then, the parameter decoding unit 302 decodes the difference vector lMvd[ ] from the syntax elements by using the following equation.
[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 be described. Given a motion vector Mv (reference motion vector), a picture PicMv including a block having Mv, a reference picture PicMvRef for Mv, a motion vector after scaling sMv, a picture CurPic including 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 formula.
[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, etc. 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, etc.
[0161] Furthermore, the scaling function MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef) may be expressed by the following formula.
[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 to the difference in time information between PicMv and PicMvRef.
[0163] (Configuration of the intra prediction parameter derivation unit 304) The intra prediction parameter derivation unit 304 derives intra prediction parameters, for example, an intra prediction mode IntraPredMode, with reference to prediction parameters stored in the prediction parameter memory 307, based on an input from the parameter decoding unit 302. The intra prediction parameter derivation unit 304 outputs the intra prediction parameters to the predicted image generation unit 308, and also stores them in the prediction parameter memory 307. The intra prediction parameter derivation unit 304 may derive different intra prediction modes for luminance and chrominance.
[0164] The loop filter 305 is a filter provided in the encoding loop, which removes block distortion and ringing distortion to improve image quality. The loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adder 312.
[0165] The reference picture memory 306 stores the decoded image of the CU in a location that is determined in advance for each current picture and current 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 generating unit 308 receives parameters derived by the prediction parameter derivation unit 320. The predicted image generating unit 308 also reads a reference picture from the reference picture memory 306. The predicted image generating unit 308 generates a predicted image of a block or sub-block using the parameters and a reference picture (reference picture block) in a prediction mode indicated by predMode. Here, the reference picture block is a set of pixels on the reference picture (usually rectangular, so 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 and reference picture input from the inter prediction parameter derivation unit 303.
[0169] 11 is a schematic diagram showing a 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 of 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 (interpolated image generation unit 3091) generates an interpolated image (motion compensated 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, if mvLX is not integer precision, a filter for generating pixels at decimal positions called a motion compensation filter is applied to generate an interpolated image.
[0171] The motion compensation unit 3091 first derives an integer position (xInt, yInt) and a phase (xFrac, yFrac) corresponding to coordinates (x, y) in the prediction block using the following formula.
[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) are the upper left coordinates of a block of size bW*bH, where x=0...bW-1, y=0...bH-1, and MVPREC indicates the accuracy of mvLX (1 / MVPREC pixel accuracy), e.g., MVPREC=16.
[0173] The motion compensation unit 3091 derives a temporary image temp[][] by performing horizontal interpolation processing on the reference picture refImg using an interpolation filter. In the following, Σ is the sum for k=0..NTAP-1, shift1 is a normalization parameter that adjusts the value range, and offset1=1<<(shift1-1).
[0174] temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP / 2+1][yInt]+offset1)>>shift1 Next, the motion compensation unit 3091 derives the interpolated image Pred[][] by vertically interpolating the temporary image temp[][]. In the following, Σ is the sum for k=0..NTAP-1, shift2 is a normalization parameter that adjusts 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 bi-prediction, the above Pred[][] is derived for each L0 list and L1 list (called 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 weighted prediction unit 3094, and a BIO unit 30954.
[0177] (IntraInter synthesis processing) When ciip_flag is 1, the intra-predicted image generation unit 310 sets the mode to planar prediction (IntraPredModeY=INTRA_PLANAR) and generates a predicted image predSamplesIntra[][].
[0178] When ciip_flag is 1, the inter predicted image generating unit 309 performs motion compensation using the motion vector obtained by merge prediction to generate a predicted image predSamplesInter[][].
[0179] When ciip_flag is 1, the IntraInter synthesis unit 30951 generates a predicted image predSamplesComb[][] by taking the weighted sum of the inter predicted image predSamplesInter[][] and the intra predicted image predSamplesIntra[][], and outputs the generated image 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 if both the upper and left adjacent blocks of the target CU are in intra mode, to 1 if both are in non-intra mode, and to 2 otherwise.
[0181] (Triangle synthesis processing) The triangle synthesis unit 30952 generates a predicted image using the above-mentioned triangle prediction.
[0182] (BIO forecast) Next, a description will be given of details of the BIO prediction (Bi-Directional Optical Flow, BDOF processing) performed by the BIO unit 30954. In a bi-prediction mode, the BIO unit 30954 generates a predicted image by referring to two predicted images (a first predicted image and a second predicted image) and a gradient correction term.
[0183] When the inter prediction parameter decoding unit 303 determines that the prediction mode is unidirectional prediction of L0, the motion compensation unit 3091 generates PredL0[x][y]. When the inter prediction parameter decoding unit 303 determines that the prediction mode is 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 that the prediction mode is bi-prediction mode, the synthesis unit 3095 refers to bioAvailableFlag, which indicates whether or not to perform BIO processing, and determines whether or not BIO processing is required. When bioAvailableFlag indicates TRUE, the BIO unit 30954 executes BIO processing to generate a bi-directional predicted image, and when bioAvailableFlag indicates FALSE, the synthesis unit 3095 generates a predicted image by normal bi-directional predicted 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 the two pictures are in the opposite direction to the current picture.
[0185] (Weighted prediction) The weighted prediction unit 3094 generates a predicted image of the block by multiplying the interpolated image PredLX by a weighting coefficient. When one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uniprediction) and weighted prediction is not used, the following equation is processed to match PredLX (LX is L0 or L1) to the pixel bit count bitDepth.
[0186] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)> >shift1) Here, shift1=14-bitDepth and offset1=1<<(shift1-1). Furthermore, when both prediction list usage flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI) and weighted prediction is not used, the following formula is processed to average PredL0 and PredL1 and match them to the number of pixel bits.
[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 uni-prediction and weighted prediction are performed, the weighted prediction unit 3094 derives a weighted prediction coefficient w0 and an offset o0 from the encoded data, and performs processing according to the following equations.
[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 bi-prediction PRED_BI and weighted prediction are performed, the weighted prediction unit 3094 derives weighted prediction coefficients w0, w1, o0, and o1 from the coded data, and performs processing according to the following equations.
[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 generated prediction image of the block to the addition unit 312 .
[0192] (Intra-prediction image generation unit 310) When predMode indicates an 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 reference pixels read from the reference picture memory 306 .
[0193] Specifically, the intra-prediction image generation unit 310 reads adjacent blocks in a predetermined range from a target block on a target picture from the reference picture memory 306. The predetermined range refers to adjacent blocks to the left, upper left, upper, and upper right of the target block, and the area to be referenced differs depending on the intra-prediction mode.
[0194] The intra-prediction image generation unit 310 generates a prediction image of the current block by referring to the read decoded pixel values and the prediction mode indicated by IntraPredMode. The intra-prediction image generation unit 310 outputs the generated prediction image of the block to the addition unit 312.
[0195] Generation of a predicted image based on an intra prediction mode will be described below. In planar prediction, DC prediction, and angular prediction, a decoded surrounding area adjacent (close) to the prediction target block is set as a reference area R. Then, a predicted image is generated by extrapolating pixels in 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 top of the prediction target block (or further, the top left, top right, and bottom left).
[0196] In planar prediction, a provisional predicted image is generated by linearly adding reference samples s[x][y] according to the distance between the pixel position to be predicted and the reference pixel position.
[0197] The inverse quantization and inverse transform unit 311 inverse quantizes the quantized transform coefficients input from the parameter decoding unit 302 to obtain transform coefficients.
[0198] The adder 312 generates a decoded image of the block by adding, for each pixel, the predicted image of the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311. The adder 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 a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 12 is a block diagram showing the configuration of the video encoding device 11 according to this embodiment. The video encoding device 11 includes a prediction image generating unit 101, a subtraction unit 102, a transformation and quantization unit 103, an inverse quantization and inverse transformation 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 determining unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.
[0200] The predicted image generation unit 101 generates a predicted image for each CU. The predicted image generation unit 101 includes the inter predicted image generation unit 309 and the intra predicted image generation unit 310, which have already been described, and therefore a description thereof will be omitted.
[0201] The subtraction unit 102 generates a prediction error by subtracting the pixel values of the predicted image of the block input from the predicted image generation unit 101 from the pixel values of the image T. The subtraction unit 102 outputs the prediction error to the transformation and quantization unit 103.
[0202] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction errors input from the subtraction unit 102, and derives quantized transform coefficients by quantizing the prediction errors. The transform / quantization unit 103 outputs the quantized transform coefficients to the parameter coding unit 111 and the inverse quantization / inverse transform unit 105.
[0203] The inverse quantization and inverse transform unit 105 is the same as the inverse quantization and inverse transform unit 311 (FIG. 7) in the video decoding device 31, and a description thereof will be omitted. The calculated prediction error is output to the addition unit .
[0204] The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, and a CU coding unit 1112 (prediction mode coding unit). The CU coding unit 1112 further includes a TU coding unit 1114. The following describes an outline of the operation of each module.
[0205] The header encoding unit 1110 performs encoding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.
[0206] The CT information encoding unit 1111 encodes the QT, MT (BT, TT) division information and the like.
[0207] The CU encoding unit 1112 encodes the CU information, prediction information, division information, and so on.
[0208] When a prediction error is included in a TU, the TU encoding unit 1114 encodes the QP update information and the 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 coding unit 104 receives the quantized transform coefficients and coding parameters (division information, prediction parameters) from the parameter coding unit 111. The entropy coding unit 104 entropy codes these to generate and output a coded 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 the inter-prediction parameter encoding unit) 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 the video decoding device. 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 predictive vector candidates and the like, and outputs them to the inter prediction parameter derivation unit 303 and the parameter coding unit 111.
[0214] (Configuration of the 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 the video decoding device.
[0215] The parameter coding control unit 1131 derives IntraPredModeY and IntraPredModeC. Furthermore, it determines intra_luma_mpm_flag by referring to mpmCandList[ ]. These prediction parameters are output to the intra prediction parameter derivation unit 304 and the parameter coding unit 111.
[0216] However, unlike the video decoding device, the inputs to the inter prediction parameter derivation unit 303 and the intra prediction parameter derivation unit 304 are the coding parameter determination unit 110 and the prediction parameter memory 108 , and they are output to the parameter coding unit 111 .
[0217] The adder 106 generates a decoded image by adding, for each pixel, the pixel value of the predicted block input from the predicted image generation unit 101 and the prediction error input from the inverse quantization and inverse transform unit 105. The adder 106 stores the generated decoded image in a reference picture memory 109.
[0218] The loop filter 107 performs deblocking filtering, SAO, and ALF on the decoded image generated by the adder 106. Note that the loop filter 107 does not necessarily have to include the above three types of filters, and may be configured, for example, as only a deblocking filter.
[0219] The prediction parameter memory 108 stores the prediction parameters generated by the coding parameter determination unit 110 in a predetermined location for each current picture and CU.
[0220] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each current picture and CU.
[0221] The coding parameter determination unit 110 selects one set from among a plurality of sets of coding parameters. The coding parameters are the above-mentioned QT, BT or TT division information, prediction parameters, or parameters to be coded that are generated in relation to these. The predicted image generation unit 101 generates a predicted image using these coding parameters.
[0222] The coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the information amount and the coding error for each of the multiple sets. The RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by a coefficient λ. The code amount is the information amount of the coding 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 that is set in advance. The coding parameter determination unit 110 selects a set of coding parameters that minimizes the calculated cost value. The coding parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111 and the prediction parameter derivation unit 120.
[0223] In addition, a part of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generating unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the prediction parameter derivation unit 320, the predicted image generating unit 101, the subtraction unit 102, the transform and quantization unit 103, the entropy coding unit 104, the inverse quantization and inverse transform unit 105, the loop filter 107, the coding parameter determination unit 110, the parameter coding unit 111, and the prediction parameter derivation unit 120 may be realized by a computer. In this case, a program for realizing this control function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into and executed by a computer system. In addition, the "computer system" referred to here is a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. In addition, "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording medium" may also include devices that dynamically hold a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, and devices that hold a program for a certain period of time, such as volatile memory inside a computer system that serves as a server or client in such cases. Furthermore, the above program may be one that realizes part of the above-mentioned functions, or may be one that can realize the above-mentioned functions in combination with a program already recorded in the computer system.
[0224] In addition, a part or the whole of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the video encoding device 11 and the video decoding device 31 may be individually made into a processor, or a part or the whole may be integrated into a processor. The integrated circuit method is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Furthermore, when an integrated circuit technology that replaces LSI appears due to the progress of semiconductor technology, an integrated circuit based on that technology may be used.
[0225] Although one embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to the above, and various design changes, etc. are possible within the scope that does not deviate from the gist of the present invention.
[0226] [Application example] The above-mentioned video encoding device 11 and video decoding device 31 can be mounted on various devices that transmit, receive, record, and play videos. The video may be a natural video captured by a camera or the like, or an artificial video (including CG and GUI) generated by a computer or the like.
[0227] First, it will be described with reference to FIG. 2 that the above-mentioned video encoding device 11 and video decoding device 31 can be used for transmitting and receiving videos.
[0228] Fig. 2(a) is a block diagram showing the configuration of a transmitting device PROD_A equipped with a video encoding device 11. As shown in the figure, the transmitting device PROD_A includes an encoding unit PROD_A1 that obtains encoded data by encoding a video, a modulation unit PROD_A2 that obtains a modulated signal by modulating a carrier wave with the encoded data obtained by the encoding unit PROD_A1, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-mentioned video encoding device 11 is used as this encoding unit PROD_A1.
[0229] The transmitting device PROD_A may further include a camera PROD_A4 for capturing moving images, a recording medium PROD_A5 for recording moving images, an input terminal PROD_A6 for inputting moving images from the outside, and an image processing unit A7 for generating or processing images, as a source of moving images to be input to the encoding unit PROD_A1. In the figure, the transmitting device PROD_A is illustrated as having all of these components, but some of them may be omitted.
[0230] The recording medium PROD_A5 may record unencoded video, or may record video encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding method for recording may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
[0231] 2(b) is a block diagram showing the configuration of a receiving device PROD_B equipped with a video decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulation unit PROD_B2 that obtains coded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a decoding unit PROD_B3 that obtains a video by decoding the coded data obtained by the demodulation unit PROD_B2. The above-mentioned video decoding device 31 is used as this decoding unit PROD_B3.
[0232] The receiving device PROD_B may further include, as destinations of the moving image output by the decoding unit PROD_B3, a display PROD_B4 for displaying the moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal PROD_B6 for outputting the moving image to the outside. In the figure, the receiving device PROD_B is illustrated as having all of these components, but some of them may be omitted.
[0233] The recording medium PROD_B5 may be for recording unencoded video, or may be encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_B3 and the recording medium PROD_B5, which encodes the video acquired from the decoding unit PROD_B3 according to the encoding method for recording.
[0234] The transmission medium for transmitting the modulated signal may be wireless or wired. The transmission mode for transmitting the modulated signal may be broadcast (here, this refers to a transmission mode in which the destination is not specified in advance) or communication (here, this refers to a transmission mode in which the destination is specified in advance). In other words, the transmission of the modulated signal may be realized by any of wireless broadcast, wired broadcast, wireless communication, and wired communication.
[0235] For example, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by wireless broadcasting. Also, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by cable broadcasting.
[0236] Also, a server (such as a workstation) / client (such as a television receiver, a personal computer, a smartphone, etc.) of a VOD (Video On Demand) service or a video sharing service using the Internet is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by communication (usually, in a LAN, either wireless or wired is used as a transmission medium, and in a WAN, wired is used as a transmission medium). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Also, smartphones include multi-function mobile phone terminals.
[0237] The client of the video hosting service has a function to decode the encoded data downloaded from the server and display it on a display, as well as a function to encode the video captured by the camera and upload it to the server. That is, the client of the video hosting service functions as both the transmitting device PROD_A and the receiving device PROD_B.
[0238] Next, it will be described with reference to FIG. 3 that the above-mentioned video encoding device 11 and video decoding device 31 can be used for recording and reproducing videos.
[0239] 3(a) is a block diagram showing the configuration of a recording device PROD_C equipped with the above-mentioned video 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 a video, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 onto a recording medium PROD_M. The above-mentioned video encoding device 11 is used as this encoding unit PROD_C1.
[0240] The recording medium PROD_M may be (1) a type built into the recording device PROD_C, such as an HDD (Hard Disk Drive) or SSD (Solid State Drive), (2) a type connected to the recording device PROD_C, such as an SD memory card or USB (Universal Serial Bus) flash memory, or (3) a type loaded into a drive device (not shown) built into the recording device PROD_C, such as a DVD (Digital Versatile Disc: registered trademark) or BD (Blu-ray Disc: registered trademark).
[0241] The recording device PROD_C may further include a camera PROD_C3 for capturing moving images, an input terminal PROD_C4 for inputting moving images from the outside, a receiving unit PROD_C5 for receiving moving images, and an image processing unit PROD_C6 for generating or processing images, as a supply source of moving images to be input to the encoding unit PROD_C1. Although the figure illustrates a configuration in which the recording device PROD_C includes all of these, some of them may be omitted.
[0242] The receiving unit PROD_C5 may receive unencoded video, or may receive encoded data encoded by an encoding method for transmission that is different from the encoding method for recording. In the latter case, a transmission decoding unit (not shown) that decodes the encoded data encoded by the encoding method for transmission 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, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of the moving image). Other examples of such a recording device PROD_C include a camcorder (in this case, the camera PROD_C3 is the main source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main source of the moving image), and a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of the moving image).
[0244] 3(b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-mentioned video decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads out coded data written to a recording medium PROD_M, and a decoding unit PROD_D2 that obtains video by decoding the coded data read by the reading unit PROD_D1. The above-mentioned video decoding device 31 is used as this decoding unit PROD_D2.
[0245] The recording medium PROD_M may be (1) a type that is built into the playback device PROD_D, such as an HDD or SSD, (2) a type that is connected to the playback device PROD_D, such as an SD memory card or USB flash memory, or (3) a type that is loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or BD.
[0246] The playback device PROD_D may further include, as destinations of the video output by the decoding unit PROD_D2, a display PROD_D3 for displaying the video, an output terminal PROD_D4 for outputting the video to the outside, and a transmission unit PROD_D5 for transmitting the video. In the figure, the playback device PROD_D is illustrated as having all of these components, but some of them may be omitted.
[0247] The transmission unit PROD_D5 may transmit unencoded video, or may transmit encoded data encoded by an encoding method for transmission different from the encoding method for recording. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_D2 and the transmission unit PROD_D5, which encodes the video by the encoding method for transmission.
[0248] Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected is the main destination of the video image). Other examples of such a playback device PROD_D include a television receiver (in this case, the display PROD_D3 is the main destination of the video image), a digital signage (also called an electronic billboard or electronic bulletin board, and the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main destination of the video image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), and a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image).
[0249] (Hardware and Software Realizations) Furthermore, each block of the above-mentioned video decoding device 31 and video encoding device 11 may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or in software by using a CPU (Central Processing Unit).
[0250] In the latter case, each of the above devices includes a CPU that executes the commands of a program that realizes 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. The object of the embodiment of the present invention can also be achieved by supplying each of the above devices with a recording medium on which the program code (executable program, intermediate code program, source program) of the control program of each of the above devices, which is software that realizes the above-mentioned functions, is recorded in a computer-readable manner, and the computer (or CPU or MPU) reads and executes the program code recorded on the recording medium.
[0251] Examples of the recording medium that can be used include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy disks (registered trademark) and hard disks, disks including optical disks such as CD-ROMs (Compact Disc Read-Only Memory), MO disks (Magneto-Optical discs), MDs (Mini Discs), DVDs (Digital Versatile Discs: registered trademark), CD-Rs (CD Recordable), and Blu-ray Discs (registered trademark), cards such as IC cards (including memory cards) and optical cards, semiconductor memories such as mask ROMs, EPROMs (Erasable Programmable Read-Only Memory), EEPROMs (Electrically Erasable and Programmable Read-Only Memory: registered trademark), and flash ROMs, and logic circuits such as PLDs (Programmable logic devices) and FPGAs (Field Programmable Gate Arrays).
[0252] Moreover, 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 is not particularly limited as long as it is capable of transmitting the program code. For example, the Internet, an intranet, an extranet, a LAN (Local Area Network), an ISDN (Integrated Services Digital Network), a VAN (Value-Added Network), a CATV (Community Antenna television / Cable Television) communication network, a virtual private network, a telephone line network, a mobile communication network, a satellite communication network, etc. may be used. Moreover, the transmission medium constituting this communication network is not limited to a specific configuration or type as long as it is a medium capable of transmitting the program code. For example, it can be used in wired communication 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 in wireless communication such as infrared such as IrDA (Infrared Data Association) or remote control, BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. The embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
[0253] The present invention is not limited to the above-described embodiment, and various modifications are possible within the scope of the claims. In other words, the technical scope of the present invention also includes embodiments obtained by combining technical means that are appropriately modified within the scope of the claims. [Industrial Applicability]
[0254] The embodiments of the present invention can be suitably applied to a video decoding device that decodes coded data in which image data is coded, and a video coding device that generates coded data in which image data is coded, and can also be suitably applied to the data structure of coded data that is generated by a video coding device and referenced by the video decoding device.
[0255] (summary) An image decoding device according to one embodiment of the present invention has a parameter decoding unit that decodes parameters for generating a predicted image, and when a regular merge flag indicates a regular merge mode, checks a flag indicating whether or not MMVD prediction, which is notified in a sequence parameter set or the like, is available, and when MMVD prediction is not available, decodes motion vector information obtained from a merge candidate.
[0256] An image decoding device according to one embodiment of the present invention is characterized in that, when the regular merge flag indicates regular merge mode, the device decodes a flag sps_mmvd_enabled_flag indicating whether MMVD prediction notified in the sequence parameter set or the like is available or not, and a flag mmvd_merge_flag indicating whether MMVD prediction is used on a CU basis, and when mmvd_merge_flag==0 or sps_mmvd_enabled_flag==0 and 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 device according to one embodiment of the present invention has parameter encoding that encodes parameters for generating a predicted image, and when a regular merge flag indicates a regular merge mode, checks a flag indicating whether or not MMVD prediction, which is notified in a sequence parameter set or the like, is available, and when MMVD prediction is not available, encodes motion vector information obtained from a merge candidate.
[0258] An image encoding device according to one embodiment of the present invention is characterized in that, when the regular merge flag indicates regular merge mode, it encodes a flag sps_mmvd_enabled_flag indicating whether MMVD prediction notified in the sequence parameter set or the like is available or not, and a flag mmvd_merge_flag indicating whether MMVD prediction is used on a CU basis, and when mmvd_merge_flag==0 or sps_mmvd_enabled_flag==0 and the number of merge candidates MaxNumMergeCand is greater than 1, the parameter encoding unit encodes an index merge_idx for selecting from the merge candidates as the motion vector information.
[0259] By adopting such a configuration, even if the MMVD mode is prohibited by the higher-level syntax, the merge mode can be selectively used, thereby achieving high coding efficiency.
[0260] An image decoding device according to one embodiment of the present invention is an image decoding device that decodes parameters for generating a predicted image, and is equipped with a parameter decoding unit that decodes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data, and the parameter decoding unit is characterized in that, 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 or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set, and, when the value of the flag is 1, decodes an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit, and uses the MMVD merge flag to decode a merge index, which is an index of a merge candidate list.
[0261] An image decoding device according to one embodiment of the present invention is characterized in that the merge index is decoded when the MMVD merge flag indicates that the motion vector of the merge candidate is not used to generate the inter prediction parameters and the number of merge candidates is greater than one.
[0262] An image decoding device according to one aspect of the present invention is characterized in that, when the value of the MMVD merge flag is 0, the value of the merge index is estimated to be 0.
[0263] An image coding device according to one embodiment of the present invention is an image coding device that codes parameters for generating a predicted image, and is equipped with a parameter coding unit that codes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data, and when the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter coding unit checks a flag indicating whether or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set, and when the value of the flag is 1, codes an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit, and codes 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 embodiment of the present invention is an image decoding method for decoding parameters for generating a predicted image, and is characterized in that it includes at least the steps of: decoding a regular merge flag from merge data indicating whether or not a regular merge mode is used in inter prediction; if the regular merge flag indicates that the regular merge mode is used in inter prediction, checking a flag indicating whether or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set; if the value of the flag is 1, decoding an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit; 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 July 24, 2019, the entire contents of which are incorporated herein by reference.
[0266] (Additional Notes) The above embodiment can also be expressed as follows. An image decoding device according to one embodiment of the present invention is an image decoding device that decodes parameters for generating a predicted image, and is equipped with a parameter decoding unit that decodes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data, and the parameter decoding unit is characterized in that, 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 or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set, and, when the value of the flag is 1, decodes an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit, and uses the MMVD merge flag to decode a merge index, which is an index of a merge candidate list.
[0267] An image decoding device according to one embodiment of the present invention is characterized in that the merge index is decoded when the MMVD merge flag indicates that the motion vector of the merge candidate is not used to generate the inter prediction parameters and the number of merge candidates is greater than one.
[0268] An image decoding device according to one aspect of the present invention is characterized in that, when the value of the MMVD merge flag is 0, the value of the merge index is estimated to be 0.
[0269] An image coding device according to one embodiment of the present invention is an image coding device that codes parameters for generating a predicted image, and is equipped with a parameter coding unit that codes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from merge data, and when the regular merge flag indicates that the regular merge mode is used in inter prediction, the parameter coding unit checks a flag indicating whether or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set, and when the value of the flag is 1, codes an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit, and codes a merge index, which is an index of a merge candidate list, using the MMVD merge flag.
[0270] An image decoding method according to one embodiment of the present invention is an image decoding method for decoding parameters for generating a predicted image, and is characterized in that it includes at least the steps of: decoding a regular merge flag from merge data indicating whether or not a regular merge mode is used in inter prediction; if the regular merge flag indicates that the regular merge mode is used in inter prediction, checking a flag indicating whether or not a motion vector of a merge candidate is valid, which is notified in a sequence parameter set; if the value of the flag is 1, decoding an MMVD merge flag indicating whether or not the motion vector of the merge candidate is used to generate inter prediction parameters of a target coding unit; and decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag. [Configuration 1] An image decoding device that decodes parameters for generating a predicted image, comprising: A parameter decoding unit that decodes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from the merge data, The parameter decoding unit If 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 is valid, the flag being indicated in a sequence parameter set; If 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 inter prediction parameters of the current coding unit; An image decoding device characterized in that a merge index, which is an index of a merge candidate list, is decoded using the MMVD merge flag.
[0271] [Configuration 2] The image decoding device of configuration 1, characterized in that the merge index is decoded when the MMVD merge flag indicates that the motion vector of the merge candidate is not used to generate the inter prediction parameters and the number of merge candidates is greater than one.
[0272] [Configuration 3] 2. The image decoding apparatus according to claim 1, wherein if 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 device that encodes parameters for generating a predicted image, comprising: A parameter encoding unit that encodes a regular merge flag indicating whether or not a regular merge mode is used in inter prediction from the merge data, The parameter encoding unit is If 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 is valid, the flag being indicated in a sequence parameter set; If 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 inter prediction parameters of the current coding unit; An image coding device characterized in that a merge index, which is an index of a merge candidate list, is coded using the MMVD merge flag.
[0274] [Configuration 5] 1. An image decoding method for decoding parameters for generating a predicted image, comprising: decoding a regular merge flag from the merge data, the regular merge flag indicating whether a regular merge mode is used in inter prediction; if the regular merge flag indicates that the regular merge mode is used in inter prediction, checking a flag, which is indicated in a sequence parameter set, indicating whether a motion vector of a merge candidate is valid; if the flag has a value of 1, decoding an MMVD merge flag indicating whether the motion vector of the merge candidate is used to generate inter prediction parameters of a current coding unit; and a step of decoding a merge index, which is an index of a merge candidate list, using the MMVD merge flag. [Explanation of symbols]
[0275] 31 Image Decoding Device 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 Prediction image generation unit 309 Inter-prediction image generation unit 310 Intra-prediction image generation unit 311, 105 Inverse quantization and inverse transformation unit 312, 106 Addition section 320 Prediction parameter derivation part 11 Image encoding device 102 Subtraction section 103 Transformation and Quantization Section 104 Entropy coding unit 110 Encoding parameter determination unit 111 Parameter Encoding Unit 112 Inter-prediction parameter coding unit 113 Intra prediction parameter coding unit 120 Prediction parameter derivation part
Claims
1. An image decoding device that decodes parameters for generating a predicted image, comprising: Decoding a regular merge flag from the merge data, the regular merge flag indicating whether a regular merge mode is used in inter prediction; Decoding an MMVD merge flag from the merge data, the MMVD merge flag indicating whether an MMVD mode is used to generate inter prediction parameters of the current coding unit; a parameter decoding unit configured to decode a merge index, which is an index of a merge candidate list, from the merge data; The parameter decoding unit If the value of the regular merge flag is 1, check the MMVD enabled flag, which is notified in the sequence parameter set and indicates whether the MMVD mode is enabled or not; If the MMVD possible flag has a value of 1, decode the MMVD merge flag; If the value of the MMVD possible flag is 0, estimate the MMVD merge flag; If the value of the MMVD enable flag is 0 and the number of merge candidates is greater than 1, decode the merge index; When the value of the MMVD possible flag is 0 and the number of merging candidates is 1 or less, the value of the merging index is estimated to be 0.
2. An image encoding device that encodes parameters for generating a predicted image, comprising: encoding a regular merge flag from the merge data indicating whether a regular merge mode is used in inter prediction; Encoding an MMVD merge flag from the merge data, the MMVD merge flag indicating whether an MMVD mode is used to generate inter prediction parameters of the target coding unit; 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 is If the value of the regular merge flag is 1, check the MMVD enabled flag, which is notified in the sequence parameter set and indicates whether the MMVD mode is enabled or not; If the value of the MMVD enable flag is 1, encode the MMVD merge flag; If the value of the MMVD possible flag above is 0, set the MMVD merge flag above, If the value of the MMVD enable flag is 0 and the number of merge candidates is greater than 1, encode the merge index; When the value of the MMVD possible flag is 0 and the number of merging candidates is 1 or less, the value of the merging index is set to 0.
3. A computer-readable recording medium having a program recorded thereon for causing a computer to decode parameters for generating a predicted image, comprising: The program is configured to: decoding a regular merge flag from the merge data, the regular merge flag indicating whether a regular merge mode is used in inter prediction; If the value of the regular merge flag is 1, checking an MMVD enabled flag notified in the sequence parameter set, which indicates whether the MMVD mode is enabled; if the value of the MMVD possible flag is 1, decoding an MMVD merge flag indicating whether an MMVD mode is used to generate inter prediction parameters of the current coding unit; if the MMVD possible flag has a value of 0, estimating the MMVD merge flag; if the value of the MMVD possible flag is 0 and the number of merging candidates is greater than 1, decoding a merging index, which is an index of a merging candidate list; if the value of the MMVD possible flag is 0 and the number of merge candidates is equal to or less than 1, inferring a value of the merge index to 0; A recording medium for executing the above.
4. A computer-readable recording medium having a program recorded thereon for causing a computer to encode parameters for generating a predicted image, comprising: The program is configured to: encoding a regular merge flag from the merge data indicating whether a regular merge mode is used in inter prediction; If the value of the regular merge flag is 1, checking an MMVD enabled flag notified in the sequence parameter set, which indicates whether the MMVD mode is enabled; if the value of the MMVD possible flag is 1, encoding an MMVD merge flag indicating whether an MMVD mode is used to generate inter prediction parameters of the current coding unit; if the value of the MMVD possible flag is zero, setting the MMVD merge flag; encoding a merge index, which is an index of a merge candidate list, if the value of the MMVD possible flag is 0 and the number of merge candidates is greater than 1; if the value of the MMVD possible flag is 0 and the number of merge candidates is 1 or less, setting the value of the merge index to 0; A recording medium for executing the above.
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