Method and apparatus for image encoding / decoding
By generating a candidate list and optimizing the selection of motion vector prediction factors, the problem of low efficiency in generating MERGE/AMVP candidate lists in existing technologies is solved, improving the prediction and coding efficiency of video coding, and enhancing the accuracy of motion information transmission and the transmission efficiency of transform coefficients.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IND ACAD COOP GRP OF SEJONG UNIV
- Filing Date
- 2020-01-06
- Publication Date
- 2026-07-03
Smart Images

Figure CN113287302B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to an image encoding / decoding method and apparatus. Background Technology
[0002] Recently, the demand for multimedia data such as video on the Internet has grown rapidly. However, the development of channel bandwidth cannot keep up with the rapidly increasing volume of multimedia data. Therefore, in February 2014, the ITU-T VCEG (Video Coding Experts Group) and the ISO / IEC MPEG (Moving Picture Experts Group) issued HEVC (High Efficiency Video Coding) version 1 (a video compression standard).
[0003] HEVC defines techniques such as intra-frame prediction, inter-frame prediction, transform, quantization, entropy coding, and in-loop filtering. Summary of the Invention
[0004] Technical issues
[0005] This disclosure proposes a method in which prediction efficiency can be improved by efficiently deriving motion information used to generate a list of MERGE / AMVP candidates.
[0006] This disclosure provides a method and apparatus for searching motion vector prediction factors of the current block in the reconstructed motion information surrounding the current block when generating a prediction block for the current block.
[0007] This disclosure provides a method and apparatus for effectively transmitting motion information of the current block.
[0008] This disclosure provides a method and apparatus for more effectively predicting the current block by using reconstruction information in the current frame.
[0009] This disclosure provides a method and apparatus for encoding / decoding the transform coefficients of the current block.
[0010] Technical solution
[0011] According to the image encoding / decoding method and apparatus of this disclosure, a candidate list for the current block can be generated, and inter-frame prediction of the current block can be performed by using any one of the multiple candidates belonging to the candidate list.
[0012] In the image encoding / decoding method and apparatus according to the present disclosure, the plurality of candidates may include at least one of spatial candidates, temporal candidates or candidates based on reconstruction information, and candidates based on reconstruction information may be added from a buffer of motion information previously decoded in the current block.
[0013] In the image encoding / decoding method and apparatus according to the present disclosure, motion information stored in the buffer can be added to the candidate list in the order of motion information stored later in the buffer, or in the order of motion information stored first in the buffer.
[0014] In the image encoding / decoding method and apparatus according to the present disclosure, the number or order in which motion information stored in the buffer is added to the candidate list can be determined differently depending on the inter-frame prediction mode of the current block.
[0015] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate list can be filled by using motion information stored in a buffer until the maximum number of candidates in the candidate list is reached, or the candidate list can be filled by using motion information stored in a buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
[0016] In the image encoding / decoding method and apparatus according to the present disclosure, the buffer can be initialized in units of coding tree unit (CTU), CTU line, stripe or frame.
[0017] According to this disclosure, a computer-readable recording medium can store a bitstream that will be decoded by an image decoding method.
[0018] In a computer-readable recording medium according to the present disclosure, an image decoding method may include generating a candidate list of a current block and performing inter-frame prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
[0019] In a computer-readable recording medium according to the present disclosure, a plurality of candidates may include at least one of spatial candidates, temporal candidates, or candidates based on reconstruction information, and candidates based on reconstruction information may be added from a buffer of motion information stored prior to the current block.
[0020] In a computer-readable recording medium according to this disclosure, motion information stored in a buffer may be added to a candidate list in the order in which motion information is stored later in the buffer, or in the order in which motion information is stored first in the buffer.
[0021] In a computer-readable recording medium according to this disclosure, the number or order in which motion information stored in a buffer is added to a candidate list can be determined differently depending on the inter-frame prediction mode of the current block.
[0022] In a computer-readable recording medium according to this disclosure, a candidate list can be populated by using motion information stored in a buffer until the maximum number of candidates in the candidate list is reached, or the candidate list can be populated by using motion information stored in a buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
[0023] In a computer-readable recording medium according to this disclosure, the buffer can be initialized in units of coding tree units (CTUs), CTU lines, stripes, or frames.
[0024] According to the image encoding / decoding method and apparatus of this disclosure, a candidate list for the current block can be generated, and inter-frame prediction of the current block can be performed by using any one of the multiple candidates belonging to the candidate list.
[0025] In the image encoding / decoding method and apparatus according to this disclosure, the plurality of candidates may include temporal candidates on a sub-block basis. The temporal candidates on a sub-block basis may be candidates for deriving motion information of each sub-block of the current block, and may have motion information of target blocks that are temporally adjacent to the current block.
[0026] In the image encoding / decoding method and apparatus according to the present disclosure, the sub-block can be an N×M block having a fixed size preset in the decoding apparatus.
[0027] In the image encoding / decoding method and apparatus according to the present disclosure, a sub-block of a target block can be determined as a block located at a position offset from the position of a sub-block of the current block by a predetermined time motion vector.
[0028] In the image encoding / decoding method and apparatus according to the present disclosure, a temporal motion vector can be set by using only the surrounding blocks at a specific location in the spatial surrounding blocks of the current block, and the surrounding blocks at the specific location can be the left block of the current block.
[0029] In the image encoding / decoding method and apparatus according to the present disclosure, the time motion vector can be set only when the reference image of the surrounding block at the specific location is the same as the target image to which the target block belongs.
[0030] According to this disclosure, a computer-readable recording medium can store a bitstream that will be decoded by an image decoding method.
[0031] In a computer-readable recording medium according to the present disclosure, an image decoding method may include generating a candidate list of a current block and performing inter-frame prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
[0032] In a computer-readable recording medium according to this disclosure, the plurality of candidates may include time candidates on a sub-block basis. The time candidates on a sub-block basis may be candidates for deriving motion information for each sub-block of the current block, and may have motion information for a target block that is temporally adjacent to the current block.
[0033] In a computer-readable recording medium according to the present disclosure, a sub-block may be an N×M block having a fixed size preset in a decoding device.
[0034] In a computer-readable recording medium according to the present disclosure, a sub-block of a target block can be determined as a block located at a position offset from the position of a sub-block of the current block by a predetermined time motion vector.
[0035] In a computer-readable recording medium according to the present disclosure, a time motion vector can be set by using only the surrounding blocks at a specific location in the spatial surrounding blocks of the current block, and the surrounding blocks at the specific location may be the left block of the current block.
[0036] In a computer-readable recording medium according to this disclosure, a time motion vector may be set only when the reference frame of the surrounding block at the specific location is the same as the target frame to which the target block belongs.
[0037] According to the image encoding / decoding method and apparatus of this disclosure, a merging candidate list for the current block can be configured, any one of the multiple merging candidates belonging to the merging candidate list can be set as the motion information of the current block, the final motion vector of the current block can be derived by adding a predetermined motion vector difference (MVD) to the motion vector in the motion information of the current block, and a predicted block of the current block can be generated by performing motion compensation based on the final motion vector.
[0038] In the image encoding / decoding method and apparatus according to the present disclosure, the merging candidate list may be configured with k merging candidates, and k may be a natural number such as 4, 5, 6 or greater.
[0039] In the image encoding / decoding method and apparatus according to the present disclosure, motion information of the current block can be set by using either a first merge candidate or a second merge candidate belonging to the merge candidate list, based on merge candidate index information sent from the encoding apparatus.
[0040] In the image encoding / decoding method and apparatus according to the present disclosure, motion vector difference can be derived based on a predetermined offset vector, and a predetermined offset vector can be derived based on at least one of the length or direction of the predetermined offset vector.
[0041] In the image encoding / decoding method and apparatus according to the present disclosure, the length of a predetermined offset vector can be determined based on at least one of a distance index or a predetermined flag, and the flag can represent information indicating whether the motion vector uses integer pixel accuracy in the merging mode of the current block.
[0042] In the image encoding / decoding method and apparatus according to the present disclosure, the direction of a predetermined offset vector can be determined based on a direction index, and the direction can represent any one of the directions of left, right, top, bottom, upper left, lower left, upper right, or lower right.
[0043] In the image encoding / decoding method and apparatus according to the present disclosure, a predetermined offset vector can be modified by taking into account the POC difference between the reference frame of the current block and the current frame to which the current block belongs.
[0044] The image encoding / decoding method and apparatus according to this disclosure can determine the prediction block of the current block belonging to the current block by using the previously reconstructed region in the current frame, encode / decode the transform block of the current block, and reconstruct the current block based on the prediction block and the transform block.
[0045] In the image encoding / decoding method and apparatus according to the present disclosure, determining a prediction block may include determining candidates for deriving motion information of the current block, configuring a candidate list of the current block based on the candidates, and determining the motion information of the current block from the candidate list.
[0046] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate may represent motion information of surrounding blocks that are spatially adjacent to the current block.
[0047] In the image encoding / decoding method and apparatus according to the present disclosure, there may be a limitation that the predicted block and the current block belong to the same coding tree unit (CTU) or CTU row.
[0048] In the image encoding / decoding method and apparatus according to the present disclosure, motion information of surrounding blocks can be selectively added to a candidate list based on whether the size of the current block is greater than a predetermined threshold size.
[0049] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate list may additionally include motion information stored in a buffer of the encoding / decoding apparatus.
[0050] In the image encoding / decoding method and apparatus according to the present disclosure, the current block is divided into multiple sub-blocks, and encoding / decoding the transform block may include: encoding / decoding the sub-block information of the sub-blocks of the current block, and encoding / decoding at least one of the coefficient information greater than 0, coefficient information greater than 1, parity information or coefficient information greater than 3 of the current coefficient in the sub-block when there is at least one non-zero coefficient in the sub-block according to the sub-block information.
[0051] In the image encoding / decoding method and apparatus according to the present disclosure, the quantity information of sub-blocks can be encoded / decoded, and the quantity information can represent the maximum number of coefficient information allowed in the sub-blocks.
[0052] In the image encoding / decoding method and apparatus according to the present disclosure, the coefficient information may include at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, or coefficient information greater than 3.
[0053] In the image encoding / decoding method and apparatus according to the present disclosure, whenever at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, or coefficient information greater than 3 is encoded / decoded, the quantity information may be increased / decreased by 1.
[0054] Technical effect
[0055] According to this disclosure, prediction efficiency can be improved by efficiently deriving motion information used to generate a list of MERGE / AMVP candidates.
[0056] This disclosure improves coding efficiency by using reconstructed motion information around the current block to select motion vector predictors and efficiently transmit motion information.
[0057] This disclosure can improve the accuracy of the predicted signal by searching for motion information of blocks even in the current frame rather than in the previously reconstructed frame, and can provide an image encoding / decoding method and apparatus that thereby transmits transform coefficients more efficiently. Attached Figure Description
[0058] Figure 1 This is a flowchart schematically illustrating an image encoding device.
[0059] Figure 2 This is a diagram used to describe in detail the prediction unit of an image coding apparatus.
[0060] Figure 3 This is a diagram illustrating a method for deriving candidate motion information for SKIP and MERGE patterns.
[0061] Figure 4 This is a flowchart illustrating a method for deriving candidate motion information for AMVP patterns.
[0062] Figure 5 This is a flowchart illustrating a method for encoding prediction information.
[0063] Figure 6 This is a flowchart schematically illustrating an image decoding device.
[0064] Figure 7 This is a diagram used to describe the prediction unit of an image decoding device.
[0065] Figure 8 This is a flowchart illustrating the method for decoding prediction information.
[0066] Figure 9 This is a flowchart describing a method for configuring a MERGE / AMVP candidate list according to this embodiment.
[0067] Figure 10 This is a diagram illustrating a method for deriving temporal candidate motion information according to this embodiment.
[0068] Figure 11 This is a diagram illustrating a first method for determining a target block in a target frame when exporting temporal candidate motion information according to this embodiment.
[0069] Figure 12 This is a diagram illustrating a second method for determining a target block in a target frame when exporting temporal candidate motion information according to this embodiment.
[0070] Figure 13 This is a diagram illustrating a third method for determining a target block in a target frame when exporting temporal candidate motion information according to this embodiment.
[0071] Figure 14 This is a diagram illustrating a first method for deriving historical candidate motion information according to this embodiment.
[0072] Figure 15 This is a diagram illustrating a second method for deriving historical candidate motion information according to this embodiment.
[0073] Figure 16 This is a diagram illustrating a first method for deriving average candidate motion information according to this embodiment.
[0074] Figure 17 This is a diagram illustrating a second method for deriving average candidate motion information according to this embodiment.
[0075] Figure 18 This is a schematic diagram illustrating a method for predicting MVD information.
[0076] Figure 19 This is an example table describing a method for configuring a Merge / AMVP candidate list for motion vectors, according to embodiments of this disclosure.
[0077] Figure 20 This is an example table describing a method for configuring a Merge / AMVP candidate list for MVD, according to embodiments of this disclosure.
[0078] Figure 21 This is a flowchart illustrating a process for encoding prediction information including MVD candidate motion information according to an embodiment of the present disclosure.
[0079] Figure 22 This is a flowchart illustrating a process for decoding prediction information including MVD candidate motion information according to an embodiment of the present disclosure.
[0080] Figure 23 This is a flowchart illustrating a process for encoding prediction information, including additional MVD information, according to an embodiment of the present disclosure.
[0081] Figure 24 This is a flowchart illustrating a process for decoding prediction information, including additional MVD information, according to an embodiment of the present disclosure.
[0082] Figure 25 This is a table illustrating configuration examples of a reference screen set according to embodiments of the present disclosure.
[0083] Figure 26 This is a table describing a method for adaptively determining the inter-frame prediction direction and binarization of reference frame index information based on the configuration state of a reference frame set according to embodiments of the present disclosure.
[0084] Figure 27 This is a table showing information about the initial occurrence probabilities of MPS and LPS based on the context of the corresponding binary bits when transmitting binary bits of inter-frame prediction direction information according to an embodiment of the present disclosure.
[0085] Figure 28 This is a diagram illustrating the update rules for the probability of LPS occurrence according to an embodiment of the present disclosure.
[0086] Figure 29 This is a block diagram showing the intra-frame prediction unit of an image coding apparatus.
[0087] Figure 30 This is a block diagram showing the inter-frame prediction unit of an image coding apparatus.
[0088] Figure 31 It is a method for encoding prediction pattern information.
[0089] Figure 32 The intra-frame prediction unit of the image decoding device is shown.
[0090] Figure 33 The image decoding device shows the inter-frame prediction unit.
[0091] Figure 34 It is a method for decoding prediction pattern information.
[0092] Figure 35 This is a flowchart illustrating the encoding method of the transform block.
[0093] Figure 36 This is a flowchart illustrating the decoding method for the transform block.
[0094] Figure 37 This is a flowchart illustrating the context-adaptive binary arithmetic coding method.
[0095] Figure 38 This is a flowchart illustrating the context-adaptive binarization arithmetic decoding method.
[0096] Figure 39 This is a diagram illustrating examples of applying probability information differently based on information from surrounding coefficients.
[0097] Figure 40 This is a diagram illustrating examples of applying probability information differently based on information from surrounding coefficients.
[0098] Figure 41 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
[0099] Figure 42 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0100] Figure 43 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0101] Figure 44 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0102] Figure 45 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0103] Figure 46 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0104] Figure 47 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0105] Figure 48 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0106] Figure 49 A method for generating prediction blocks by using intra-block copy prediction is shown according to an embodiment of the present disclosure.
[0107] Figure 50 This is a block diagram illustrating an intra-block copy prediction unit of an image coding apparatus according to an embodiment of the present disclosure.
[0108] Figure 51 This indicates the locations of adjacent space candidates around the current block.
[0109] Figure 52 This is a method for encoding prediction pattern information according to embodiments of the present disclosure.
[0110] Figure 53 This is a block diagram illustrating an intra-block copy prediction unit of an image decoding apparatus according to an embodiment of the present disclosure.
[0111] Figure 54 This is a block diagram illustrating an intra-block copy prediction unit of an image decoding apparatus according to an embodiment of the present disclosure.
[0112] Figure 55 This is a method for decoding prediction pattern information according to embodiments of the present disclosure.
[0113] Figure 56 This is a flowchart illustrating a method for encoding quantization transform coefficients according to an embodiment of the present disclosure.
[0114] Figure 57 This is a flowchart illustrating a method for decoding quantization transform coefficients according to an embodiment of the present disclosure. Detailed Implementation
[0115] Optimal Implementation
[0116] According to the image encoding / decoding method and apparatus of this disclosure, a candidate list for the current block can be generated, and inter-frame prediction of the current block can be performed by using any one of the multiple candidates belonging to the candidate list.
[0117] In the image encoding / decoding method and apparatus according to the present disclosure, the plurality of candidates may include at least one of spatial candidates, temporal candidates or candidates based on reconstruction information, and candidates based on reconstruction information may be added from a buffer of motion information previously decoded in the current block.
[0118] In the image encoding / decoding method and apparatus according to the present disclosure, motion information stored in the buffer can be added to the candidate list in the order of motion information stored later in the buffer, or in the order of motion information stored first in the buffer.
[0119] In the image encoding / decoding method and apparatus according to the present disclosure, the number or order in which motion information stored in the buffer is added to the candidate list can be determined differently depending on the inter-frame prediction mode of the current block.
[0120] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate list can be filled by using motion information stored in a buffer until the maximum number of candidates in the candidate list is reached, or the candidate list can be filled by using motion information stored in a buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
[0121] In the image encoding / decoding method and apparatus according to the present disclosure, the buffer can be initialized in units of coding tree unit (CTU), CTU line, stripe or frame.
[0122] According to this disclosure, a computer-readable recording medium can store a bitstream that will be decoded by an image decoding method.
[0123] In a computer-readable recording medium according to the present disclosure, an image decoding method may include generating a candidate list of a current block and performing inter-frame prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
[0124] In a computer-readable recording medium according to the present disclosure, a plurality of candidates may include at least one of spatial candidates, temporal candidates, or candidates based on reconstruction information, and candidates based on reconstruction information may be added from a buffer of motion information stored prior to the current block.
[0125] In a computer-readable recording medium according to this disclosure, motion information stored in a buffer may be added to a candidate list in the order in which motion information is stored later in the buffer, or in the order in which motion information is stored first in the buffer.
[0126] In a computer-readable recording medium according to this disclosure, the number or order in which motion information stored in a buffer is added to a candidate list can be determined differently depending on the inter-frame prediction mode of the current block.
[0127] In a computer-readable recording medium according to this disclosure, a candidate list can be populated by using motion information stored in a buffer until the maximum number of candidates in the candidate list is reached, or the candidate list can be populated by using motion information stored in a buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
[0128] In a computer-readable recording medium according to this disclosure, the buffer can be initialized in units of coding tree units (CTUs), CTU lines, stripes, or frames.
[0129] According to the image encoding / decoding method and apparatus of this disclosure, a candidate list for the current block can be generated, and inter-frame prediction of the current block can be performed by using any one of the multiple candidates belonging to the candidate list.
[0130] In the image encoding / decoding method and apparatus according to this disclosure, the plurality of candidates may include temporal candidates on a sub-block basis. The temporal candidates on a sub-block basis may be candidates for deriving motion information of each sub-block of the current block, and may have motion information of target blocks that are temporally adjacent to the current block.
[0131] In the image encoding / decoding method and apparatus according to the present disclosure, the sub-block can be an N×M block having a fixed size preset in the decoding apparatus.
[0132] In the image encoding / decoding method and apparatus according to the present disclosure, a sub-block of a target block can be determined as a block located at a position offset from the position of a sub-block of the current block by a predetermined time motion vector.
[0133] In the image encoding / decoding method and apparatus according to the present disclosure, a temporal motion vector can be set by using only the surrounding blocks at a specific location in the spatial surrounding blocks of the current block, and the surrounding blocks at the specific location can be the left block of the current block.
[0134] In the image encoding / decoding method and apparatus according to the present disclosure, the time motion vector can be set only when the reference image of the surrounding block at the specific location is the same as the target image to which the target block belongs.
[0135] According to this disclosure, a computer-readable recording medium can store a bitstream that will be decoded by an image decoding method.
[0136] In a computer-readable recording medium according to the present disclosure, an image decoding method may include generating a candidate list of a current block and performing inter-frame prediction of the current block by using any one of a plurality of candidates belonging to the candidate list.
[0137] In a computer-readable recording medium according to this disclosure, the plurality of candidates may include time candidates on a sub-block basis. The time candidates on a sub-block basis may be candidates for deriving motion information for each sub-block of the current block, and may have motion information for a target block that is temporally adjacent to the current block.
[0138] In a computer-readable recording medium according to the present disclosure, a sub-block may be an N×M block having a fixed size preset in a decoding device.
[0139] In a computer-readable recording medium according to the present disclosure, a sub-block of a target block can be determined as a block located at a position offset from the position of a sub-block of the current block by a predetermined time motion vector.
[0140] In a computer-readable recording medium according to the present disclosure, a time motion vector can be set by using only the surrounding blocks at a specific location in the spatial surrounding blocks of the current block, and the surrounding blocks at the specific location may be the left block of the current block.
[0141] In a computer-readable recording medium according to this disclosure, a time motion vector may be set only when the reference frame of the surrounding block at the specific location is the same as the target frame to which the target block belongs.
[0142] According to the image encoding / decoding method and apparatus of this disclosure, a merging candidate list for the current block can be configured, any one of the multiple merging candidates belonging to the merging candidate list can be set as the motion information of the current block, the final motion vector of the current block can be derived by adding a predetermined motion vector difference (MVD) to the motion vector in the motion information of the current block, and a predicted block of the current block can be generated by performing motion compensation based on the final motion vector.
[0143] In the image encoding / decoding method and apparatus according to the present disclosure, the merging candidate list may be configured with k merging candidates, and k may be a natural number such as 4, 5, 6 or greater.
[0144] In the image encoding / decoding method and apparatus according to the present disclosure, motion information of the current block can be set by using either a first merge candidate or a second merge candidate belonging to the merge candidate list, based on merge candidate index information sent from the encoding apparatus.
[0145] In the image encoding / decoding method and apparatus according to the present disclosure, motion vector difference can be derived based on a predetermined offset vector, and a predetermined offset vector can be derived based on at least one of the length or direction of the predetermined offset vector.
[0146] In the image encoding / decoding method and apparatus according to the present disclosure, the length of a predetermined offset vector can be determined based on at least one of a distance index or a predetermined flag, and the flag can represent information indicating whether the motion vector uses integer pixel accuracy in the merging mode of the current block.
[0147] In the image encoding / decoding method and apparatus according to the present disclosure, the direction of a predetermined offset vector can be determined based on a direction index, and the direction can represent any one of the directions of left, right, top, bottom, upper left, lower left, upper right, or lower right.
[0148] In the image encoding / decoding method and apparatus according to the present disclosure, a predetermined offset vector can be modified by taking into account the POC difference between the reference frame of the current block and the current frame to which the current block belongs.
[0149] The image encoding / decoding method and apparatus according to this disclosure can determine the prediction block of the current block belonging to the current block by using the previously reconstructed region in the current frame, encode / decode the transform block of the current block, and reconstruct the current block based on the prediction block and the transform block.
[0150] In the image encoding / decoding method and apparatus according to the present disclosure, determining a prediction block may include determining candidates for deriving motion information of the current block, configuring a candidate list of the current block based on the candidates, and determining the motion information of the current block from the candidate list.
[0151] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate may represent motion information of surrounding blocks that are spatially adjacent to the current block.
[0152] In the image encoding / decoding method and apparatus according to the present disclosure, there may be a limitation that the predicted block and the current block belong to the same coding tree unit (CTU) or CTU row.
[0153] In the image encoding / decoding method and apparatus according to the present disclosure, motion information of surrounding blocks can be selectively added to a candidate list based on whether the size of the current block is greater than a predetermined threshold size.
[0154] In the image encoding / decoding method and apparatus according to the present disclosure, the candidate list may additionally include motion information stored in a buffer of the encoding / decoding apparatus.
[0155] In the image encoding / decoding method and apparatus according to the present disclosure, the current block is divided into multiple sub-blocks, and encoding / decoding the transform block may include: encoding / decoding the sub-block information of the sub-blocks of the current block, and encoding / decoding at least one of the coefficient information greater than 0, coefficient information greater than 1, parity information or coefficient information greater than 3 of the current coefficient in the sub-block when there is at least one non-zero coefficient in the sub-block according to the sub-block information.
[0156] In the image encoding / decoding method and apparatus according to the present disclosure, the quantity information of sub-blocks can be encoded / decoded, and the quantity information can represent the maximum number of coefficient information allowed in the sub-blocks.
[0157] In the image encoding / decoding method and apparatus according to the present disclosure, the coefficient information may include at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, or coefficient information greater than 3.
[0158] In the image encoding / decoding method and apparatus according to the present disclosure, whenever at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, or coefficient information greater than 3 is encoded / decoded, the quantity information may be increased / decreased by 1.
[0159] Implementation of this disclosure
[0160] Embodiments of this disclosure have been described in detail with reference to the accompanying drawings, enabling those skilled in the art to readily implement this disclosure. However, this disclosure can be implemented in various different forms and is not limited to the embodiments described herein. Furthermore, portions irrelevant to the description have been omitted, and similar reference numerals have been applied to similar portions throughout the specification to clearly describe this disclosure in the accompanying drawings.
[0161] In this specification, when a component is referred to as being "connected to" another component, this includes the case where it is electrically connected while being inserted into another component, as well as the case where it is directly connected.
[0162] Additionally, in this specification, when a component is referred to as a “comprise” component, it means that other components may be included without excluding them, unless otherwise stated.
[0163] Additionally, terms such as "first," "second," etc., can be used to describe various components, but these components should not be limited by these terms. These terms are only used to distinguish one component from others.
[0164] Furthermore, in the embodiments of the apparatus and methods described in this specification, some configurations of the apparatus or some steps of the method may be omitted. Additionally, the order of some configurations of the apparatus or some steps of the method may be changed. Furthermore, another configuration or another step may be inserted into some configurations of the apparatus or some steps of the method.
[0165] In addition, some configurations or steps in the first embodiment of this disclosure may be added to the second embodiment of this disclosure, or may be replaced by some configurations or steps in the second embodiment.
[0166] Furthermore, when the building units shown in the embodiments of this disclosure are independently illustrated to represent different functional features, it does not mean that each building unit is configured in a separate hardware or software building unit. In other words, for ease of description, each building unit can be described by listing each building unit as a separate building unit, and at least two building units in each building unit can be combined to configure a building unit, or a building unit can be divided into multiple building units to perform functions. Such integrated and separate embodiments in each building unit are also included within the scope of the claims of this disclosure, provided that they do not depart from the spirit of this disclosure.
[0167] In this specification, blocks may be represented as units, regions, units, partitions, etc., and samples may be represented as pixels, pixel points, cells, etc.
[0168] In the following description, embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Repeated descriptions of the same components are omitted in the description of the present disclosure.
[0169] Figure 1 This is a block flowchart schematically illustrating the configuration of an image encoding apparatus. As an apparatus for encoding images, the image encoding apparatus may mainly include a block partitioning unit, a prediction unit, a transform unit, a quantization unit, an entropy coding unit, an inverse quantization unit, an inverse transform unit, an addition unit, an in-loop filter unit, a memory unit, and a subtraction unit.
[0170] Block partitioning unit 101 partitions the block encoded with the largest size (hereinafter referred to as the largest coded block) into blocks encoded with the smallest size (hereinafter referred to as the smallest coded block). Several block partitioning methods exist. Quadtree partitioning (hereinafter referred to as QT (quadtree) partitioning) partitions the current coded block exactly into four partitions. Binary tree partitioning (hereinafter referred to as BT (binary tree) partitioning) partitions the coded block exactly into two partitions in either the horizontal or vertical direction. Tritree partitioning partitions the coded block into three partitions in either the horizontal or vertical direction. When partitioning the coded block horizontally, the height ratio of the partitioned blocks can be {1:n:1}. Optionally, when partitioning the coded block vertically, the width ratio of the partitioned blocks can be {1:n:1}. In this case, n can be a natural number such as 1, 2, 3, or larger. Various other partitioning methods may exist. Furthermore, partitioning can be performed by considering several partitioning methods simultaneously.
[0171] Prediction unit 102 generates prediction blocks by using pixels surrounding the currently predicted block (hereinafter referred to as the prediction block) in the current original block or pixels in the already encoded / decoded reference frame. One or more prediction blocks can be generated within an encoded block. When the number of prediction blocks in an encoded block is one, the prediction block has the same shape as the encoded block. As video signal prediction techniques are primarily configured with intra-frame prediction and inter-frame prediction, intra-frame prediction generates prediction blocks by using pixels surrounding the current block, while inter-frame prediction generates prediction blocks by finding the block most similar to the current block in the already encoded / decoded reference frame. Then, for the residual block obtained by subtracting the prediction block from the original block, the optimal prediction mode for the prediction block is determined using various methods such as RDO (Rate Distortion Optimization). The formula for calculating the RDO cost is shown in Equation 1.
[0172] [Formula 1]
[0173] J(Φ, λ) = D(Φ) + λR(Φ)
[0174] D, R, and J represent the degradation caused by quantization, the rate of compression, and the RD cost, respectively. Φ is the coding mode, and λ is the Lagrange multiplier, which are used as coefficients for scaling to match the units between the error amount and the bit amount. To be selected as the optimal coding mode in the encoding process, J (i.e., the RD cost) when the corresponding mode is applied should be less than J when other modes are applied, and it is calculated in the formula used to find the RD cost value by simultaneously considering the bit rate and the error.
[0175] An intra-prediction unit (not shown) can generate a prediction block based on reference pixel information surrounding the current block, which serves as pixel information in the current frame. When the prediction mode of the surrounding blocks of the current block to be intra-predicted is inter-prediction, reference pixels from other surrounding blocks that have applied intra-prediction can be used to replace reference pixels included in the surrounding blocks that have applied inter-prediction. In other words, when reference pixels are unavailable, unavailable reference pixel information can be used by replacing them with at least one of the available reference pixels.
[0176] In intra-frame prediction, the prediction mode can have a directional prediction mode that uses reference pixel information based on the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode used to predict luminance information can be different from the mode used to predict chrominance information, and chrominance information can be predicted using intra-frame prediction mode information used to predict luminance information or predicted luminance signal information.
[0177] An intra-prediction unit may include an adaptive intra-smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. As part of the filtering of reference pixels for the current block, the AIS filter adaptively determines whether to apply the filter based on the prediction mode in the current prediction unit. When the prediction mode for the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0178] When the prediction mode in the prediction unit is a prediction unit that performs intra-frame prediction based on the pixel values of interpolated reference pixels, the reference pixel interpolation unit in the intra-frame prediction unit can interpolate reference pixels to generate reference pixels at fractional unit positions. When the prediction mode in the current prediction unit is a prediction mode that generates prediction blocks without interpolating reference pixels, interpolation of reference pixels is not required. When the prediction mode of the current block is DC mode, the DC filter can generate prediction blocks through filtering.
[0179] The inter-frame prediction unit (not shown) generates prediction blocks using motion information stored in memory 110 and a previously reconstructed reference image. For example, the motion information may include motion vectors, reference frame indexes, list 1 prediction flags, list 0 prediction flags, etc.
[0180] The inter-frame prediction unit can derive a prediction block based on information from at least one of the previous or subsequent frames of the current frame. Alternatively, it can derive the prediction block of the current block based on information from some regions encoded in the current frame. The inter-frame prediction unit according to embodiments of this disclosure may include a reference frame interpolation unit, a motion prediction unit, and a motion compensation unit.
[0181] In the reference frame interpolation unit, reference frame information can be provided from memory 110, and pixel information equal to or less than integer pixels can be generated in the reference frame. For luminance pixels, an 8-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information equal to or less than integer pixels in units of 1 / 4 pixels. For chrominance signals, a 4-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information equal to or less than integer pixels in units of 1 / 8 pixels.
[0182] The motion prediction unit can perform motion prediction based on a reference frame interpolated by the reference frame interpolation unit. Various methods such as FBMA (Bulk Matching Algorithm Based on Full Search), TSS (Three-Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Motion vectors can have motion vector values in 1 / 2 or 1 / 4 pixel units based on interpolated pixels. In the motion prediction unit, the prediction block for the current block can be predicted by using different motion prediction methods. Various methods such as Skip mode, Merge mode, and AMVP (Advanced Motion Vector Prediction) mode can be used as motion prediction methods.
[0183] Figure 2 This is a flowchart 200 describing the process in the prediction unit of an image coding apparatus. When intra-frame prediction is performed using original information and reconstructed information (201), the optimal intra-frame prediction mode is determined using the RD value of each prediction mode (202), and a prediction block is generated. When inter-frame prediction is performed using original information and reconstructed information (203), the RD values of SKIP mode, MERGE mode, and AMVP mode are calculated. In the MERGE candidate search unit 204, candidate motion information sets for SKIP mode and MERGE mode are configured. In the corresponding candidate motion information sets, the optimal motion information is determined using the RD value (205). In the AMVP candidate search unit 206, candidate motion information sets for AMVP mode are configured. Motion prediction is performed using the corresponding candidate motion information sets (207), and the optimal motion information is determined. Motion compensation 208 is performed using the optimal motion information determined in each mode to generate a prediction block.
[0184] The inter-frame prediction described above can be configured with three modes (SKIP mode, MERGE mode, and AMVP mode). Each prediction mode can find the prediction block of the current block by using motion information (prediction direction information, reference frame information, motion vector), and additional prediction modes that use motion information can also exist.
[0185] The SKIP mode determines the optimal prediction information by using motion information from previously reconstructed regions. Motion information candidate groups are configured in the reconstructed regions to generate prediction blocks by using candidates with the minimum RD cost value from the corresponding candidate groups as prediction information. In this case, the method for configuring the motion information candidate groups is the same as that for configuring the motion information candidate groups in the MERGE mode, and therefore is omitted in this specification.
[0186] The MERGE mode is similar to the SKIP mode in that it uses motion information from previously reconstructed regions to determine the optimal prediction information. However, they differ in that the SKIP mode searches for motion information in the candidate set that results in zero prediction error, while the MERGE mode searches for motion information in the candidate set that results in non-zero prediction error. Similar to the SKIP mode, motion information candidate sets are configured in the reconstructed region to generate prediction blocks by using the candidate with the minimum RD cost value in the corresponding candidate set as the prediction information.
[0187] Figure 3 In this context, 301 represents method 300 for generating motion information candidates for SKIP and MERGE modes. The maximum number of motion information candidates can be determined equally in both the image encoding and decoding devices, and the corresponding number information can be pre-sent in the higher head of the image encoding device (the higher head represents parameters sent from the higher set of blocks (e.g., video parameter set, sequence parameter set, frame parameter set, etc.)). In the descriptions of steps S305 and S306, motion information derived using the corresponding motion information is included in the motion information candidate group only when spatial and temporal candidate blocks are encoded using an inter-frame prediction mode. In step S305, four candidates from five spatial candidate blocks surrounding the current block are selected within the same frame. The positions of the spatial candidates are referenced... Figure 3 In step 302, the position of each candidate can be changed to any block in the reconstructed region. By considering spatial candidates in the order A1, A2, A3, A4, A5, the motion information of the spatial candidate block that can be used first is determined as the spatial candidate. However, this is merely an example of priority, and the priority can be A2, A1, A3, A4, A5 or A2, A1, A4, A3, A5. When duplicate motion information exists, only the motion information of the candidate with the higher priority is considered. In step S306, one candidate from the two temporal candidate blocks is selected. The position of the temporal candidate is referenced... Figure 3 302, and the position of each candidate is determined based on the block that is at the same position as the current block of the current frame in the co-frame. In this case, co-frames can be set between reconstructed frames under the same conditions in the image encoding device and the image decoding device. The motion information of the candidate block that can be used first is determined as a time candidate by considering the time candidates in the order of blocks B1, B2. The method for determining the motion information of the time candidate is referred to Figure 3 303. The motion information of candidate blocks (B1, B2) in the same frame indicates the predicted block in the reference frame B (however, the reference frame for each candidate block may be different from each other. In this specific embodiment, for convenience, it is represented as reference frame B). For the corresponding motion vector, the motion vector of the candidate block is determined by scaling the motion vector of the candidate block according to the corresponding ratio after calculating the ratio of the distance between the current frame and the reference frame A to the distance between the same frame and the reference frame B. Equation 2 represents the scaling formula.
[0188] [Equation 2]
[0189]
[0190] MV represents the motion vector of the temporal candidate block motion information. scale The zoom motion vector represents the time distance between the current frame and the reference frame B, and TD represents the time distance between the current frame and the reference frame A. Reference frame A and reference frame B can be the same reference frame. Similarly, motion information for time candidates is derived by determining the zoom motion vector as the motion vector for time candidates and determining the reference frame of the current frame as the reference frame information for the motion information of time candidates. Step S307 is executed only if the maximum number of motion information candidates has not been filled in steps S305 and S306, and step S307 is a step of adding new bidirectional motion information candidates by combining the motion information candidates derived in previous steps. Bidirectional motion information candidates are generated by introducing each of the motion information in the previously derived past or future directions and combining them into new candidates. Figure 3 Table 304 indicates the priority of bidirectional motion information candidate combinations. Additional combinations may be used besides those in this table, and this table only represents one example. When the maximum number of motion information candidates is not filled despite using bidirectional motion information candidates, step S308 is executed. In step S308, the motion vector of the motion information candidate is fixed to a zero motion vector, and the maximum number of motion information candidates is filled by making the reference frame different according to the prediction direction.
[0191] The AMVP mode determines the optimal motion information based on motion estimation for each reference frame using the prediction direction. In this case, the prediction direction can be a unidirectional direction using only one of the past / future directions, or a bidirectional direction using both past and future directions. Prediction blocks are generated by performing motion compensation using the optimal motion information determined by the motion estimation. In this case, a candidate set of motion information for motion estimation is derived for each reference frame based on the prediction direction. The corresponding candidate set of motion information is used as the starting point for motion estimation. The method for deriving the candidate set of motion information for motion estimation in the AMVP mode is described in reference 400. Figure 4 .
[0192] The maximum number of motion information candidates can be determined equally in both the image encoding and image decoding devices, and the corresponding number information can be pre-sent from the higher head of the image encoding device. In the descriptions of steps S401 and S402, motion information derived using the corresponding motion information is included in the motion information candidate group only when spatial candidate blocks and temporal candidate blocks are encoded using the inter-frame prediction mode. In step S401, unlike the description in step S305, the number (2) derived as spatial candidates can be different, and the priority used to select spatial candidates can also be different. The remaining descriptions are the same as those in step S305. Step S402 is the same as the description in step S306. In step S403, when duplicate motion information exists in the candidates derived so far, it is removed. Step S404 is the same as the description in step S308. Among the motion information candidates derived in this way, the motion information candidate with the minimum RD value is selected as the optimal motion information candidate, so as to obtain the optimal motion information of the AMVP mode through the motion estimation process based on the corresponding motion information.
[0193] Transform unit 103 generates a transform block by transforming the residual block, which is the difference between the original block and the prediction block. The transform block is the smallest unit used in the transformation and quantization process. The transform unit generates a transform block with transform coefficients by transforming the residual signal to the frequency domain. In this case, various transform methods (such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen Loeve Transform), etc.) can be used as methods to transform the residual signal to the frequency domain, and transform coefficients are generated by transforming the residual signal to the frequency domain using various transform methods. Matrix operations are performed using basis vectors to facilitate the use of transform methods. Depending on which prediction mode is used to encode the prediction block, transform methods can be mixed in various ways and used in matrix operations. For example, in intra-frame prediction, depending on the prediction mode, a discrete cosine transform can be used in the horizontal direction, and a discrete sine transform can be used in the vertical direction.
[0194] Quantization unit 104 generates a quantized transform block by quantizing the transform block. In other words, the quantization unit generates a quantized transform block (quantized transform coefficients) with quantized transform coefficients by quantizing the transform coefficients of the transform block generated from transform unit 103. As a quantization method, DZUTQ (Dead Zone Uniform Threshold Quantization) or a quantization weighting matrix can be used, but various quantization methods such as those that improve upon it can be used.
[0195] On the other hand, the image coding apparatus shown and described above includes a transform unit and a quantization unit, but may optionally include both. In other words, the image coding apparatus can generate a transform block by transforming the residual block without performing a quantization process, may perform only a quantization process without transforming the residual block into frequency coefficients, or may not perform either the transform or quantization process. Although not all or some of the processing of the transform unit and quantization unit is performed in the image coding apparatus, the block input to the entropy coding unit is generally referred to as a "quantized transform block".
[0196] The entropy coding unit 105 outputs a bitstream by encoding the quantization transform block. In other words, the entropy coding unit encodes the coefficients of the quantization transform block output from the quantization unit using various coding methods such as entropy coding, and generates and outputs a bitstream that includes additional information required for decoding the corresponding block in the image decoding apparatus described below (e.g., information about the prediction mode (motion information or intra-frame prediction mode information determined in the prediction unit may be included in the information about the prediction mode), quantization coefficients, etc.).
[0197] The dequantization unit 106 reconstructs the dequantization transform block by reversing the quantization method used in the quantization of the quantization transform block.
[0198] The inverse transform unit 107 reconstructs the residual block by performing an inverse transform on the dequantized transform block using the same method used in the transform, and performs the inverse transform by reversing the transform method used in the transform unit.
[0199] On the other hand, the dequantization unit and the inverse transform unit can perform dequantization and inverse transform by reversing the quantization method used in the quantization unit and the transform method used in the transform unit. Furthermore, when the transform unit and the quantization unit only perform quantization and not transform, they can perform only dequantization and not inverse transform. When neither transform nor quantization is performed, the dequantization unit and the inverse transform unit may not perform either inverse transform or dequantization, or they may be omitted if not included in the image encoding device.
[0200] The addition unit 108 reconstructs the current block by adding the residual signal generated in the inverse transform unit to the prediction block generated by prediction.
[0201] The filter unit 109 performs the following processing: after reconstructing all blocks in the current frame, additional filtering is performed on the frame, including deblocking filtering, SAO (Sample Adaptive Shift), and ALF (Adaptive Loop Filter). Deblocking filtering refers to the operation of reducing block distortion generated when encoding an image in blocks, and SAO (Sample Adaptive Shift) refers to the operation of minimizing the difference between the reconstructed image and the original image by subtracting a specific value from or adding a specific value to the reconstructed pixels. ALF (Adaptive Loop Filter) can be performed based on values generated by comparing the filtered reconstructed image with the original image. Pixels included in the image can be divided into predetermined groups, a filter to be applied to the corresponding group can be determined, and filtering can be performed separately for each group. Information related to whether to apply ALF can be transmitted for each coding unit (CU), and the shape and / or filter coefficients of the ALF filter to be applied can be different for each block. In addition, ALF filters of the same shape (fixed shape) can be applied regardless of the characteristics of the block to be applied.
[0202] The memory 110 can store the current block reconstructed by adding the residual signal generated in the inverse transform unit to the prediction block generated by prediction and then filtering it through the in-loop filter unit, and it can be used to predict subsequent blocks or subsequent frames, etc.
[0203] Subtraction unit 111 generates a residual block by subtracting the predicted block from the current original block.
[0204] Figure 5This is a flowchart 500 illustrating the encoding process of encoding information in the entropy encoding unit of an image encoding apparatus. In step S501, the operation information of the SKIP mode is encoded. In step S502, it is determined whether the SKIP mode is operating. If the SKIP mode is operating in step S502, the flowchart ends after encoding the merging candidate index information of the SKIP mode in step S507. If the SKIP mode is not operating in step S502, the prediction mode is encoded in step S503. In step S504, it is determined whether the prediction mode is an inter-frame prediction mode or an intra-frame prediction mode. If the prediction mode is an inter-frame prediction mode in step S504, the operation information of the MERGE mode is encoded in step S505. In step S506, it is determined whether the MERGE mode is operating. If the MERGE mode is operating in step S506, the flowchart ends after moving to step S507 and encoding the merging candidate index information of the MERGE mode. When the MERGE mode is not in operation in step S506, the predicted direction is encoded in step S508. In this case, the predicted direction can be one of the past direction, future direction, or bidirectional direction. In step S509, it is determined whether the predicted direction is a future direction. When the predicted direction is not a future direction in step S509, the reference frame index information in the past direction is encoded in step S510. In step S511, the MVD (Motion Vector Difference) information in the past direction is encoded. In step S512, the MVP (Motion Vector Prediction Factor) information in the past direction is encoded. When the predicted direction is a future direction or bidirectional direction in step S509, or when step S512 ends, it is determined whether the predicted direction is a past direction in step S513. When the predicted direction is not a past direction in step S513, the reference frame index information in the future direction is encoded in step S514. In step S515, the MVD information in the future direction is encoded. After the MVP information in the future direction is encoded in step S516, the flowchart ends. When the prediction mode is intra-frame prediction mode in step S504, the flowchart ends after the intra-frame prediction mode information is encoded in step S517.
[0205] Figure 6 This is a block flowchart schematically illustrating the configuration of the image decoding device 600.
[0206] The image decoding device 600 is a device for decoding images, and may mainly include a block entropy decoding unit, an inverse quantization unit, an inverse transform unit, a prediction unit, an addition unit, an in-loop filter unit, and a memory. The encoding block in the image encoding device is called a decoding block in the image decoding device.
[0207] The entropy decoding unit 601 reads the quantized transform coefficients and various information required to decode the corresponding block by interpreting the bit stream sent from the image encoding device.
[0208] The dequantization unit 602 reconstructs the dequantization block with dequantized coefficients by reversing the quantization method used in the entropy decoding unit to quantize the decoded quantization coefficients.
[0209] The inverse transform unit 603 reconstructs the residual block with the difference signal by performing an inverse transform on the dequantized transform block using the same method used in the transform, and performs the inverse transform by reversing the transform method used in the transform unit.
[0210] The prediction unit 604 generates a prediction block by using prediction mode information decoded in the entropy decoding unit, which uses the same prediction method as that performed in the prediction unit of the image encoding device.
[0211] Addition unit 605 reconstructs the current block by adding the residual signal reconstructed in the inverse transform unit to the prediction block generated by prediction.
[0212] The filter unit 606 performs the following processing: after reconstructing all blocks in the current frame, it performs additional filtering on the frame, including deblocking filtering, SAO (sample adaptive offset), ALF, etc., and the detailed description is the same as that described in the in-loop filter unit of the image coding device described above.
[0213] The memory 607 can store the current block reconstructed by adding the residual signal generated in the inverse transform unit to the prediction block generated by prediction and then filtering it through the in-loop filter unit, and it can be used to predict subsequent blocks or subsequent frames, etc.
[0214] Figure 7This is a flowchart 700 describing the process in the prediction unit of an image decoding apparatus. When the prediction mode is intra-frame prediction 701, the optimal intra-frame prediction mode information is determined and a prediction block is generated by performing intra-frame prediction (702). When the prediction mode is inter-frame prediction 703, the optimal prediction mode for SKIP mode, MERGE mode, and AMVP mode is determined. When decoding in SKIP mode or MERGE mode, a candidate motion information set for SKIP mode and MERGE mode is configured in the merging candidate search unit 704. Among the corresponding candidate motion information sets, the optimal motion information is determined by using the transmitted candidate index (e.g., merging index) (705). When decoding in AMVP mode, a candidate motion information set for AMVP mode is configured in the AMVP candidate search unit 706. Among the corresponding candidate motion information candidates, the optimal motion information is determined by using the transmitted candidate index (e.g., MVP information) (707). Then, motion compensation 708 is performed using the optimal motion information determined in each mode to generate a prediction block.
[0215] Figure 8This is a flowchart 800 illustrating the decoding process of encoded information in an image decoding device. In step S801, the operation information of the SKIP mode is decoded. In step S802, it is determined whether the SKIP mode is operating. When the SKIP mode is operating in step S802, the flowchart ends after decoding the merging candidate index information for the SKIP mode in step S807. When the SKIP mode is not operating in step S802, the prediction mode is decoded in step S803. In step S804, it is determined whether the prediction mode is an inter-frame prediction mode or an intra-frame prediction mode. When the prediction mode is an inter-frame prediction mode in step S804, the operation information of the MERGE mode is decoded in step S805. In step S806, it is determined whether the MERGE mode is operating. When the MERGE mode is operating in step S806, the flowchart ends after moving to step S807 and decoding the merging candidate index information for the MERGE mode. When the MERGE mode is not operating in step S806, the prediction direction is decoded in step S808. In this scenario, the predicted direction can be one of the following: a past direction, a future direction, or a bidirectional direction. In step S809, it is determined whether the predicted direction is a future direction. If the predicted direction is not a future direction in step S809, the reference frame index information in the past direction is decoded in step S810. In step S811, the MVD (Motion Vector Difference) information in the past direction is decoded. In step S812, the MVP (Motion Vector Prediction Factor) information in the past direction is decoded. If the predicted direction is a future direction or a bidirectional direction in step S809, or if step S812 ends, it is determined whether the predicted direction is a past direction in step S813. If the predicted direction is not a past direction in step S813, the reference frame index information in the future direction is decoded in step S814. In step S815, the MVD information in the future direction is decoded. In step S816, after decoding the MVP information in the future direction, the flowchart ends. When the prediction mode is intra-frame prediction mode in step S804, the flowchart ends after decoding the intra-frame prediction mode information in step S817.
[0216] The following embodiments describe a method for deriving candidate motion information for inter-frame prediction of the current block in the merging candidate search units 204, 704 and AMVP candidate search units 206, 706 of the prediction units of the image encoding and decoding apparatus. The candidate motion information is immediately determined as the motion information of the current block in the merging candidate search unit and used as a prediction factor for transmitting the optimal motion information of the current block in the AMVP candidate search unit.
[0217] Figure 9This is a flowchart 900 illustrating a method for deriving candidate motion information for a MERGE / AMVP pattern. In this flowchart, methods for deriving candidate motion information for both the MERGE and AMVP patterns are shown in the same flowchart, but some candidates may not be used in every pattern. Therefore, the candidate motion information derived for each pattern may be different, and the number of candidate motion information derived may also be different. For example, the MERGE pattern may select 4(B) out of 5(A) spatial candidates, and the AMVP pattern may select only 2(B) out of 4(A) spatial candidates. In steps S901 and S902, A, B, C, and D (A, B, C, and D are integers equal to or greater than 1) represent the number of spatial candidates, the number of selected spatial candidates, the number of temporal candidates, and the number of selected temporal candidates, respectively.
[0218] The description of step S901 is the same as that of steps S305 and S401 above. However, the positions of the surrounding blocks of the spatial candidate can be different. In addition, the surrounding blocks of the spatial candidate can belong to at least one of the first group, the second group, and the third group. In this case, the first group can include at least one of the left-side block (A1) and the lower-left block (A4) of the current block, the second group can include at least one of the top block (A2) and the upper-right block (A3) of the current block, and the third group can include at least one of the upper-left block (A5) of the current block, the block adjacent to the bottom of the upper-left block, and the block adjacent to the left side of the upper-left block.
[0219] The description of step S902 is the same as that of steps S306 and S402 above. Similarly, the positions of the time candidate blocks can be different.
[0220] In step S903, time candidates are added on a sub-block basis. However, when adding time candidates on a sub-block basis to the AMVP candidate list, according to the method for deriving motion vectors for the AMVP pattern described above, only the candidate motion information of one arbitrary sub-block should be used as a predictor. But in some cases, the candidate motion information of two or more sub-blocks can be used as a predictor. This step will be described in detail in Example 1 below.
[0221] In step S904, candidates based on history are added. This step will be described in detail in Example 2 below.
[0222] In step S905, the average candidate motion information between the candidate motion information in the MERGE / AMVP list is added. This step will be described in detail in Example 3 below.
[0223] After step S905, when the candidate motion information in the MERGE / AMVP list has not reached the maximum number, the flowchart ends after adding zero motion information to fill the maximum number and configuring the candidate motion information list for each mode in step S906. The candidate motion information described in this embodiment can be used in various prediction modes other than the MERGE / AMVP mode. Additionally, in Figure 9 In this specification, the order in which candidates are added to the candidate list is not restricted. For example, temporal candidates based on sub-blocks may be added to the candidate list before spatial candidates. Optionally, average candidates may be added to the candidate list before historically based candidates. In this specification, the terms candidate motion information list, candidate motion information set, motion information candidate group, and candidate list are understood to have the same meaning.
[0224] In this embodiment, the following will be described in detail. Figure 9 The methods for deriving time candidates and time candidates in units of sub-blocks are described in steps S902 and S903. Time candidates represent time candidates in units of blocks and can be distinguished from time candidates in units of sub-blocks. In this case, sub-blocks are obtained by dividing the block to be encoded or decoded (hereinafter, the current block) into blocks of arbitrary N×M size (N, M≥0), and each sub-block represents a unit of the basic block used to derive motion information of the current block. Sub-blocks may have a preset size in the encoder and / or decoder. For example, a sub-block may have a square shape with a fixed size, such as 4×4 or 8×8. However, this is not a limitation, and the shape of the sub-block may be non-square, and at least one of the width and height of the sub-block may be greater than 8. There may be a limitation that time candidates in units of sub-blocks are added to the candidate list only when the current block is greater than N×M. For example, when N and M are both 8, time candidates in units of sub-blocks may be added to the candidate list when the width and height of the current block are both greater than 8.
[0225] Figure 10 This is a basic concept diagram 1000 used to describe this embodiment. Figure 10 The current (sub)block of the current frame is shown. A target (sub)block corresponding to the current (sub)block is searched in the target frame. In this case, information about the target frame and the target (sub)block can be transmitted separately as a higher header or as the current block, and the target frame and the target (sub)block can be specified under the same conditions in the image encoding and decoding apparatus. After determining the target frame and the target (sub)block of the current (sub)block, the motion information of the current (sub)block is derived using the motion information of the target (sub)block.
[0226] Specifically, each sub-block of the current block corresponds to each sub-block of the target block. A time candidate, organized by sub-block, can have motion information for each sub-block in the current block, and the motion information for each sub-block can be derived using the motion information of the corresponding sub-blocks in the target block. However, there may be cases where the motion information of the corresponding sub-blocks is unavailable. In this case, the motion information of the corresponding sub-block can be set as the default motion information. In this case, the default motion information can represent the motion information of surrounding sub-blocks adjacent to the corresponding sub-block in the horizontal or vertical direction. Optionally, the default motion information can represent the motion information of sub-blocks including the center sample of the target block. However, it is not limited to this, and the default motion information can represent the motion information of sub-blocks including any one of the n corner samples of the target block. n can be 1, 2, 3, or 4. Optionally, among sub-blocks including the center sample and / or sub-blocks including the n corner samples, sub-blocks with available motion information can be searched according to a predetermined priority, and the motion information of the first sub-block searched can be set as the default motion information.
[0227] On the other hand, it can be determined first whether the aforementioned default motion information is available. As a result of this determination, if the default motion information is unavailable, the process of exporting motion information for time candidates at the sub-block level and adding them to the candidate list can be omitted. In other words, time candidates at the sub-block level can only be exported and added to the candidate list if the default motion information is available.
[0228] On the other hand, the motion vector of motion information can be represented as a scaled motion vector. The time distance between the target frame and the reference frame of the target (sub) block is determined as TD, and the time distance between the current frame and the reference frame of the current (sub) block is determined as TB. The motion vector (MV) of the target (sub) block is scaled using Equation 2. Scaled motion vector (MV) scale This can be used when indicating the predicted (sub)block of the current (sub)block in the reference frame, or it can be used as a motion vector for the time candidate of the current (sub)block or the time candidate of the current (sub)block on a sub-block basis. However, when deriving scaled motion vectors, the variable MV used in Equation 2 represents the motion vector of the target (sub)block, and MV scale The motion vector representing the scaling of the current (sub) block.
[0229] In addition, the reference screen information of the current (sub) block can be specified by the image encoding device and the image decoding device under the same conditions, and the reference screen information of the current (sub) block can also be transmitted in units of the current (sub) block.
[0230] The method for determining the target (sub)block of the current (sub)block under the same conditions in the image encoding and decoding apparatus will be described in more detail below. The target (sub)block of the current (sub)block can be indicated by using one of the candidate motion information from the MERGE / AMVP candidate list. More specifically, after determining the prediction modes of the candidate motion information in the candidate list, the target (sub)block of the current (sub)block can be determined by prioritizing the prediction modes. For example, the target (sub)block can be indicated by selecting one of the motion information from the candidate list according to the priority of the AMVP mode, MERGE mode, and SKIP mode.
[0231] Alternatively, the target (sub)block can be indicated simply by unconditionally selecting the first candidate motion information from the candidate list. For candidate motion information encoded using the same prediction mode, various priority conditions can be used, such as selection based on priority in the candidate list. However, when the reference frame and the target frame of the candidate motion information are different, the corresponding candidate motion information can be excluded. Optionally, it can be determined as the target (sub)block in the target frame corresponding to the same position as the current (sub)block.
[0232] Specifically, the target (sub)block can be determined as the block located at a position offset from the current (sub)block's position by a predetermined time motion vector (time MV). In this case, the time motion vector can be set as the motion vector of the surrounding blocks spatially adjacent to the current block. The surrounding blocks can be any one of the current block's left-hand block, top-hand block, bottom-left block, top-right block, and top-left block. Optionally, the time motion vector can be derived using only the surrounding blocks at pre-agreed fixed positions in the encoding / decoding device. For example, the surrounding block at a fixed position can be the current block's left-hand block (A1). Optionally, the surrounding block at a fixed position can be the current block's top-hand block (A2). Optionally, the surrounding block at a fixed position can be the current block's bottom-left block (A3). Optionally, the surrounding block at a fixed position can be the current block's top-right block (A4). Optionally, the surrounding block at a fixed position can be the current block's top-left block (A5).
[0233] This setting can be performed only when the reference frame and target frame of the surrounding blocks are the same (for example, when the POC difference between the reference frame and the target frame is 0). When the reference frame and target frame of the surrounding blocks are not the same, the time motion vector can be set to (0,0).
[0234] The time motion vector can be rounded based on at least one of a predetermined offset or a shift value. In this case, the offset can be derived based on the shift value, and the shift value can include at least one of a right-hand shift (rightShift) or a left-hand shift value (leftShift). The shift value can be a preset integer in the encoding / decoding device. For example, rightShift can be set to 4 and leftShift can be set to 0, respectively. For example, the rounding of the time motion vector can be performed as shown in Equation 3 below.
[0235] [Formula 3]
[0236] offset=(rightShift==0)? 0:(1<<(rightShift-1))
[0237] mvX R [0]=((mvX[0]+offset-(mvX[0]>=0))>>rightShift)< <leftShift
[0238] mvX R [1]=((mvX[1]+offset-(mvX[1]>=0))>>rightShift)< <leftShift
[0239] To describe this in more detail, let's assume two conditions. First, motion information is stored and maintained in 4×4 sub-blocks within the encoded frame (hereinafter, the boundaries of the 4×4 sub-blocks used to store motion information match the boundaries of the target (sub)blocks in the target frame). Second, the size of the sub-blocks in the current block is set to 4×4. The size of the aforementioned blocks can be determined differently. In this case, when determining the position of the target (sub)block in the target frame corresponding to the same position in the current (sub)block, or when indicating the position of the target (sub)block in the target frame using motion information from the MERGE / AMVP candidate list of the current (sub)block, the basic coordinates of each sub-block may not correspond to the basic coordinates of the current (sub)block in the 4×4 sub-blocks where motion information is stored in the target frame. For example, a mismatch may occur, such as the coordinates of the top-left pixel of the current (sub)block being (12,12), while the top-left coordinates of the target (sub)block could be (8,8). This is an unavoidable phenomenon due to the difference in block partitioning structure between the target frame and the current frame.
[0240] Figure 11This is a schematic diagram illustrating a method 1100 for determining a target block when deriving temporal candidate motion information on a block-by-block basis rather than a sub-block basis. After determining the motion vector (MV) indicating the target position from the base coordinates of the current block (the motion vector derived from the same position (i.e., zero motion) or the candidate list), the point indicated by the corresponding motion vector is found in the target frame. When deriving the scaled motion vector of the current block, motion information of a 4×4 target sub-block, including the corresponding target point in the target frame, can be used. Optionally, when the same 4×4 target sub-block is indicated by each target point indicated from multiple base coordinates of the current block, the motion information of the corresponding target sub-block is used when deriving the scaled motion vector of the current block. However, they indicate multiple 4×4 target sub-blocks, and the average motion information of each target sub-block can be used to derive the scaled motion vector of the current block. For the target position, it can be as follows: Figure 11 The example uses two target locations in the center region of the current block, but more than two target locations can be used, and any pixel location in other current blocks can be used. Naturally, there can be two or more additional motion information sources for calculating the average motion information. Alternatively, the final prediction block can be generated by deriving multiple scaled motion vectors from each of the multiple target sub-blocks and then performing a weighted summation on the corresponding prediction blocks.
[0241] Figure 12 and Figure 13 These are schematic diagrams illustrating methods 1200 and 1300 for determining a target block when deriving temporal candidate motion information in units of sub-blocks in the current block. Figure 12 This is a diagram illustrating the case where there exists a basic position based on sub-blocks, and Figure 13 This is a diagram illustrating the use of multiple basic positions as a unit for sub-blocks.
[0242] Figure 12 The basic position, shown in sub-blocks, is the top-left pixel position of the sub-block. After determining a target block of the same size as the current block based on the 4×4 target sub-blocks of the target image, each scaling motion vector of the current sub-block can be derived by using the motion information of the target sub-blocks between the target block and its co-located sub-blocks of the current block. The 4×4 target sub-blocks of the target image are found based on the basic coordinates of the bottom-right sub-block of the current block. Optionally, after calculating the target position of the target image using the motion vector indicating the target position at the basic coordinates of the sub-block, the motion information of the 4×4 target sub-blocks, including the target position, can be used when deriving the scaling motion vector of the current sub-block.
[0243] Figure 13 This is a schematic diagram illustrating a method for deriving scaled motion vectors using multiple target sub-blocks for each current sub-block. When... Figure 13In the example, when exporting the scaling motion vector of sub-block D, the target position in the target image is calculated based on multiple basic coordinates within sub-block D. Subsequently, when the target position indicates the same target sub-block, the scaling motion vector of the current sub-block can be exported using the motion information of the corresponding target sub-block. However, when... Figure 13 When the indicated target position points to different target sub-blocks, the scaling motion vector of the current sub-block can be derived by calculating the average motion information of each target sub-block. Furthermore, after deriving different scaling motion vectors using the motion information of each target sub-block, the final prediction block can be generated by generating prediction sub-blocks separately and performing a weighted summation on each prediction sub-block. Other sub-blocks in the current block (sub-blocks A, B, and C) can also be generated as prediction sub-blocks using the same method.
[0244] In this embodiment, a detailed description will be provided. Figure 9 Step S904. For history-based candidates (hereinafter referred to as "candidates based on reconstruction information"), there exists a motion candidate storage buffer based on reconstruction information (hereinafter referred to as "H buffer") to store motion information encoded / decoded prior to the current block in units of sequence, image, or stripe. The corresponding buffer manages the encoded motion information while updating the buffer using a FIFO (First-In-First-Out) method. The H buffer can be initialized in units of CTU, CTU line, stripe, or frame, and the corresponding motion information is updated in the H buffer when the current block is predicted and encoded using motion information. Figure 9 In step S904, the motion information stored in the H buffer can be used as MERGE / AMVP candidates. When adding candidate motion information from the H buffer to the candidate list, the candidate motion information can be added in the order of the most recently updated motion information in the H buffer, and vice versa. Optionally, the order of motion information in the H buffer to be added to the candidate list can be determined according to the inter-frame prediction mode.
[0245] Specifically, in the example, motion information in the H buffer can be added to the candidate list through a redundancy check between the H buffer and the candidate list. In MERGE mode, a redundancy check can be performed on some merge candidates in the candidate list and some motion information in the H buffer. Some of the candidate list may include the left and top blocks of spatial merge candidates. However, it is not limited to this, and it may be limited to any block of spatial merge candidates, or may also include at least one of the bottom left block, top right block, top left block, and temporal merge candidates. On the other hand, some of the H buffer may represent m motion information recently added to the H buffer. In this case, m can be 1, 2, 3, or larger, and can be a fixed value pre-agreed in the encoding / decoding device. Assume that 5 motion information are stored in the H buffer, and indices 1 to 5 are assigned to each motion information. When the index is larger, it indicates motion information stored later. In this case, a redundancy check can be performed between the motion information with indices 5, 4, and 3 and the merge candidates in the candidate list. Optionally, a redundancy check can be performed between the motion information with indices 5 and 4 and the merge candidates in the candidate list. Optionally, excluding the motion information at index 5, a redundancy check can be performed between the motion information with indices 4 and 3 and the merged candidates in the candidate list. As a result of the redundancy check, the motion information in the H buffer may not be added to the candidate list if even one identical motion information exists. On the other hand, when no identical motion information exists, the motion information in the H buffer can be added to the last position of the candidate list. In this case, the motion information can be added to the candidate list in the order it was most recently stored in the H buffer (i.e., in order from the largest index to the smallest index). However, there may be a limitation that the motion information last stored in the H buffer (the motion information with the largest index) is not added to the candidate list.
[0246] On the other hand, in AMVP mode, motion information (specifically, motion vectors) stored in the H buffer can be added to the candidate list in the order they were first stored. In other words, motion information with a smaller index among the motion information stored in the H buffer can be added to the candidate list before motion information with a larger index.
[0247] On the other hand, motion vectors stored in the H buffer can be added to the candidate list equally, and motion vectors subjected to the rounding process described above can also be added to the candidate list. Rounding is used to control the accuracy of candidate motion information to correspond to the accuracy of the motion vector of the current block. Referring to Equation 3, respectively, mvX R`mvX` can represent a motion vector that has undergone rounding, and `mvX` can represent a motion vector stored in the `H` buffer. Additionally, at least one of `rightShift` and `leftShift` (the shift value) can be determined by considering the accuracy (or resolution) of the motion vector. For example, when the accuracy of the motion vector is 1 / 4 sample, the shift value can be determined to be 2, and when the accuracy of the motion vector is 1 / 2 sample, the shift value can be determined to be 3. When the accuracy of the motion vector is 1 sample, the shift value can be determined to be 4, and when the accuracy of the motion vector is 4 samples, the shift value can be determined to be 6. `rightShift` and `leftShift` can be set to the same value.
[0248] When adding motion information stored in the H buffer to the Merge / AMVP candidate list, the amount of motion information that can be added is limited. For example, the maximum number of candidates in the Merge / AMVP candidate list can be populated using motion information from the H buffer, but only up to (maximum number of candidates - 1) can be added.
[0249] The amount of candidate motion information stored in the H buffer can be determined under the same conditions in the image encoding and decoding devices, and can be sent to the image decoding device via the higher head.
[0250] Specifically, in the case of a merged candidate list, only (maximum number of candidates - n) can be filled using the motion information of the H buffer. In this case, n can be an integer such as 1, 2, or larger. The maximum number of candidates can be determined as a fixed number predefined in the encoding / decoding device (e.g., 5, 6, 7, 8), or it can be variably determined based on information indicating the maximum number of candidates using signals. On the other hand, in the case of an AMVP candidate list, the maximum number of candidates can be filled using the motion information of the H buffer. The maximum number of candidates in an AMVP candidate list can be 2, 3, 4, or more. In the case of an AMVP candidate list, unlike a merged candidate list, the maximum number of candidates may not be variable.
[0251] The first method for updating the H buffer (reference 1400) Figure 14 The H buffer updates motion information according to the block encoding order in the first CTU line. For the second CTU line, updating motion information according to block encoding order is the same, but the H buffer can be updated by additionally considering motion information in the reconstructed blocks adjacent to the current CTU line stored in the top CTU. Figure 14In this context, *mi* in CTU stands for Motion Information and refers to the reconstructed motion information stored in the bottom blocks of the remaining CTU rows excluding the last CTU row. Up to *P* (where *P* is an integer equal to or greater than 1) motion information items can be updated in the H buffer, and the update method can vary depending on the unit in which the H buffer is initialized. In this embodiment, the method of updating the H buffer will be described based on the cases of initializing the H buffer in units of CTU and initializing it in units of CTU rows. First, when the H buffer is initialized in units of CTU, each CTU in the second CTU row can be initialized in the H buffer using *mi* before encoding begins. In this case, initialization means re-updating any motion information in a completely empty H buffer. For example, before encoding CTU8, the H buffer can be initialized using the four *mi* items at the bottom of CTU3. The order in which *mi* is updated can also be determined differently. It can be updated from the *mi* currently in the left position, or conversely, from the *mi* in the right position. When the H buffer is initialized in units of CTU rows, only the first CTU in each CTU row can be updated using the *mi* items in the top CTU. Additionally, the H buffer can be completely cleared and initialized on a per-initialization basis. On the other hand, if the most recently encoded / decoded motion information is identical to the motion information pre-stored in the H buffer, the most recent motion information may not be added to the H buffer. Alternatively, motion information identical to the most recent motion information may be removed from the H buffer, and the most recent motion information may be stored in the H buffer. In this case, the most recent motion information may be stored at the end of the H buffer.
[0252] The second method for updating the H buffer (reference 1500) Figure 15The second method has an additional motion candidate storage buffer that does not include the H buffer. This buffer is a buffer (hereinafter referred to as the "V buffer") that stores the reconstructed motion information (hereinafter referred to as "Vmi") of the top CTU. This V buffer can be used when the H buffer is initialized on a CTU row or strip basis and the V buffer can be initialized on a CTU row basis. The Vmi in the V buffer should be updated for the bottom CTU rows in all CTU rows except the last CTU row in the current frame. In this case, up to Q (Q is an integer equal to or greater than 1) motion information can be updated in the V buffer, and the motion information corresponding to the Vmi can be determined by various methods. For example, the Vmi can be the reconstructed motion information of a block including the center coordinates of the CTU, or it can be the most recent motion information included in the H buffer when encoding a block including the center coordinates of the top CTU. The number of Vmi to be updated in a CTU can be one or more, and the updated Vmi is used when updating the H buffer of the bottom CTU. For each CTU in the remaining CTU rows excluding the first CTU row, update the Vmi stored in the V buffer of the top CTU row in the current H buffer. When multiple Vmi are stored in the V buffer of the top CTU row, the motion information updated first can be retrieved and updated in the H buffer first, and vice versa. The Vmi in the top CTU stored in the V buffer can be updated in the H buffer at various times, such as before encoding each CTU or before encoding the block that borders the top CTU in each CTU. In addition, the Vmi in the top-left CTU, top-right CTU, and top CTU can also be updated in the H buffer.
[0253] The candidate motion information of the aforementioned V buffer can be added independently. Figure 9 The process of exporting the MERGE / AMVP candidate list. When adding candidate motion information to the V buffer, the corresponding priority in the MERGE / AMVP candidate list can be determined differently. For example, if valid motion information exists in the V buffer after step S904, the corresponding candidate motion information can be added between step S904 and step S905.
[0254] In this embodiment, a detailed description will be provided. Figure 9Step S905. This step is omitted when there are one or fewer motion information entries in the Merge / AMVP candidate list filled through steps S901 to S904. When there are two or more motion information entries in the Merge / AMVP candidate list, the candidate list can be filled by generating average candidate motion information among the candidates. The motion vector of the average candidate motion information is derived based on each predicted direction of the motion information (List 0 or List 1), which means the motion vector is generated by averaging the motion vectors in the same direction stored in the candidate list. When the reference screen index information of the motion information used in averaging is different when deriving the average candidate motion information, the reference screen information of the motion information with higher priority can be determined as the reference screen index information of the average candidate motion information. Optionally, the reference screen information of the motion information with lower priority can be determined as the reference screen index information of the average candidate motion information.
[0255] When averaged candidate motion information is added to the Merge / AMVP candidate list, the generated averaged candidate motion information can be used when generating another averaged candidate motion information. To describe this example 1600, refer to... Figure 16 .exist Figure 16 In the middle, the table on the left is... Figure 9 The Merge / AMVP candidate list prior to step S905, and the table on the right is... Figure 9 The Merge / AMVP candidate list follows step S905. In the table on the left, the motion information corresponding to candidate numbers 0 and 1 is filled into two candidate lists. The average candidate motion information corresponding to candidate number 2 can be generated using these two motion information sets. Figure 16 In the example, the motion information of candidate 2 in the direction of list 0 is filled by averaging the motion vector (MV)(1,1) of candidate 0 in the direction of list 0 (motion information with reference screen index (Refidx) 1) and the motion vector (3,-1) of candidate 1 in the direction of list 0 (motion information with reference screen index 0). For the direction of list 1, there is no motion information for candidate 0. In this case, the motion information of candidate 2 in the direction of list 1 is filled by incorporating the motion information of candidate 1 (since it exists as a candidate in the direction of list 1). When there is no motion information in any direction when averaging candidate motion information is derived, the corresponding direction is not exported separately. Additional average candidate motion information can be generated by using the average candidate motion information of candidate 2 derived in this way. The average candidate motion information of candidate 3 is the average candidate motion information of candidates 0 and 2, and the average candidate motion information of candidate 4 is the average candidate motion information of candidates 1 and 2. The method for generating average candidate motion information is the same as described above.
[0256] exist Figure 9 Prior to step S905, duplicate candidate motion information may exist in the Merge / AMVP candidate list. Averaging the candidate motion information can be used to remove such duplicate candidate motion information. Figure 17 Example 1700 is shown. The left and right tables are... Figure 16 The information described is the same as in the table on the left. In the table on the left, candidate motion information for numbers 0 and 2 is completely identical. In this case, the lower-priority candidate motion information for number 2 can be replaced by the average candidate motion information. Figure 17 In the example, the existing candidate motion information of No. 2 is replaced by the average candidate motion information of No. 0 and No. 1, and No. 3 fills the candidate list with the average candidate motion information of No. 0 and No. 2, and No. 4 fills the candidate list with the average candidate motion information of No. 1 and No. 2.
[0257] The number of candidates that can be populated in the Merge / AMVP candidate list using average candidate motion information is also limited. For example, the maximum number of candidates in the Merge / AMVP candidate list can be populated using average candidate motion information, but only up to (the maximum number of candidates - 1) can be populated. Furthermore, the candidate motion information used when calculating the average candidate motion information can be three or more, and the median information (not the information obtained by averaging three or more candidate motion information) can be used to determine the average candidate motion information.
[0258] In the following embodiments, a method for efficiently transmitting motion vector information will be described. In the AMVP mode described above, a motion vector prediction factor is subtracted from the motion vector of the current block determined by the image encoding device. Figure 5 , Figure 8 The motion vector difference obtained from the MVP information (in the middle) Figure 5 , Figure 8 The motion information (MVD) of the selected merging candidate is sent to the image decoding device. Additionally, in the MERGE mode described above, without transmitting MVD information, the motion information of the selected merging candidate is set as the motion information of the current block. However, if additional MVD information is transmitted in MERGE mode, prediction efficiency can be improved by increasing the accuracy of the motion information. In this case, MVD information is often referred to as random information where a certain pattern may not be found. However, under specific assumptions, this MVD information can also be transformed into predictable information.
[0259] Will be used Figure 18 Describe the specific situation described above. Figure 18In (1800), there exists a current block to be encoded in the current frame. Reconstruction blocks A through D surround the current block. In this case, assuming a specific object is performing uniform acceleration motion from top to bottom while passing through the current block, it can be predicted that the motion vector will increase by a certain amount through blocks C, B, and the current block. Optionally, the same principle can also be considered to apply to uniform deceleration motion. Returning to this, if the motion vector increases by a certain amount when a specific object is performing uniform acceleration motion while passing through the current block, then the motion vector of the point indicating that the MVD of the corresponding block is added to the motion vector of the surrounding blocks is likely to be determined as the optimal motion information in the current block. Under the above premise, a detailed observation from the viewpoint of AMVP mode... Figure 18 If the MVD information of the difference between the optimal motion vector of block B and the motion vector of block C (i.e., the MVP of block B) is similar to the MVD information of the difference between the optimal motion vector of the current block and the MVP of block B, then motion information can be encoded more efficiently using it. Here, the motion vector of block C is used as the MVP information of block B, and the current block uses the motion vector of block B as the MVP. From the perspective of MERGE mode, more efficient encoding can be performed by transmitting additional MVD information.
[0260] In the following embodiments, a method for effectively predicting and encoding / decoding such MVD information will be described in detail.
[0261] Figure 19 Table 1900 is an example of the candidate list of the merged candidate search unit and the AMVP candidate search unit in the prediction unit of the image encoding device and the image decoding device.
[0262] Figure 19 The left-hand table is available Figure 3 Step S307 or Figure 4 The Merge / AMVP candidate list is generated after step S403. The table on the right shows the candidate list after generating new motion candidates using motion information with MVD not equal to (0,0) that already exists in the Merge / AMVP candidate list. New candidate motion information is generated by adding the motion vector of the motion information with MVD not equal to (0,0) and then filling it into the candidate list. Even when one MVD is not equal to (0,0), the bidirectional prediction candidate motion information can be used to generate new candidate motion information using the above method. Since this method does not require new encoding and decoding information, it can be used... Figure 5 and Figure 8The above flowchart is used to encode motion information. Optionally, the motion vector obtained by adding the motion vector in the Merge / AMVP candidate list to the MVD can be determined as the final candidate motion vector without generating such new candidate motion information. In this case, information indicating that the candidate motion vector is obtained by adding the MVD to the motion vector in the current candidate motion information can be transmitted separately.
[0263] Figure 20 Example Table 2000 is used to describe a method of using the MVD of the reconstructed region as the MVD of the current block by generating a separate Merge / AMVP candidate list for MVD instead of a Merge / AMVP candidate list for motion vectors. Figure 20 The left table is an example table of the completed Merge / AMVP candidate list for motion vectors, and the right table is an MVD Merge / AMVP candidate list made using MVD information from the motion vector Merge / AMVP candidate list. The MVDs of the 0th and 1st candidates in the left table are determined using the MVDs from the 4th and 5th candidates in the left table, and the MVDs of the 2nd and 3rd candidates in the right table are determined using the MVDs from the 4th and 5th candidates. Additionally, the image encoding and decoding devices can add another candidate MVD information to the MVD Merge / AMVP candidate list using reconstructed motion information. MVD information can be transmitted separately in Merge mode using the MVD Merge / AMVP candidate list information derived in this way, or it can be merged without transmitting MVD information in AMVP mode. For detailed motion information encoding / decoding procedures, refer to [reference needed]. Figure 21 and Figure 22 .
[0264] Figure 21 This is flowchart 2100, which encodes motion information using MVD Merge / AMVP candidate list information. The descriptions in steps S2101 to S2107 are consistent with... Figure 5 The descriptions in steps S501 to S507 are the same. In step S2108, operation information indicating whether to perform MVD merging is encoded. MVD merging can represent deriving the final motion vector by adding a predetermined MVD to the motion vector reconstructed through MERGE mode or AMVP mode. In step S2109, it is determined whether the corresponding operation information is true or false. If the corresponding operation information is false, the flowchart ends. If the corresponding operation information is true, in step S2110, the candidate index information indicating which MVD information from the MVD merging candidate list to add to the current motion vector is encoded, and the flowchart ends. The descriptions in steps S2111 to S2113 are the same as... Figure 5The descriptions in steps S508 to S510 are the same. In step S2114, the operation information for determining whether to transmit the MVD in the past direction is encoded. In step S2115, it is determined whether the corresponding operation information is true or false. If it is true, the process moves to step S2116; if it is false, the process moves to step S2117. The descriptions in steps S2116 and S2117 are the same as those in steps S2118 and S2119. Figure 5 The descriptions in steps S511 and S512 are the same. In step S2118, the candidate index information of the MVD indicating motion information in the past direction in the MVD AMVP candidate list is encoded. The descriptions in steps S2119 and S2120 are the same. Figure 5 The descriptions in steps S513 and S514 are the same. In step S2121, the operation information for determining whether to transmit MVD in the future direction is encoded. In step S2122, it is determined whether the corresponding operation information is true or false. If it is true, proceed to step S2123; if it is false, proceed to step S2124. In step S2125, the candidate index information of MVDs indicating motion information in the future direction in the MVD AMVP candidate list is encoded, and the flowchart ends. The description in step S2126 is the same as that in step S517.
[0265] Figure 22 This is a flowchart illustrating the decoding of motion information using MVD Merge / AMVP candidate list information. The descriptions in steps S2201 to S2207 are consistent with... Figure 8 The descriptions in steps S801 to S807 are the same. In step S2208, the operation information indicating whether to perform MVD merging is decoded. MVD merging can mean deriving the final motion vector by adding a predetermined MVD to the motion vector reconstructed through MERGE mode or AMVP mode. In step S2209, it is determined whether the corresponding operation information is true or false. If the corresponding operation information is false, the flowchart ends. If the corresponding operation information is true, in step S2210, the candidate index information indicating which MVD information from the MVD merging candidate list to add to the current motion vector is decoded, and the flowchart ends. The descriptions in steps S2211 to S2213 are the same as... Figure 8 The descriptions in steps S808 to S810 are the same. In step S2214, the operation information for determining whether to transmit MVD in the past direction is decoded. In step S2215, it is determined whether the corresponding operation information is true or false. If it is true, the process moves to step S2216; if it is false, the process moves to step S2217. The descriptions in steps S2216 and S2217 are the same as those in steps S808 to S810. Figure 8The descriptions in steps S811 and S812 are the same. In step S2218, the candidate index information of the MVD indicating motion information in the past direction in the MVD AMVP candidate list is decoded. The descriptions in steps S2219 and S2220 are the same. Figure 8 The descriptions in steps S813 and S814 are the same. In step S2221, the operation information for determining whether to transmit MVD in the future direction is decoded. In step S2222, it is determined whether the corresponding operation information is true or false. If it is true, the process moves to step S2223; if it is false, the process moves to step S2224. In step S2225, the candidate index information of MVD indicating motion information in the future direction in the MVD AMVP candidate list is decoded, and the flowchart ends. The description in step S2226 is the same as that in step S817.
[0266] In Merge mode, the motion vector is determined by transmitting additional MVD information with motion information indicated by the merge candidate index information and adding the additional MVD information to the motion vector indicated by the merge candidate index. In this case, the candidate list for the merge mode can be configured with k merge candidates, where k can be a natural number such as 4, 5, 6, or larger. An index is assigned to each merge candidate, and the index has a value from 0 to (k-1). However, when applying MVD merge, the merge candidate index information can only have a value of 0 or 1. In other words, when applying MVD merge, the motion information of the current block can be derived from either the first or second merge candidate belonging to the candidate list, based on the merge candidate index information. The additional MVD information can be transmitted in various forms. MVD can be expressed by direction information (such as top, bottom, left, right, bottom right diagonal, bottom left diagonal, top right diagonal, top left diagonal, etc.) and distance information, rather than transmitting MVD in a vector shape such as (x,y), where the distance information indicates how far apart it is in each direction based on the motion vector of the motion information indicated by the current merged candidate index information.
[0267] Specifically, the MVD of the current block can be derived based on the offset vector (offsetMV). The MVD may include at least one of the MVD in the L0 direction (MVD0) or the MVD in the L1 direction (MVD1), and each of MVD0 and MVD1 can be derived using the offset vector.
[0268] The offset vector can be determined based on its length (mvdDistance) and direction (mvdDirection). For example, the offset vector (offsetMV) can be determined as shown in Equation 4 below.
[0269] [Formula 4]
[0270] offsetMV[x0][y0][0]=(mvdDistance[x0][y0]<<2)*mvdDirection[x0][y0][0]
[0271] offsetMV[x0][y0][1]=(mvdDistance[x0][y0]<<2)*mvdDirection[x0][y0][1]
[0272] In this case, `mvdDistance` can be determined by considering at least one of the distance index (`distance_idx`) and the predefined flag (`pic_fpel_mmvd_enabled_flag`). The distance index (`distance_idx`) can represent the index encoded to specify the length or distance of the MVD. `pic_fpel_mmvd_enabled_flag` can indicate whether the motion vector uses integer pixel accuracy in the MERGE mode of the current block. For example, when `pic_fpel_mmvd_enabled_flag` is a first value, the merging mode of the current block uses integer pixel accuracy. In other words, this can indicate that the motion vector resolution of the current block is integer samples (integer pixels). On the other hand, when `pic_fpel_mmvd_enabled_flag` is a second value, the merging mode of the current block can use fractional pixel accuracy. In other words, when `pic_fpel_mmvd_enabled_flag` is a second value, the merging mode of the current block can use both integer pixel accuracy and fractional pixel accuracy. Optionally, when pic_fpel_mmvd_enabled_flag is the second value, the merging mode of the current block may be limited to using only fractional pixel accuracy. Examples of fractional pixel accuracy include 1 / 2 samples, 1 / 4 samples, 1 / 8 samples, 1 / 16 samples, etc. At least one of the distance index (distance_idx) or the aforementioned flag (pic_fpel_mmvd_enabled_flag) may be encoded and transmitted in the encoding device.
[0273] For example, mvdDistance can be determined as shown in Table 1 below.
[0274] [Table 1]
[0275]
[0276] Additionally, `mvdDirection` can represent the direction of the offset vector and can be determined based on the direction index (`direction_idx`). In this case, the direction can include at least one of left, right, top, bottom, upper left, lower left, upper right, and lower right. For example, `mvdDirection` can be determined as shown in Table 2 below. The direction index (`direction_idx`) can be encoded and transmitted in the encoding device.
[0277] [Table 2]
[0278]
[0279] In Table 2, `mvdDirection[x0][y0][0]` represents the sign of the x-component of the MVD, and `mvdDirection[x0][y0][1]` represents the sign of the y-component of the MVD. Specifically, when `direction_idx` is 0, the direction of the MVD can be determined as the right direction; when `direction_idx` is 1, the direction of the MVD can be determined as the left direction; when `direction_idx` is 2, the direction of the MVD can be determined as the bottom direction; and when `direction_idx` is 3, the direction of the MVD can be determined as the top direction.
[0280] On the other hand, the MVD can be set to be the same as the offset vector determined above. Alternatively, the offset vector can be modified by considering the POC difference (PocDiff) between the reference frame of the current block and the current frame to which the current block belongs, and the modified offset vector can be set as the MVD. In this case, the current block can be encoded / decoded by bidirectional prediction, and the reference frame of the current block may include a first reference frame (reference frame in the L0 direction) and a second reference frame (reference frame in the L1 direction). For ease of description, in the following text, the POC difference between the first reference frame and the current frame is referred to as PocDiff0, and the POC difference between the second reference frame and the current frame is referred to as PocDiff1.
[0281] When PocDiff0 and PocDiff1 are the same, the MVD0 and MVD1 of the current block can be set to offset vectors equally.
[0282] When PocDiff0 and PocDiff1 are not the same, if the absolute value of PocDiff0 is greater than or equal to the absolute value of PocDiff1, MVD0 can be set as an offset vector. Alternatively, MVD1 can be derived based on a preset MVD0. For example, when the first and second reference frames are long-term reference frames, MVD1 can be derived by applying a first scaling factor to MVD0. The first scaling factor can be determined based on PocDiff0 and PocDiff1. Conversely, when at least one of the first and second reference frames is a short-term reference frame, MVD1 can be derived by applying a second scaling factor to MVD0. The second scaling factor can be a fixed value pre-defined in the encoding / decoding device (e.g., -1 / 2, -1, etc.). However, the second scaling factor can only be applied if the sign of PocDiff0 is different from the sign of PocDiff1. If the sign of PocDiff0 is the same as the sign of PocDiff1, MVD1 can be set to be the same as MVD0, and separate scaling is not required.
[0283] On the other hand, when PocDiff0 and PocDiff1 are not the same, if the absolute value of PocDiff0 is less than the absolute value of PocDiff1, MVD1 can be set as an offset vector. Alternatively, MVD0 can be derived based on a preset MVD1. For example, when the first reference frame and the second reference frame are long-term reference frames, MVD0 can be derived by applying a first scaling factor to MVD1. The first scaling factor can be determined based on PocDiff0 and PocDiff1. On the other hand, when at least one of the first reference frame and the second reference frame is a short-term reference frame, MVD0 can be derived by applying a second scaling factor to MVD1. The second scaling factor can be a fixed value pre-defined in the encoding / decoding device (e.g., -1 / 2, -1, etc.). However, the second scaling factor can only be applied if the sign of PocDiff0 is different from the sign of PocDiff1. If the sign of PocDiff0 is the same as the sign of PocDiff1, MVD0 can be set to be the same as MVD1 and no separate scaling is required. For detailed encoding and decoding procedures for MVD, please refer to [link / reference]. Figure 23 and Figure 24 .
[0284] Figure 23 This is a flowchart illustrating the encoding of motion information, including additional MVD, in a merged mode. The descriptions in steps S2301 to S2307 are consistent with... Figure 5The descriptions in steps S501 to S507 are the same. In step S2308, the operation information indicating whether the additional MVD information is encoded in skip mode or merge mode is encoded. In step S2309, it is determined whether the corresponding operation information is true or false. If it is true, the flowchart ends after encoding the additional MVD information in step S2310; if it is false, the flowchart ends without delay. The descriptions in steps S2311 to S2320 are the same as those in steps S2311 to S2320. Figure 5 The steps S508 to S517 are described in the same way.
[0285] Figure 24 This is a flowchart illustrating the decoding of motion information, including additional MVD, in merged mode. The descriptions in steps S2401 to S2407 are consistent with... Figure 8 The descriptions in steps S801 to S807 are the same. In step S2408, the operation information indicating whether the additional MVD information is decoded in skip mode or merge mode is decoded. In step S2409, it is determined whether the corresponding operation information is true or false. If it is true, the flowchart ends after decoding the additional MVD information in step S2410; if it is false, the flowchart ends without delay. The descriptions in steps S2411 to S2420 are the same as those in steps S2408. Figure 8 The steps S808 to S817 are described in the same way.
[0286] In this embodiment, a method for binarizing the reference frame index information and the predicted direction information in the components of motion information when encoding motion information will be described in detail.
[0287] For prediction direction information and reference screen index information, the binarization method can be changed according to the configuration status of the reference screen set (hereinafter referred to as "RPS"). RPS information can be transmitted in the higher header. The components of RPS information may include the number of reference screens for each prediction direction, the reference screen corresponding to the reference screen index, and the POC difference information between the corresponding reference screen and the current screen, etc. Figure 25 This is an example of RPS information, showing how to configure RPS. The RPS configuration includes reference screens for list 0 and list 1 directions respectively. This will be achieved through... Figure 26 These examples are used to describe Figure 25 A binarization method for the predicted direction information and reference screen index information for each example.
[0288] There are three steps to check the RPS configuration status. The first step (hereinafter referred to as the "first RPS check") determines whether the reference frames in the List 0 and List 1 directions are stored in the RPS in the same index order. However, the number of reference frames in the List 0 direction should be greater than or equal to the number of reference frames in the List 1 direction. The second step (hereinafter referred to as the "second RPS check") determines whether all reference frames in the List 1 direction are included, regardless of the reference frame index order in the RPS in the List 0 direction. The third step (hereinafter referred to as the "third RPS check") determines whether the number of reference frames in the List 0 direction is the same as the number of reference frames in the List 1 direction. The binarization method for the prediction direction information and reference frame index information can be changed based on these three determinations.
[0289] For binarization methods of prediction direction information, the first RPS check and restrictions on bidirectional prediction based on block size can be considered. For example, bidirectional prediction can be restricted when the sum of the width and length is equal to or less than a predetermined threshold length. In this case, since the threshold length is a preset value in the encoding / decoding device, it can be 8, 12, 16, etc. For blocks where the first RPS check is false and bidirectional prediction is allowed, binarization can be performed by assigning 1 to bidirectional prediction, 00 to list 0 direction, and 01 to list 1 direction. For blocks where the first RPS check is false and bidirectional prediction is restricted, binarization can be performed by assigning 0 to list 0 direction and 1 to list 1 direction. For blocks where the first RPS check is true and bidirectional prediction is allowed, binarization can be performed by assigning 1 to bidirectional prediction and 0 to list 0 direction. This is because the reference image in the list 1 direction already exists in the list 0 direction, so there is no need to perform list 1 direction prediction. For blocks where the first RPS check is true and bidirectional prediction is restricted, prediction direction information does not need to be sent, and binarization of the corresponding information is not required. In this case, when the first RPS check is false, the reference... Figure 25 RPS A in the middle, and when the first RPS check is true, refer to Figure 25 RPS B or RPS C in the middle.
[0290] The prediction direction information can be binarized simply by checking if the first RPS check is false, regardless of the result of the first RPS check. In this case, when bidirectional prediction is unrestricted, the second bit indicating whether the prediction direction is list 0 or list 1 should be encoded, and in this case, entropy encoding / decoding using CABAC can be performed by considering the first RPS check. For example, when the first RPS check condition is considered as the context of the second bit of the prediction direction information, it can be done by using... Figure 27The initial probability of the MPS (most likely symbol) and LPS (least likely symbol) is updated using the initial probability of the context index information number 4 in the context initial probability table, because if the corresponding condition is true, List 1 predicts that it may not occur. If the corresponding condition is false, the occurrence probability of the MPS (most likely symbol) and LPS (least likely symbol) can be updated using the initial probability of the context index information number 1. In this example, the indication ( Figure 17 The second binary bit of list 0 is 0, therefore the MPS information is 0 and the LPS information is 1. Probability information can be obtained through... Figure 28 The rules for updating are based on the probability changes of LPS in the data. Figure 28 In this diagram, the probability state index (σ) on the horizontal axis is an index showing the level of change in the probability of LPS occurrence, and the vertical axis represents the probability of LPS occurrence. For example, when σ is 5, the probability of LPS occurrence is approximately 40%, and if an update is performed to improve the probability of LPS occurrence, it can be determined according to... Figure 19 The rule governing the change in the probability of LPS occurrence updates it to approximately a 44% probability (the probability of LPS occurrence when σ is 3). See again in this manner. Figure 27 When the context index information is number 4, the initial probability of LPS occurrence is 5%, which is the same as in... Figure 28 The results show that when σ is 31, the probability is the same, and when the context index is number 1, the initial probability of LPS occurrence is 35%, which is consistent with... Figure 28 The results show that the same condition applies when σ is 7. While treating this occurrence probability state as initial information, the occurrence probability states of MPS and LPS can be consistently updated by considering the context of the second binary bit of the prediction direction information.
[0291] The reference image index information can be binarized by considering all first, second, and third RPS checks. Binarization can also be based on the number of reference images in the RPS for each prediction direction. Figure 26 When the first RPS check is false, the second RPS check is true, and the third RPS check is false, the binarization method of the reference screen index information is different, but it is the same for other conditions.
[0292] In this case, for other conditions, binarization can be performed based on the index order of the reference frames and the number of reference frames. For example, when the number of reference frames is 5, the reference frame index information can be binarized into 0, 10, 110, 1110, 1111.
[0293] In other cases (the first RPS check is false, the second RPS check is true, and the third RPS check is false), the reference frames in the list 1 direction also exist in the reference frames in the list 0 direction in the same way, but the index order of each reference frame is different. In this case, binarization can be performed using two methods.
[0294] In the first method, binarization can be performed separately by dividing the RPS into common reference frame groups and non-common reference frame groups according to the prediction direction. In the table representing the binarization method for reference frame index information, the RPS common POC is the common reference frame group, and the RPS non-common POC is the non-common reference frame group. (Refer to...) Figure 25 In the RPS D, there are three reference frames numbered 1, 3, and 4 in the common reference frame group, and two reference frames numbered 0 and 2 in the non-common reference frame group. Therefore, for reference frames 1, 3, and 4 in the RPS common POC, the reference frame index information can be binarized to 00, 010, and 011, and for reference frames 0 and 2 in the RPS non-common POC, the reference frame index information can be binarized to 10 and 11.
[0295] The second method corresponds to the case where the prediction direction is not bidirectional. Similar to the first method, the reference screen for each prediction direction of RPS is divided into a common reference screen group and a non-common reference screen group. However, the first binary bit indicating the group to which the current reference screen belongs in the reference screen index information is not transmitted. Figure 26 The underlined binary bits in the table used for binarization of reference screen index information, and the binary bits indicating whether it is list 0 or list 1 of the prediction direction information ( Figure 26 The first binary bit is transmitted using the underlined binary bits in the table of binarization methods used to predict direction information. Figure 26 In the table of binarization methods for prediction direction information, the underlined bits are used to indicate whether the reference screen for the current block is a common reference screen group, rather than indicating whether the prediction direction is list 0 or list 1. In this case, when prediction direction information is binarized, only the bits indicating whether the prediction direction is bidirectional are transmitted. When bidirectional prediction is restricted, prediction direction information is not transmitted.
[0296] Figure 29 This is a block diagram showing the intra-frame prediction unit of an image coding apparatus.
[0297] After selecting intra-prediction as the prediction mode for the current block, reference pixels surrounding the current block are derived and filtered in the reference pixel generation unit 2901. Reference pixels are determined using reconstructed pixels surrounding the current block. When some reconstructed pixels may not be used or there are no reconstructed pixels around the current block, unusable areas can be filled with available reference pixels or intermediate values within the range of possible pixel values. After all reference pixels are derived, filtering is performed using an AIS (Adaptive Intra-Smoothing) filter.
[0298] The optimal intra-prediction mode determination unit 2902 is a device that determines a prediction mode from M intra-prediction modes. In this case, M represents the total number of intra-prediction modes. Intra-prediction mode generation is performed by generating a prediction block using reference pixels filtered according to directional and non-directional prediction modes. The intra-prediction mode with the lowest cost is selected by comparing the RD cost of each intra-prediction mode.
[0299] Figure 30 This is a block diagram showing in detail the inter-frame prediction unit 3000 of the image coding apparatus.
[0300] The inter-frame prediction unit can be divided into a merge candidate search unit 3002 and an AMVP candidate search unit 3004 based on the method of deriving motion information. The merge candidate search unit 3002 sets reference blocks used in inter-frame prediction within the reconstructed blocks surrounding the current block as merge candidates. Merge candidates are derived in the same way in the encoding / decoding device, using the same number, and the number of merge candidates is sent from the encoding device to the decoding device. In this case, when no merge candidates are set from the reconstructed reference blocks surrounding the current block as agreed, motion information of blocks at the same position as the current block is brought in from other frames instead of the current frame. Optionally, motion information from the past and future directions from the current frame is combined and filled in as candidates, or blocks at the same position from another reference frame are set as motion information to set merge candidates.
[0301] The AMVP candidate search unit 3004 determines the motion information of the current block in the motion estimation (motion prediction) unit 3005. The motion estimation unit 3005 finds the prediction block that is most similar to the current block in the reconstructed image.
[0302] In the inter-frame prediction unit, after determining the motion information of the current block by using one of the merged candidate search unit and the AMVP candidate search unit, a prediction block is generated by motion compensation 3006.
[0303] Figure 31 It is a method for encoding prediction pattern information.
[0304] Skip mode operation information encoding (S3101) is information indicating whether the prediction mode information of the current block uses inter-frame prediction merging information and whether the prediction block is used as a reconstruction block in the decoding device.
[0305] If the pattern operation is skipped, the determined merge candidate index encoding is performed (S3103); if the pattern operation is skipped, the predicted pattern encoding is performed (S3104).
[0306] Prediction mode encoding (S3104) encodes whether the prediction mode of the current block is inter-frame prediction or intra-frame prediction. When inter-frame prediction mode is selected, merge mode operation information is encoded (S3106). When merge mode is in operation (S3107), merge candidate index encoding is performed (S3103). When merge mode is not in operation, prediction direction encoding is performed (S3108). Prediction direction encoding (S3108) is based on whether the direction of the reference frame used is in the past direction, the future direction, or both directions, according to the current frame indication. When the prediction direction is a past direction or a bidirectional direction (S3109), the inter-frame prediction motion information of the current block can be indicated by encoding the reference frame index information in the past direction (S3110), encoding the MVD information in the past direction (S3111), and encoding the MVP information in the past direction (S3112). When the prediction direction is a future direction or a bidirectional direction (S3113), the inter-frame prediction motion information of the current block can be indicated by encoding the reference frame index information in the future direction (S3114), encoding the MVD information in the future direction (S3115), and encoding the MVP information in the future direction (S3116). The information encoded during inter-frame prediction is called inter-frame prediction unit mode information encoding.
[0307] When the prediction mode is intra-prediction mode, MPM operation information is encoded (S3117). MPM operation information encoding indicates that when there is the same prediction mode information as the current block in a reconstructed block surrounding the current block, the same prediction mode information as the reconstructed block should be used, and the prediction mode information of the current block should not be encoded. When an MPM operation is performed (S3118), MPM index encoding (S3119) indicates which reconstructed block's prediction mode is used as the prediction mode of the current block, and when an MPM operation is not performed (S3118), residual prediction mode encoding is performed (S3120). Residual prediction mode encoding encodes the prediction mode index among the remaining prediction modes other than those selected as MPM candidates, which are then used as the prediction mode for the current block. The information encoded during intra-prediction is called intra-prediction unit mode information encoding.
[0308] Figure 32 and Figure 33 The intra-frame prediction unit and inter-frame prediction unit of the image decoding device are shown.
[0309] For intra-frame prediction unit 3200, only the determination step is omitted. Figure 29 The processing of the optimal prediction mode and the processing of generating prediction blocks based on the optimal prediction mode operate in a manner substantially the same as the intra-prediction unit of the image coding device.
[0310] For inter-frame prediction unit 3300, only the determination step is omitted. Figure 30 The processing of the optimal prediction mode and the processing of generating prediction blocks based on the optimal prediction mode operate in a manner substantially the same as the inter-frame prediction unit of the image coding device.
[0311] Figure 34 It is a method for decoding prediction pattern information. It is basically based on... Figure 31 It operates in the same way as the method used to encode prediction pattern information.
[0312] Figure 35 This is a flowchart illustrating the encoding method of the transform block.
[0313] Figure 35 The encoding method of the transform block in the image encoding device 100 can be executed by the entropy encoding unit 105.
[0314] First, when scanning the transform coefficients according to the reverse scan order, the first non-zero coefficient is determined as the basic coefficient, and the position information Last_sig is encoded (S3501).
[0315] A sub-block containing basic coefficients is selected (S3502), and the transform coefficient information in the corresponding sub-block is encoded. When it is not a sub-block containing basic coefficients, the sub-block information is encoded before encoding the coefficients in the transform block (S3503). Coded_sub_blk_flag (sub-block information) is a flag indicating whether there are at least one or more non-zero coefficients in the current sub-block. Subsequently, the non-zero coefficient information is encoded (S3504). In this case, Sig_coeff_flag (non-zero coefficient information) indicates whether the value of each coefficient in the sub-block is 0.
[0316] Furthermore, coefficient information greater than N is encoded (S3505). In this case, coefficient information greater than N means that for all coefficients in the sub-block, the absolute value of each coefficient is greater than each of the values from 1 to N. N can be any preset value in encoding and decoding, but it is permissible to use the same value in encoding and decoding by encoding the value of N. The number of coefficient information greater than N can be any preset value, or it can vary depending on the position of the basic coefficients. Coefficient information greater than N can be encoded for all or some coefficients in the sub-block, and the coefficient information greater than N can be encoded sequentially in the scanning order of each coefficient.
[0317] For example, when N is set to 3, for all non-zero coefficients in the sub-block, the absolute value of each coefficient is encoded to see if it is greater than 1. For this, the flag Abs_greater1_flag, indicating whether the absolute value of the coefficient is greater than 1, is used. Then, only for coefficients determined to be greater than 1, the value of whether they are greater than 2 is encoded. For this, the flag Abs_greater2_flag, indicating whether the absolute value of the coefficient is greater than 2, is used. Finally, only for coefficients determined to be greater than 2, the value of whether they are greater than 3 is encoded. For this, the flag Abs_greater3_flag, indicating whether the absolute value of the coefficient is greater than 3, is used.
[0318] Optionally, for non-zero coefficients in a sub-block, the absolute value of each coefficient is encoded to determine if it is greater than 1. For this purpose, a flag `Abs_greater1_flag` indicating whether the absolute value of a coefficient is greater than 1 is used. Subsequently, only for coefficients determined to be greater than 1, the evenness or oddness of the coefficient can be encoded. For this purpose, parity information indicating whether a coefficient is even or odd can be used. Furthermore, the absolute value of a coefficient can be encoded to determine if it is greater than 3. For this purpose, a flag `Abs_greater3_flag` indicating whether the absolute value of a coefficient is greater than 3 can be used.
[0319] As mentioned above, coefficient information greater than N may include at least one of Abs_greaterN_flag and a flag indicating whether it is even. In this case, N can be 1, 2, or 3, but is not limited to these. N can also be a natural number greater than 3, such as 4, 5, 6, 7, 8, 9, etc.
[0320] Subsequently, for each coefficient determined to be non-zero, sign information indicating whether it is negative or positive is encoded (S3506). For sign information, Sign_flag can be used.
[0321] Furthermore, the residual value obtained by subtracting N from only the coefficients whose absolute value is determined to be greater than N is defined as residual coefficient information, and the residual value information remaining_coeff of this coefficient is encoded (S3507). In this case, the encoding of the information for each coefficient can be performed by moving to the subsequent coefficients after performing the processes S3504, S3505, S3506, and S3507 on each coefficient. Optionally, the information of the coefficients in the sub-block can be encoded once per step. For example, when there are 16 coefficients in the sub-block, each of the 16 coefficients can be encoded first (S3504), the S3505 process can be fully performed only on the coefficients whose absolute value is determined to be non-zero in S3504, and the S3506 process can be performed. Subsequently, when it is impossible to represent the absolute value of the current coefficient in the S3505 process, the S3507 process can be performed. The absolute values of non-zero coefficients can be derived by decoding at least one of Sig_coeff_flag, one or more Abs_greaterN_flags, parity information, and residual information.
[0322] After encoding all coefficient information of the current sub-block, check if there is a subsequent sub-block (S3509). If there is a subsequent sub-block, move to the subsequent sub-block (S3510) and encode the sub-block information (S3503). Check the sub-block information Coded_sub_blk_flag (S3508). When the value of Coded_sub_blk_flag is found to be true, encode the non-zero coefficient information Sig_coeff_flag. When the value of Coded_sub_blk_flag of the sub-block information is false, it indicates that there is no coefficient to be encoded in the corresponding sub-block, so check if there is a subsequent sub-block. Optionally, after moving to a subsequent sub-block, if the sub-block is the lowest frequency sub-block, assuming that there will be non-zero coefficients, it can be set to true in both encoding and decoding without encoding and decoding the sub-block information.
[0323] exist Figure 35 For ease of description, the encoding of symbolic information (S3506) is described as a process following S3505, but the S3506 process can be performed between S3504 and S3505 or after S3507.
[0324] Figure 36 This is a flowchart illustrating the decoding method for the transform block.
[0325] Figure 36 The method for decoding the transform block in the text corresponds to Figure 35 The method for encoding transform blocks. Figure 36 The decoding method for the transform block in the middle can be derived from Figure 6The entropy decoding unit 601 of the image decoding device 600 in the image decoding device 600 is executed.
[0326] For the information to be encoded, context-adaptive binarization arithmetic is performed through binarization processing. Context-adaptive binarization arithmetic refers to the process of symbolizing and encoding the information in the block by applying different probabilistic information based on the occurrence probability of symbols. In this example, for ease of description, only 0 and 1 are used as symbols, but for the number of symbols, N (N is a natural number equal to or greater than 2) can be used.
[0327] Probabilistic information refers to the probability of occurrence of 0 and 1 in binary information. The probabilities of occurrence of two pieces of information can be set equally or differently based on previously reconstructed information. Depending on the information, it can have M probabilistic pieces of information. In this case, the M probabilistic pieces of information can be implemented as a probability table.
[0328] Figure 37 This is a flowchart illustrating a context-adaptive binary arithmetic encoding method. First, probability initialization is performed (S3701). Probability initialization is the process of dividing the binary information into probability sections based on the probabilities set in the probability information. However, for which probability information will be used, the same conditions can be used through any preset rules in the encoding or decoding device, and the probability information can be encoded separately. The initial probability section can be equally determined through preset rules in the encoding / decoding process. Optionally, the initial probability section can be newly encoded and used. Optionally, the probability section and probability information of previously used encoding parameters can be incorporated without performing probability initialization.
[0329] When the binary information of the current encoding parameter to be encoded is determined (S3702), the binary information of the current encoding parameter is encoded using the probability interval state up to the previous step S3702 and the previous probability information of the same encoding parameter (S3703). Furthermore, the probability information and probability interval can be updated for the binary information to be encoded subsequently (S3704). Furthermore, if there is encoding parameter information to be encoded subsequently (S3705), the above process is repeated by moving to the subsequent encoding parameter information (S3706). If there is no encoding parameter information to be encoded subsequently, the flowchart ends.
[0330] Figure 38 This is a flowchart illustrating a context-adaptive binary arithmetic decoding method. Unlike the encoding device, the decoding device determines the information of the current encoding parameters (S3803) after decoding the binary information of the encoding parameters using probability information and probability intervals (S3802). Furthermore, since... Figure 38 The decoding method in corresponds to Figure 37The encoding method in [the document] is omitted in detail here.
[0331] exist Figure 37 and Figure 38 In steps S3703 and S3802 above, encoding or decoding can be performed by selectively using the optimal probability information among M probability information, which is preset by using information (or encoding parameters) that has been reconstructed around each encoding parameter.
[0332] For example, probabilistic information with a high probability of occurrence that depends on the size of the transform block is used as probabilistic information for encoding parameters.
[0333] Optionally, probability information can be applied differently based on information about the surrounding coefficients of the coefficient to be encoded or decoded, and the probability information of the information to be encoded or decoded can be selected by using the probability information of previously encoded or decoded information.
[0334] Figure 39 and Figure 40 This is a diagram illustrating examples of applying probability information differently based on information from surrounding coefficients.
[0335] Figure 39 This is an example of a probability information table used to encode or decode the Sig_coeff_flag information value of the current coefficient. When the number of coefficients adjacent to the coefficient to be encoded or decoded that have the same Sig_coeff_flag information value as the current coefficient is 1, index 8 is assigned to the current coefficient. In this case, the probability of symbol 1 (the binary Sig_coeff_flag information of the current coefficient) is 61%, and the probability of symbol 0 is 39%. When the number of surrounding coefficients with the same Sig_coeff_flag information value as the current coefficient is 2, index 5 is assigned to the current coefficient, and in this case, the probability of symbol 1 (the binary Sig_coeff_flag information of the current coefficient) is 71%, and the probability of symbol 0 is 29%. When the number of surrounding coefficients with the same Sig_coeff_flag information value as the current coefficient is 3, index 2 is assigned to the current coefficient, and in this case, the probability of symbol 1 (the binary Sig_coeff_flag information of the current coefficient) is 87%, and the probability of symbol 0 is 13%.
[0336] In use Figure 39 The probability information table shown can be encoded or decoded as follows: Figure 40 The probability information is updated in the same way as in [the previous text].
[0337] On the other hand, for the non-zero coefficient information Sig_coeff_flag, since it is closer to the low-frequency domain, the probability information with a high probability of occurrence of Sig_coeff_flag with non-zero coefficient information can be used.
[0338] Furthermore, in the case of probability information for coefficients greater than N, the probability information for coefficients greater than N can be set by using the probability information for coefficients greater than N that were just previously encoded / decoded, or it can be used as is the probability information for coefficients greater than N that were first encoded / decoded on a sub-block basis. As mentioned above, the coefficient information greater than N may include at least one of Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, ... and Abs_greaterN_flag.
[0339] In addition, the sub-block information Coded_sub_blk_flag can use the probability information of the M surrounding sub-blocks that were encoded / decoded, or the probability information of the sub-block that was just encoded / decoded before.
[0340] Figure 41 It adds the intra-block copy prediction unit to Figure 1 An illustration of the image encoding apparatus 100. The intra-frame block copy prediction unit can generate a prediction block for the block to be encoded using the reconstructed region in the current frame.
[0341] Figures 42 to 47 This is an example of generating a prediction block in an intra-block copy prediction unit. In the figure, CB represents the current block, and PB represents the prediction block.
[0342] The motion search range can be limited to the reconstructed region. For example, such as Figure 42 In this context, the motion search range can be limited to the reconstructed area within the current frame, and as... Figure 43 In this context, when even some parts of the predicted block belong to the reconstruction region, it can be set as the motion search range. Optionally, as in... Figure 44 In the example, when the current block and the predicted block partially overlap, they can be set as the motion search range. The partially overlapping corresponding regions can be filled using adjacent reconstructed pixels, while the overlapping regions can be predicted using reconstructed pixels.
[0343] Figures 45 to 47This is an example illustrating a method for generating a prediction block when the prediction block and the current block overlap. A represents the region where the current block and the prediction block overlap, and B is the surrounding adjacent reconstructed pixels used to predict A. The available reconstructed pixels can vary depending on which direction the prediction block exists in the current block (top-left, top-right, left-side, etc.). In this case, region A can be predicted using M intra-prediction modes (M is an integer equal to or greater than 1). M is the number of prediction modes available for intra-prediction of the current block. Figure 48 This is a schematic diagram illustrating pixel prediction in region A using a reconstructed pixel line that can be used for pixel prediction in region A and the top-left direction mode among the M available intra-frame prediction modes.
[0344] The motion vector of the current block can be used to indicate the reconstructed pixel line used to derive the reference pixel line of the current block, instead of... Figure 49 The diagram indicates the predicted block of the current block within the reconstructed region of the current frame. Intra-frame prediction can be performed based on M prediction modes by using reference pixel lines of the reconstructed region that are not adjacent to the current block, and the prediction mode for generating the optimal predicted block can be selected. In this case, the predicted block can be generated using prediction modes from W (W is an integer equal to or greater than 1) reference pixel lines and the optimal reference pixel line, and the optimal predicted block can be generated by performing a weighted summation on the generated predicted blocks after generating the predicted blocks by using different prediction modes or the same prediction mode on the W reference pixel lines.
[0345] Optionally, after generating prediction blocks using intra-block copy prediction and intra-frame prediction respectively, an optimal prediction block can be generated by performing a weighted summation on the generated prediction blocks.
[0346] Alternatively, the reference pixel line can use only the reconstructed pixels at the top or the reconstructed pixels on the left. In this case, when the prediction block and the current block overlap, the prediction block can be generated using the reference pixel line used when generating the prediction block.
[0347] exist Figures 42 to 48 In the illustration, the motion search range is the current frame as an example, but it may be limited to the CTU or CTU row to which the current block belongs, or it may be limited to adjacent CTUs other than the current CTU. For example, the predicted block (PB) indicated by the motion vector of the current block (CB) may be limited to belonging to the same CTU or CTU row as the current block.
[0348] Figure 50This is a block diagram detailing the intra-block copy prediction unit of an image encoding apparatus, whereby the intra-block copy prediction S5001 can be divided into a CPR_Merge candidate search unit S5002 and a CPR_AMVP candidate search unit S5004. The CPR_Merge candidate search unit S5002 can use reconstructed blocks as CPR_Merge candidates. The reconstructed blocks can be blocks encoded / decoded via inter-frame prediction, or they can be limited to blocks encoded / decoded in the surrounding blocks using intra-block copy (IBC) mode. The maximum number of CPR_Merge candidates can be used equally within the encoding / decoding apparatus, or they can be sent from a higher header. In this case, the maximum number can be 2, 3, 4, 5, or greater. The higher header represents higher header information including picture and block information such as video parameter levels, sequence parameter levels, picture parameter levels, stripe levels, etc. By using... Figure 50 Describe the method for deriving CPR_Merge candidates.
[0349] Figure 51 This indicates spatial candidates adjacent to the current block. AL, A, AR, L, and BL represent the locations of reconstructed blocks belonging to the same frame as the current block and can be used as CPR_Merge candidates. For example, when inter-frame prediction or intra-frame block copy prediction is used in a reconstructed block at the locations AL, A, AR, L, or BL, it can be used as a CPR_Merge candidate. The order in which reconstructed blocks are considered can be determined by the order of L, A, AR, BL, AL, or other various priorities. Spatially adjacent reconstructed blocks can only be used as CPR_Merge candidates if the size of the current block is greater than a predetermined threshold. The size of the current block can be represented as the block's width, height, the sum of its width and height, the product of its width and height, the minimum / maximum value of its width and height, etc. For example, when the product of the width and height of the current block is greater than 16, the reconstructed block can be used as a CPR_Merge candidate; otherwise, the reconstructed block may not be used as a CPR_Merge candidate.
[0350] When the maximum number of candidates is not filled in the CPR_Merge candidate list, motion information stored in the H buffer can be added to the CPR_Merge candidate list. The H buffer can store motion information of blocks encoded / decoded before the current block. Optionally, when the maximum number of candidates is not filled in the CPR_Merge candidate list and intra-block copy prediction is used for a reconstructed block in a previously reconstructed frame that is at the same position as the current block, the motion information of the corresponding reconstructed block can be added as a CPR_Merge candidate.
[0351] Optionally, when the number of CPR_MVP candidates added so far is less than the maximum number of candidates, default vector candidates can be added. The default vector can represent a vector equally determined by the encoding / decoding device. For example, when the default vectors are (0,0), (-10,0), (0,-10), (-15,0), (0,-15) and two CPR_Merge candidates are missing, two default vectors can be added sequentially from the beginning to the CPR_Merge candidate list. Subsequently, the RD cost of each motion information in the CPR_Merge candidate list is calculated, and the motion information with the optimal RD cost is determined (S5003).
[0352] The CPR_AMVP candidate search unit S5004 can determine at least one of CPR_MVP candidates or CPR_MVD information by using motion information of surrounding blocks after generating a prediction block within the motion search range. The maximum number of CPR_MVP candidates can be used equally in the encoding / decoding device or sent from a higher head. In this case, the maximum number can be 2, 3, 4, 5, or greater. The number of CPR_MVP information can be used equally in the encoding / decoding device or sent from a higher head. By using... Figure 50 Describe the method for deriving CPR_MVP candidates. AL, A, AR, L, and BL are the locations of reconstructed blocks belonging to the same frame as the current block and can be used as CPR_MVP candidates. When inter-frame prediction or intra-frame block copy prediction is used in the reconstructed blocks at the locations AL, A, AR, L, and BL, they can be used as CPR_MVP candidates. The order in which reconstructed blocks are considered can be determined by the order of L, A, AR, BL, and AL or various priorities. Spatially adjacent reconstructed blocks can only be used as CPR_MVP candidates if the size of the current block is greater than a predetermined threshold. The size of the current block can be represented as the block's width, height, the sum of its width and height, the product of its width and height, the minimum / maximum value of its width and height, etc. For example, when the product of the width and height of the current block is greater than 16, the reconstructed block can be used as a CPR_MVP candidate; otherwise, the reconstructed block may not be used as a CPR_MVP candidate.
[0353] When the maximum number of candidates is not filled in the CPR_MVP candidate list, motion information stored in the H buffer can be added to the CPR_MVP candidate list. The H buffer can store motion information of blocks encoded / decoded before the current block. Optionally, when the maximum number of candidates is not filled in the CPR_MVP candidate list and intra-block copy prediction technology is used for a reconstructed block in a previously reconstructed frame that is in the same position as the current block, the motion information of the corresponding reconstructed block can be added as a CPR_MVP candidate.
[0354] When the number of CPR_MVP candidates added so far is less than the maximum number of candidates, a default vector can be added to the CPR_MVP candidate list. The CPR_MVD information can be the difference between the motion information of the current block and the motion information stored in the CPR_MVP candidates. For example, when the motion vector of the current block is (-14, -14) and the motion vector of the CPR_MVP candidate is (-13, -13), the CPR_MVD information can be (1, 1), that is, ((-14) - (-13), (-14) - (-13)), which is a difference. Optionally, when the current block and the predicted block do not overlap within the motion search range, the motion vector can be expressed according to the size of the current block as shown in Equations 5 and 6 below.
[0355] [Formula 5]
[0356] MV.x=Curr.MV.x-Curr.blk·width
[0357] [Formula 6]
[0358] MV.y=Curr.MV.y-Curr.blk.height
[0359] In Equations 5 and 6, Curr_MV.x and Curr_MV.y are the x and y components of the motion vector of the current block. Curr_blk_width and Curr_blk_height can be determined to various values, such as the horizontal size, vertical size, half the horizontal size, half the vertical size, etc., of the current block. MV is the finally derived motion vector of the current block. For example, when the motion vector of the current block is (-14, -14) and the size of the current block is (4, 4), the motion vector can be set to (-10, -10). The motion vector of the current block can be determined by subtracting only half of the horizontal and vertical lengths of the current block from its motion vector. Subsequently, the RD cost of each motion information in the CPR_MVP candidate list is calculated, and the motion information with the optimal RD cost is determined (S5005).
[0360] In the intra-block copy prediction unit, after determining the motion information of the current block by using one of the CPR_Merge candidate search units and the CPR_AMVP candidate search units, a prediction block is generated by motion compensation (S5006).
[0361] Figure 52 It is a method for encoding prediction pattern information.
[0362] Skip mode operation information encoding (S5201) is information indicating whether a predicted block is used as a reconstructed block in the encoding device.
[0363] Prediction mode encoding (S5202) can encode whether the prediction mode of the current block is inter-frame prediction, intra-frame prediction, or intra-block copy prediction. When encoding it via inter-frame prediction (S5203), the inter-frame prediction unit mode information can be encoded (S5204). Inter-frame prediction unit mode information encoding (S5204) can serve as... Figure 31 The encoding of inter-frame prediction unit mode information serves the same purpose as in intra-frame prediction. When encoding the prediction mode via intra-frame prediction (S5205), the intra-frame prediction unit mode information can also be encoded (S5206). Intra-frame prediction unit mode information encoding serves the same purpose as in intra-frame prediction. Figure 31 The same function is achieved by encoding the intra-prediction unit mode information. When the intra-block copy prediction mode is selected, the CPR_Merge mode operation information can be encoded (S5207). When the CPR_Merge mode is in operation (S5208), CPR_Merge candidate index encoding can be performed (S5209). When the CPR_Merge mode is not in operation, CPR_MVD information encoding can be performed (S5210), and CPR_MVP candidates can be encoded (S5211). When the overlap between the current block and the prediction block is determined by using the CPR_MVP candidates and CPR_MVD information, the prediction mode for the overlapping region can be encoded separately. Additionally, when using... Figure 49 When performing intra-frame prediction in the example, intra-frame prediction mode information coding (S5206) can be performed after CPR_Merge candidate coding S5209 and CPR_MVP candidate coding S5211.
[0364] In this case, when there is no previously reconstructed frame that can be used in the current frame due to the higher head setting, the inter-frame prediction unit mode information can be omitted in the prediction mode coding (S5202).
[0365] By using Figure 31 To perform prediction pattern information encoding.
[0366] Intra-frame block copy prediction unit mode information can be represented as inter-frame prediction unit mode information. It can be represented by adding current frame information to reference frame index information set for inter-frame prediction information. For example, when there are reference frame indices from 0 to 4, 0 to 3 can represent previously reconstructed frames, and 4 can represent the current frame. In merge candidate index encoding (S3103), when the past direction reference frame index information is the current frame when using past direction information, intra-frame block copy prediction technology can be performed; otherwise, inter-frame prediction technology can be performed. Furthermore, when encoding AMVP mode information, when encoding the past direction for prediction direction information (S3108) and encoding the past direction reference frame index information as the current frame (S3110), the past direction MVD information (S3111) and past direction MVP candidate (S3112) can be information used for intra-frame block copy prediction; otherwise, they can be information used for inter-frame prediction technology. In this case, when there is no previously reconstructed frame available for use by the current frame due to the higher head setting, the processing of prediction direction coding (S3108), past direction reference frame index information coding (S3110), future direction reference frame index information coding (S3114), future direction MVD information coding (S3115), and future direction MVP information coding (S3116) can be omitted. Furthermore, when inter-frame prediction is coded in the prediction mode coding step, it can represent intra-frame block copy prediction instead of inter-frame prediction.
[0367] Figure 53 It adds the intra-block copy prediction unit to Figure 6 A diagram of the image decoding device 600.
[0368] Figure 54 The intra-frame block copy prediction unit of the image decoding apparatus is shown.
[0369] For intra-block copy prediction units, only omissions are needed. Figure 50 The process of determining the optimal prediction mode and generating prediction blocks by receiving the determined optimal prediction mode operates in a manner substantially the same as the intra-block copy prediction unit of the image coding apparatus.
[0370] Figure 55 It is a method for decoding prediction pattern information.
[0371] Skip mode operation information decoding (S5501) is information indicating whether the predicted block is used as a reconstruction block in the decoding device.
[0372] Prediction mode decoding (S5502) can decode whether the prediction mode of the current block is inter-frame prediction, intra-frame prediction, or intra-block copy prediction. When decoding via inter-frame prediction (S5503), the inter-frame prediction unit mode information can be decoded (S5504). Inter-frame prediction unit mode information decoding (S5504) can serve as a... Figure 34 The decoding of inter-prediction unit mode information serves the same purpose as in intra-prediction (S5505). When the prediction mode is decoded into intra-prediction (S5505), the intra-prediction unit mode information can be decoded (S5506). Intra-prediction unit mode information decoding serves the same purpose as in... Figure 34 The same function is achieved by decoding the intra-prediction unit mode information. When the intra-block copy prediction mode is selected, the CPR_Merge mode operation information can be decoded (S5507). When the CPR_Merge mode is in operation (S5508), the CPR_Merge candidate index can be decoded (S5509). When the CPR_Merge mode is not in operation, the CPR_MVD information can be decoded (S5510), and the CPR_MVP candidate can be decoded (S5511). When the overlap between the current block and the prediction block is determined by using the CPR_MVP candidate and CPR_MVD information, the prediction mode for the overlapping region can be decoded separately. Additionally, when... Figure 49 When performing intra-frame prediction in the example, intra-frame prediction mode information decoding (S5506) can be performed after CPR_Merge candidate decoding (S5509) and CPR_MVP candidate decoding (S5511).
[0373] In this case, when there is no previously reconstructed frame available for use by the current frame due to a higher head setting, the inter-frame prediction unit mode information can be omitted in the prediction mode decoding (S5502).
[0374] By using Figure 34 To perform prediction pattern information decoding.
[0375] Intra-frame block copy prediction unit mode information can be represented as inter-frame prediction unit mode information. It can be represented by adding current frame information to the reference frame index information set in the inter-frame prediction information. For example, when there are reference frame indices from 0 to 4, 0 to 3 can represent previously reconstructed frames, and 4 can represent the current frame. In the merge candidate index decoding (S3403), when past direction information is used and the past direction reference frame index information is the current frame, intra-frame block copy prediction technology can be performed; otherwise, inter-frame prediction technology can be performed. Furthermore, when decoding the AMVP mode information, past information MVD information (S3411) and past direction MVP candidate (S3412) can be information used for intra-frame block copy prediction when the prediction direction information is decoded (S3408) to indicate the past direction and the past direction reference frame index information is decoded to indicate the current frame (S3410); otherwise, it can be inter-frame prediction technology information. In this case, when there is no previously reconstructed frame available for use by the current frame due to a higher head setting, the processes of prediction direction decoding (S3408), past direction reference frame index information decoding (S3410), future direction reference frame index information decoding (S3414), future direction MVD information decoding (S3415), and future direction MVP information decoding (S3416) can be omitted. When inter-frame prediction is decoded in the prediction mode decoding step, this can represent intra-frame block copy prediction instead of inter-frame prediction.
[0376] Figure 56 This is a flowchart illustrating the encoding method for quantized transform coefficients (hereinafter referred to as "transform coefficients"). It can be performed by the entropy encoding unit of an image encoding device.
[0377] First, when scanning the transform coefficients according to the reverse scan order, the first non-zero coefficient can be determined as the basic coefficient, and the position information (Last_sig) can be encoded (S5601).
[0378] A sub-block containing basic coefficients is selected (S5602), and the transform coefficient information in the sub-block can be encoded. When it is not a sub-block containing basic coefficients, the sub-block information can be encoded before encoding the coefficients in the transform block (S5603). Coded_sub_blk_flag (sub-block information) is a flag indicating whether there are at least one or more non-zero transform coefficients in the current sub-block. Before encoding the coefficient information in the sub-block, the first and second encoded information quantities can be initialized to 0. The first encoded information is the number of encoded coefficients greater than 0 (S5606), coefficients greater than 1 (S5606), and parity information (S5607). The second encoded information is the number of encoded coefficients greater than 3 (S5610). The first step of coefficient information encoding represents steps S5606, S5607, and S5608, which encode coefficients greater than 0, coefficients greater than 1, and parity information. The second step of coefficient information encoding is step S5610, which encodes coefficients greater than 3.
[0379] Subsequently, the transform coefficient to be encoded can be selected in reverse scan order (S5604). PosL indicates the first position of the transform coefficient in the current sub-block according to the reverse scan order, which has not been encoded by the first step coefficient information encoding process. After selecting the transform coefficient to be encoded first in the sub-block, the coefficient information indicating whether the absolute value of the current transform coefficient is greater than 0 can be encoded (S5606). Subsequently, when the current transform coefficient is determined to be non-zero, the coefficient information indicating whether the absolute value of the current transform coefficient is greater than 1 can be encoded (S5607). Subsequently, when it is determined from the coefficient information greater than 1 that the absolute value of the current transform coefficient is greater than 1, the parity information is encoded (S5608) to indicate the parity of the current transform coefficient. For example, the parity information can indicate whether the absolute value of the current transform coefficient is even or odd.
[0380] In this case, when encoding coefficient information greater than 0, coefficient information greater than 1, and parity information, the number of first encoded information is increased (S5606, S5607, S5608). For example, when encoding at least one of coefficient information greater than 0, coefficient information greater than 1, and parity information, the number of first encoded information may increase by 1. Optionally, whenever at least one of coefficient information greater than 0, coefficient information greater than 1, and parity information is encoded, the number of first encoded information may increase by 1.
[0381] In other words, the first amount of encoded information can represent the maximum number of coefficients allowed in a block. In this case, a block can represent a transform block or a sub-block of a transform block. Furthermore, the coefficient information can include at least one of coefficients greater than 0, coefficients greater than 1, and parity information. The first amount of encoded information can be defined in units of video sequences, frames, stripes, coding unit (CTU), coding block (CU), transform block (TU), or sub-blocks of transform blocks. In other words, the same first amount of encoded information can be determined / set for all transform blocks or sub-blocks belonging to the corresponding unit.
[0382] Subsequently, the transform coefficients to be encoded are changed to subsequent coefficients by decrementing the PosL value by 1. In this case, when the number of first encoded information exceeds the first threshold or the first step of encoding coefficient information in the current sub-block is completed, the process can move to the encoding step of coefficient information greater than 3. Otherwise, subsequent coefficient information can be encoded. The first threshold is the maximum number of at least one of the following that can be encoded on a sub-block basis: coefficient information greater than 0, coefficient information greater than 1, and parity information (S5606, S5607, S5608).
[0383] Coefficients greater than 3 can be encoded only for the transform coefficients whose parity information is encoded in reverse scan order (S5610). When encoding coefficients greater than 3, the number of second encoded information can be increased. When the number of second encoded information exceeds a second threshold or the second step of encoding coefficient information in the current sub-block is completed, it can be moved to the subsequent step S5611. The second threshold is the maximum number of coefficients greater than 3 that can be encoded on a sub-block basis.
[0384] Optionally, the first encoding information may represent the maximum number of coefficient information that can be encoded in a predetermined unit. The coefficient information may include at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, and coefficient information greater than 3. In this case, the step of encoding coefficient information greater than 3 may be included in the first step of coefficient information encoding.
[0385] Specifically, information indicating whether the absolute value of the current transform coefficient is greater than 0 can be encoded. When the current transform coefficient is determined to be non-zero, information indicating whether the absolute value of the current transform coefficient is greater than 1 can be encoded. Subsequently, when it is determined that the absolute value of the current transform coefficient is greater than 1 based on information indicating that the coefficient is greater than 1, parity information can be encoded, and information indicating that the coefficient is greater than 3 can also be encoded.
[0386] In this case, the number of first encoded information increases when coefficient information greater than 0, coefficient information greater than 1, parity information, and coefficient information greater than 3 are encoded. For example, the number of first encoded information may increase by 1 when at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, and coefficient information greater than 3 is encoded. Optionally, the number of first encoded information may increase by 1 whenever at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, and coefficient information greater than 3 is encoded.
[0387] In other words, the first amount of encoded information can represent the maximum number of coefficients allowed in a block. In this case, a block can represent a transform block or a sub-block of a transform block. Furthermore, the coefficient information can include at least one of the following: coefficients greater than 0, coefficients greater than 1, parity information, and coefficients greater than 3. The first amount of encoded information can be defined in units of video sequences, frames, stripes, coding unit (CTU), coding block (CU), transform block (TU), or sub-blocks of transform blocks. In other words, the same first amount of encoded information can be determined / set for all transform blocks or sub-blocks belonging to the corresponding unit.
[0388] PosC represents the position of the transform coefficient to be encoded. When PosL is less than PosC (S5612), it indicates that the first step of coefficient information has been encoded. After encoding coefficient information greater than N, the absolute value of the difference coefficient, obtained by subtracting the minimum absolute value of the current transform coefficient from the current coefficient value, can be encoded (S5613), where the minimum absolute value of the current transform coefficient can be obtained from the parity information of the current transform coefficient. In this case, N represents a number equal to or greater than 3, and the same value can be used in the encoding / decoding device, or the value can be sent from the higher head. When the value of N is 5, coefficient information greater than 4 can be encoded for coefficients whose absolute value is determined to be 4 or greater. When the absolute value of the current coefficient is determined to be 5 or greater by coefficient information greater than 4, coefficient information greater than 5 can be encoded. When the value of the current transform coefficient is fully encoded by encoding coefficient information greater than N, the step of encoding the absolute value of the difference coefficient can be omitted (S5613). When PosL is greater than or equal to PosC, the absolute value of the current transform coefficient itself can be encoded (S5614). Subsequently, the sign information representing the sign information of the current transform coefficient can be encoded (S5615). When all the information of the current transform coefficient is encoded, the subsequent transform coefficient in the sub-block can be selected as the current transform coefficient by decrementing the PosC value by 1 (S5617), and when the current transform coefficient is the last transform coefficient in the sub-block, the first threshold and the second threshold can be updated (S5618).
[0389] For the first and second thresholds, when the number of transform coefficients in the current sub-block that encode the absolute value of the current coefficient itself is equal to or greater than C (where C is an integer equal to or greater than 0), the corresponding thresholds can be adjusted. For example, when the first threshold is 13, the number of first encoded information is 15, the second threshold is 2, and the number of second encoded information is 2, this indicates that the number of first encoded information and the number of second encoded information have reached the first and second thresholds, respectively. Therefore, the first and second thresholds can be updated to increase the first and second thresholds. Alternatively, for example, when the first threshold is 13, the number of first encoded information is 15, the second threshold is 2, and the number of second encoded information is 1, this indicates that the number of first encoded information exceeds the first threshold, but the number of second encoded information has not reached the second threshold. Therefore, the first and second thresholds can be updated to increase the first threshold and decrease the second threshold. Optionally, when neither the number of first nor the number of second encoded information has reached the first and second thresholds, the first and second thresholds can be updated to decrease the first and second thresholds. Optionally, the first and second thresholds can be updated to maintain the first and second thresholds.
[0390] When the current sub-block is not the last sub-block (S5619), it can move to the subsequent sub-block (S5620), and when the current sub-block is the last sub-block (S5619), the transformation block encoding can end.
[0391] Figure 57 This is a flowchart illustrating a decoding method for quantized transform coefficients. It can be executed by the entropy decoding unit of an image decoding device.
[0392] First, by decoding Last_sig, the first non-zero coefficient when scanning the transform coefficients according to the reverse scan order can be determined as the basic coefficient (S5701).
[0393] A sub-block including basic coefficients can be selected (S5702), and the transform coefficient information in the sub-block can be decoded. When it is not a sub-block including basic coefficients, the sub-block information can be decoded before decoding the coefficients in the transform block (S5703). Coded_sub_blk_flag (sub-block information) is a flag indicating that there are at least one or more non-zero coefficients in the current sub-block. Before decoding the coefficient information in the sub-block, the first number of decoded information and the second number of decoded information can be initialized to 0. The first number of decoded information is the number of decoded coefficients greater than 0 (S5706), coefficients greater than 1 (S5706), and parity information (S5707). The second number of decoded information is the number of decoded coefficients greater than 3 (S5710).
[0394] Subsequently, the transform coefficient to be decoded can be selected in reverse scan order (S5704). PosL represents the first position of the transform coefficient in the current sub-block in reverse scan order, which has not been decoded by the first step coefficient information decoding process. After selecting the transform coefficient to be decoded first in the sub-block, the coefficient information indicating whether the absolute value of the current transform coefficient is greater than 0 can be decoded (S5706). When the current transform coefficient is determined to be non-zero, the coefficient information indicating whether the absolute value of the current transform coefficient is greater than 1 can be decoded (S5707). Subsequently, when it is determined that the absolute value of the current transform coefficient is greater than 1 based on the coefficient information greater than 1, the parity of the current transform coefficient can be determined by decoding the parity information (S5708). In this case, when the coefficient information greater than 0, the coefficient information greater than 1, and the parity information are decoded, the number of first decoded information is reduced (S5706, S5707, S5708). For example, when at least one of coefficient information greater than 0, coefficient information greater than 1, and parity information is decoded, the first number of decoded information can be reduced by 1. Optionally, the first number of decoded information can be reduced by 1 each time at least one of coefficient information greater than 0, coefficient information greater than 1, and parity information is decoded. In other words, the first number of decoded information can represent the maximum number of coefficient information transmitted for a block. In this case, a block can represent a transform block or a sub-block of a transform block. Furthermore, the coefficient information can include at least one of coefficient information greater than 0, coefficient information greater than 1, and parity information. The first number of decoded information can be defined in units of video sequences, frames, stripes, coding unit blocks (CTUs), coding blocks (CUs), transform blocks (TUs), or sub-blocks of transform blocks. In other words, the same first number of decoded information can be set for all transform blocks or sub-blocks belonging to the corresponding unit.
[0395] Subsequently, by decreasing the PosL value by 1, the coefficients to be decoded are changed to subsequent transform coefficients. In this case, when the number of first decoded information exceeds the first threshold or the first step coefficient information in the current sub-block is decoded, the process can move to the decoding step for coefficient information greater than 3. Otherwise, the subsequent transform coefficient information can be decoded. The first threshold is the maximum number of coefficient information greater than 0, coefficient information greater than 1, and parity information (S5706, S5707, S5708) that can be decoded on a sub-block basis. The first step coefficient information decoding refers to steps S5706, S5707, and S5708 that decode coefficient information greater than 0, coefficient information greater than 1, and parity information.
[0396] Decoding of coefficients greater than 3 can be performed only on the transform coefficients whose parity information is decoded in reverse scan order (S5710). When decoding coefficients greater than 3, the number of second-decoded information can be increased. When the number of second-decoded information exceeds a second threshold or the second-step coefficient information decoding in the current sub-block is completed, the process can move to the subsequent step S5711. The second threshold is the maximum number of coefficients greater than 3 that can be decoded on a sub-block basis. The second-step coefficient information decoding is step S5710, which decodes coefficients greater than 3.
[0397] Optionally, the first number of decoded information may represent the maximum number of coefficient information that can be transmitted in predetermined units. In this case, the coefficient information may include at least one of coefficient information greater than 0, coefficient information greater than 1, parity information, and coefficient information greater than 3. In this case, the step of decoding coefficient information greater than 3 may be included in the first step of coefficient information decoding.
[0398] Specifically, the information indicating whether the absolute value of the current transform coefficient is greater than 0 can be decoded. When the current transform coefficient is determined to be non-zero, the information indicating whether the absolute value of the current transform coefficient is greater than 1 can be decoded. Subsequently, when it is determined that the absolute value of the current transform coefficient is greater than 1 based on the information indicating that the coefficient is greater than 1, the parity information and the information indicating that the coefficient is greater than 3 can be decoded.
[0399] In this scenario, the number of first decoded information entries decreases when coefficients greater than 0, greater than 1, parity information, and greater than 3 are decoded. For example, the number of first decoded information entries can be reduced by 1 when at least one of these coefficients is decoded. Optionally, the number of first decoded information entries can be reduced by 1 whenever at least one of these coefficients is decoded.
[0400] In other words, the first number of decoded information can represent the maximum number of coefficients allowed in a block. In this case, a block can represent a transform block or a sub-block of a transform block. Furthermore, the coefficient information can include at least one of the following: coefficients greater than 0, coefficients greater than 1, parity information, and coefficients greater than 3. The first number of decoded information can be defined in units of video sequences, frames, stripes, coding unit (CTU), coding block (CU), transform block (TU), or sub-blocks of transform blocks. In other words, the same first number of decoded information can be set for all transform blocks or sub-blocks belonging to the corresponding unit.
[0401] PosC represents the position of the transform coefficient to be decoded. When PosL is less than PosC (S5712), decoding of information about the current transform coefficient can be performed in the first step of coefficient information decoding. After decoding coefficient information greater than N, the absolute value of the difference coefficient, obtained by subtracting the minimum absolute value of the current transform coefficient from the current coefficient value, can be decoded (S5713), where the minimum absolute value of the current transform coefficient can be obtained through the parity information of the current transform coefficient. When the value of the current coefficient is completely decoded by decoding coefficient information greater than N, step S5713 of decoding the absolute value of the difference coefficient can be omitted. When PosL is greater than or equal to PosC, decoding of the absolute value of the current transform coefficient information can be performed once (S5714). Subsequently, the sign information representing the sign information of the current transform coefficient can be decoded (S5715). When decoding all the information of the current transform coefficient, the subsequent coefficient in the sub-block can be selected as the current coefficient by decreasing the PosC value by 1 (S5717), and when the current transform coefficient is the last coefficient in the sub-block, the first threshold and the second threshold can be updated (S5718).
[0402] For the first and second thresholds, when the absolute value of the current coefficient in the current sub-block is equal to or greater than C (where C is an integer equal to or greater than 0), the corresponding thresholds can be adjusted. For example, when the first threshold is 13, the first number of decoded information is 15, the second threshold is 2, and the second number of decoded information is 2, this indicates that the first and second numbers of decoded information have reached the first and second thresholds, respectively. Therefore, the first and second thresholds can be updated to increase the first and second thresholds. Alternatively, for example, when the first threshold is 13, the first number of decoded information is 15, the second threshold is 2, and the second number of decoded information is 1, this indicates that the first number of decoded information exceeds the first threshold, but the second number of decoded information has not reached the second threshold. Therefore, the first and second thresholds can be updated to increase the first threshold and decrease the second threshold. Optionally, when neither the first nor the second number of decoded information has reached the first and second thresholds, the first and second thresholds can be updated to decrease the first and second thresholds. Optionally, the first and second thresholds can be updated to maintain the first and second thresholds.
[0403] When the current sub-block is not the last sub-block (S5719), it can move to the subsequent sub-block (S5720), and when the current sub-block is the last sub-block (S5719), the transformation block decoding can end.
[0404] The various embodiments of this disclosure do not enumerate all possible combinations, but rather describe representative aspects of this disclosure, and the content described in the various embodiments may be applied independently or in two or more combinations.
[0405] Alternatively, the various embodiments of this disclosure can be implemented by hardware, firmware, software, or combinations thereof. For hardware implementation, implementation can be performed using one or more ASICs (Application-Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field-Programmable Gate Arrays), general-purpose processors, controllers, microcontrollers, microprocessors, etc.
[0406] The scope of this disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that perform actions in a device or computer according to the methods of various embodiments, as well as non-transitory computer-readable media that cause such software or instructions to be stored in a device or computer and can be executed in a device or computer.
[0407] Industrial applicability
[0408] This disclosure can be used for encoding / decoding images.
Claims
1. An image decoding method, comprising: Generate a candidate list for the current block; as well as Inter-frame prediction for the current block is performed using any one of the multiple candidates belonging to the candidate list. The plurality of candidates includes spatial candidates, temporal candidates, and candidates based on reconstruction information. The spatial candidates are determined based on the motion information of the reconstructed spatial blocks that are spatially adjacent to the current block. The time candidates are determined based on the motion information of the reconstruction time blocks that are temporally adjacent to the current block. The reconstructed time block is a block in the same frame that is at the same position as the current block. Specifically, the candidate based on the reconstruction information is added from the buffer containing motion information decoded prior to the current block. The order in which the motion information stored in the buffer is added to the candidate list is determined based on the inter-frame prediction mode of the current block. Wherein, in response to the inter-frame prediction mode being an advanced motion vector prediction mode, the motion information stored in the buffer is added to the candidate list in the order in which the motion information was first stored in the buffer, and In response to the inter-frame prediction mode being a merging mode, the motion information stored in the buffer is added to the candidate list in the order of the motion information most recently stored in the buffer.
2. The method according to claim 1, wherein, The candidate list is populated by using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the candidate list is populated by using the motion information stored in the buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
3. The method according to claim 1, wherein, The buffer is initialized in units of coding tree units, coding tree unit rows, stripes, or frames.
4. An image encoding method, comprising: Generate a candidate list for the current block; as well as Inter-frame prediction for the current block is performed using any one of the multiple candidates belonging to the candidate list. The plurality of candidates includes spatial candidates, temporal candidates, and candidates based on reconstruction information. The spatial candidates are determined based on the motion information of the reconstructed spatial blocks that are spatially adjacent to the current block. The time candidates are determined based on the motion information of the reconstruction time blocks that are temporally adjacent to the current block. The reconstructed time block is a block in the same frame that is at the same position as the current block. Specifically, the candidate based on the reconstruction information is added from the buffer containing motion information encoded prior to the current block. The order in which the motion information stored in the buffer is added to the candidate list is determined based on the inter-frame prediction mode of the current block. Wherein, in response to the inter-frame prediction mode being an advanced motion vector prediction mode, the motion information stored in the buffer is added to the candidate list in the order in which the motion information was first stored in the buffer, and In response to the inter-frame prediction mode being a merging mode, the motion information stored in the buffer is added to the candidate list in the order of the motion information most recently stored in the buffer.
5. The method according to claim 4, wherein, The candidate list is populated by using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the candidate list is populated by using the motion information stored in the buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
6. The method according to claim 4, wherein, The buffer is initialized in units of coding tree units, coding tree unit rows, stripes, or frames.
7. A method for transmitting a bit stream, comprising: A bitstream is generated by performing an encoding method; as well as Transmit the bit stream, The encoding method includes: Generate a candidate list for the current block; and Inter-frame prediction for the current block is performed using any one of the multiple candidates belonging to the candidate list. The plurality of candidates includes spatial candidates, temporal candidates, and candidates based on reconstruction information. The spatial candidates are determined based on the motion information of the reconstructed spatial blocks that are spatially adjacent to the current block. The time candidates are determined based on the motion information of the reconstruction time blocks that are temporally adjacent to the current block. The reconstructed time block is a block in the same frame that is at the same position as the current block. Specifically, the candidate based on the reconstruction information is added from the buffer containing motion information encoded prior to the current block. The order in which the motion information stored in the buffer is added to the candidate list is determined based on the inter-frame prediction mode of the current block. Wherein, in response to the inter-frame prediction mode being an advanced motion vector prediction mode, the motion information stored in the buffer is added to the candidate list in the order in which the motion information was first stored in the buffer, and In response to the inter-frame prediction mode being a merging mode, the motion information stored in the buffer is added to the candidate list in the order of the motion information most recently stored in the buffer.
8. The method according to claim 7, wherein, The candidate list is populated by using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the candidate list is populated by using the motion information stored in the buffer until the number of candidates is reduced by 1 from the maximum number of candidates.
9. The method according to claim 7, wherein, The buffer is initialized in units of coding tree units, coding tree unit rows, stripes, or frames.