Video signal encoding / decoding method and device thereof

By using the predicted area motion information list in the video signal encoding/decoding method to derive merge candidates and perform redundant detection, the problem of increasing data volume in high-resolution video services is solved, and encoding efficiency and performance are improved.

JP2025072574AActive Publication Date: 2025-05-09GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025019602
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-11-27
Filing Date
2025-02-07
Publication Date
2025-05-09
Estimated Expiration
2039-11-08

AI Technical Summary

Technical Problem

Existing video encoding technology faces the problem of increasing data volume in high-resolution video services, resulting in limited compression performance.

Method used

In the video signal encoding/decoding method, the predicted area motion information list is used to derive merge candidates and perform redundant detection to improve the encoding efficiency.

Benefits of technology

It improves the efficiency of intersection prediction, simplifies redundant detection, and improves the overall performance of video signal encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025072574000001_ABST
    Figure 2025072574000001_ABST
Patent Text Reader

Abstract

To provide a video decoding method for improving merging candidate derivation using a prediction region motion information list.SOLUTION: A video decoding method includes the steps of: deriving merge candidates for a current block from neighboring blocks of the current block; adding the derived merge candidates to a merge candidate list; adding at least one prediction region merge candidate included in a prediction region motion information list to the merge candidate list when the number of merge candidates added to the merge candidate list is less than a threshold; deriving motion information of the current block based on the merge candidate list; and performing motion compensation on the current block based on the derived motion information.SELECTED DRAWING: Figure 17
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a video signal encoding / decoding method and an apparatus therefor. [Background technology]

[0002] As display panels become larger and larger, video services with higher image quality are required. The biggest problem with high-definition video services is the large increase in data volume. To solve this problem, active studies on improving video compression rates are underway. As a representative example, in 2009, the Motion Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) under the International Telecommunication Union-Telecommunication (ITU-T) established the Joint Collaborative Team on Video Coding (JCT-VC). JCT-VC proposed the video compression standard HEVC (High Efficiency Video Coding), which was approved on January 25, 2013. Its compression performance is about twice that of H.264 / AVC. With the rapid growth of high-definition video services, the performance limitations of HEVC are gradually emerging. Summary of the Invention [Problem to be solved by the invention]

[0003] An object of the present invention is to provide a method for deriving merging candidates using a prediction region motion information list when encoding / decoding a video signal, and an apparatus for performing said method.

[0004] An object of the present invention is to provide a redundancy detection method for detecting redundancy between a prediction region merge candidate included in a prediction region motion information list and a merge candidate included in a merge candidate list when encoding / decoding a video signal.

[0005] It is an object of the present invention to provide a method for deriving merging candidates for blocks included in a merging processing area when encoding / decoding a video signal, and an apparatus for implementing said method.

[0006] The technical problems that the present invention aims to achieve are not limited to the technical problems mentioned above, and a person having ordinary skill in the art to which the present invention pertains will clearly understand other technical problems not mentioned from the following description. [Means for solving the problem]

[0007] According to the present invention, a video signal decoding / encoding method includes the steps of: deriving a merge candidate of a current block from neighboring blocks of the current block, adding the derived merge candidate to a merge candidate list, adding at least one prediction region merge candidate included in a prediction region motion information list to the merge candidate list if the number of merge candidates added to the merge candidate list is less than a threshold, deriving motion information of the current block based on the merge candidate list, and performing motion compensation on the current block based on the derived motion information. In this case, whether to add the prediction region merge candidate to the merge candidate list may be determined based on a comparison result between the motion information of the prediction region merge candidate and the motion information of the merge candidates included in the merge candidate list.

[0008] In the video signal decoding / encoding method of the present invention, the comparison may be performed for at least one merging candidate whose index in the merging candidate list is less than or equal to a threshold.

[0009] In the video signal decoding / encoding method according to the present invention, the comparison may be performed with at least one of a merging candidate derived from a left adjacent block located to the left of the current block, or a merging candidate derived from an upper adjacent block located above the current block.

[0010] In the video signal decoding / encoding method according to the present invention, when it is determined that a merge candidate having motion information that is the same as that of a first prediction region merge candidate is present in the merge candidate list, the first prediction region merge candidate is not added to the merge candidate list, and it is possible to determine whether to add the second prediction region merge candidate to the merge candidate list based on a comparison result between the motion information of a second prediction region merge candidate included in the prediction region motion information list and the motion information of a merge candidate included in the merge candidate list.

[0011] In the video signal decoding / encoding method according to the present invention, it is possible to omit determining whether the motion information of the second prediction region merging candidate is the same as the motion information of a merging candidate having motion information that is the same as the motion information of the first prediction region merging candidate.

[0012] In the video signal decoding / encoding method according to the present invention, a difference value between the number of prediction region merging candidates included in the prediction region merging candidates and the indexes of the prediction region merging candidates is equal to or smaller than a threshold value.

[0013] The video signal decoding / encoding method according to the present invention further includes adding a current prediction region merging candidate derived from the motion information of the current block to the prediction region motion information list. In this case, if there is a prediction region merging candidate that is the same as the current prediction region merging candidate, the prediction region merging candidate that is the same as the current prediction region merging candidate may be deleted, and a maximum index may be assigned to the current prediction region merging candidate.

[0014] The above brief summary features of the present invention are merely exemplary embodiments of the detailed description of the invention that follows and are not intended to limit the scope of the invention. Effect of the Invention

[0015] According to the present invention, by providing a method for deriving merging candidates using a prediction region motion information list, it is possible to improve inter prediction efficiency.

[0016] According to the present invention, it is possible to improve inter prediction efficiency by simplifying redundancy detection between prediction region merge candidates and merge candidates.

[0017] According to the present invention, by providing a method for deriving merging candidates for blocks included in a merging processing region, it is possible to improve inter prediction efficiency.

[0018] The effects obtainable by the present invention are not limited to the above effects, and a person having ordinary skill in the art to which the present invention pertains will clearly understand other effects not mentioned from the following description. [Brief description of the drawings]

[0019] [Figure 1] FIG. 2 is a block diagram illustrating a video encoder according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram illustrating a video decoder according to an embodiment of the present invention. [Diagram 3] FIG. 2 illustrates a basic coding tree unit according to an embodiment of the present invention. [Figure 4] A diagram showing multiple division types of a coding block. [Diagram 5] A diagram showing the division modes of a coding tree unit. [Figure 6] 2 is a flowchart illustrating an inter-prediction method according to an embodiment of the present invention. [Figure 7] FIG. 2 illustrates non-linear motion of an object. [Figure 8]2 is a flowchart illustrating an affine motion based inter prediction method according to an embodiment of the present invention. [Figure 9] FIG. 2 is a diagram showing examples of affine seed vectors for each affine motion model. [Figure 10] FIG. 2 is a diagram showing examples of affine vectors of sub-blocks in a four-parameter motion model. [Figure 11] 11 is a flowchart illustrating a process of deriving motion information for a current block in merge mode. [Figure 12] FIG. 13 illustrates an example of candidate blocks for deriving merging candidates. [Figure 13] FIG. 13 illustrates the location of a reference sample. [Figure 14] FIG. 13 illustrates an example of candidate blocks for deriving merging candidates. [Figure 15a] 13A and 13B are diagrams illustrating an example of a change in the position of a reference sample. [Figure 15b] 13A and 13B are diagrams illustrating an example of a change in the position of a reference sample. [Figure 16] 13A and 13B are diagrams illustrating an example of a change in the position of a reference sample. [Figure 17] 13 is a flowchart illustrating a process for updating a prediction region motion information list. [Figure 18] FIG. 13 is a diagram illustrating an example of updating a prediction region merge candidate list. [Figure 19] FIG. 13 is a diagram illustrating an example of updating indexes of stored prediction region merging candidates. [Figure 20] FIG. 2 shows the location of a representative sub-block. [Figure 21] A diagram showing an example of generating a prediction region motion information list for each inter prediction mode. [Figure 22] 13 is a diagram showing an example of adding a prediction region merging candidate included in the long-term motion information list to a merging candidate list. FIG. [Figure 23] FIG. 13 illustrates an example of performing redundancy detection on only some of the merging candidates. [Figure 24] FIG. 13 illustrates an example of omitting redundant detection for a specific merging candidate. [Diagram 25] FIG. 13 is a diagram showing an example in which a candidate block included in the same merge processing area as the current block is set as unavailable as a merge candidate. [Figure 26] FIG. 13 shows a temporary motion information list. [Figure 27] A figure showing an example of merging a prediction region motion information list and a temporal motion information list. [Figure 28] 13 is a diagram showing an example of address information of blocks included in coding area merge candidates. FIG. [Figure 29] 13 is a diagram showing an example of address information of blocks included in coding area merge candidates. FIG. [Diagram 30] FIG. 13 is a diagram illustrating an example in which a coding region merging candidate having address information that is the same as the address information of a current block is set as unavailable as a merging candidate of the current block. [Diagram 31] FIG. 13 is a diagram illustrating an example in which a coding region merging candidate having address information that is the same as the address information of a current block is set as unavailable as a merging candidate of the current block. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[0021] Video encoding and decoding is performed on a block-by-block basis. For example, encoding / decoding operations such as transform, quantization, prediction, loop filtering, or reconstruction may be performed on a coding block, a transform block, or a predictive block.

[0022] Hereinafter, the block to be coded / decoded is called a “current block.” For example, according to a current coding / decoding process step, the current block can represent a coding block, a transformation block or a prediction block.

[0023] In addition, the term "unit" as used in this specification may be understood to represent a basic unit for performing a specific encoding / decoding process, and "block" may be understood to represent a sample array of a certain size. Unless otherwise specified, "block" and "unit" are used interchangeably. For example, in the embodiments described below, a coding block and a coding unit may be understood to have the same meaning.

[0024] FIG. 1 is a block diagram illustrating a video encoder according to an embodiment of the present invention.

[0025] Referring to FIG. 1, the video encoding device 100 may include an image division unit 110, a prediction unit 120, 125, a transformation unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150 and a memory 155.

[0026] Each component shown in Fig. 1 is shown alone to represent different characteristic functions in a video encoding device, but does not represent that each component is composed of separate hardware or a single software assembly. That is, for ease of explanation, each component is arranged so that at least two of the components are combined to form one component, or one component is divided into multiple components to perform the function. As long as it does not deviate from the essence of the present invention, such an embodiment in which each component is integrated and an embodiment in which each component is separated also fall within the scope of the present invention.

[0027] In addition, some of the components are not essential components for performing the essential functions of the present invention, but are only optional components for improving performance. The present invention may be implemented by including only the members necessary to realize the essence of the present invention other than the components used only to improve performance, and a structure including only essential components other than the optional components used only to improve performance also falls within the scope of the present invention.

[0028] The image division unit 110 can divide an input image into at least one processing unit. In this case, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The image division unit 110 divides one image into a combination of multiple coding units, prediction units, and transform units. The image can be coded by selecting a combination of a coding unit, a prediction unit, and a transform unit based on a predetermined criterion (e.g., a cost function).

[0029] For example, an image can be divided into multiple coding units. To divide an image into coding units, a recursive tree structure such as a quad tree structure can be used to divide a video or largest coding unit into other coding units as a root. The other coding units may have child nodes whose number is equal to the number of divided coding units. A coding unit that is not divided due to some restrictions becomes a leaf node. That is, if it is assumed that a coding unit can only realize a square division, a coding unit can be divided into a maximum of four other coding units.

[0030] Hereinafter, in the embodiments of the present invention, the encoding unit may refer to a unit that performs encoding, or may refer to a unit that performs decoding.

[0031] The prediction units in one coding unit may be divided into shapes such as at least one of a square or a rectangle of the same size, and one prediction unit in one coding unit may also be divided into a shape and / or size that differs from another prediction unit.

[0032] Performing intra prediction based on a coding unit If the prediction unit is not the smallest coding unit, intra prediction can be performed without the need to split into multiple prediction units NxN.

[0033] The prediction units 120 and 125 may include an inter prediction unit 120 that performs inter prediction and an intra prediction unit 125 that performs intra prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference image, etc.) may be determined based on each prediction method. In this case, the processing unit that performs the prediction may be different from the processing unit that determines the prediction method and specific content. For example, the prediction unit may determine the prediction method and prediction mode, and the prediction may be performed by the conversion unit. A residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 130. In addition, prediction mode information, motion vector information, etc. for prediction may be encoded together with the residual value in the entropy encoding unit 165 and transmitted to the decoder. When a specific encoding mode is used, the prediction unit 120 and 125 may not generate a prediction block, but the original block may be directly encoded and transmitted to the decoder.

[0034] The inter prediction unit 120 may predict a prediction unit based on information of at least one image, either an image immediately before or an image immediately after the current image. In some cases, the prediction unit may also be predicted based on information of a part of an encoded region in the current image. The inter prediction unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.

[0035] The reference image interpolation unit receives reference image information from the memory 155, and can generate pixel information of integer pixels or less from the reference image. For luminance pixels, an 8-tap interpolation filter based on DCT with different filter coefficients can be used to generate pixel information of integer pixels or less in units of 1 / 4 pixels. For chrominance signals, a 4-tap interpolation filter based on DCT with different filter coefficients can be used to generate pixel information of integer pixels or less in units of 1 / 8 pixels.

[0036] The motion prediction unit can perform motion prediction based on the reference image interpolated by the reference image interpolation unit. As a method for calculating a motion vector, multiple methods such as a full search-based block matching algorithm (FBMA), a three step search method (TSS), a new three-step search algorithm (NTS), etc. can be used. According to the interpolated pixel, the motion vector may have a motion vector value in units of 1 / 2 pixel or 1 / 4 pixel. In the motion prediction unit, a current prediction unit can be predicted by using different motion prediction methods. As a motion prediction method, multiple methods such as a skip method, a merge method, an advanced motion vector prediction method (AMVP), an intra block copy method, etc. can be used.

[0037] The intra prediction unit 125 can generate a prediction unit based on the neighboring reference pixel information of the current block, which is pixel information in the current image. When the neighboring block of the current prediction unit is a block on which inter prediction has been performed, and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be the reference pixel information of the neighboring block on which intra prediction has been performed. In other words, when the reference pixel is unavailable, at least one reference pixel of the available reference pixels can be used instead of the unavailable reference pixel information.

[0038] In intra prediction, the prediction mode may include an angular prediction mode that uses reference pixel information based on the prediction direction and a non-angular mode that does not use direction information when performing prediction. The mode for predicting luma information may be different from the mode for predicting chroma information. To predict chroma information, intra prediction mode information for predicting luma information or predicted luma signal information may be used.

[0039] When performing intra prediction, if the size of prediction unit is the same as the size of transform unit, intra prediction can be performed on prediction unit based on the pixel located on the left side, the pixel located on the top left, and the pixel located on the top.However, when performing intra prediction, if the size of prediction unit is different from the size of transform unit, intra prediction can be performed based on the reference pixel of transform unit.Note that intra prediction using N×N division can be applied only to the minimum coding unit.

[0040] After applying an Adaptive Intra Smoothing (AIS) filter to the reference pixels based on the prediction mode, a prediction block can be generated by an intra prediction method. The type of the adaptive intra smoothing filter applied to the reference pixels can be different. To perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted based on the intra prediction mode of a prediction unit located in the vicinity of the current prediction unit. When predicting the prediction mode of the current prediction unit using mode information predicted from the surrounding prediction units, if the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the surrounding prediction units, information indicating that the prediction mode of the current prediction unit is the same as the surrounding prediction units can be transmitted using predetermined flag information. If the prediction mode of the current prediction unit is different from the prediction mode of the surrounding prediction units, the prediction mode information of the current block can be encoded by performing entropy encoding.

[0041] In addition, a residual block including residual value information that is a difference value between a prediction unit that performs prediction based on the prediction unit generated by the prediction unit 120, 125 and an original block of the prediction unit can be generated. The generated residual block can be input to the conversion unit 130.

[0042] The transform unit 130 may perform transform on the original block and the residual block including residual value information between the prediction units generated by the prediction units 120 and 125 using a transform method such as a discrete cosine transform (DCT) or a discrete sine transform (DST). Here, the DCT transform kernel includes at least one of DCT2 or DCT8, and the DSTc includes DST7. Whether to apply DCT or DST to transform the residual block may be determined based on intra prediction mode information of the prediction unit for generating the residual block. Transformation of the residual block may also be skipped. A flag indicating whether to skip transformation of the residual block may be coded. Transformation may be skipped for residual blocks whose magnitude is equal to or less than a threshold, luma component, or chroma component (4:4:4 format or less).

[0043] The quantization unit 135 may quantize the values ​​transformed into the frequency domain by the transformation unit 130. The quantization coefficient may vary depending on the importance of the block or image. The values ​​calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.

[0044] The rearrangement unit 160 may perform rearrangement of coefficient values ​​on the quantized residual values.

[0045] The rearrangement unit 160 may change two-dimensional block shape coefficients into one-dimensional vector form using a coefficient scanning method. For example, the rearrangement unit 160 may scan DC coefficients or high-frequency region coefficients using a zig-zag scan method and convert them into one-dimensional vector form. Depending on the size of the transform unit and the intra prediction mode, instead of zig-zag scanning, vertical scanning for scanning two-dimensional block shape coefficients along a column direction and horizontal scanning for scanning two-dimensional block shape coefficients along a row direction may be used. That is, it is possible to determine which of zig-zag scanning, vertical scanning, and horizontal scanning to use, depending on the size of the transform unit and the intra prediction mode.

[0046] The entropy coding unit 165 may perform entropy coding based on the value calculated by the rearrangement unit 160. For example, the entropy coding may use a plurality of coding methods such as Exponential Golomb code, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).

[0047] The entropy coding unit 165 can code a variety of information such as residual value coefficient information and block type information of the coding unit from the rearrangement unit 160 and the prediction units 120 and 125, prediction mode information, division unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information.

[0048] The entropy coding unit 165 may perform entropy coding on the coefficient values ​​of the coding unit input from the rearrangement unit 160 .

[0049] The inverse quantization unit 140 and the inverse transform unit 145 perform inverse quantization on the multiple values ​​quantized by the quantization unit 135, and perform inverse transform on the values ​​transformed by the transform unit 130. A reconstructed block can be generated by merging residual values ​​generated by the inverse quantization unit 140 and the inverse transform unit 145 with prediction units predicted by the motion prediction unit, motion compensation unit, and intra prediction unit included in the prediction units 120 and 125.

[0050] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).

[0051] The deblocking filter can remove block artifacts generated in a reconstructed image due to boundaries between blocks. In order to determine whether to perform deblocking, it can be determined whether to apply a deblocking filter to a current block based on pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied based on a required deblocking filtering strength. In addition, when performing vertical filtering or horizontal filtering in the process of using the deblocking filter, horizontal filtering and vertical filtering can be performed synchronously.

[0052] The offset correction unit can correct the offset between the deblocked video and the original video on a pixel-by-pixel basis. The offset correction can be performed on a specified image in the following manner: After dividing the pixels included in the video into a predetermined number of regions, the regions that require offset execution are determined, and an offset is applied to the corresponding region or an offset is applied taking into account edge information of each pixel.

[0053] Adaptive loop filtering (ALF) can be performed based on a comparison value between the filtered reconstructed image and the original video. After dividing the pixels included in the video into predetermined groups, a filter to be used for the corresponding group is determined, so that filtering can be performed differentially for each group. Information regarding whether adaptive loop filtering is applied and luminance information can be transmitted according to a coding unit (CU). The shape and filter coefficients of the adaptive loop filter to be applied vary depending on each block. It is also possible to apply the same type (constant type) of adaptive loop filter regardless of the characteristics of the block to which it is applied.

[0054] The memory 155 can store the reconstructed block or image calculated by the filter unit 150 and can provide the stored reconstructed block or image to the prediction units 120, 125 when performing inter prediction.

[0055] FIG. 2 is a block diagram illustrating a video decoder according to an embodiment of the present invention.

[0056] Referring to FIG. 2, the video decoder 200 may include an entropy decoding unit 210, a rearrangement unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, a prediction unit 235, a filter unit 240, and a memory 245.

[0057] When a video bitstream is input from a video encoder, the input bitstream can be decoded in steps that are the reverse of those taken by the video encoder.

[0058] The entropy decoding unit 210 may perform entropy decoding in a step that is the reverse of the step of performing entropy encoding in the entropy encoding unit of the video encoder. For example, a number of methods such as Exponential Golomb coding, Context-Adaptive Variable Length Coding (CAVLC), Context-Adaptive Binary Arithmetic Coding (CABAC), etc. may be applied to correspond to the method performed in the video encoder.

[0059] The entropy decoding unit 210 can perform decoding on information related to intra prediction and inter prediction performed by the encoder.

[0060] The rearrangement unit 215 may perform rearrangement by rearranging a bitstream entropy decoded by the entropy decoding unit 210 in the encoding unit. The rearrangement may be performed by reconstructing a plurality of coefficients represented in a one-dimensional vector form into coefficients in a two-dimensional block shape. The rearrangement unit 215 may perform rearrangement by receiving information related to a coefficient scan performed by the encoding unit and performing a reverse scan according to the scan order performed by the corresponding encoding unit.

[0061] The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficient values ​​of the rearranged block.

[0062] The inverse transform unit 225 may perform an inverse discrete cosine transform and an inverse discrete sine transform on the quantization result performed by the video encoder. The inverse discrete cosine transform and the inverse discrete sine transform are inverse transforms of the transform performed by the transform unit, that is, inverse transforms of the discrete cosine transform and the discrete sine transform. Here, the DCT transform kernel may include at least one of DCT2 and DCT8, and the DST transform kernel may include DST7. Alternatively, if the transform is skipped in the video encoder, the inverse transform unit 225 may not perform the inverse transform. The inverse transform may be performed by a transmission unit determined by the video encoder. The inverse transform unit 225 of the video decoder may selectively perform a transform method (e.g., DCT or DST) based on a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.

[0063] The prediction units 230, 235 can generate a prediction block based on information related to the generation of the prediction block provided by the entropy decoding unit 210 and previously decoded block or image information provided by the memory 245.

[0064] As mentioned above, when performing intra prediction in the same manner as the operation manner in the video encoder, if the size of the prediction unit is the same as the size of the transform unit, intra prediction is performed on the prediction unit based on the pixel located to the left of the prediction unit, the pixel located to the upper left, and the pixel located above.When performing intra prediction, if the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed based on the reference pixel of the transform unit.Note that intra prediction using N×N division can be applied only to the minimum coding unit.

[0065] The prediction unit 230, 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives a plurality of pieces of information, such as prediction unit information input from the entropy decoding unit 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and classifies the prediction unit based on the current encoding unit, and determines whether the prediction unit is performing inter prediction or intra prediction. The inter prediction unit 230 can perform inter prediction on the current prediction unit based on information included in at least one image of the image immediately before or immediately after the current image to which the current prediction unit belongs, using information necessary for performing inter prediction of the current prediction unit provided by the video encoder. Alternatively, inter prediction can be performed based on information of a reconstructed part of the area in the current image to which the current prediction unit belongs.

[0066] To perform inter prediction, it is possible to determine, based on the coding unit, whether the motion prediction method of the prediction unit included in the corresponding coding unit is skip mode, merge mode, advanced motion vector prediction mode (AMVP mode), or intra block duplication mode.

[0067] The intra prediction unit 235 may generate a prediction block based on pixel information in the current image. If the prediction unit is a prediction unit that has performed intra prediction, the intra prediction may be performed based on intra prediction mode information of the prediction unit provided from the video encoder. The intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The adaptive intra smoothing filter is a part that performs filtering on reference pixels of the current block, and may determine whether to apply a filter based on the prediction mode of the current prediction unit. Adaptive intra smoothing filtering may be performed on reference pixels of the current block using the prediction mode of the prediction unit and adaptive intra smoothing filter information provided from the video encoder. If the prediction mode of the current block is a mode that does not perform adaptive intra smoothing filtering, the adaptive intra smoothing filter may not be applied.

[0068] Regarding the reference pixel interpolation unit, if the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on pixel values ​​to be interpolated for the reference pixels, the reference pixels can be generated by performing interpolation on the reference pixels. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without performing interpolation on the reference pixels, the reference pixels do not need to be interpolated. If the prediction mode of the current block is a DC mode, the DC filter can generate a prediction block by filtering.

[0069] The reconstructed block or image may be provided to a filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.

[0070] From the video encoder, information regarding whether to apply a deblocking filter to a corresponding block or image and information regarding whether to use a strong filter or a weak filter when applying the deblocking filter may be received. The deblocking filter of the video decoder may receive the information regarding the deblocking filter provided by the video encoder, and the video decoder may perform deblocking filtering on the corresponding block.

[0071] The offset compensation unit may perform offset compensation on the reconstructed image based on the offset information and the type of offset compensation applied to the video when encoding.

[0072] An ALF may be applied to a coding unit based on information provided by the encoder regarding whether to apply an ALF, ALF coefficient information, etc. Such ALF information may be provided by being included in a particular parameter set.

[0073] The memory 245 is capable of storing the reconstructed image or block, making said image or block available as a reference image or block, and of providing the reconstructed image to an output.

[0074] FIG. 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present invention.

[0075] The largest coding block can be defined as a coding tree block. An image may be divided into multiple coding tree units (a coding tree unit is a coding tree unit (CTU) in size). The largest coding unit may be called a largest coding unit (LCU). Figure 3 shows an example of dividing an image into multiple coding tree units.

[0076] The size of the coding tree unit may be defined at the picture level or at the sequence level, so that the picture parameter set or the sequence parameter set can be used to signal the information indicating the size of the coding tree unit.

[0077] For example, the size of the coding tree unit for all images in a sequence may be 128 x 128. Alternatively, the size of the coding tree unit may be determined to be one of 128 x 128 or 256 x 256 at the image level. For example, the size of the coding tree unit in a first image may be 128 x 128, and the size of the coding tree unit in a second image may be 256 x 256.

[0078] A coding block can be generated by dividing the coding tree unit. The coding block represents a basic unit for performing coding / decoding processing. For example, prediction or transformation can be performed according to different coding blocks, or a predictive coding mode can be determined according to different coding blocks. Here, the predictive coding mode represents a method for generating a predicted image. For example, the predictive coding mode may include intra prediction (Intra Prediction), inter prediction (Inter Prediction), current picture referencing (CPR), intra block copy (IBC), or combined prediction (Combined Prediction). For a coding block, a predictive block related to the coding block can be generated using at least one predictive coding mode among intra prediction, inter prediction, current picture referencing, or combined prediction.

[0079] Information indicating the predictive coding mode of the current block may be transmitted in a signal via the bitstream. For example, the information may be a one-bit flag indicating whether the predictive coding mode is an intra mode or an inter mode. Only if it is determined that the predictive coding mode of the current block is an inter mode, can the current image reference or combined prediction be used.

[0080] The current image reference is used to obtain a prediction block of the current block from an encoded / decoded area in the current image by using the current image as a reference image. Here, the current image means an image including the current block. Information indicating whether the current image reference is applied to the current block may be transmitted as a signal via the bitstream. For example, the information may be a 1-bit flag. If the flag is true, the prediction coding mode of the current block may be determined as the current image reference. If the flag is false, the prediction mode of the current block may be determined as the inter prediction.

[0081] Alternatively, the predictive coding mode of the current block may be determined based on the reference image index. For example, if the reference image index points to the current image, the predictive coding mode of the current block may be determined as current image reference. If the reference image index points to an image other than the current image, the predictive coding mode of the current block may be determined as inter prediction. That is, the current image reference is a prediction method that uses information of an encoded / decoded area in the current image, and the inter prediction is a prediction method that uses information of another encoded / decoded image.

[0082] The combined prediction is a coding mode formed by combining two or more of intra prediction, inter prediction, and current image reference. For example, when the combined prediction is applied, a first predicted block may be generated based on one of intra prediction, inter prediction, and current image reference, and a second predicted block may be generated based on the other. When the first predicted block and the second predicted block are generated, a final predicted block may be generated by averaging and weighted addition of the first predicted block and the second predicted block. Information indicating whether the combined prediction is applied may be transmitted in a signal via the bitstream. The information may be a 1-bit flag.

[0083] FIG. 4 is a diagram showing a number of division types of a coding block.

[0084] A coding block can be divided into a plurality of coding blocks based on a quadtree division, a binary tree division, or a ternary tree division. Also, a divided coding block can be further divided into a plurality of coding blocks based on a quadtree division, a binary tree division, or a ternary tree division.

[0085] Quadtree partitioning is a partitioning technique that divides the current block into four blocks. As a result of the quadtree partitioning, the current block can be divided into four square partitions (see “SPLIT_QT” in (a) of FIG. 4).

[0086] Binary tree partitioning is a partitioning technique that divides a current block into two blocks. The process of dividing the current block into two blocks along the vertical direction (i.e., using a vertical line that crosses the current block) can be called vertical binary tree partitioning, and the process of dividing the current block into two blocks along the horizontal direction (i.e., using a horizontal line that crosses the current block) can be called horizontal binary tree partitioning. After binary tree partitioning, the current block can be divided into two non-square partitions. "SPLIT_BT_VER" in (b) of FIG. 4 represents the vertical binary tree partitioning result, and "SPLIT_BT_HOR" in (c) of FIG. 4 represents the horizontal binary tree partitioning result.

[0087] Ternary tree partitioning is a partitioning technique that partitions the current block into three blocks. The process of partitioning the current block into three blocks along the vertical direction (i.e., using two vertical lines that cross the current block) can be called vertical ternary tree partitioning, and the process of partitioning the current block into three blocks along the horizontal direction (i.e., using two horizontal lines that cross the current block) can be called horizontal ternary tree partitioning. After ternary tree partitioning, the current block can be partitioned into three non-square partitions. In this case, the width / height of the partition located at the center of the current block may be twice the width / height of the other partitions. "SPLIT_TT_VER" in FIG. 4(d) represents the vertical ternary tree partitioning result, and "SPLIT_TT_HOR" in FIG. 4(e) represents the horizontal ternary tree partitioning result.

[0088] The number of times a coding tree unit is divided can be defined as a partitioning depth. The maximum partitioning depth of a coding tree unit can be determined at a sequence or image level. Therefore, the maximum partitioning depth of a coding tree unit may differ depending on a sequence or image.

[0089] Alternatively, a maximum partitioning depth can be determined for each of multiple partitioning techniques independently. For example, the maximum partitioning depth that allows for quadtree partitioning may be different from the maximum partitioning depth that allows for binary tree partitioning and / or ternary tree partitioning.

[0090] The encoder may transmit information indicative of at least one of the partition shape or partition depth of the current block in a signal via the bitstream, and the decoder may determine the partition shape and partition depth of the coding tree unit based on the information parsed from the bitstream.

[0091] FIG. 5 is a diagram illustrating an example of division of a coding tree unit.

[0092] The process of dividing a coding block using a division technique such as quad-tree division, binary-tree division and / or ternary-tree division can be called multi-tree partitioning.

[0093] The coding blocks generated by applying the multi-tree partitioning to the coding block can be called downstream coding blocks. If the partitioning depth of the coding block is k, the partitioning depth of the downstream coding blocks is k+1.

[0094] On the other hand, for a plurality of coding blocks with a division depth of k+1, the coding block with a division depth of k can be called an upstream coding block.

[0095] The division type of the current coding block may be determined based on at least one of the division shape of the upstream coding block or the division type of the adjacent coding block, where the adjacent coding block is adjacent to the current coding block and may include at least one of the upper adjacent block, the left adjacent block, or the adjacent block adjacent to the upper left corner of the current coding block, where the division type may include at least one of whether to perform quadtree division, whether to perform binary tree division, the binary tree division direction, whether to perform ternary tree division, or the ternary tree division direction.

[0096] To determine the partition shape of the coding block, information indicating whether the coding block is partitioned can be transmitted as a signal via the bitstream. The information is a 1-bit flag "split_cu_flag", which indicates that the coding block is partitioned using a multi-tree partitioning technique if the flag is true.

[0097] If "split_cu_flag" is true, a signal may be sent via the bitstream indicating whether the coding block has been quadtree split. The information is a 1-bit flag "split_qt_flag", and if the flag is true, the coding block may be split into 4 blocks.

[0098] For example, in the example shown in Fig. 5, the coding tree unit is quadtree-divided to generate four coding blocks with a division depth of 1. Note that the diagram illustrates the application of quadtree division to the first and fourth coding blocks among the four coding blocks generated as a result of the quadtree division. Finally, four coding blocks with a division depth of 2 can be generated.

[0099] In addition, by applying quadtree partitioning again to a coding block with a partition depth of 2, a coding block with a partition depth of 3 can be generated.

[0100] When quadtree partitioning is not applied to the coding block, it is possible to determine whether to perform binary tree partitioning or ternary tree partitioning on the coding block by considering at least one of the following: the size of the coding block, whether the coding block is located on the boundary of the image, the maximum partition depth, or the partition shape of the adjacent block. When it is determined to perform binary tree partitioning or ternary tree partitioning on the coding block, information indicating a partitioning direction can be transmitted by a signal via a bit stream. The information may be a one-bit flag "mtt_split_cu_vertical_flag". Based on the flag, it can be determined whether the partitioning direction is vertical or horizontal. It is to be noted that information indicating whether binary tree partitioning or ternary tree partitioning is applied to the coding block can be transmitted by a signal via a bit stream. The information may be a one-bit flag "mtt_split_cu_binary_flag". Based on the flag, it can be determined whether to apply binary tree partitioning or ternary tree partitioning to the coding block.

[0101] For example, in the example shown in Fig. 5, vertical binary tree partitioning is applied to a coding block with a partition depth of 1. Of the coding blocks generated as a result of the partitioning, vertical ternary tree partitioning is applied to the left coding block, and vertical binary tree partitioning is applied to the right coding block.

[0102] Inter prediction is a predictive coding mode that predicts a current block using information of a previous image. For example, a block in the previous image at the same position as the current block (hereinafter, referred to as a collocated block) can be used as a prediction block for the current block. Hereinafter, a prediction block generated based on a block that is located at the same position as the current block is referred to as a collocated prediction block.

[0103] On the other hand, if an object in the previous image moves to another position in the current image, the current block can be effectively predicted based on the object's motion. For example, if the moving direction and size of the object can be understood by comparing the previous image with the current image, a predicted block (or predicted image) of the current block can be generated taking into account the object's motion information. Hereinafter, the predicted block generated using the motion information can be referred to as a motion predicted block.

[0104] A residual block can be generated by subtracting the predictive block from the current block. In this case, in the presence of target motion, the energy of the residual block can be reduced by using a motion predictive block instead of a co-located predictive block, improving the compression performance of the residual block.

[0105] As described above, a process of generating a prediction block using motion information may be called motion compensated prediction. In most inter predictions, a prediction block may be generated based on motion compensated prediction.

[0106] The motion information may include at least one of a motion vector, a reference image index, a prediction direction, or a bidirectional weight index. The motion vector represents the moving direction and size of an object. The reference image index specifies a reference image of the current block among multiple reference images included in a reference image list. The prediction direction indicates one of unidirectional L0 prediction, unidirectional L1 prediction, or bidirectional prediction (L0 prediction and L1 prediction). At least one of the motion information in the L0 direction or the motion information in the L1 direction can be used based on the prediction direction of the current block. The bidirectional weight index specifies a weight applied to the L0 prediction block and a weight applied to the L1 prediction block.

[0107] FIG. 6 is a flowchart illustrating an inter prediction method according to an embodiment of the present invention.

[0108] Referring to FIG. 6, the inter prediction method includes a step of determining an inter prediction mode of a current block (S601), a step of obtaining motion information of the current block based on the determined inter prediction mode (S602), and a step of performing motion compensation prediction on the current block based on the obtained motion information (S603).

[0109] Here, the inter prediction mode represents a number of techniques for determining motion information of the current block, and may include an inter prediction mode using translation motion information and an inter prediction mode using affine motion information. For example, the inter prediction mode using translation motion information may include a merge mode and an advanced motion vector prediction mode. The inter prediction mode using affine motion information may include an affine merge mode and an affine motion vector prediction mode. According to the inter prediction mode, the motion information of the current block may be determined based on information analyzed from a neighboring block or a bitstream adjacent to the current block.

[0110] The inter prediction method using affine motion information will now be described in detail.

[0111] FIG. 7 is a diagram illustrating the non-linear movement of an object.

[0112] The motion of an object in a video may be nonlinear. For example, as shown in the example of FIG. 7, nonlinear motion of an object may occur, such as camera zoom-in, zoom-out, rotation, or affine transformation. When nonlinear motion of an object occurs, the motion of the object cannot be effectively represented by a translational motion vector. Therefore, in the part where nonlinear motion of an object occurs, affine motion is used instead of translational motion, thereby improving coding efficiency.

[0113] FIG. 8 is a flow chart illustrating an affine motion based inter prediction method according to an embodiment of the present invention.

[0114] According to the information analyzed from the bitstream, it can determine whether to apply an affine motion-based inter prediction technique to the current block. Specifically, it can determine whether to apply an affine motion-based inter prediction technique to the current block according to at least one of a flag indicating whether to apply an affine merge mode to the current block or a flag indicating whether to apply an affine motion vector prediction mode to the current block.

[0115] When applying an affine motion-based inter prediction technique to a current block, an affine motion model of the current block can be determined (S801). The affine motion model can be determined by at least one of a six-parameter affine motion model or a four-parameter affine motion model. The six-parameter affine motion model represents affine motion with six parameters, and the four-parameter affine motion model represents affine motion with four parameters.

[0116] Equation 1 is a case where affine motion is expressed by six parameters. The affine motion represents the translational motion of a given region determined by an affine seed vector.

number

[0117] When affine motion is represented by six parameters, complex motion can be represented, but the number of bits required for coding each parameter increases, which reduces coding efficiency. Therefore, affine motion can also be represented by four parameters. Equation 2 is the case when affine motion is represented by four parameters.

number

[0118] Information for determining an affine motion model of a current block may be coded and transmitted as a signal via a bitstream. For example, the information may be a 1-bit flag "affine_type_flag". When the value of the flag is 0, it indicates that a 4-parameter affine motion model is applied. When the value of the flag is 1, it indicates that a 6-parameter affine motion model is applied. The flag may be coded in units of slices, image blocks, or blocks (e.g., coding blocks or coding tree units). When the flag is transmitted using a signal at a slice level, the affine motion model determined at the slice level may be applied to all blocks belonging to the slice.

[0119] Alternatively, an affine motion model of the current block may be determined based on an affine inter prediction mode of the current block. For example, when an affine merge mode is applied, an affine motion model of the current block may be determined as a four-parameter motion model. On the other hand, when an affine motion vector prediction mode is applied, information for determining an affine motion model of the current block may be coded and transmitted as a signal via a bitstream. For example, when an affine motion vector prediction mode is applied to the current block, an affine motion model of the current block may be determined based on a 1-bit flag "affine_type_flag".

[0120] Next, an affine seed vector for the current block may be derived (S802). If a four-parameter affine motion model is selected, motion vectors may be derived at two control points of the current block. However, if a six-parameter affine motion model is selected, motion vectors may be derived at three control points of the current block. The motion vectors at the control points may be referred to as affine seed vectors. The control points may include at least one of the top left corner, the top right corner, or the bottom left corner of the current block.

[0121] FIG. 9 is a diagram showing examples of affine seed vectors for each affine motion model.

[0122] In a four-parameter affine motion model, an affine seed vector can be derived for two of the top left corner, the top right corner, or the bottom left corner. For example, as shown in FIG. 9A, when a four-parameter affine motion model is selected, an affine seed vector sv 0 and the affine seed vector sv associated with the top-right corner of the current block (e.g., the top-right sample (x1, y1)). 1 Alternatively, instead of the affine seed vector for the upper left corner, an affine seed vector for the lower left corner can be used, or instead of the affine seed vector for the upper right corner, an affine seed vector for the lower left corner can be used.

[0123] In a six-parameter affine motion model, affine seed vectors for the top left corner, top right corner, and bottom left corner can be derived. For example, as shown in FIG. 9B, when a six-parameter affine motion model is selected, an affine seed vector sv for the top left corner of the current block (e.g., the top left sample (x0, y0)) can be derived. 0 , the affine seed vector sv associated with the top-right corner of the current block (e.g., the top-right sample (x1, y1)). 1 and the affine seed vector sv associated with the top-left corner of the current block (e.g., the top-left sample (x2, y2)). 2 The affine vector can be derived using:

[0124] In the embodiment described below, in the four-parameter affine motion model, the affine seed vectors of the top-left control point and the top-right control point are referred to as the first affine seed vector and the second affine seed vector, respectively. In the embodiment described below that uses the first affine seed vector and the second affine seed vector, at least one of the first affine seed vector and the second affine seed vector can be replaced with the affine seed vector of the bottom-left control point (the third affine seed vector) or the affine seed vector of the bottom-right control point (the fourth affine seed vector).

[0125] In the six-parameter affine motion model, the affine seed vectors of the top-left control point, the top-right control point, and the bottom-left control point are referred to as the first affine seed vector, the second affine seed vector, and the third affine seed vector, respectively. In an embodiment using the first affine seed vector, the second affine seed vector, and the third affine seed vector, described below, at least one of the first affine seed vector, the second affine seed vector, and the third affine seed vector can be replaced with the affine seed vector of the bottom-right control point (fourth affine seed vector).

[0126] The affine seed vector can be used to derive affine vectors according to different sub-blocks (S803), where the affine vectors represent translational motion vectors derived based on the affine seed vectors. The affine vectors of a sub-block can be called affine sub-block motion vectors or sub-block motion vectors.

[0127] FIG. 10 is a diagram showing an example of affine vectors of sub-blocks in a four-parameter motion model.

[0128] The affine vector of the sub-block can be derived based on the control point position, the sub-block position, and the affine seed vector. For example, Equation 3 shows an example of derivation of the affine sub-block vector.

number

[0129] In the above formula 3, (x, y) represents the position of the subblock. Here, the position of the subblock represents the position of the reference sample included in the subblock. The reference sample may be a sample located at the upper left corner of the subblock, or may be at least one sample located at the center position in the x-axis or y-axis coordinate. (x 0 ,y 0 ) represents the position of the first control point, and (sv 0x ,sv 0y ) represents the first affine seed vector. Note that (x 1 ,y 1 ) represents the position of the second control point, and (sv 1x ,sv 1y ) represents the second affine seed vector.

[0130] If the first control point and the second control point correspond to the upper left corner and the upper right corner of the current block, respectively, then x 1 -x 0 can be set to a value that is equal to the width of the current block.

[0131] Then, motion compensation prediction may be performed for each subblock using the affine vector of each subblock (S804). After performing motion compensation prediction, a prediction block for each subblock may be generated. The prediction block of the subblock may be set as the prediction block of the current block.

[0132] Next, the inter prediction method using translational motion information will be described in detail.

[0133] The motion information of the current block may be derived from the motion information of another block of the current block. Here, the other block may be a block that is preferentially encoded / decoded by inter prediction rather than the current block. A merge mode may be defined as a case where the motion information of the current block is the same as the motion information of another block. Also, a motion vector prediction mode may be defined as a case where the motion vector of the other block is set as a predicted value of the motion vector of the current block.

[0134] FIG. 11 is a flow chart illustrating a process of deriving motion information for a current block in merge mode.

[0135] Merge candidates for a current block may be derived (S1101). The merging candidates for the current block are derived from a block that is before the current block and that is coded / decoded using inter prediction.

[0136] FIG. 12 is a diagram showing examples of candidate blocks for deriving merging candidates.

[0137] The candidate block may include at least one of adjacent blocks including samples adjacent to the current block or non-adjacent blocks including samples not adjacent to the current block. Hereinafter, the samples for determining the candidate block are designated as reference samples. Note that the reference samples adjacent to the current block are called adjacent reference samples, and the reference samples not adjacent to the current block are called non-adjacent reference samples.

[0138] The neighboring reference sample may be included in the neighboring column of the leftmost column of the current block or the neighboring row of the topmost row of the current block. For example, if the coordinates of the top left sample of the current block are (0,0), one of the block including the reference sample at the (-1,H-1) position, the block including the reference sample at the (W-1,-1) position, the block including the reference sample at the (W,-1) position, the block including the reference sample at the (-1,H) position, or the block including the reference sample at the (-1,-1) position may be used as a candidate block. As shown in the drawing, the neighboring blocks with indexes 0 to 4 may be used as candidate blocks.

[0139] The non-adjacent reference sample represents a sample having at least one of the x-axis distance or y-axis distance from a reference sample adjacent to the current block having a predefined value. For example, one of a block including a reference sample having a predefined x-axis distance from a left reference sample, a block including a non-adjacent sample having a predefined y-axis distance from an upper reference sample, or a block including a non-adjacent sample having predefined x-axis and y-axis distances from an upper left reference sample can be used as a candidate block. The predefined value may be an integer such as 4, 8, 12, 16, etc. As shown in the drawing, at least one of blocks having indexes from 5 to 26 can be used as a candidate block.

[0140] A non-adjacent reference sample may be a sample that is not located on the same vertical, horizontal, or diagonal line as an adjacent reference sample.

[0141] FIG. 13 is a diagram showing the positions of the reference samples.

[0142] As shown in the example of Fig. 13, the x coordinate of the upper non-adjacent reference sample may be set to be different from the x coordinate of the upper adjacent reference sample. For example, when the position of the upper adjacent reference sample is (W-1, -1), the position of the upper non-adjacent reference sample that is N away from the upper adjacent reference sample along the y axis may be ((W / 2)-1, -1-N), and the position of the upper non-adjacent reference sample that is 2N away from the upper adjacent reference sample along the y axis may be (0, -1-2N). That is, the position of the non-adjacent reference sample may be determined based on the position of the adjacent reference sample and the distance from the adjacent reference sample.

[0143] Hereinafter, among the candidate blocks, a candidate block including adjacent reference samples will be referred to as an adjacent block, and a block including non-adjacent reference samples will be referred to as a non-adjacent block.

[0144] If the distance between the current block and the candidate block is equal to or greater than a threshold, the candidate block may be set as unavailable as a merging candidate. The threshold may be determined according to the size of the coding tree unit. For example, the threshold may be set to the height of the coding tree unit (ctu_height) or a value obtained by adding or subtracting an offset value to the height of the coding tree unit (e.g., ctu_height ± N). The offset value N is a value predefined in the encoder and decoder, and may be set to 4, 8, 16, 32, or ctu_height.

[0145] If the difference value between the y-axis coordinate of the current block and the y-axis coordinate of a sample included in the candidate block is greater than a threshold, the candidate block may be determined to be unavailable as a merging candidate.

[0146] Alternatively, a candidate block that does not belong to the same coding tree unit as the current block can be set as unavailable as a merging candidate, for example, if the reference sample is beyond the upper boundary of the coding tree unit to which the current block belongs, the candidate block containing the reference sample can be set as unavailable as a merging candidate.

[0147] When the upper boundary of the current block is adjacent to the upper boundary of a coding tree unit, if multiple candidate blocks are set as unavailable as merge candidates, the encoding / decoding efficiency of the current block will be reduced. To solve the above problem, the number of candidate blocks located above the current block can be made greater than the number of candidate blocks located to the left of the current block by setting the candidate blocks.

[0148] FIG. 14 is a diagram showing examples of candidate blocks for deriving merging candidates.

[0149] 14, the candidate blocks can be an upper block belonging to the N block rows above the current block and a left block belonging to the M block rows to the left of the current block. In this case, by making M larger than N, the number of left candidate blocks can be made larger than the number of above candidate blocks.

[0150] For example, the difference value between the y-axis coordinate of a reference sample in the current block and the y-axis coordinate of an upper block that can be used as a candidate block can be set to N times the height of the current block or less, and the difference value between the x-axis coordinate of a reference sample in the current block and the x-axis coordinate of a left block that can be used as a candidate block can be set to M times the width of the current block or less.

[0151] For example, in the example shown in FIG. 14, the blocks belonging to the two block columns above the current block and the blocks belonging to the five block columns to the left of the current block are set as candidate blocks.

[0152] As another example, if a candidate block does not belong to the same coding tree unit as the current block, a merging candidate can be derived instead of the candidate block using a block that belongs to the same coding tree unit as the current block or a block that contains reference samples adjacent to the boundary of the coding tree unit.

[0153] FIG. 15 (FIGS. 15a and 15b are collectively referred to as FIG. 15. FIG. 15a is also referred to as FIG. 15(a). FIG. 15b is also referred to as FIG. 15(b)) is a diagram showing an example of fluctuation in the position of the reference sample.

[0154] If a reference sample is included in a different coding tree unit from the current block and the reference sample is not adjacent to the boundary of the coding tree unit, a candidate block reference sample can be determined using a reference sample adjacent to the boundary of the coding tree unit instead of the reference sample.

[0155] For example, in the examples shown in Figures 15(a) and 15(b), when the upper boundary of the current block and the upper boundary of the coding tree unit touch each other, the reference samples above the current block belong to a coding tree unit different from the current block, and the samples adjacent to the upper boundary of the coding tree unit can replace the reference samples that do not adjacent to the upper boundary of the coding tree unit among the reference samples that belong to a coding tree unit different from the current block.

[0156] For example, as shown in the example of FIG. 15(a), the reference sample at position 6 is replaced with a sample located at position 6' of the upper boundary of the coding tree unit. As shown in the example of FIG. 15(b), the reference sample at position 15 is replaced with a sample located at position 15' of the upper boundary of the coding tree unit. In this case, the y coordinate of the replacement sample may be changed to an adjacent position of the coding tree unit, and the x coordinate of the replacement sample may be set to be the same as the reference sample. For example, the sample at position 6' may have the same x coordinate as the sample at position 6, and the sample at position 15' may have the same x coordinate as the sample at position 15.

[0157] Alternatively, the x-coordinate of the replacement sample may be obtained by adding or subtracting an offset value to or from the x-coordinate of the reference sample. For example, if the x-coordinates of an adjacent reference sample and a non-adjacent reference sample located above the current block are the same, the x-coordinate of the replacement sample may be obtained by adding or subtracting an offset value to or from the x-coordinate of the reference sample. The purpose is to prevent a replacement sample for a non-adjacent reference sample from being in the same position as other non-adjacent or adjacent reference samples.

[0158] FIG. 16 is a diagram showing an example of a change in the position of the reference sample.

[0159] When replacing a reference sample that is located at the boundary of a coding tree unit and is included in a coding tree unit different from the current block and is not adjacent to the boundary of the coding tree unit, the value obtained by adding or subtracting an offset value to the x coordinate of the reference sample can be used as the x coordinate of the replacement sample.

[0160] For example, in the example shown in Figure 16, the reference sample at position 6 and the reference sample at position 15 may be replaced with a sample at position 6' and a sample at position 15', respectively, that have the same y coordinate as the row adjacent to the upper boundary of the coding tree unit. In this case, the x coordinate of the sample at position 6' may be set to have a difference value of W / 2 from the x coordinate of the reference sample at position 6, and the x coordinate of the sample at position 15' may be set to have a difference value of W-1 from the x coordinate of the reference sample at position 15.

[0161] Different from the examples shown in Figures 15 and 16, the y coordinate of the row located above the top row of the current block or the y coordinate of the upper boundary of the coding tree unit may further be set as the y coordinate of the replacement sample.

[0162] Although not shown, a sample to replace the reference sample may be determined based on the left boundary of the coding tree unit. For example, if the reference sample is not included in the same coding tree unit as the current block and is not adjacent to the left boundary of the coding tree unit, the reference sample may be replaced with a sample adjacent to the left boundary of the coding tree unit. In this case, the replacement sample may have the same y coordinate as the reference sample, or may have a y coordinate obtained by adding or subtracting an offset value to the y coordinate of the reference sample.

[0163] Subsequently, the blocks containing the replacement samples are taken as candidate blocks, based on which merging candidates for the current block can be derived.

[0164] Merging candidates can also be derived from temporally neighboring blocks in a different image than the current block, for example, from collocated blocks in a collocated image.

[0165] The motion information of the merging candidate may be set to be the same as the motion information of the candidate block, for example, at least one of the motion vector, the reference image index, the prediction direction, or the bidirectional weight index of the candidate block may be the motion information of the merging candidate.

[0166] A merge candidate list including merge candidates may be generated (S1102). The merge candidates may be classified into adjacent merge candidates derived from adjacent blocks adjacent to the current block and non-adjacent merge candidates derived from non-adjacent blocks.

[0167] Indices of the merge candidates in the merge candidate list may be assigned according to a predetermined order. For example, indices assigned to adjacent merge candidates may have lower values ​​than indices assigned to non-adjacent merge candidates. Alternatively, an index may be assigned to each merge candidate based on the index of each block shown in FIG. 12 or FIG. 14.

[0168] If the merge candidate list includes multiple merge candidates, at least one of the multiple merge candidates may be selected (S1103). In this case, information indicating whether motion information of the current block is derived from an adjacent merge candidate may be transmitted in a signal via the bitstream. The information may be a 1-bit flag. For example, a syntax element isAdjancentMergeFlag indicating whether motion information of the current block is derived from an adjacent merge candidate may be transmitted in a signal via the bitstream. If the syntax element isAdjancentMergeFlag has a value of 1, the motion information of the current block may be derived based on the adjacent merge candidate. On the other hand, if the syntax element isAdjancentMergeFlag has a value of 0, the motion information of the current block may be derived based on a non-adjacent merge candidate.

[0169] Table 1 shows a syntax table including the syntax element isAdjancentMergeFlag. [Table 1(1)] [Table 1(2)]

[0170] Information for specifying one of the multiple merging candidates may be transmitted in a signal via the bitstream, for example, information indicating an index of one of the merging candidates included in the merging candidate list may be transmitted in a signal via the bitstream.

[0171] When isAdjacentMergeflag is 1, a signal may be used to transmit a syntax element merge_idx for determining one of the adjacent merge candidates. The maximum value of the syntax element merge_idx may be a value whose difference value from the number of adjacent merge candidates is 1.

[0172] If isAdjacentMergeflag is 0, the signal may be used to send a syntax element NA_merge_idx for determining one of the non-adjacent merge candidates. The syntax element NA_merge_idx indicates a value obtained by subtracting the index of the non-adjacent merge candidate from the number of adjacent merge candidates. The decoder may select the non-adjacent merge candidate by adding the number of adjacent merge candidates to the index based on NA_merge_idx.

[0173] If the number of merging candidates included in the merging candidate list is less than a threshold, merging candidates included in the prediction region motion information list may be added to the merging candidate list. Here, the threshold may be the maximum number of merging candidates included in the merging candidate list or the maximum number of merging candidates minus an offset value. The offset value may be an integer such as 1 or 2. The inter motion information list may include merging candidates derived based on blocks encoded / decoded before the current block.

[0174] The prediction region motion information list includes merge candidates derived from blocks encoded / decoded based on inter prediction in the current image. For example, the motion information of the merge candidates included in the prediction region motion information list may be set to be equal to the motion information of the blocks encoded / decoded based on inter prediction. Here, the motion information may include at least one of a motion vector, a reference image index, a prediction direction, or a bidirectional weight index.

[0175] For ease of interpretation, the merging candidates included in the prediction region motion information list are called prediction region merging candidates.

[0176] The encoder and decoder can predefine the maximum number of merging candidates that can be included in the prediction region motion information list. For example, the maximum number of merging candidates that can be included in the prediction region motion information list can be 1, 2, 3, 4, 5, 6, 7, 8, or more (e.g., 16).

[0177] Alternatively, information indicating the maximum number of merging candidates that can be included in a prediction region motion information list can be transmitted by a signal via a bitstream. The information is transmitted by a signal at a sequence level, an image level or a slice level. The information can indicate the maximum number of merging candidates that can be included in a prediction region motion information list. Alternatively, the information can indicate a difference value between the maximum number of merging candidates that can be included in a prediction region motion information list and the maximum number of merging candidates that can be included in a merge candidate list.

[0178] Alternatively, the maximum number of merge candidates included in the prediction region motion information list may be determined according to the size of an image, a slice, or a coding tree unit.

[0179] The prediction region motion information list may be initialized for each image, slice, tile, brick, coding tree unit, or coding tree unit line (row or column). For example, when a slice is initialized, the prediction region motion information list is also initialized, and the prediction region motion information list may not include any merge candidates.

[0180] Alternatively, a signal may be sent via the bitstream to indicate whether to initialize the prediction region motion information list. The information may be sent by a signal at a slice level, a tile level, a brick level, or a block level. The prediction region motion information list located before the information indicates the initialization of the prediction region motion information list may be used.

[0181] Alternatively, the signal may transmit information related to the initial prediction region merging candidate through the picture parameter set or slice header. When the slice is initialized, the initial prediction region merging candidate may be included in the prediction region motion information list. Thus, the prediction region merging candidate is used for the block that is the earliest target to be coded / decoded in the slice.

[0182] Alternatively, a prediction region merge candidate included in the prediction region motion information list of the immediately preceding coding tree unit may be set as the initial prediction region merge candidate. For example, among the prediction region merge candidates included in the prediction region motion information list of the immediately preceding coding tree unit, a prediction region merge candidate with the smallest index or a prediction region merge candidate with the largest index may be set as the initial prediction region merge candidate.

[0183] The blocks are coded / decoded according to the coding / decoding order. Furthermore, the blocks coded / decoded based on inter prediction may be set as prediction region merging candidates according to the coding / decoding order.

[0184] FIG. 17 is a flow chart illustrating a process for updating the prediction region motion information list.

[0185] When performing inter prediction on a current block (S1701), a prediction region merging candidate may be derived based on the current block (S1702). The motion information of the prediction region merging candidate may be set equal to the motion information of the current block.

[0186] If the prediction region motion information list is empty (S1703), a prediction region merging candidate derived based on the current block may be added to the prediction region motion information list (S1704).

[0187] If the prediction region merge candidate is included in the prediction region motion information list (S1703), redundancy detection may be performed on the motion information of the current block (or the prediction region merge candidate derived based on the current block) (S1705). The redundancy detection is used to determine whether the motion information of the prediction region merge candidate stored in the prediction region motion information list is the same as the motion information of the current block. The redundancy detection may be performed on all prediction region merge candidates stored in the prediction region motion information list. Alternatively, redundancy detection may be performed on prediction region merge candidates whose indexes are greater than or less than a threshold among the prediction region merge candidates stored in the prediction region motion information list.

[0188] If the list does not include an inter prediction merge candidate having motion information that is the same as the motion information of the current block, a prediction region merge candidate derived based on the current block may be added to the prediction region motion information list (S1708). It may be determined whether the inter merge candidates are the same based on whether their motion information (e.g., motion vectors and / or reference image indexes, etc.) is the same.

[0189] In this case, when the maximum number of prediction region merge candidates is stored in the prediction region motion information list (S1706), the oldest prediction region merge candidate is deleted (S1707), and a prediction region merge candidate derived based on the current block may be added to the prediction region motion information list (S1708). Here, the oldest prediction region merge candidate may be the prediction region merge candidate with the largest index or the prediction region merge candidate with the smallest index.

[0190] Each prediction region merge candidate may be labeled with an index. When a prediction region merge candidate derived from the current block is added to the prediction region motion information list, the smallest index (e.g., 0) may be assigned to the prediction region merge candidate, and the index of the stored prediction region merge candidate may be increased by 1. In this case, when the maximum number of inter-prediction merge candidates is stored in the prediction region motion information list, the prediction region merge candidate with the largest index is removed.

[0191] Alternatively, when a prediction region merge candidate derived from the current block is added to a prediction region motion information list, the largest index may be assigned to the prediction region merge candidate. For example, if the number of inter prediction merge candidates stored in the prediction region motion information list is less than a maximum value, an index whose value is equal to the number of stored inter prediction merge candidates may be assigned to the prediction region merge candidate. Alternatively, if the number of inter prediction merge candidates stored in the prediction region motion information list is equal to a maximum value, an index obtained by subtracting 1 from the maximum value may be assigned to the prediction region merge candidate. In addition, the prediction region merge candidate with the smallest index is deleted. Also, the indexes of the remaining stored prediction region merge candidates may be decreased by 1.

[0192] FIG. 18 is a diagram illustrating an example of updating the prediction region merge candidate list.

[0193] When adding a prediction region merge candidate derived from the current block to the prediction region merge candidate list, it is assumed that the highest index is assigned to the prediction region merge candidate, and it is also assumed that the maximum number of prediction region merge candidates is stored in the prediction region merge candidate list.

[0194] When adding a prediction region merge candidate HmvpCand[n+1] derived from the current block to the prediction region merge candidate list HmvpCandList, the prediction region merge candidate HmvpCand[0] with the smallest index among the stored prediction region merge candidates is deleted. In addition, the indexes of the remaining prediction region merge candidates can be decreased by 1. Note that the index of the prediction region merge candidate HmvpCand[n+1] derived from the current block can be set to the maximum value (n in the example shown in FIG. 18).

[0195] If a prediction region merging candidate that is the same as the prediction region merging candidate derived based on the current block is stored (S1705), the prediction region merging candidate derived based on the current block does not need to be added to the prediction region motion information list (S1709).

[0196] Alternatively, when adding a prediction region merge candidate derived based on the current block to the prediction region motion information list, a stored prediction region merge candidate that is the same as the prediction region merge candidate may be deleted, in which case an effect similar to updating the index of the stored prediction region merge candidate may be obtained.

[0197] FIG. 19 is a diagram illustrating an example of updating the indexes of stored prediction region merging candidates.

[0198] When the index of the stored inter-prediction merge candidate that is the same as the prediction region merge candidate mvCand derived based on the current block is hIdx, the index of the stored inter-prediction merge candidate is deleted. Also, the index of the inter-prediction merge candidate whose index is greater than hIdx can be decremented by 1. For example, in the example shown in FIG. 19, it is illustrated that HmvpCand[2] that is the same as mvCand is deleted from the prediction region motion information list HvmpCand, and the indexes of HmvpCand[3] to HmvpCand[n] are decremented by 1, respectively.

[0199] In addition, the prediction region merge candidate mvCand derived from the current block can be added to the end of the prediction region motion information list.

[0200] Alternatively, the index assigned to the stored prediction region merging candidate that is the same as the prediction region merging candidate derived based on the current block can be updated, for example, the index of the stored prediction region merging candidate can be changed to a minimum or maximum value.

[0201] It may be set not to add the motion information of the block included in a predetermined area to the prediction area motion information list. For example, it may not be necessary to add the prediction area merge candidate derived based on the motion information of the block included in the merge processing area to the prediction area motion information list. Since the encoding / decoding order of the blocks included in the merge processing area is not defined, it is inappropriate to use the motion information of any one of these blocks for the inter prediction of other blocks. Therefore, it may not be necessary to add the prediction area merge candidate derived based on the block included in the merge processing area to the prediction area motion information list.

[0202] Alternatively, it may be set not to add motion information of a block having a size smaller than a predetermined size to the prediction region motion information list. For example, it may not be necessary to add a prediction region merge candidate derived based on motion information of a coding block having a width or height smaller than 4 or 8 or motion information of a coding block having a size of 4×4 to the prediction region motion information list.

[0203] When motion compensation prediction is performed on a sub-block basis, a prediction region merging candidate may be derived based on motion information of a representative sub-block among a plurality of sub-blocks included in a current block. For example, when a sub-block merging candidate is used for a current block, a prediction region merging candidate may be derived based on motion information of a representative sub-block among the sub-blocks.

[0204] The motion vector of a sub-block may be derived in the following order. First, any one of the merging candidates included in the merging candidate list of the current block is selected, and an initial shift vector (shVector) may be derived based on the motion vector of the selected merging candidate. In addition, a shift sub-block whose reference sample position is (xColSb, yColSb) may be derived by adding the initial shift vector to the position (xSb, ySb) of a reference sample (e.g., the top left sample or the middle position sample) of each sub-block in the coding block. The following Equation 4 shows an equation for deriving the shift sub-block.

number

[0205] Next, the motion vector of the collocated block corresponding to the center position of the sub-block including (xColSb, yColSb) is set as the motion vector of the sub-block including (xSb, ySb).

[0206] The representative sub-block may refer to the sub-block that includes the top-left sample or the center sample of the current block.

[0207] FIG. 20 is a diagram showing the locations of representative sub-blocks.

[0208] Figure 20(a) shows an example in which a sub-block located at the top left of a current block is a representative sub-block. Figure 20(b) shows an example in which a sub-block located at the center of a current block is a representative sub-block. When motion compensation prediction is performed on a sub-block basis, a prediction region merging candidate for a current block can be derived based on a motion vector of a sub-block including a top left sample of the current block or a sub-block including a center sample of the current block.

[0209] It may be determined whether the current block is used as a prediction region merging candidate based on the inter prediction mode of the current block. For example, a block encoded / decoded based on an affine motion model may be set as unavailable as a prediction region merging candidate. Thus, even if the current block is encoded / decoded by inter prediction, if the inter prediction mode of the current block is an affine prediction mode, the inter prediction motion information list is not updated based on the current block.

[0210] Alternatively, a prediction region merging candidate can be derived based on at least one subblock vector of the subblocks included in the block encoded / decoded based on the affine motion model. For example, a prediction region merging candidate can be derived using a subblock located at the upper left of the current block, a subblock located at the center of the current block, or a subblock located at the upper right of the current block. Alternatively, an average value of the subblock vectors of multiple subblocks can be set as the motion vector of the prediction region merging candidate.

[0211] Alternatively, the prediction region merging candidate may be derived by the average value of the affine seed vectors of the blocks encoded / decoded based on the affine motion model. For example, the average value of at least one of the first affine seed vector, the second affine seed vector, and the third affine seed vector of the current block may be set as the motion vector of the prediction region merging candidate.

[0212] Alternatively, a prediction region motion information list may be arranged for each inter prediction mode. For example, at least one of a prediction region motion information list for a block coded / decoded by intra block duplication, a prediction region motion information list for a block coded / decoded based on a translational motion model, and a prediction region motion information list for a block coded / decoded based on an affine motion model may be defined. Any one of the multiple prediction region motion information lists may be selected based on the inter prediction mode of the current block.

[0213] FIG. 21 is a diagram showing an example of generating a prediction region motion information list for each inter prediction mode.

[0214] When a block is coded / decoded based on a non-affine motion model, a prediction region merge candidate mvCand derived based on the block can be added to the prediction region non-affine motion information list HmvpCandList. On the other hand, when a block is coded / decoded based on an affine motion model, a prediction region merge candidate mvAfCand derived based on the block can be added to the prediction region affine motion information list HmvpAfCandList.

[0215] The affine seed vector of a block that is coded / decoded based on an affine motion model can be stored in a prediction region merge candidate derived from the block, and thus the prediction region merge candidate can be used as a merge candidate for deriving the affine seed vector of the current block.

[0216] In addition to the above prediction region motion information list, another prediction region motion information list can also be defined. In addition to the above prediction region motion information list (hereinafter referred to as the first prediction region motion information list), a long-term motion information list (hereinafter referred to as the second prediction region motion information list) can also be defined. Here, the long-term motion information list includes long-term merge candidates.

[0217] When both the first prediction region motion information list and the second prediction region motion information list are empty, the prediction region merging candidate can be added to the second prediction region motion information list first. The prediction region merging candidate can be added to the first prediction region motion information list only after the number of available prediction region merging candidates in the second prediction region motion information list reaches a maximum number.

[0218] Alternatively, one inter prediction merge candidate can be added to both the second prediction region motion information list and the first prediction region motion information list.

[0219] In this case, the second prediction region motion information list that has been arranged may not be updated. Alternatively, when the decoding region is equal to or larger than a predetermined ratio of the slice, the second prediction region motion information list may be updated. Alternatively, the second prediction region motion information list may be updated every N coding tree unit lines.

[0220] On the other hand, the first prediction region motion information list can be updated every time a block encoded / decoded by inter prediction is generated. However, the prediction region merge candidate added to the second prediction region motion information list may be set not to be used for updating the first prediction region motion information list.

[0221] A signal may be transmitted via a bitstream to transmit information for selecting one of the first prediction region motion information list and the second prediction region motion information list, and if the number of merge candidates included in the merge candidate list is less than a threshold, a merge candidate included in the prediction region motion information list indicated by the information may be added to the merge candidate list.

[0222] Alternatively, the prediction region motion information list may be selected based on the size and shape of the current block, the inter prediction mode, whether bidirectional prediction is enabled, whether motion vector refinement is enabled, or whether triangulation is enabled.

[0223] Alternatively, if a prediction region merge candidate included in the first prediction region motion information list is added, but the number of merge candidates included in the merge candidate list is less than the maximum number of merge candidates, a prediction region merge candidate included in the second prediction region motion information list can be added to the merge candidate list.

[0224] FIG. 22 is a diagram showing an example of adding a prediction region merging candidate included in the long-term motion information list to a merging candidate list.

[0225] When the number of merge candidates included in the merge candidate list is less than the maximum number, the prediction region merge candidates included in the first prediction region motion information list HmvpCandList can be added to the merge candidate list. When the number of merge candidates included in the merge candidate list is also less than the maximum number even after the prediction region merge candidates included in the first prediction region motion information list are added to the merge candidate list, the prediction region merge candidates included in the long-term motion information list HmvpLTCand can be added to the merge candidate list.

[0226] Table 2 shows the process of adding the prediction region merge candidates included in the long-term motion information list to the merge candidate list. [Table 2]

[0227] The prediction region merge candidate may be set to include other information in addition to the motion information. For example, the size, shape, or partition information of the block may be stored separately for the prediction region merge candidate. When constructing a merge candidate list for the current block, only the inter merge candidates whose size, shape, or partition information is the same or similar to that of the current block are used among the inter merge candidates. Alternatively, the inter merge candidates whose size, shape, or partition information is the same or similar to that of the current block may be preferentially added to the merge candidate list.

[0228] Alternatively, a prediction region motion information list may be generated for each of the size, shape, or partition information of a block. A merge candidate list for the current block may be generated by using a prediction region motion information list corresponding to the shape, size, or partition information of the current block among the multiple prediction region motion information lists.

[0229] If the number of merge candidates included in the merge candidate list of the current block is less than a threshold, the prediction region merge candidates included in the prediction region motion information list may be added to the merge candidate list. The adding process may be performed according to ascending or descending order of indexes. For example, the prediction region merge candidate with the largest index may be added to the merge candidate list first.

[0230] When it is desired to add a prediction region merge candidate included in the prediction region motion information list to a merge candidate list, redundancy detection can be performed between the prediction region merge candidate and the merge candidates stored in the merge candidate list.

[0231] For example, Table 3 shows the process of adding predictive region merge candidates to the merge candidate list. [Table 3]

[0232] Redundancy detection may be performed only on some of the prediction region merge candidates included in the prediction region motion information list. For example, redundancy detection may be performed only on the prediction region merge candidates whose indexes are equal to or greater than a threshold. Alternatively, redundancy detection may be performed only on the N merge candidates with the highest indexes or the N merge candidates with the lowest indexes.

[0233] Alternatively, redundancy detection may be performed on only a portion of the merge candidates stored in the merge candidate list, for example, on only merge candidates whose index is greater than or equal to a threshold or less than or equal to a threshold, or on merge candidates derived from a block at a particular location, where the particular location may include at least one of the left neighboring block, the above neighboring block, the top-right neighboring block, or the bottom-left neighboring block of the current block.

[0234] FIG. 23 is a diagram showing an example in which redundancy detection is performed on only some of the merging candidates.

[0235] When it is desired to add a prediction domain merge candidate HmvpCand[j] to a merge candidate list, a redundancy detection can be performed on the prediction domain merge candidate and the two merge candidates with maximum indices mergeMandCandList[NumMerge-2] and mergeCandList[NumMerge-1], where NumMerge can represent the number of available spatial and temporal merge candidates.

[0236] Different from the illustrated example, when it is desired to add a prediction domain merge candidate HmvpCand[j] to a merge candidate list, a redundancy detection can be performed on the prediction domain merge candidate and at most two merge candidates with the smallest index, for example, whether mergeCandList[0] and mergeCandList[1] are the same as HmvpCand[j].

[0237] Alternatively, redundancy detection may be performed only on merge candidates derived from a particular position. For example, redundancy detection may be performed only on at least one of merge candidates derived from adjacent blocks located to the left of the current block or merge candidates derived from adjacent blocks located above the current block. If there is no merge candidate derived from a particular position in the merge candidate list, the prediction region merge candidate may be added to the merge candidate list without performing redundancy detection.

[0238] When it is desired to add a prediction domain merge candidate HmvpCand[j] to a merge candidate list, a redundancy detection can be performed on the prediction domain merge candidate and the two merge candidates with maximum indices mergeMandCandList[NumMerge-2] and mergeCandList[NumMerge-1], where NumMerge can represent the number of available spatial and temporal merge candidates.

[0239] Redundancy detection with merge candidates can be performed only for some prediction region merge candidates. For example, redundancy detection can be performed only for N prediction region merge candidates having large indexes or N prediction region merge candidates having small indexes among the prediction region merge candidates included in the prediction region motion information list. For example, redundancy detection can be performed only for prediction region merge candidates whose difference value between the number of prediction region merge candidates included in the prediction region motion information list and the index is equal to or less than a threshold. When the threshold is 2, redundancy detection can be performed only for three prediction region merge candidates having the maximum index value among the prediction region merge candidates included in the prediction region motion information list. Redundancy detection can be omitted for prediction region merge candidates other than the three prediction region merge candidates. When redundancy detection is omitted, the prediction region merge candidate can be added to the merge candidate list regardless of whether the prediction region merge candidate has the same motion information as the merge candidate.

[0240] On the other hand, a setting may be made so that redundancy detection is performed only on prediction region merging candidates for which the difference value between the number of prediction region merging candidates included in the prediction region motion information list and the index is equal to or greater than a threshold value.

[0241] In the encoder and decoder, the number of prediction region merging candidates for which redundancy detection is performed can be predefined. For example, the threshold value can be an integer such as 0, 1, or 2.

[0242] Alternatively, the threshold value may be determined based on at least one of the number of merging candidates included in the merging candidate list and the number of prediction region merging candidates included in the prediction region motion information list.

[0243] When finding a merging candidate that is the same as the first prediction region merging candidate and performing redundancy detection on the second prediction region merging candidate, the redundancy detection of the merging candidate that is the same as the first prediction region merging candidate may be omitted.

[0244] FIG. 24 is a diagram showing an example in which redundancy detection for a specific merging candidate is omitted.

[0245] When it is desired to add a prediction region merge candidate HmvpCand[i] having index i to a merge candidate list, redundancy detection is performed between the prediction region merge candidate and the merge candidates stored in the merge candidate list. In this case, if a merge candidate mergeCandList[j] that is the same as the prediction region merge candidate HmvpCand[i] is found, redundancy detection can be performed between the prediction region merge candidate HmvpCand[i-1] having index i-1 and the merge candidate without adding the prediction region merge candidate HmvpCand[i] to the merge candidate list. In this case, redundancy detection can be omitted between the prediction region merge candidate HmvpCand[i-1] and the merge candidate mergeCandList[j].

[0246] For example, in the example shown in Figure 24, it is determined that HmvpCand[i] and mergeCandList[2] are the same. This allows HmvpCand[i] to be not added to the merge candidate list, and redundancy detection to be performed on HmvpCand[i-1]. In this case, redundancy detection between HmvpCand[i-1] and mergeCandList[2] can be omitted.

[0247] If the number of merge candidates included in the merge candidate list of the current block is less than a threshold, in addition to the prediction region merge candidate, the list may further include at least one of a paired merge candidate and a zero merge candidate. A paired merge candidate is a merge candidate whose motion vector is the average value of the motion vectors of two or more merge candidates, and a zero merge candidate is a merge candidate whose motion vector is 0.

[0248] Merge candidates can be added to the current block's merge candidate list in the following order:

[0249] Spatial merge candidates - Temporal merge candidates - Predictor domain merge candidates - (Predictor domain affine merge candidates) - Paired merge candidates - Zero merge candidates The spatial merge candidates are merge candidates derived from at least one of adjacent blocks or non-adjacent blocks, and the temporal merge candidates are merge candidates derived from an immediately preceding reference image. The prediction domain affine merge candidates represent prediction domain merge candidates derived from blocks encoded / decoded by an affine motion model.

[0250] The prediction region motion information list may be used in a motion vector prediction mode. For example, when the number of motion vector prediction candidates included in the motion vector prediction candidate list of the current block is less than a threshold, the prediction region merge candidate included in the prediction region motion information list can be set as the motion vector prediction candidate of the current block. Specifically, the motion vector of the prediction region merge candidate can be set as the motion vector prediction candidate.

[0251] When any one of the motion vector prediction candidates included in the motion vector prediction candidate list of the current block is selected, the selected candidate is set as the motion vector prediction value of the current block. Then, the motion vector residual value of the current block is decoded, and the motion vector prediction value and the motion vector residual value are added to obtain the motion vector of the current block.

[0252] The motion vector prediction candidate list for the current block can be constructed according to the following order:

[0253] Spatial motion vector prediction candidate-Temporal motion vector prediction candidate-Inter prediction region merge candidate-(Inter prediction region affine merge candidate)-Zero motion vector prediction candidate The spatial motion vector prediction candidate is a motion vector prediction candidate derived from at least one of adjacent blocks or non-adjacent blocks, and the temporal motion vector prediction candidate is a motion vector prediction candidate derived from an immediately preceding reference image. The prediction region affine merge candidate represents a prediction region motion vector prediction candidate derived from a block encoded / decoded by an affine motion model. The zero motion vector prediction candidate represents a candidate whose motion vector value is 0.

[0254] A merge processing area whose size is larger than the coding block may be specified. The coding blocks included in the merge processing area may be coded / decoded in parallel instead of sequentially. Here, not coding / decoding in sequence means that the order of coding / decoding is not specified. This allows the coding / decoding processes of the blocks included in the merge processing area to be performed independently. Alternatively, the blocks included in the merge processing area may share a merge candidate. Here, the merge candidate may be derived based on the merge processing area.

[0255] According to the above feature, the merge processing region can also be called a parallel processing region, a shared merge region (SMR), or a merge estimation region (MER).

[0256] Merge candidates for the current block may be derived based on the coded blocks. However, if the current block is included in a merge processing region whose size is larger than the size of the current block, the candidate blocks included in the same merge processing region as the current block may be set as unavailable as merge candidates.

[0257] FIG. 25 is a diagram showing an example in which a candidate block included in the same merge processing area as the current block is set as being unavailable as a merge candidate.

[0258] In the example shown in FIG. 25(a), when encoding / decoding CU5, a block including a reference sample adjacent to CU5 can be set as a candidate block. In this case, candidate blocks X3 and X4 included in the same merge processing area as CU5 can be set as unavailable as merge candidates for CU5. On the other hand, candidate blocks X0, X1, and X2 not included in the same merge processing area as CU5 can be set as available as merge candidates.

[0259] In the example shown in Figure 25 (b), when encoding / decoding CU8, a block including a reference sample adjacent to CU8 can be set as a candidate block. In this case, candidate blocks X6, X7, and X8 included in the same merge processing area as CU8 can be set as unavailable as merge candidates. On the other hand, candidate blocks X5 and X9 not included in the same parallel merge area as CU8 can be set as available as merge candidates.

[0260] The merge processing region may be square or non-square. Information for determining the merge processing region may be transmitted in a signal via the bit stream. The information may include at least one of information indicating the shape of the merge processing region and information indicating the size of the merge processing region. If the merge processing region is non-square, at least one of information indicating the size of the merge processing region, information indicating the width and / or height of the merge processing region, and information indicating the ratio of the width and height of the merge processing region may be transmitted in a signal via the bit stream.

[0261] The size of the merge region may be determined by at least one of the following: information signaled via the bitstream, image resolution, slice size, or tile size.

[0262] When motion compensation prediction is performed on a block included in the merge processing region, a prediction region merge candidate derived based on motion information of the block on which motion compensation prediction is performed can be added to a prediction region motion information list.

[0263] However, when a prediction region merge candidate derived from a block included in the merge processing area is added to the prediction region motion information list, when encoding / decoding another block in the merge processing area (which is actually encoded / decoded after the block is encoded / decoded), the prediction region merge candidate derived from the block may be used. That is, when encoding / decoding a block included in the merge processing area, the dependency between blocks should be eliminated, but motion prediction compensation may be performed using the motion information of another block included in the merge processing area. To solve the above problem, even if encoding / decoding for a block included in the merge processing area has already been completed, the motion information of the encoded / decoded block may not be added to the prediction region motion information list.

[0264] Alternatively, when performing motion compensation prediction on a block included in a merge processing region, prediction region merge candidates derived from the block may be added to a prediction region motion information list according to a predefined order, where the predefined order may be determined by a scanning order of coding blocks in a merge processing region or a coding tree unit. The scanning order may be at least one of a raster scan, a horizontal scan, a vertical scan, or a zigzag scan. Alternatively, the predefined order may be determined by the motion information of each block or the number of blocks having the same motion information.

[0265] Alternatively, prediction region merge candidates containing unidirectional motion information may be added to the prediction region merge candidate list before prediction region merge candidates containing bidirectional motion information, while prediction region merge candidates containing bidirectional motion information may be added to the prediction region merge candidate list before prediction region merge candidates containing unidirectional motion information.

[0266] Alternatively, prediction region merging candidates may be added to the prediction region motion information list according to the order of high or low frequency of use in the merging processing region or coding tree unit.

[0267] When the current block is included in the merge processing region and the number of merge candidates included in the merge candidate list of the current block is less than the maximum number, the prediction region merge candidates included in the prediction region motion information list may be added to the merge candidate list. In this case, it may be set not to add the prediction region merge candidates derived from the blocks included in the same merge processing region as the current block to the merge candidate list of the current block.

[0268] Alternatively, when the current block is included in the merge processing region, the prediction region merge candidates included in the prediction region motion information list may be set not to be used, that is, even if the number of merge candidates included in the merge candidate list of the current block is less than the maximum number, the prediction region merge candidates included in the prediction region motion information list may not be added to the merge candidate list.

[0269] A prediction region motion information list of a merge processing area or a coding tree unit can be arranged. The prediction region motion information list serves to temporarily store the motion information of the blocks included in the merge processing area. In order to distinguish between a general prediction region motion information list and a prediction region motion information list of a merge processing area or a coding tree unit, the prediction region motion information list of a merge processing area or a coding tree unit is called a temporary motion information list. Note that the prediction region merge candidates stored in the temporary motion information list are called temporary merge candidates.

[0270] FIG. 26 is a diagram showing a temporary motion information list.

[0271] A temporary motion information list of the coding tree unit or the merge processing region may be arranged. If motion compensation prediction has already been performed on a current block included in the coding tree unit or the merge processing region, the motion information of the block may not be added to the inter-prediction motion information list HmvpCandList. Conversely, a temporary merge candidate derived from the block may be added to the temporary motion information list HmvpMERCandList. That is, a temporary merge candidate added to the temporary motion information list may not be added to the prediction region motion information list. As a result, the prediction region motion information list may not include a prediction region merge candidate derived based on the motion information of a block included in the coding tree unit or the merge processing region.

[0272] The maximum number of merge candidates that can be included in the temporal motion information list can be set to be the same as the maximum number of merge candidates that can be included in the prediction region motion information list. Alternatively, the maximum number of merge candidates that can be included in the temporal motion information list may depend on the size of the coding tree unit or the merging processing region.

[0273] A current block included in a coding tree unit or a merge processing area may be set not to use the temporal motion information list of the corresponding coding tree unit or the corresponding merge processing area. That is, when the number of merge candidates included in the merge candidate list of the current block is less than a threshold, the prediction region merge candidate included in the prediction region motion information list may be added to the merge candidate list, and the temporal merge candidate included in the temporal motion information list may not be added to the merge candidate list. Therefore, the motion information of other blocks included in the same coding tree unit or merge processing area as the current block may not be used for motion compensation prediction for the current block.

[0274] When the encoding / decoding of all blocks included in the coding tree unit or the merge processing area is completed, the prediction area motion information list and the temporal motion information list can be merged.

[0275] FIG. 27 is a diagram showing an example of merging a prediction region motion information list and a temporal motion information list.

[0276] When encoding / decoding of all blocks contained in a coding tree unit or a merge processing area is completed, the prediction area motion information list can be updated using the temporary merge candidates contained in the temporary motion information list, as shown in the example of Figure 27.

[0277] In this case, the temporary merge candidates included in the temporary motion information list can be added to the prediction region motion information list according to the order of insertion into the temporary motion information list (i.e., ascending or descending order of index value).

[0278] As another example, the temporal merging candidates included in the temporal motion information list may be added to the prediction region motion information list according to a predefined order.

[0279] Here, the predefined order may be determined by a scanning order of the coding blocks in the merge processing region or the coding tree unit, which may be at least one of a raster scan, a horizontal scan, a vertical scan, or a zigzag scan. Alternatively, the predefined order may be determined by the motion information of each block or the number of blocks having the same motion information.

[0280] Alternatively, temporal merge candidates containing unidirectional motion information may be added to the prediction region merge candidate list before temporal merge candidates containing bidirectional motion information, while temporal merge candidates containing bidirectional motion information may be added to the prediction region merge candidate list before temporal merge candidates containing unidirectional motion information.

[0281] Alternatively, the temporary merging candidates can be added to the prediction region motion information list according to the order of high or low frequency of use in the merging process region or coding tree unit.

[0282] When a temporary merge candidate included in the temporary motion information list is added to the prediction region motion information list, redundancy detection may be performed on the temporary merge candidate. For example, if a prediction region merge candidate that is the same as a temporary merge candidate included in the temporary motion information list is stored in the prediction region motion information list, the temporary merge candidate may not be added to the prediction region motion information list. In this case, redundancy detection may be performed on some prediction region merge candidates included in the prediction region motion information list. For example, redundancy detection may be performed on an inter-prediction merge candidate whose index is equal to or greater than a threshold value. For example, if the temporary merge candidate is the same as a prediction region merge candidate whose index is equal to or greater than a predefined value, the temporary merge candidate may not be added to the prediction region motion information list.

[0283] A prediction region merge candidate derived from a block included in the same coding tree unit or merge processing region as the coding tree unit or merge processing region of the current block may be restricted from being used as a merge candidate of the current block. For this reason, address information of the block may be stored separately for the prediction region merge candidate. The address information of the block includes at least one of a position of the block, an address of the block, an index of the block, a position of the merge processing region including the block, an address of the merge processing region including the block, an index of the merge processing region including the block, a position of the coding tree region including the block, an address of the coding tree region including the block, and an index of the coding tree region including the block.

[0284] 28 and 29 are diagrams showing examples of address information of blocks included in coding area merging candidates.

[0285] The motion information of the block coded by inter prediction may be stored as the motion information of the coding region merging candidate. For example, the motion vector mv of the block may be stored as the motion vector mvCand of the coding region merging candidate, and the reference image index RefIdx of the block may be stored as the reference image index RefIdxCand of the coding region merging candidate.

[0286] For the coding area merge candidate, the address information of the block may be further stored. For example, the address of the block BLK_ADR, the address of the merge processing area including the block MER_ADDR, or the address of the coding tree unit including the block CTU_ADDR may be stored separately.

[0287] In the example shown in FIG. 28, it is illustrated that a motion vector mvCand, a reference image index RefIdxCand, and an address MER_ADDR of a merge processing area are stored for a coding area merge candidate.

[0288] For the coding region merge candidate, a plurality of address information can be stored. In the example shown in Fig. 29, for the coding region merge candidate, a motion vector mvCand, a reference image index RefIdxCand, an address of a merge processing region MER_ADDR, and an address of a coding tree unit CTU_ADDR are stored.

[0289] By comparing the address of the current block with the address of the coding region merge candidate, it can be determined whether the coding region merge candidate can be used as a merge candidate for the current block. For example, if the index of the merge processing region including the current block is the same as the index of the merge processing region indicated by the coding region merge candidate, the coding region merge candidate can be set as unavailable as a merge candidate for the current block. Alternatively, if the index of the coding tree region including the current block is the same as the index of the coding tree region indicated by the coding region merge candidate, the coding region merge candidate can be set as unavailable as a merge candidate for the current block. In other words, a coding region merge candidate derived from a block included in a merge processing region or coding tree unit that is the same as the merge processing region or coding tree unit of the current block, or a coding region merge candidate derived from a block adjacent to the current block, does not need to be added to the merge candidate list for the current block.

[0290] 30 and 31 are diagrams illustrating an example in which a coding region merging candidate having address information that is the same as the address information of the current block is set as an unusable merging candidate for the current block.

[0291] When the index of the merge processing area to which the current block belongs is 2, the coding area merge candidate derived from the block belonging to the merge processing area with index 2 can be set as unavailable as a merge candidate for the current block. In the example shown in Fig. 30, the address information of the coding area merge candidate HvmpCand[5] with index 5 indicates index 2, so that the coding area merge candidate can be set as unavailable as a merge candidate for the current block.

[0292] When the index of the coding tree unit to which the current block belongs is 2 and the index of the merge processing region to which the current block belongs is 1, a coding region merge candidate derived from a coding tree unit and a block included in the merge processing region that are the same as the coding tree unit and merge processing region of the current block can be set as unavailable as a merge candidate of the current block. In the example shown in Fig. 31, in the case of a coding region merge candidate HvmpCand[5] with an index of 5, when the index of the coding tree unit is 2 and the index of the merge processing region is 1, the coding region merge candidate can be set as unavailable as a merge candidate of the current block.

[0293] As another example, if a difference value between the address information indicated by the coding region merge candidate and the address information of the current block is equal to or greater than a threshold, the coding region merge candidate can be set as unavailable. For example, if a difference value between an address or index of a coding tree unit indicated by the coding region merge candidate and an address or index of a coding tree unit to which the current block belongs is equal to or greater than a threshold, the coding region merge candidate can be set as unavailable.

[0294] Alternatively, as another example, if a difference value between address information indicated by the coding region merge candidate and address information of the current block is equal to or less than a threshold, the coding region merge candidate can be set as unavailable. For example, if a difference value between address information or index indicated by the coding region merge candidate and an address or index of the current block is equal to or less than a threshold, the coding region merge candidate can be set as unavailable. In other words, a coding region merge candidate derived from a block adjacent to the current block can be set as unavailable as a merge candidate for the current block.

[0295] When adding a coding region merge candidate derived from the current block to the coding region motion information list, redundancy detection may be performed. In this case, the redundancy detection may be to determine whether the motion information and address information of the coding region merge candidate derived from the current block are the same as the motion information and address information of the coding region merge candidate stored in the coding region motion information list. In this case, if a coding region merge candidate having the same motion vector, reference image index, and address information as the coding region merge candidate derived from the current block is stored, the coding region merge candidate derived from the current block may not be added to the coding region motion information list. Alternatively, if a coding region merge candidate having the same motion vector, reference image index, and address information as the coding region merge candidate derived from the current block is stored, the stored coding region merge candidate may be deleted and the coding region merge candidate derived from the current block may be added to the coding region motion information list. In this case, a maximum index or a minimum index may be assigned to the coding region merge candidate derived from the current block.

[0296] Alternatively, it may be set not to consider whether the address information is the same when performing redundancy detection. For example, even if the address information of the coding region merge candidate derived from the current block is different from the address information of the coding region merge candidate stored in the coding region motion information list, if the motion information of the two coding region merge candidates is the same, the coding region merge candidate derived from the current block may not be added to the coding region motion information list. Alternatively, if the address information of the coding region merge candidate derived from the current block is the same as the motion information (address information) of the coding region merge candidate stored in the coding region motion information list, but the address information (motion information) is different, the stored coding region merge candidate may be deleted, and the coding region merge candidate derived from the current block may be added to the coding region motion information list. In this case, the maximum index or the minimum index may be assigned to the coding region merge candidate derived from the current block.

[0297] Intra prediction is to predict a current block using reconstructed samples that have been coded / decoded around the current block. In this case, the intra prediction of the current block can use reconstructed samples before applying an in-loop filter.

[0298] The intra prediction technique includes intra prediction based on a matrix and general intra prediction considering the directionality with surrounding reconstructed samples. Information indicating the intra prediction technique of the current block may be transmitted in a signal via a bit stream. The information may be a 1-bit flag. Alternatively, the intra prediction technique of the current block may be determined based on at least one of the position, size, shape, or intra prediction technique of a neighboring block of the current block. For example, if the current block is located across an image boundary, the current block is set to not apply intra prediction based on a matrix.

[0299] Matrix-based intra prediction is a method of obtaining a prediction block of a current block based on matrix multiplication of a matrix stored in an encoder and a decoder and a reconstructed sample around the current block. Information indicating one of a plurality of stored matrices can be transmitted in a signal via a bitstream. The decoder can determine a matrix to be used for intra prediction of the current block based on the information and the size of the current block.

[0300] General intra prediction is a method of obtaining a predicted block related to a current block based on a non-angular intra prediction mode or an angular intra prediction mode.

[0301] A residual image can be derived by subtracting the original image from the predicted image. In this case, when the residual image is transformed into the frequency domain, removing high frequency components from the frequency components does not significantly degrade the subjective image quality of the video. Therefore, reducing the value of the high frequency components or setting the value of the high frequency components to 0 has the effect of improving compression efficiency without causing obvious visual distortion. In order to reflect the above characteristics, the residual image can be decomposed into two-dimensional frequency components by transforming the current block. The transformation can be performed using a transformation technique such as a Discrete Cosine Transform (DCT) or a Discrete Sine Transform (DST).

[0302] After transforming the current block using DCT or DST, a transformation can be performed again on the transformed current block. In this case, the transformation based on DCT or DST is defined as a first transformation, and the process of performing a transformation again on the block to which the first transformation has been applied is called a second transformation.

[0303] The first transform may be performed using any one of a number of candidate transform kernels, for example, the first transform may be performed using any one of DCT2, DCT8, or DCT7.

[0304] Different transform kernels can be used for the horizontal and vertical directions. A signal can also be sent via the bitstream indicating a combination of a horizontal transform kernel and a vertical transform kernel.

[0305] The execution units of the first transform and the second transform are different. For example, the first transform can be performed on an 8×8 block, and the second transform can be performed on a sub-block of the transformed 8×8 block that has a size of 4×4. In this case, the transform coefficients of the surplus area where the second transform is not performed can be set to 0.

[0306] Alternatively, a first transform can be performed on a 4x4 block and a second transform can be performed on a region of size 8x8 that contains the transformed 4x4 block.

[0307] Via the bitstream, a signal may transmit information indicating whether or not to perform a second transformation.

[0308] In the decoder, the inverse transform (second inverse transform) of the second transform can be performed, and the inverse transform (first inverse transform) of the first transform can be performed on the result. As a result of performing the second inverse transform and the first inverse transform, a residual signal of the current block can be obtained.

[0309] Quantization is used to reduce the energy of a block, and the quantization process involves dividing the transform coefficients by a certain constant, which may be derived from a quantization parameter, which may be defined as a value between 1 and 63.

[0310] After performing the transform and quantization in the encoder, the decoder can obtain the residual block by inverse quantization and inverse transform. At the decoder, the predictive block and the residual block can be added to obtain a reconstructed block of the current block.

[0311] Once a reconstructed block of the current block is obtained, in-loop filtering can be used to reduce information loss that occurs in the quantization and encoding processes. The in-loop filter may include at least one of a deblocking filter, a sample adaptive offset filter (SAO), or an adaptive loop filter (ALF).

[0312] It is within the scope of the present invention to use the embodiments described with emphasis on a decoding or encoding process in an encoding or decoding process. It is also within the scope of the present invention to modify the embodiments described in a given order in a different order than that described.

[0313] Although the embodiments have been described based on a series of steps or flow charts, this does not limit the time order of the invention. Furthermore, the steps may be executed simultaneously or in a different order, as necessary. In the above embodiments, each of the components (e.g., units, modules, etc.) constituting the block diagrams may be realized as a hardware device or software. Furthermore, a plurality of components may be combined and executed as a single hardware device or software. The embodiments may be executed in the form of program instructions. The program instructions may be executed by various computer components and recorded on a computer-readable storage medium. The computer-readable storage medium may include program instructions, data files, data structures, etc. alone or in combination. Examples of computer-readable storage media may include magnetic media such as hard disks, flexible disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices that are specifically arranged in a manner to store and execute program instructions, such as ROMs, RAMs, flash memories, etc. The hardware devices may be configured to operate as one or more software modules to execute the processes according to the present invention, or vice versa. [Industrial Applicability]

[0314] The present invention is applicable to electronic devices that perform encoding / decoding on video.

Claims

1. 1. A video decoding method, comprising: deriving a merge candidate list for the current block; determining whether to add a prediction region merge candidate included in a prediction region motion information list to the merging candidate list based on a condition when the number of merging candidates included in the merging candidate list is less than a first threshold, the condition including: (a) whether a difference between the number of the prediction region merging candidates included in the prediction region motion information list and the indexes of the prediction region merging candidates is equal to or smaller than a second threshold; (b) whether the prediction region merging candidate has the same motion information as at least one of the motion information of the merging candidates included in the merging candidate list; The steps are: in response to determining to add the prediction domain merge candidate to the merge candidate list, adding the prediction domain merge candidate to the merge candidate list; deriving motion information of the current block based on the merge candidate list; performing motion compensation on the current block based on the derived motion information.

2. At least one merging candidate included in the merging candidate list includes a merging candidate derived from an adjacent block located to the left of the current block and a merging candidate derived from an adjacent block located above the current block. The video decoding method of claim 1.

3. The step of determining whether to add a prediction region merge candidate included in the prediction region motion information list to the merge candidate list based on a condition includes: determining not to add the prediction region merging candidate to the merging candidate list if all of conditions (a) and (b) are satisfied; and if at least one of conditions (a) and (b) is not met, determining to add the prediction domain merging candidate to the merging candidate list. The video decoding method of claim 2.

4. determining to add the prediction domain merging candidate to the merging candidate list if at least one of the conditions (a) and (b) is not satisfied, comprising: determining, if condition (a) is not satisfied, to add the predictive region merging candidate to the merging candidate list, regardless of whether condition (b) is satisfied; The video decoding method of claim 3.

5. The video decoding method further includes: when the coordinates of an upper left sample of the current block are (0, 0), at least one merging candidate included in the merging candidate list includes a merging candidate derived from a neighboring block including a reference sample at a position (−1, H−1) and a merging candidate derived from a neighboring block including a reference sample at a position (W−1, −1), where H is a height of the current block and W is a width of the current block. A video decoding method according to any one of claims 2 to 4.

6. The video decoding method further comprises: determining the merging candidate list based on at least one of pairwise merging candidates and zero merging candidates in addition to the predictive region merging candidates; and deriving motion information of a current block based on the merge candidate list. A video decoding method according to any one of claims 1 to 5.

7. 1. A video encoding method, comprising: deriving a merge candidate list for the current block; determining whether to add a prediction region merge candidate included in a prediction region motion information list to the merging candidate list based on a condition when the number of merging candidates included in the merging candidate list is less than a first threshold, the condition including: (a) whether a difference between the number of the prediction region merging candidates included in the prediction region motion information list and the indexes of the prediction region merging candidates is equal to or smaller than a second threshold; (b) whether the prediction region merging candidate has the same motion information as at least one of the motion information of the merging candidates included in the merging candidate list; The steps are: in response to determining to add the prediction domain merge candidate to the merge candidate list, adding the prediction domain merge candidate to the merge candidate list; deriving motion information of the current block based on the merge candidate list; performing motion compensation on the current block based on the derived motion information.

8. At least one merging candidate included in the merging candidate list includes a merging candidate derived from an adjacent block located to the left of the current block and a merging candidate derived from an adjacent block located above the current block.

8. The video encoding method of claim 7.

9. The step of determining whether to add a prediction region merge candidate included in the prediction region motion information list to the merge candidate list based on a condition includes: determining not to add the prediction region merging candidate to the merging candidate list if all of conditions (a) and (b) are satisfied; and if at least one of conditions (a) and (b) is not met, determining to add the prediction domain merging candidate to the merging candidate list.

9. The video encoding method of claim 8.

10. determining to add the prediction domain merging candidate to the merging candidate list if at least one of the conditions (a) and (b) is not satisfied, comprising: determining, if condition (a) is not satisfied, to add the predictive region merging candidate to the merging candidate list, regardless of whether condition (b) is satisfied; 10. The video encoding method of claim 9.

11. The video encoding method further includes: when the coordinates of an upper left sample of the current block are (0,0), at least one merging candidate included in the merging candidate list includes a merging candidate derived from a neighboring block including a reference sample at a position (-1,H-1) and a merging candidate derived from a neighboring block including a reference sample at a position (W-1,-1), where H is a height of the current block and W is a width of the current block. Video encoding method according to any one of claims 8 to 10.

12. The video encoding method further comprises: determining the merging candidate list based on at least one of pairwise merging candidates and zero merging candidates in addition to the predictive region merging candidates; and deriving motion information of a current block based on the merge candidate list. Video encoding method according to any one of claims 7 to 11.

13. A video decoding device, comprising an inter prediction unit for performing the video decoding method according to any one of claims 1 to 6.

14. A video encoding device, comprising an inter prediction unit for carrying out the video encoding method according to any one of claims 7 to 12.

15. A non-transitory computer readable storage medium comprising a bitstream, said bitstream being generated by a video decoding method according to any one of claims 1 to 6, or said bitstream being generated by a video encoding method according to any one of claims 7 to 12.

Citation Information

Patent Citations

  • Interlayer video decoding method for performing sub-block-based prediction and apparatus therefor, and interlayer video encoding method for performing sub-block-based prediction and apparatus therefor

    US20170188028A1

  • Device and methods for merge list reordering in video coding

    WO2013106336A2