Image encoding / decoding method and apparatus, and recording medium storing bit stream
By using the candidate list method in image encoding/decoding, block vector information is dynamically adjusted to improve encoding efficiency, and the problem of high-resolution image data transmission and storage costs is solved.
Patent Information
- Application Number
- CN202510106875.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-08
- Filing Date
- 2020-03-06
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to effectively solve the problem of increasing cost of high-resolution and high-quality image data in transmission and storage, and methods to improve image encoding/decoding efficiency are needed.
Using an image encoding/decoding method using a candidate list, the candidate list is dynamically adjusted to improve encoding efficiency by comparing the block vector information included in the history-based candidate list with the block vector of adjacent blocks.
Improves the efficiency of image encoding/decoding, reduces the amount of data, and thus reduces transmission and storage costs.
Smart Images

Figure CN119893082A_ABST
Abstract
Description
[0001] This application is a divisional application of an invention patent application with an application date of March 6, 2020, application number "202080019607.8", and invention name "Image encoding / decoding method and device and recording medium for storing bit stream". Technical Field
[0002] The present invention relates to an image encoding / decoding method and apparatus, and a recording medium for storing a bit stream. More particularly, the present invention relates to a method for encoding and decoding an image using a candidate list. Background Art
[0003] Recently, in various applications, the demand for high-resolution and high-quality images such as high-definition (HD) or ultra-high-definition (UHD) images has increased. As the resolution and quality of images increase, the amount of data increases accordingly. This is one of the reasons why transmission costs and storage costs increase when image data is transmitted through existing transmission media such as wired or wireless broadband channels or when image data is stored. In order to solve these problems of high-resolution and high-quality image data, efficient image encoding / decoding technology is required.
[0004] There are various video compression techniques, such as inter-frame prediction techniques that predict the values of pixels in a current picture from the values of pixels in a previous picture or a subsequent picture, intra-frame prediction techniques that predict the values of pixels in an area of the current picture from the values of pixels in another area of the current picture, transformation and quantization techniques for compressing the energy of residual signals, and entropy coding techniques that assign shorter codes to frequently occurring pixel values and longer codes to less frequently occurring pixel values. Summary of the invention
[0005] Technical issues An object of the present invention is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] Another object of the present invention is to provide an image encoding / decoding method and apparatus capable of improving image compression efficiency using a candidate list.
[0007] Another object of the present invention is to provide a recording medium for storing a bit stream generated by the image encoding method or apparatus according to the present invention.
[0008] Technical Solution The method for decoding an image according to an embodiment of the present invention includes: comparing block vector information included in a history-based candidate list with block vectors of neighboring blocks used as IBC block vector candidates for intra-block copy (IBC) prediction of a current block; and adding the block vector information included in the history-based candidate list to the IBC block vector candidate list based on the comparison. The comparing step is performed only for the candidate last included in the history-based candidate list.
[0009] In the image decoding method, the comparing step may be performed only when the area of the current block is greater than 16.
[0010] In the image decoding method, the adding step may include adding the block vector information included in the history-based candidate list to the IBC block vector candidate list when the block vector information included in the history-based candidate list is different from the block vector of the neighboring block as a comparison result.
[0011] In the image decoding method, the comparing step may be performed only when the number of IBC block vector candidates included in the IBC block vector candidate list is less than a maximum number of merge candidates that can be included in the IBC block vector candidate list.
[0012] In the image decoding method, the adding step may be performed until the number of IBC block vector candidates included in the IBC block vector candidate list reaches a maximum number of merge candidates that can be included in the IBC block vector candidate list.
[0013] In the image decoding method, a maximum number of merge candidates that can be included in the IBC block vector candidate list may be determined based on encoding parameters.
[0014] In the image decoding method, the neighboring block may include at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
[0015] In the image decoding method, the history-based candidate list may include block vector information of blocks decoded prior to decoding of the current block.
[0016] The image decoding method may further include the step of adding block vector information of the current block to the history-based candidate list.
[0017] In the image decoding method, when a block decoded before decoding of a current block and the current block belong to different coding tree unit CTU rows, block vector information of the current block may not be added to the history-based candidate list.
[0018] The method for encoding an image according to an embodiment of the present invention includes: comparing block vector information included in a history-based candidate list with block vectors of neighboring blocks used as IBC block vector candidates for intra-block copy (IBC) prediction of a current block; and adding the block vector information included in the history-based candidate list to the IBC block vector candidate list based on the comparison. The comparing step is performed only for the candidate last included in the history-based candidate list.
[0019] In the image encoding method, the comparing step may be performed only when the area of the current block is greater than 16.
[0020] In the image encoding method, the adding step may include: when the block vector information included in the history-based candidate list and the block vector of the neighboring block are different as a result of the comparison, adding the block vector information included in the history-based candidate list to the IBC block vector candidate list.
[0021] In the image encoding method, the comparing step may be performed only when the number of IBC block vector candidates included in the IBC block vector candidate list is less than a maximum number of merge candidates that can be included in the IBC block vector candidate list.
[0022] In the image encoding method, the adding step may be performed until the number of IBC block vector candidates included in the IBC block vector candidate list reaches a maximum number of merge candidates that can be included in the IBC block vector candidate list.
[0023] In the image encoding method, a maximum number of merge candidates that can be included in an IBC block vector candidate list may be determined based on an encoding parameter.
[0024] In the image encoding method, the neighboring block may include at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
[0025] In the image encoding method, the history-based candidate list may include block vector information of blocks encoded before encoding of the current block, and the image encoding method may further include a step of adding the block vector information of the current block to the history-based candidate list.
[0026] In the image encoding method, when a block encoded before encoding of a current block and the current block belong to different coding tree unit CTU rows, block vector information of the current block may not be added to a history-based candidate list.
[0027] In a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method according to an embodiment of the present invention, the image encoding method includes: a step of comparing block vector information included in a history-based candidate list with block vectors of neighboring blocks used as IBC block vector candidates for intra block copy (IBC) prediction of a current block; and a step of adding the block vector information included in the history-based candidate list to the IBC block vector candidate list based on the comparison. The comparison step is performed only for a candidate last included in the history-based candidate list.
[0028] Beneficial Effects According to the present invention, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0029] According to the present invention, it is possible to provide an image encoding / decoding method and apparatus capable of improving encoding / decoding efficiency using a candidate list.
[0030] According to the present invention, there can be provided a recording medium for storing a bit stream generated by the image encoding method or apparatus according to the present invention.
[0031] According to the present invention, there can be provided a recording medium for storing a bit stream received and decoded by the image decoding apparatus according to the present invention and used to reconstruct an image. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0033] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment and to which the present invention is applied.
[0034] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded.
[0035] Figure 4 is a diagram illustrating an intra prediction process.
[0036] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0037] Figure 6 is a diagram illustrating transform and quantization processing.
[0038] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0039] Figure 8 and Fig. 9is a diagram illustrating a method of adding a neighboring block adjacent to a current block to a candidate list according to an embodiment of the present invention.
[0040] Fig.10 and Fig.11 2 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of adjacency lengths of a current block and a neighboring block according to an embodiment of the present invention.
[0041] Fig.12 and Fig.13 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of the size of the neighboring block according to an embodiment of the present invention.
[0042] Fig.14 and Fig.15 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of depths of the neighboring blocks according to an embodiment of the present invention.
[0043] Fig.16 and Fig.17 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of a partition form of the neighboring block according to an embodiment of the present invention.
[0044] Fig.18 and Fig.19 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of a block form of the neighboring block according to an embodiment of the present invention.
[0045] Fig. 20 2 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of an encoding / decoding order of the neighboring blocks according to an embodiment of the present invention.
[0046] Fig.21 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of positions of neighboring blocks located at a certain distance from a position of a current block according to an embodiment of the present invention.
[0047] Fig. 22 2 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of the position of a neighboring block located at a specific distance from at least one of a current picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column according to an embodiment of the present invention.
[0048] Fig.23 is a diagram illustrating a process of adding block information of a current block to a candidate list according to an embodiment of the present invention.
[0049] Fig.24 is a diagram illustrating a process of adding a candidate in a candidate list as a candidate of an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list according to an embodiment of the present invention.
[0050] Fig.25 is a diagram illustrating an embodiment of neighboring blocks used when constructing an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list.
[0051] Fig.26 is a diagram illustrating a process of adding a candidate in a candidate list to an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list according to an embodiment of the present invention.
[0052] Fig. 27 is a diagram illustrating a process of adding a candidate in a history-based candidate list as a candidate of an IBC block vector prediction candidate list or an IBC merge candidate list according to an embodiment of the present invention.
[0053] Fig.28 is a diagram illustrating an embodiment of neighboring blocks used when constructing an IBC block vector prediction candidate list or an IBC merge candidate list.
[0054] Fig.29 is a diagram illustrating a process of adding a candidate in a history-based candidate list as a candidate of an IBC block vector prediction candidate list or an IBC merge candidate list according to an embodiment of the present invention.
[0055] Fig.30 is a diagram illustrating an image decoding method according to an embodiment of the present invention.
[0056] Fig.31 is a diagram illustrating an image encoding method according to an embodiment of the present invention.
[0057] Fig.32 is a diagram illustrating an embodiment of constructing an IBC block vector candidate list using a history-based candidate list according to an embodiment of the present invention.
[0058] Fig.33 is a diagram illustrating an embodiment of a method for constructing an IBC block vector candidate list using a history-based candidate list according to an embodiment of the present invention.
[0059] Fig.34 is a diagram illustrating an embodiment of a method for constructing a merge candidate list using a history-based candidate list according to an embodiment of the present invention.
[0060] Fig.35 is a diagram illustrating an embodiment of a method for constructing a merge candidate list using a history-based candidate list according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] Various modifications may be made to the present invention, and there are various embodiments of the present invention, wherein examples of various embodiments of the present invention will now be provided with reference to the accompanying drawings and described in detail. However, the present invention is not limited thereto, although the exemplary embodiments may be interpreted as including all modifications, equivalents or substitutions within the technical concept and technical scope of the present invention. In various aspects, similar figure numerals refer to the same or similar functions. In the accompanying drawings, the shapes and sizes of the elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings that illustrate specific embodiments of the present invention in a graphical manner. These embodiments are described in sufficient detail to enable those skilled in the art to implement the present disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, without departing from the spirit and scope of the present disclosure, the specific features, structures and characteristics described herein in conjunction with one embodiment may be implemented in other embodiments. In addition, it should be understood that the position or arrangement of each element within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description should not be regarded as having a limiting meaning, and the scope of the present disclosure is limited only by the appended claims (when properly interpreted, together with the full range of equivalents claimed by the claims).
[0062] The terms "first", "second", etc. used in the specification may be used to describe various components, but the components should not be interpreted as being limited to these terms. These terms are only used to distinguish one component from other components. For example, without departing from the scope of the present invention, a "first" component may be named a "second" component, and a "second" component may also be similarly named a "first" component. The term "and / or" includes a combination of multiple items or any one of the multiple items.
[0063] It will be understood that in this specification, when an element is simply referred to as being “connected to” or “coupled to” another element rather than being “directly connected to” or “directly coupled to” another element, the element may be “directly connected to” or “directly coupled to” another element, or connected to or coupled to another element with other elements interposed therebetween. Conversely, it will be understood that when an element is referred to as being “directly coupled to” or “directly connected to” another element, there are no intervening elements.
[0064] In addition, the components shown in the embodiments of the present invention are shown independently to represent the characteristic functions that are different from each other. Therefore, this does not mean that each component is composed of a separate hardware or software component unit. In other words, for convenience, each component includes each component in the listed components. Therefore, at least two components of each component can be combined to form a component, or a component can be partitioned into multiple components to perform each function. If it does not depart from the essence of the present invention, the embodiment in which each component is combined and the embodiment in which a component is partitioned are also included in the scope of the present invention.
[0065] The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. Unless there is a significantly different meaning in the context, the expression used in the singular includes the expression in the plural form. In this specification, it will be understood that terms such as "including", "having" etc. are intended to indicate the presence of features, numbers, steps, actions, elements, parts or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, parts or combinations thereof may exist or may be added. In other words, when a particular element is referred to as "included", it does not exclude elements other than the corresponding element, but may include other elements in an embodiment of the present invention or in the scope of the present invention.
[0066] In addition, some components may not be essential components for performing the basic functions of the present invention, but rather selective components that only improve its performance. The present invention may be implemented by including only essential components for implementing the essence of the present invention without including components for improving performance. Structures that include only essential components without including selective components that only improve performance are also included within the scope of the present invention.
[0067] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing the exemplary embodiments of the present invention, well-known functions or configurations will not be described in detail because they may unnecessarily obscure the understanding of the present invention. The same constituent elements in the accompanying drawings are represented by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0068] Hereinafter, an image may refer to a picture constituting a video, or may refer to the video itself. For example, "encoding or decoding an image or both encoding and decoding" may refer to "encoding or decoding a moving picture or both encoding and decoding", and may refer to "encoding or decoding one of the images of the moving picture or both encoding and decoding".
[0069] Hereinafter, the terms "motion picture" and "video" may be used as the same meaning and may be replaced with each other.
[0070] Hereinafter, a target image may be an encoding target image as an encoding target and / or a decoding target image as a decoding target. In addition, a target image may be an input image input to an encoding device, and an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
[0071] Hereinafter, the terms "image", "picture", "frame" and "screen" may be used as the same meaning and may be replaced with each other.
[0072] Hereinafter, the target block may be an encoding target block as an encoding target and / or a decoding target block as a decoding target. In addition, the target block may be a current block as a target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used as the same meaning and may be replaced with each other.
[0073] Hereinafter, the terms "block" and "unit" may be used as the same meaning and may be replaced with each other. Alternatively, a "block" may refer to a specific unit.
[0074] In the following, the terms "region" and "segment" are used interchangeably.
[0075] Hereinafter, a specific signal may be a signal representing a specific block. For example, an original signal may be a signal representing a target block. A prediction signal may be a signal representing a prediction block. A residual signal may be a signal representing a residual block.
[0076] In an embodiment, each of the specific information, data, flags, indexes, elements, attributes, etc. may have a value. The value of the information, data, flags, indexes, elements, and attributes equal to "0" may represent a logical false or a first predefined value. In other words, the value "0", false, logical false, and the first predefined value may be replaced with each other. The value of the information, data, flags, indexes, elements, and attributes equal to "1" may represent a logical true or a second predefined value. In other words, the value "1", true, logical true, and the second predefined value may be replaced with each other.
[0077] When the variable i or j is used to represent a column, row, or index, the value of i may be an integer equal to or greater than 0, or an integer equal to or greater than 1. That is, the column, row, index, etc. may be counted from 0, or may be counted from 1.
[0078] Description of terms Encoder: This refers to a device that performs encoding. In other words, it refers to an encoding device.
[0079] Decoder: Refers to a device that performs decoding. In other words, it refers to a decoding device.
[0080] Block: is an M×N sample array. Here, M and N may represent positive integers, and a block may represent a sample array in a two-dimensional form. A block may refer to a unit. A current block may represent an encoding target block that becomes a target at the time of encoding, or a decoding target block that becomes a target at the time of decoding. In addition, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0081] Sample: It is the basic unit of a block. d ), the sample points can be represented as In the present invention, a sample point may be used as the meaning of a pixel. That is, a sample point, a pel, and a pixel may have the same meaning as each other.
[0082] Unit: may refer to a coding and decoding unit. When encoding and decoding an image, a unit may be a region generated by partitioning a single image. In addition, when a single image is partitioned into sub-partition units during encoding or decoding, a unit may represent a sub-partition unit. That is, an image may be partitioned into a plurality of units. When encoding and decoding an image, a predetermined process for each unit may be performed. A single unit may be partitioned into sub-units having a size smaller than that of the unit. According to the function, a unit may represent a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, a transform block, and the like. In addition, in order to distinguish a unit from a block, a unit may include a luminance component block, a chrominance component block associated with the luminance component block, and a syntax element for each color component block. A unit may have various sizes and shapes, and specifically, the shape of a unit may be a two-dimensional geometric figure such as a square, a rectangle, a trapezoid, a triangle, a pentagon, and the like. Also, the unit information may include at least one of a unit type indicating a coding unit, a prediction unit, a transformation unit, etc., and a unit size, a unit depth, an order of encoding and decoding of the unit, and the like.
[0083] Coding tree unit: A single coding tree block configured with a luminance component Y and two coding tree blocks associated with chrominance components Cb and Cr. In addition, the coding tree unit may represent a syntax element including a block and each block. Each coding tree unit may be partitioned by using at least one of a quadtree partitioning method, a binary tree partitioning method, and a ternary tree partitioning method to configure a lower-level unit such as a coding unit, a prediction unit, a transform unit, etc. The coding tree unit may be used as a term for specifying a sample block that becomes a processing unit when encoding / decoding an image as an input image. Here, the quadtree may represent a quadtree.
[0084] When the size of the coding block is within a predetermined range, it can be partitioned using only quadtree partitioning. Here, the predetermined range may be defined as at least one of the maximum size and the minimum size of the coding block that can be partitioned using only quadtree partitioning. Information indicating the maximum / minimum size of the coding block that allows quadtree partitioning may be signaled through a bitstream, and the information may be signaled in at least one unit of a sequence, a picture parameter, a parallel block group, or a slice (fragment). Optionally, the maximum / minimum size of the coding block may be a fixed size predetermined in the encoder / decoder. For example, when the size of the coding block corresponds to 256×256 to 64×64, it is possible to partition using only quadtree partitioning. Optionally, when the size of the coding block is larger than the size of the maximum conversion block, it is possible to partition using only quadtree partitioning. Here, the block to be partitioned may be at least one of a coding block and a transform block. In this case, information indicating the partitioning of the coding block (e.g., split_flag) may be a flag indicating whether quadtree partitioning is performed. When the size of the coding block falls within a predetermined range, it is possible to partition using only binary or ternary tree partitioning. In this case, the above description of the quadtree partition can be applied to the binary tree partition or the ternary tree partition in the same manner.
[0085] Coding tree block: may be used as a term used to designate any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.
[0086] Neighboring block: may refer to a block adjacent to the current block. The block adjacent to the current block may refer to a block that touches the boundary of the current block or a block that is located within a predetermined distance from the current block. The neighboring block may refer to a block adjacent to a vertex of the current block. Here, the block adjacent to a vertex of the current block may refer to a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the current block or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the current block.
[0087] Reconstructed neighboring block: may represent a neighboring block that is adjacent to the current block and has been encoded or decoded in space / time. Here, the reconstructed neighboring block may represent a reconstructed neighboring unit. The reconstructed spatial neighboring block may be a block that is within the current picture and has been reconstructed by encoding or decoding or both encoding and decoding. The reconstructed temporal neighboring block is a block at a position corresponding to the current block of the current picture within the reference image or a neighboring block of the block.
[0088] Unit depth: may represent the degree of partitioning of a unit. In a tree structure, the highest node (root node) may correspond to the first unit that is not partitioned. In addition, the highest node may have a minimum depth value. In this case, the depth of the highest node may be level 0. A node with a depth of level 1 may represent a unit generated by partitioning the first unit once. A node with a depth of level 2 may represent a unit generated by partitioning the first unit twice. A node with a depth of level n may represent a unit generated by partitioning the first unit n times. A leaf node may be the lowest node and a node that cannot be further partitioned. The depth of a leaf node may be the maximum level. For example, the predefined value of the maximum level may be 3. The depth of the root node may be the lowest, and the depth of the leaf node may be the deepest. In addition, when a unit is represented as a tree structure, the level at which the unit exists may represent the unit depth.
[0089] Bitstream: can represent a stream of bits including coded image information.
[0090] Parameter set: corresponds to header information among the configurations in the bitstream. At least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set may be included in the parameter set. In addition, the parameter set may include a slice header, a tile group header, and tile header information. The term "tile group" means a group of tiles and has the same meaning as a slice.
[0091] The adaptation parameter set may represent a parameter set that can be shared by being referenced in different pictures, sub-pictures, slices, tile groups, tiles, or bricks. In addition, information in the adaptation parameter set may be used by referring to different adaptation parameter sets for sub-pictures, slices, tile groups, tiles, or bricks within a picture.
[0092] Furthermore, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for a sub-picture, a slice, a tile group, a tile, or a partition within a picture.
[0093] Furthermore, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for slices, tile groups, tiles, or partitions within a sub-picture.
[0094] Furthermore, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for tiles or partitions within a slice.
[0095] Furthermore, with respect to adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for partitions within a tile.
[0096] Information about the adaptation parameter set identifier may be included in a parameter set or a header of a sub-picture, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the sub-picture.
[0097] Information about the adaptation parameter set identifier may be included in a parameter set or a header of a tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0098] Information about the adaptation parameter set identifier may be included in a header of the tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0099] A picture may be partitioned into one or more tile rows and one or more tile columns.
[0100] A sub-picture may be partitioned into one or more parallel block rows and one or more parallel block columns within a picture. A sub-picture may be an area having a rectangular / square form within a picture and may include one or more CTUs. In addition, at least one or more parallel blocks / blocks / strips may be included in a sub-picture.
[0101] A tile may be an area having a rectangular / square form within a picture and may include one or more CTUs. In addition, a tile may be partitioned into one or more partitions.
[0102] A partition may represent one or more CTU rows within a tile. A tile may be partitioned into one or more partitions, and each partition may have at least one or more CTU rows. A tile that is not partitioned into two or more may represent a partition.
[0103] A slice may include one or more tiles within a picture, and may include one or more partitions within a tile.
[0104] Parsing: may mean determining the value of a syntax element by performing entropy decoding, or may mean the entropy decoding itself.
[0105] Symbol: At least one of a syntax element, a coding parameter, and a transform coefficient value that can represent a coding / decoding target unit. In addition, the symbol can represent an entropy coding target or an entropy decoding result.
[0106] Prediction mode: may be information indicating a mode for encoding / decoding using intra prediction or a mode for encoding / decoding using inter prediction.
[0107] Prediction unit: may represent a basic unit when performing predictions such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation. A single prediction unit may be partitioned into multiple partitions of smaller sizes, or may be partitioned into multiple prediction units of lower levels. Multiple partitions may be basic units when performing prediction or compensation. Partitions generated by partitioning a prediction unit may also be prediction units.
[0108] Prediction unit partition: may represent a shape obtained by partitioning a prediction unit.
[0109] A reference picture list may refer to a list including one or more reference pictures used for inter prediction or motion compensation. There are several types of available reference picture lists, including LC (List Combination), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3).
[0110] The inter prediction indicator may refer to the direction of inter prediction of the current block (unidirectional prediction, bidirectional prediction, etc.). Optionally, the inter prediction indicator may refer to the number of reference pictures used to generate the prediction block of the current block. Optionally, the inter prediction indicator may refer to the number of prediction blocks used when performing inter prediction or motion compensation on the current block.
[0111] The prediction list utilization flag indicates whether at least one reference picture in a specific reference picture list is used to generate a prediction block. The prediction list utilization flag may be used to derive the inter prediction indicator, and conversely, the inter prediction indicator may be used to derive the prediction list utilization flag. For example, when the prediction list utilization flag has a first value of zero (0), it indicates that the reference picture in the reference picture list is not used to generate the prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), it indicates that the reference picture list is used to generate the prediction block.
[0112] The reference picture index may refer to an index indicating a specific reference picture in a reference picture list.
[0113] A reference picture may refer to a reference picture referenced by a specific block for the purpose of inter-frame prediction or motion compensation of the specific block. Alternatively, a reference picture may be a picture including a reference block referenced by a current block for inter-frame prediction or motion compensation. Hereinafter, the terms "reference picture" and "reference image" have the same meaning and are interchangeable.
[0114] A motion vector may be a two-dimensional vector used for inter-frame prediction or motion compensation. A motion vector may represent an offset between an encoding / decoding target block and a reference block. For example, (mvX, mvY) may represent a motion vector. Here, mvX may represent a horizontal component, and mvY may represent a vertical component.
[0115] The search range may be a two-dimensional area that is searched during inter prediction to retrieve a motion vector. For example, the size of the search range may be M×N. Here, M and N are both integers.
[0116] The motion vector candidate may refer to a prediction candidate block or a motion vector of the prediction candidate block when predicting a motion vector. In addition, the motion vector candidate may be included in a motion vector candidate list.
[0117] The motion vector candidate list may mean a list consisting of one or more motion vector candidates.
[0118] The motion vector candidate index may represent an indicator indicating a motion vector candidate in the motion vector candidate list. Alternatively, it may be an index of a motion vector predictor.
[0119] The motion information may represent information including at least one of items including a motion vector, a reference picture index, an inter-frame prediction indicator, a prediction list utilization flag, a reference picture list information, a reference picture, a motion vector candidate, a motion vector candidate index, a merge candidate and a merge index.
[0120] The merge candidate list may mean a list consisting of one or more merge candidates.
[0121] The merge candidate may represent a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-prediction merge candidate, or a zero merge candidate. The merge candidate may include motion information such as an inter prediction indicator, a reference picture index for each list, a motion vector, a prediction list utilization flag, and an inter prediction indicator.
[0122] The merge index may represent an indicator indicating a merge candidate in the merge candidate list. Alternatively, the merge index may indicate a block in a reconstructed block that is spatially / temporally adjacent to the current block, from which the merge candidate has been derived. Alternatively, the merge index may indicate at least one piece of motion information of the merge candidate.
[0123] Transform unit: may represent a basic unit when encoding / decoding (such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding / decoding) is performed on a residual signal. A single transform unit may be partitioned into a plurality of lower-level transform units having a smaller size. Here, the transform / inverse transform may include at least one of a first transform / first inverse transform and a second transform / second inverse transform.
[0124] Scaling: may refer to the process of multiplying the level of quantization by a factor. Transform coefficients may be generated by scaling the level of quantization. Scaling may also be referred to as inverse quantization.
[0125] Quantization parameter: may indicate a value used when a transform coefficient is used to generate a quantized level during quantization. The quantization parameter may also indicate a value used when a transform coefficient is generated by scaling the quantized level during inverse quantization. The quantization parameter may be a value mapped to a quantization step size.
[0126] Delta quantization parameter: may represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0127] Scan: may refer to a method of ordering coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix may be called scanning, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix may be called scanning or inverse scanning.
[0128] Transform coefficient: may refer to a coefficient value generated after performing a transform in an encoder. Transform coefficient may refer to a coefficient value generated after performing at least one of entropy decoding and inverse quantization in a decoder. A quantization level obtained by quantizing a transform coefficient or a residual signal or a quantized transform coefficient level may also fall within the meaning of a transform coefficient.
[0129] Quantization level: may represent a value generated by quantizing a transform coefficient or a residual signal in an encoder. Alternatively, the quantization level may represent a value that is a dequantization target subjected to dequantization in a decoder. Similarly, the quantized transform coefficient level as a result of transformation and quantization may also fall within the meaning of the quantization level.
[0130] Non-zero transform coefficient: may refer to a transform coefficient having a value other than zero, or a transform coefficient level or quantization level having a value other than zero.
[0131] Quantization matrix: may refer to a matrix used in a quantization process or an inverse quantization process performed to improve subjective image quality or objective image quality. The quantization matrix may also be referred to as a scaling list.
[0132] Quantization matrix coefficients: can represent each element in the quantization matrix. Quantization matrix coefficients can also be called matrix coefficients.
[0133] Default matrix: may represent a predetermined quantization matrix predefined in an encoder or a decoder.
[0134] Non-default matrix: may denote a quantization matrix that is not predefined in the encoder or decoder but is signaled by the user.
[0135] Statistical value: The statistical value for at least one of a variable, a coding parameter, a constant value, etc. having a calculable specific value can be one or more of the average value, summed value, weighted average value, weighted sum value, minimum value, maximum value, most frequently occurring value, median value, and interpolation value of the corresponding specific value.
[0136] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0137] The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include at least one image. The encoding device 100 may sequentially encode at least one image.
[0138] Reference Figure 1 , the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180 and a reference picture buffer 190.
[0139] The encoding device 100 may perform encoding of an input image by using an intra mode or an inter mode or both an intra mode and an inter mode. In addition, the encoding device 100 may generate a bit stream including encoding information by encoding the input image, and output the generated bit stream. The generated bit stream may be stored in a computer-readable recording medium, or may be streamed through a wired / wireless transmission medium. When the intra mode is used as a prediction mode, the switch 115 may switch to the intra mode. Alternatively, when the inter mode is used as a prediction mode, the switch 115 may switch to the inter mode. Here, the intra mode may represent an intra prediction mode, and the inter mode may represent an inter prediction mode. The encoding device 100 may generate a prediction block for an input block of the input image. In addition, the encoding device 100 may encode the residual block using the residual of the input block and the prediction block after generating the prediction block. The input image may be referred to as a current image as a current encoding target. The input block may be referred to as a current block as a current encoding target, or may be referred to as an encoding target block.
[0140] When the prediction mode is the intra mode, the intra prediction unit 120 may use samples of a block that has been encoded / decoded and is adjacent to the current block as reference samples. The intra prediction unit 120 may perform spatial prediction on the current block by using the reference samples, or may generate prediction samples of the input block by performing spatial prediction. Here, intra prediction may refer to prediction within a frame.
[0141] When the prediction mode is the inter mode, the motion prediction unit 111 may retrieve the area that best matches the input block from the reference image when performing motion prediction, and derive a motion vector by using the retrieved area. In this case, the search area may be used as the area. The reference image may be stored in the reference picture buffer 190. Here, when encoding / decoding the reference image is performed, the reference image may be stored in the reference picture buffer 190.
[0142] The motion compensation unit 112 may generate a predicted block by performing motion compensation on the current block using a motion vector. Here, inter prediction may refer to prediction or motion compensation between frames.
[0143] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial area of a reference picture. In order to perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among the skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and current picture reference mode is used for motion prediction and motion compensation of a prediction unit included in the corresponding coding unit. Then, inter-picture prediction or motion compensation may be performed differently according to the determined mode.
[0144] The subtractor 125 may generate a residual block by using the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may represent the difference between the original signal and the prediction signal. In addition, the residual signal may be a signal generated by transforming or quantizing the difference between the original signal and the prediction signal, or by transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.
[0145] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip the transform on the residual block.
[0146] The quantized level may be generated by applying quantization to a transform coefficient or to a residual signal. Hereinafter, the quantized level may also be referred to as a transform coefficient in an embodiment.
[0147] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to the parameter and output the generated quantization level. Here, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.
[0148] The entropy encoding unit 150 may generate a bitstream by performing entropy encoding on the value calculated by the quantization unit 140 or the encoding parameter value calculated when encoding is performed according to the probability distribution, and output the generated bitstream. The entropy encoding unit 150 may perform entropy encoding on sample information of the image and information for decoding the image. For example, the information for decoding the image may include a syntax element.
[0149] When entropy coding is applied, symbols are represented so that a smaller number of bits are allocated to symbols with a high probability of generation, and a larger number of bits are allocated to symbols with a low probability of generation, and thus, the size of the bitstream for the symbol to be encoded can be reduced. The entropy coding unit 150 may use a coding method for entropy coding such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. For example, the entropy coding unit 150 may perform entropy coding by using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 may derive a binarization method of a target symbol and a probability model of a target symbol / binary bit, and perform arithmetic coding by using the derived binarization method and context model.
[0150] In order to encode a transform coefficient level (quantized level), the entropy encoding unit 150 may change a coefficient in a two-dimensional block form into a one-dimensional vector form by using a transform coefficient scanning method.
[0151] The coding parameters may include information such as syntax elements (flags, indexes, etc.) that are encoded in the encoder and sent to the decoder by signaling, as well as information derived when performing encoding or decoding. The coding parameters may represent information required when encoding or decoding an image. For example, at least one value or combination of the following items may be included in the coding parameters: unit / block size, unit / block depth, unit / block partition information, unit / block shape, unit / block partition structure, whether to perform quadtree partitioning, whether to perform binary tree partitioning, binary tree partition direction (horizontal or vertical), binary tree partition form (symmetric partitioning or asymmetric partitioning), whether the current coding unit is partitioned by ternary tree partitioning, the direction of ternary tree partitioning (horizontal or vertical), the type of ternary tree partitioning (symmetric type or asymmetric type), whether the current coding unit is partitioned by multi-type tree partitioning, and the type of multi-type tree partitioning. direction (horizontal or vertical), type of multi-type tree partition (symmetric or asymmetric), tree (binary tree or ternary tree) structure of multi-type tree partition, prediction mode (intra-frame prediction or inter-frame prediction), luminance intra-frame prediction mode / direction, chrominance intra-frame prediction mode / direction, intra-frame partition information, inter-frame partition information, coding block partition flag, prediction block partition flag, transform block partition flag, reference sample filtering method, reference sample filter taps, reference sample filter coefficients, prediction block filtering method, prediction block filter taps, prediction block filter coefficients, prediction block boundary filtering method, prediction block boundary filter taps, prediction block boundary filter coefficients, intra-frame prediction mode , inter prediction mode, motion information, motion vector, motion vector difference, reference picture index, inter prediction angle, inter prediction indicator, prediction list utilization flag, reference picture list, reference picture, motion vector predictor index, motion vector predictor candidate, motion vector candidate list, whether to use merge mode, merge index, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, representation accuracy of motion vector, transform type, transform size, information on whether primary (first) transform is used, information on whether secondary transform is used, primary transform index, secondary transform index , information on whether a residual signal exists, coding block pattern, coding block flag (CBF), quantization parameter, quantization parameter residual, quantization matrix, whether to apply an intra-frame loop filter, intra-frame loop filter coefficients, intra-frame loop filter taps, intra-frame loop filter shape / form, whether to apply a deblocking filter, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether to apply adaptive sample offset, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether to apply an adaptive loop filter, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape / form,Binarization / debinarization method, context model determination method, context model update method, whether to execute normal mode, whether to execute bypass mode, context binary bit, bypass binary bit, valid coefficient flag, last valid coefficient flag, encoding flag for unit of coefficient group, position of last valid coefficient, flag on whether the value of coefficient is greater than 1, flag on whether the value of coefficient is greater than 2, flag on whether the value of coefficient is greater than 3, information on remaining coefficient values, sign information, reconstructed luminance sample, reconstructed chrominance sample, residual luminance sample, residual chrominance sample, luminance transform coefficient, chrominance transform coefficient, quantized luminance level, quantized chrominance level, transform coefficient level scanning method, motion vector search area at decoder side domain size, shape of a motion vector search area at a decoder side, number of motion vector searches at a decoder side, information on a CTU size, information on a minimum block size, information on a maximum block size, information on a maximum block depth, information on a minimum block depth, image display / output order, slice identification information, slice type, slice partition information, tile identification information, tile type, tile partition information, tile group identification information, tile group type, tile group partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information on a luminance signal or information on a chrominance signal.
[0152] Here, signaling a flag or an index may mean entropy encoding the corresponding flag or index by an encoder and including it in a bitstream, and may mean entropy decoding the corresponding flag or index from the bitstream by a decoder.
[0153] When the encoding apparatus 100 performs encoding by inter-frame prediction, the encoded current image may be used as a reference image for another image that is subsequently processed. Therefore, the encoding apparatus 100 may reconstruct or decode the encoded current image, or store the reconstructed or decoded image as a reference image in the reference picture buffer 190.
[0154] The quantized level may be dequantized in the dequantization unit 160 or may be inversely transformed in the inverse transform unit 170. The dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient may be added to the prediction block by the adder 175. By adding the dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient to the prediction block, a reconstructed block may be generated. Here, the dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient may mean a coefficient on which at least one of dequantization and inverse transformation is performed, and may mean a reconstructed residual block.
[0155] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed sample, the reconstructed block, or the reconstructed image. The filter unit 180 may be referred to as an in-loop filter.
[0156] The deblocking filter may remove block distortion generated in the boundary between blocks. In order to determine whether to apply the deblocking filter, it may be determined whether to apply the deblocking filter to the current block based on the samples included in the number of rows or columns included in the block. When the deblocking filter is applied to the block, another filter may be applied according to the required deblocking filter strength.
[0157] In order to compensate for the coding error, a suitable offset value may be added to the sample value by using sample adaptive offset. Sample adaptive offset can correct the offset of the deblocked image from the original image in units of samples. A method of applying the offset in consideration of edge information about each sample may be used, or a method of partitioning the samples of the image into a predetermined number of regions, determining the region to which the offset is applied, and applying the offset to the determined region may be used.
[0158] The adaptive loop filter may perform filtering based on a comparison result of a filtered reconstructed image and an original image. Samples included in an image may be partitioned into predetermined groups, a filter to be applied to each group may be determined, and differential filtering may be performed on each group. Information on whether ALF is applied may be signaled by a coding unit (CU), and the form and coefficient of ALF to be applied to each block may vary.
[0159] The reconstructed block or the reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block processed by the filter unit 180 may be a part of the reference image. That is, the reference image is a reconstructed image composed of the reconstructed blocks processed by the filter unit 180. The stored reference image may be used later in inter-frame prediction or motion compensation.
[0160] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment and to which the present invention is applied.
[0161] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.
[0162] Reference Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260 and a reference picture buffer 270.
[0163] The decoding device 200 may receive a bit stream output from the encoding device 100. The decoding device 200 may receive a bit stream stored in a computer-readable recording medium, or may receive a bit stream streamed through a wired / wireless transmission medium. The decoding device 200 may decode the bit stream by using an intra mode or an inter mode. In addition, the decoding device 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.
[0164] When the prediction mode used in decoding is the intra mode, the switch may be switched to the intra mode. Alternatively, when the prediction mode used in decoding is the inter mode, the switch may be switched to the inter mode.
[0165] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block that becomes a decoding target by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as a current block.
[0166] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be an inverse process of the above entropy encoding method.
[0167] In order to decode a transform coefficient level (a quantized level), the entropy decoding unit 210 may change a coefficient in a one-way vector form into a two-dimensional block form by using a transform coefficient scanning method.
[0168] The quantized level may be dequantized in the dequantization unit 220, or the quantized level may be inversely transformed in the inverse transform unit 230. The quantized level may be a result of dequantization or inverse transformation or both, and may be generated as a reconstructed residual block. Here, the dequantization unit 220 may apply a quantization matrix to the quantized level.
[0169] When the intra mode is used, the intra prediction unit 240 may generate a predicted block by performing spatial prediction on the current block, wherein the spatial prediction uses sample values of a block that is adjacent to the decoding target block and has been decoded. When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation on the current block, wherein the motion compensation uses a motion vector and a reference image stored in the reference picture buffer 270 .
[0170] The adder 255 can generate a reconstructed block by adding the reconstructed residual block to the prediction block. The filter unit 260 can apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed image. The filter unit 260 can output the reconstructed image. The reconstructed block or the reconstructed image can be stored in the reference picture buffer 270 and used when performing inter-frame prediction. The reconstructed block processed by the filter unit 260 can be a part of the reference image. That is, the reference image is a reconstructed image composed of the reconstructed blocks processed by the filter unit 260. The stored reference image can be used later in inter-frame prediction or motion compensation.
[0171] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded. Figure 3 An example of partitioning a single cell into a plurality of lower-level cells is schematically shown.
[0172] In order to efficiently partition an image, a coding unit (CU) may be used when encoding and decoding. A coding unit may be used as a basic unit when encoding / decoding an image. In addition, a coding unit may be used as a unit for distinguishing an intra prediction mode from an inter prediction mode when encoding / decoding an image. A coding unit may be a basic unit for prediction, transformation, quantization, inverse transformation, inverse quantization, or encoding / decoding processing of a transformation coefficient.
[0173] Reference Figure 3 , the image 300 is partitioned sequentially according to the maximum coding unit (LCU), and the LCU unit is determined as a partition structure. Here, the LCU may be used in the same meaning as the coding tree unit (CTU). Unit partitioning may mean partitioning a block associated with the unit. In the block partition information, information about the unit depth may be included. The depth information may indicate the number or degree of the unit being partitioned or both the number and degree of the unit being partitioned. A single unit may be partitioned into a plurality of lower-level units hierarchically associated with the depth information based on a tree structure. In other words, the unit and the lower-level units generated by partitioning the unit may correspond to a node and a child node of the node, respectively. Each of the partitioned lower-level units may have depth information. The depth information may be information indicating the size of a CU and may be stored in each CU. The unit depth indicates the number and / or degree associated with partitioning the unit. Therefore, the partition information of the lower-level unit may include information about the size of the lower-level unit.
[0174] The partition structure may represent the distribution of coding units (CUs) within the LCU 310. Such distribution may be determined based on whether a single CU is partitioned into multiple (including 2, 4, 8, 16, etc., positive integers equal to or greater than 2) CUs. The horizontal size and vertical size of the CU generated by partitioning may be half of the horizontal size and vertical size of the CU before partitioning, respectively, or may have sizes smaller than the horizontal size and vertical size before partitioning, respectively, according to the number of partitionings. The CU may be recursively partitioned into multiple CUs. By recursive partitioning, at least one of the height and width of the CU after partitioning may be reduced compared to at least one of the height and width of the CU before partitioning. Partitioning of the CU may be recursively performed until a predefined depth or a predefined size. For example, the depth of the LCU may be 0, and the depth of the minimum coding unit (SCU) may be a predefined maximum depth. Here, as described above, the LCU may be a coding unit having a maximum coding unit size, and the SCU may be a coding unit having a minimum coding unit size. Partitioning starts from the LCU 310, and when the horizontal size or the vertical size or both the horizontal size and the vertical size of the CU are reduced by partitioning, the CU depth increases by 1. For example, for each depth, the size of the non-partitioned CU may be 2N×2N. In addition, in the case of a partitioned CU, a CU of size 2N×2N may be partitioned into four CUs of size N×N. As the depth increases by 1, the size of N may be halved.
[0175] In addition, information on whether a CU is partitioned may be indicated by using partition information of the CU. The partition information may be 1-bit information. All CUs except the SCU may include partition information. For example, when the value of the partition information is a first value, the CU may not be partitioned, and when the value of the partition information is a second value, the CU may be partitioned.
[0176] Reference Figure 3 , an LCU with a depth of 0 may be a block of 64×64. 0 may be the minimum depth. An SCU with a depth of 3 may be a block of 8×8. 3 may be the maximum depth. A CU of a block of 32×32 and a CU of a block of 16×16 may be represented as depth 1 and depth 2, respectively.
[0177] For example, when a single coding unit is partitioned into four coding units, the horizontal size and vertical size of the four coding units partitioned may be half the size of the horizontal size and vertical size of the CU before being partitioned. In one embodiment, when a coding unit of size 32×32 is partitioned into four coding units, each of the four coding units partitioned may have a size of 16×16. When a single coding unit is partitioned into four coding units, it can be said that the coding unit can be partitioned into a quadtree form.
[0178] For example, when a coding unit is partitioned into two sub-coding units, the horizontal size or vertical size (width or height) of each of the two sub-coding units may be half of the horizontal size or vertical size of the original coding unit. For example, when a coding unit of size 32×32 is partitioned vertically into two sub-coding units, each of the two sub-coding units may have a size of 16×32. For example, when a coding unit of size 8×32 is partitioned horizontally into two sub-coding units, each of the two sub-coding units may have a size of 8×16. When a coding unit is partitioned into two sub-coding units, the coding unit may be said to be partitioned into two or partitioned according to a binary tree partition structure.
[0179] For example, when one coding unit is partitioned into three sub-coding units, the horizontal size or the vertical size of the coding unit may be partitioned at a ratio of 1:2:1, thereby generating three sub-coding units having a ratio of the horizontal size or the vertical size of 1:2:1. For example, when a coding unit having a size of 16×32 is partitioned horizontally into three sub-coding units, the three sub-coding units may have sizes of 16×8, 16×16, and 16×8, respectively, in order from the uppermost sub-coding unit to the lowermost sub-coding unit. For example, when a coding unit having a size of 32×32 is partitioned vertically into three sub-coding units, the three sub-coding units may have sizes of 8×32, 16×32, and 8×32, respectively, in order from the left sub-coding unit to the right sub-coding unit. When one coding unit is partitioned into three sub-coding units, the coding unit may be said to be partitioned into three sub-coding units or partitioned according to a ternary tree partition structure.
[0180] exist Figure 3 , a coding tree unit (CTU) 320 is an example of a CTU to which a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure are all applied.
[0181] As described above, in order to partition a CTU, at least one of a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure may be applied. Various tree partition structures may be sequentially applied to a CTU according to a predetermined priority order. For example, a quadtree partition structure may be preferentially applied to a CTU. Coding units that can no longer be partitioned using a quadtree partition structure may correspond to leaf nodes of a quadtree. Coding units corresponding to leaf nodes of a quadtree may be used as root nodes of a binary and / or ternary tree partition structure. That is, coding units corresponding to leaf nodes of a quadtree may be further partitioned according to a binary tree partition structure or a ternary tree partition structure, or may not be further partitioned. Therefore, by preventing coding units obtained from binary tree partitions or ternary tree partitions of coding units corresponding to leaf nodes of a quadtree from undergoing further quadtree partitions, block partitioning operations and / or operations of signaling partition information may be effectively performed.
[0182] The fact that the coding unit corresponding to the node of the quadtree is partitioned may be signaled using the four partition information. The four partition information having a first value (e.g., "1") may indicate that the current coding unit is partitioned according to the quadtree partition structure. The four partition information having a second value (e.g., "0") may indicate that the current coding unit is not partitioned according to the quadtree partition structure. The four partition information may be a flag having a predetermined length (e.g., one bit).
[0183] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, the coding unit corresponding to the leaf node of the quadtree may further undergo any partitioning of the binary tree partitioning and the ternary tree partitioning. In addition, the coding unit generated by the binary tree partitioning or the ternary tree partitioning may undergo further binary tree partitioning or further ternary tree partitioning, or may not be further partitioned.
[0184] A tree structure in which there is no priority between binary tree partitions and ternary tree partitions is called a multi-type tree structure. A coding unit corresponding to a leaf node of a quadtree may be used as a root node of a multi-type tree. At least one of multi-type tree partition indication information, partition direction information, and partition tree information may be used to signal whether to partition a coding unit corresponding to a node of a multi-type tree. In order to partition a coding unit corresponding to a node of a multi-type tree, multi-type tree partition indication information, partition direction information, and partition tree information may be sequentially signaled.
[0185] The multi-type tree partition indication information having a first value (eg, '1') may indicate that the current coding unit will undergo multi-type tree partitioning. The multi-type tree partition indication information having a second value (eg, '0') may indicate that the current coding unit will not undergo multi-type tree partitioning.
[0186] When a coding unit corresponding to a node of a multi-type tree is further partitioned according to a multi-type tree partition structure, the coding unit may include partition direction information. The partition direction information may indicate in which direction the current coding unit will be partitioned for the multi-type tree partition. The partition direction information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned vertically. The partition direction information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned horizontally.
[0187] When the coding unit corresponding to the node of the multi-type tree is further partitioned according to the multi-type tree partition structure, the current coding unit may include partition tree information. The partition tree information may indicate a tree partition structure to be used to partition the node of the multi-type tree. The partition tree information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to a binary tree partition structure. The partition tree information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned according to a ternary tree partition structure.
[0188] The partition indication information, the partition tree information and the partition direction information may all be flags having a predetermined length (eg, one bit).
[0189] At least any one of the quadtree partition indication information, the multi-type tree partition indication information, the partition direction information, and the partition tree information may be entropy encoded / decoded. In order to entropy encode / decode those types of information, information about neighboring coding units adjacent to the current coding unit may be used. For example, there is a high probability that the partition type (partitioned or not partitioned, partition tree, and / or partition direction) of the left neighboring coding unit and / or the upper neighboring coding unit of the current coding unit is similar to the partition type of the current coding unit. Therefore, context information for entropy encoding / decoding the information about the current coding unit may be derived from the information about the neighboring coding units. The information about the neighboring coding units may include at least any one of the quadtree partition information, the multi-type tree partition indication information, the partition direction information, and the partition tree information.
[0190] As another example, among binary tree partitioning and ternary tree partitioning, binary tree partitioning may be preferentially performed. That is, the current coding unit may first undergo binary tree partitioning, and then the coding unit corresponding to the leaf node of the binary tree may be set as the root node for the ternary tree partitioning. In this case, for the coding unit corresponding to the node of the ternary tree, neither quadtree partitioning nor binary tree partitioning may be performed.
[0191] A coding unit that cannot be partitioned according to a quadtree partition structure, a binary tree partition structure, and / or a ternary tree partition structure becomes a basic unit for encoding, prediction, and / or transformation. That is, the coding unit cannot be further partitioned for prediction and / or transformation. Therefore, partition structure information and partition information for partitioning a coding unit into a prediction unit and / or a transformation unit may not exist in the bitstream.
[0192] However, when the size of the coding unit (ie, the basic unit for partitioning) is larger than the size of the maximum transform block, the coding unit may be recursively partitioned until the size of the coding unit is reduced to be equal to or smaller than the size of the maximum transform block. For example, when the size of the coding unit is 64×64 and when the size of the maximum transform block is 32×32, the coding unit may be partitioned into four 32×32 blocks for transforming. For example, when the size of the coding unit is 32×64 and the size of the maximum transform block is 32×32, the coding unit may be partitioned into two 32×32 blocks for transforming. In this case, the partitioning of the coding unit for transforming is not separately signaled, and the partitioning of the coding unit for transforming may be determined by comparison between the horizontal size or vertical size of the coding unit and the horizontal size or vertical size of the maximum transform block. For example, when the horizontal size (width) of the coding unit is larger than the horizontal size (width) of the maximum transform block, the coding unit may be vertically divided into two equal parts. For example, when the vertical size (height) of the coding unit is larger than the vertical size (height) of the maximum transform block, the coding unit may be horizontally divided into two equal parts.
[0193] Information on the maximum and / or minimum size of a coding unit and information on the maximum and / or minimum size of a transform block may be signaled or determined at a higher level of the coding unit. The higher level may be, for example, a sequence level, a picture level, a slice level, a tile group level, a tile block level, etc. For example, the minimum size of a coding unit may be determined as 4×4. For example, the maximum size of a transform block may be determined as 64×64. For example, the minimum size of a transform block may be determined as 4×4.
[0194] Information on the minimum size of the coding unit corresponding to the leaf node of the quadtree (quadtree minimum size) and / or information on the maximum depth from the root node of the multi-type tree to the leaf node (maximum tree depth of the multi-type tree) may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a slice level, a parallel block group level, a parallel block level, etc. Information on the minimum size of the quadtree and / or information on the maximum depth of the multi-type tree may be signaled or determined for each of the intra-picture slice and the inter-picture slice.
[0195] The difference information between the size of the CTU and the maximum size of the transform block may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a slice level, a parallel block group level, a parallel block level, etc. The information of the maximum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the maximum size of the binary tree) may be determined based on the size of the coding tree unit and the difference information. The maximum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the maximum size of the ternary tree) may vary according to the type of the slice. For example, for an intra-picture slice, the maximum size of the ternary tree may be 32×32. For example, for an inter-picture slice, the maximum size of the ternary tree may be 128×128. For example, the minimum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the minimum size of the binary tree) and / or the minimum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the minimum size of the ternary tree) may be set to the minimum size of the coding block.
[0196] As another example, the maximum size of the binary tree and / or the maximum size of the ternary tree may be signaled or determined at the slice level. Alternatively, the minimum size of the binary tree and / or the minimum size of the ternary tree may be signaled or determined at the slice level.
[0197] According to the sizes and depth information of the above-mentioned various blocks, quad partition information, multi-type tree partition indication information, partition tree information and / or partition direction information may or may not be included in the bitstream.
[0198] For example, when the size of the coding unit is not greater than the minimum size of the quadtree, the coding unit does not include the quad partition information. It can be inferred that the quad partition information is the second value.
[0199] For example, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is greater than the maximum size (horizontal size and vertical size) of the binary tree and / or the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be partitioned into two or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred to be the second value.
[0200] Optionally, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is the same as the maximum size (horizontal size and vertical size) of the binary tree and / or is twice as large as the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be further partitioned into two or three partitions. Therefore, the multi-type tree partition indication information may not be sent by a signal, but the multi-type tree partition indication information may be derived as a second value. This is because when the coding unit is partitioned according to the binary tree partition structure and / or the ternary tree partition structure, a coding unit smaller than the minimum size of the binary tree and / or the minimum size of the ternary tree is generated.
[0201] Optionally, the binary tree partition or ternary tree partition may be limited based on the size of the virtual pipeline data unit (hereinafter, the pipeline buffer size). For example, when the coding unit is partitioned into sub-coding units that do not fit the pipeline buffer size by binary tree partition or ternary tree partition, the corresponding binary tree partition or ternary tree partition may be limited. The pipeline buffer size may be the size of the maximum transform block (e.g., 64×64). For example, when the pipeline buffer size is 64×64, the following partition may be limited.
[0202] - N×M (N and / or M is 128) ternary tree partitions for coding units - 128×N (N<=64) binary tree partitions in the horizontal direction for coding units - N×128 (N<=64) binary tree partitions in the vertical direction for coding units Optionally, when the depth of the coding unit corresponding to the node of the multi-type tree is equal to the maximum depth of the multi-type tree, the coding unit may not be further partitioned into two and / or three partitions. Therefore, the multi-type tree partition indication information may not be sent by a signal, but the multi-type tree partition indication information may be inferred to be the second value.
[0203] Optionally, only when at least one of vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning is possible for a coding unit corresponding to a node of a multi-type tree, a multi-type tree partition indication information may be signaled. Otherwise, the coding unit may not be partitioned into two and / or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred to be a second value.
[0204] Optionally, only when both vertical binary tree partitioning and horizontal binary tree partitioning or both vertical ternary tree partitioning and horizontal ternary tree partitioning are possible for the coding unit corresponding to the node of the multi-type tree, the partition direction information can be sent by signal. Otherwise, the partition direction information may not be sent by signal, but the partition direction information may be derived as a value indicating a possible partition direction.
[0205] Optionally, only when both vertical binary tree partitioning and vertical ternary tree partitioning or both horizontal binary tree partitioning and horizontal ternary tree partitioning are possible for a coding tree corresponding to a node of a multi-type tree, partition tree information may be signaled. Otherwise, partition tree information may not be signaled, but may be derived as a value indicating a possible partition tree structure.
[0206] Figure 4 is a diagram illustrating an intra prediction process.
[0207] Figure 4 The arrows from the center to the outside in FIG. 1 represent the prediction direction of the intra prediction mode.
[0208] Intra-frame encoding and / or decoding may be performed by using reference samples of neighboring blocks of the current block. The neighboring blocks may be reconstructed neighboring blocks. For example, intra-frame encoding and / or decoding may be performed by using encoding parameters or values of reference samples included in the reconstructed neighboring blocks.
[0209] The prediction block may represent a block generated by performing intra prediction. The prediction block may correspond to at least one of a CU, a PU, and a TU. The unit of the prediction block may have a size of one of a CU, a PU, and a TU. The prediction block may be a square block of a size of 2×2, 4×4, 16×16, 32×32, or 64×64, etc., or may be a rectangular block of a size of 2×8, 4×8, 2×16, 4×16, and 8×16, etc.
[0210] Intra-prediction may be performed according to an intra-prediction mode for the current block. The number of intra-prediction modes that the current block may have may be a fixed value, and may be a value determined differently according to properties of the prediction block. For example, the properties of the prediction block may include the size of the prediction block, the shape of the prediction block, and the like.
[0211] Regardless of the block size, the number of intra-frame prediction modes can be fixed to N. Alternatively, the number of intra-frame prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65 or 67, etc. Optionally, the number of intra-frame prediction modes can vary according to the block size or the color component type or both the block size and the color component type. For example, the number of intra-frame prediction modes can vary depending on whether the color component is a luminance signal or a chrominance signal. For example, as the block size becomes larger, the number of intra-frame prediction modes can increase. Optionally, the number of intra-frame prediction modes of the luminance component block can be greater than the number of intra-frame prediction modes of the chrominance component block.
[0212] The intra prediction mode may be a non-angle mode or an angle mode. The non-angle mode may be a DC mode or a planar mode, and the angle mode may be a prediction mode having a specific direction or angle. The intra prediction mode may be represented by at least one of a mode number, a mode value, a mode number, a mode angle, and a mode direction. The number of intra prediction modes may be M, which is greater than 1, including non-angle modes and angle modes. In order to perform intra prediction on a current block, a step of determining whether a sample included in a reconstructed neighboring block can be used as a reference sample of the current block may be performed. When there are samples that cannot be used as reference samples of the current block, a value obtained by copying or interpolating at least one sample value included in the reconstructed neighboring block, or by both copying and interpolating, may be used to replace the unavailable sample value of the sample, so that the replaced sample value is used as the reference sample of the current block.
[0213] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0214] like Figure 7 As shown, at least one of the reference sample line 0 to the reference sample line 3 can be used for intra prediction of the current block. Figure 7 In , the samples of fragment A and fragment F can be filled with the samples of the closest fragment B and fragment E, respectively, instead of retrieving from the reconstructed neighboring blocks. The index information indicating the reference sample line to be used for intra prediction of the current block can be sent by signaling. For example, in Figure 7 In the example, reference sample line indicators 0, 1, and 2 may be signaled as index information indicating reference sample lines 0, 1, and 2. When the upper boundary of the current block is the boundary of the CTU, only reference sample line 0 may be available. Therefore, in this case, index information may not be signaled. When reference sample lines other than reference sample line 0 are used, filtering for a prediction block to be described later may not be performed.
[0215] When intra prediction is performed, a filter may be applied to at least one of a reference sample and a prediction sample based on an intra prediction mode and a current block size.
[0216] In the case of the planar mode, when generating the prediction block of the current block, according to the position of the prediction target sample in the prediction block, the sample value of the prediction target sample may be generated by using the weighted sum of the upper reference sample and the left reference sample of the current block and the upper right reference sample and the lower left reference sample of the current block. In addition, in the case of the DC mode, when generating the prediction block of the current block, the average value of the upper reference sample and the left reference sample of the current block may be used. In addition, in the case of the angular mode, the prediction block may be generated by using the upper reference sample, the left reference sample, the upper right reference sample and / or the lower left reference sample of the current block. In order to generate the prediction sample value, interpolation of real number units may be performed.
[0217] In the case of intra prediction between color components, a prediction block of a current block of a second color component may be generated based on a corresponding reconstruction block of a first color component. For example, the first color component may be a luminance component, and the second color component may be a chrominance component. For intra prediction between color components, parameters of a linear model between the first color component and the second color component may be derived based on a template. The template may include the upper and / or left neighboring samples of the current block and the upper and / or left neighboring samples of the reconstruction block of the first color component corresponding thereto. For example, the sample value of the first color component having the maximum value among the samples in the template and the sample value of the second color component corresponding thereto, and the sample value of the first color component having the minimum value among the samples in the template and the sample value of the second color component corresponding thereto may be used to derive the parameters of the linear model. When deriving the parameters of the linear model, the corresponding reconstruction block may be applied to the linear model to generate a prediction block of the current block. Depending on the video format, subsampling may be performed on the reconstruction block of the first color component and the neighboring samples of the corresponding reconstruction block. For example, when one sample of the second color component corresponds to four samples of the first color component, the four samples of the first color component may be subsampled to calculate one corresponding sample. In this case, parameter derivation of the linear model and intra prediction between color components may be performed based on the corresponding subsampled samples. Whether to perform intra prediction between color components and / or the range of the template may be signaled as an intra prediction mode.
[0218] The current block may be partitioned into two sub-blocks or four sub-blocks in the horizontal direction or the vertical direction. The partitioned sub-blocks may be reconstructed sequentially. That is, intra prediction may be performed on the sub-block to generate a sub-prediction block. In addition, inverse quantization and / or inverse transformation may be performed on the sub-block to generate a sub-residual block. The reconstructed sub-block may be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block may be used as a reference sample for intra prediction of a subsequent sub-block. The sub-block may be a block including a predetermined number (e.g., 16) or more samples. Thus, for example, when the current block is an 8×4 block or a 4×8 block, the current block may be partitioned into two sub-blocks. In addition, when the current block is a 4×4 block, the current block may not be partitioned into sub-blocks. When the current block has other sizes, the current block may be partitioned into four sub-blocks. Information on whether intra prediction is performed based on sub-blocks and / or partition directions (horizontal or vertical) may be sent by a signal. Intra prediction based on sub-blocks may be performed only when reference sample line 0 is used. When subblock-based intra prediction is performed, filtering for a prediction block, which will be described later, may not be performed.
[0219] The final prediction block can be generated by performing filtering on the prediction block predicted by the intra-frame. Filtering can be performed by applying predetermined weights to the filtering target samples, the left reference samples, the upper reference samples and / or the upper left reference samples. The weights and / or reference samples (range, position, etc.) used for filtering can be determined based on at least one of the block size, the intra-frame prediction mode and the position of the filtering target samples in the prediction block. Filtering can be performed only in the case of a predetermined intra-frame prediction mode (e.g., DC, plane, vertical, horizontal, diagonal and / or adjacent diagonal mode). The adjacent diagonal mode can be a mode in which k is added to the diagonal mode or k is subtracted from the diagonal mode. For example, k can be a positive integer of 8 or less.
[0220] The intra-frame prediction mode of the current block may be entropy encoded / decoded by predicting the intra-frame prediction mode of a block existing adjacent to the current block. When the intra-frame prediction mode of the current block is the same as that of the neighboring block, information that the intra-frame prediction mode of the current block is the same as that of the neighboring block may be signaled by using predetermined flag information. In addition, indicator information of the intra-frame prediction mode that is the same as the intra-frame prediction mode of the current block among the intra-frame prediction modes of multiple neighboring blocks may be signaled. When the intra-frame prediction mode of the current block is different from that of the neighboring block, the intra-frame prediction mode information of the current block may be entropy encoded / decoded by performing entropy encoding / decoding based on the intra-frame prediction mode of the neighboring block.
[0221] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0222] exist Figure 5 In , a rectangle can represent a picture. Figure 5 In FIG. 1 , the arrow indicates the prediction direction. According to the encoding type of the picture, the picture can be classified into an intra picture (I picture), a predicted picture (P picture) and a bi-predicted picture (B picture).
[0223] An I picture may be encoded by intra prediction without requiring inter-picture prediction. A P picture may be encoded by inter-picture prediction using a reference picture existing in one direction (i.e., forward or backward) relative to the current block. A B picture may be encoded by inter-picture prediction using a reference picture existing in two directions (i.e., forward and backward) relative to the current block. When inter-picture prediction is used, the encoder may perform inter-picture prediction or motion compensation, and the decoder may perform corresponding motion compensation.
[0224] Hereinafter, embodiments of inter-picture prediction will be described in detail.
[0225] Reference pictures and motion information may be used to perform inter-picture prediction or motion compensation.
[0226] The motion information of the current block may be derived during inter-picture prediction by each of the encoding device 100 and the decoding device 200. The motion information of the current block may be derived by using the motion information of a reconstructed neighboring block, the motion information of a co-located block (also referred to as a col block or a co-located block), and / or the motion information of a block adjacent to the co-located block. The co-located block may represent a block in a previously reconstructed co-located picture (also referred to as a col picture or a co-located picture) that is spatially located at the same position as the current block. The co-located picture may be one of the one or more reference pictures included in the reference picture list.
[0227] The derivation method of motion information may be different according to the prediction mode of the current block. For example, the prediction modes applied to inter-frame prediction include AMVP mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, geometric partition mode, inter-intra combined prediction mode, affine mode, etc. Here, the merge mode may be referred to as motion merge mode.
[0228] For example, when AMVP is used as a prediction mode, at least one of a motion vector of a reconstructed neighboring block, a motion vector of a co-located block, a motion vector of a block adjacent to the co-located block, and a (0, 0) motion vector may be determined as a motion vector candidate for the current block, and a motion vector candidate list may be generated by using the motion vector candidates. The motion vector candidate for the current block may be derived by using the generated motion vector candidate list. The motion information of the current block may be determined based on the derived motion vector candidate. The motion vector of the co-located block or the motion vector of a block adjacent to the co-located block may be referred to as a temporal motion vector candidate, and the motion vector of the reconstructed neighboring block may be referred to as a spatial motion vector candidate.
[0229] The encoding device 100 may calculate a motion vector difference (MVD) between a motion vector of a current block and a motion vector candidate, and may perform entropy encoding on the motion vector difference (MVD). In addition, the encoding device 100 may perform entropy encoding on a motion vector candidate index and generate a bitstream. The motion vector candidate index may indicate the best motion vector candidate among the motion vector candidates included in the motion vector candidate list. The decoding device may perform entropy decoding on the motion vector candidate index included in the bitstream, and may select a motion vector candidate for a decoding target block from the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. In addition, the decoding device 200 may add the entropy-decoded MVD to the motion vector candidate extracted by entropy decoding, thereby deriving a motion vector of the decoding target block.
[0230] In addition, the encoding apparatus 100 may perform entropy encoding on the resolution information of the calculated MVD. The decoding apparatus 200 may adjust the resolution of the entropy-decoded MVD using the MVD resolution information.
[0231] In addition, the encoding device 100 calculates a motion vector difference (MVD) between a motion vector in the current block and a motion vector candidate based on an affine model, and performs entropy encoding on the MVD. The decoding device 200 derives a motion vector based on each sub-block by deriving an affine controlled motion vector of a decoding target block according to the sum of the entropy-decoded MVD and the affine controlled motion vector candidate.
[0232] The bitstream may include a reference picture index indicating a reference picture. The reference picture index may be entropy encoded by the encoding apparatus 100 and then signaled as a bitstream to the decoding apparatus 200. The decoding apparatus 200 may generate a prediction block of a decoding target block based on the derived motion vector and the reference picture index information.
[0233] Another example of a method of deriving motion information of a current block may be a merge mode. The merge mode may represent a method of merging motions of multiple blocks. The merge mode may represent a mode of deriving motion information of a current block from motion information of neighboring blocks. When the merge mode is applied, the motion information of reconstructed neighboring blocks and / or the motion information of the same-positioned blocks may be used to generate a merge candidate list. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).
[0234] The merge candidate list may be a list of stored motion information. The motion information included in the merge candidate list may be at least one of the following: motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a co-located block of the current block in a reference picture (temporal merge candidate), new motion information generated by combining motion information present in the merge candidate list, motion information of a block encoded / decoded before the current block (history-based merge candidate), and a zero merge candidate.
[0235] The encoding device 100 may generate a bitstream by performing entropy encoding on at least one of a merge flag and a merge index, and may signal the bitstream to the decoding device 200. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which neighboring block among neighboring blocks of the current block is a merge target block. For example, the neighboring blocks of the current block may include a left neighboring block located on the left side of the current block, an upper neighboring block arranged above the current block, and a temporal neighboring block temporally adjacent to the current block.
[0236] In addition, the encoding device 100 performs entropy encoding on the correction information for correcting the motion vector in the motion information of the merge candidate, and transmits it to the decoding device 200 by signal. The decoding device 200 may correct the motion vector of the merge candidate selected by the merge index based on the correction information. Here, the correction information may include at least one of information on whether to perform correction, correction direction information, and correction size information. As described above, the prediction mode in which the motion vector of the merge candidate is corrected based on the correction information transmitted by the signal may be referred to as a merge mode with a motion vector difference.
[0237] The skip mode may be a mode in which the motion information of the neighboring blocks is applied to the current block as it is. When the skip mode is applied, the encoding apparatus 100 may perform entropy encoding on information of the fact of which block's motion information is to be used as the motion information of the current block to generate a bitstream, and may signal the bitstream to the decoding apparatus 200. The encoding apparatus 100 may not signal a syntax element regarding at least any one of the motion vector difference information, the coded block flag, and the transform coefficient level to the decoding apparatus 200.
[0238] The subblock merge mode may represent a mode for deriving motion information in units of subblocks of a coding block (CU). When the subblock merge mode is applied, the subblock merge candidate list may be generated using motion information of a subblock co-located with the current subblock in a reference image (subblock-based temporal merge candidates) and / or affine control point motion vector merge candidates.
[0239] The geometric partition mode may denote a mode of deriving motion information by partitioning the current block into predetermined directions, deriving each prediction sample using each of the derived motion information, and deriving the prediction sample of the current block by weighting each of the derived prediction samples.
[0240] The inter-intra combined prediction mode may mean a mode of deriving a prediction sample of a current block by weighting a prediction sample generated by inter prediction and a prediction sample generated by intra prediction.
[0241] The decoding apparatus 200 may correct the derived motion information by itself. The decoding apparatus 200 may search for a predetermined area based on a reference block indicated by the derived motion information, and derive motion information having a minimum SAD as the corrected motion information.
[0242] The decoding apparatus 200 may compensate for prediction samples derived through inter-frame prediction using optical flow.
[0243] Figure 6 is a diagram illustrating transform and quantization processing.
[0244] like Figure 6As shown in , a transform process and / or a quantization process is performed on the residual signal to generate a quantized level signal. The residual signal is the difference between the original block and the prediction block (i.e., an intra-frame prediction block or an inter-frame prediction block). The prediction block is a block generated by intra-frame prediction or inter-frame prediction. The transform can be a primary transform, a secondary transform, or both a primary transform and a secondary transform. The primary transform of the residual signal generates transform coefficients, and the secondary transform of the transform coefficients generates secondary transform coefficients.
[0245] At least one scheme selected from various predefined transform schemes is used to perform the primary transform. For example, examples of the predefined transform schemes include discrete cosine transform (DCT), discrete sine transform (DST) and Karhunen-Loève transform (KLT). The transform coefficients generated by the primary transform may undergo a secondary transform. The transform scheme used for the primary transform and / or the secondary transform may be determined based on the coding parameters of the current block and / or the neighboring blocks of the current block. Optionally, transform information indicating the transform scheme may be sent by a signal. DCT-based transforms may include, for example, DCT-2, DCT-8, etc. DST-based transforms may include, for example, DST-7.
[0246] A quantized level signal (quantized coefficient) may be generated by performing quantization on a residual signal or on a result of performing a primary transform and / or a secondary transform. Depending on the intra prediction mode of the block or the block size / shape, the quantized level signal may be scanned according to at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning. For example, when the coefficients are scanned according to a diagonal upper right scan, the coefficients in block form are changed to a one-dimensional vector form. In addition to the diagonal upper right scan, horizontal scanning that scans the coefficients in two-dimensional block form horizontally or vertical scanning that scans the coefficients in two-dimensional block form vertically may be used, depending on the intra prediction mode and / or the size of the transform block. The scanned quantized level coefficients may be entropy encoded for insertion into a bitstream.
[0247] The decoder performs entropy decoding on the bit stream to obtain quantized level coefficients. The quantized level coefficients can be arranged in a two-dimensional block form by inverse scanning. For the inverse scanning, at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning can be used.
[0248] The quantized level coefficients may then be dequantized, then inversely transformed secondary if necessary, and finally inversely transformed primary if necessary to generate a reconstructed residual signal.
[0249] Inverse mapping in the dynamic range can be performed for the luminance component reconstructed by intra-frame prediction or inter-frame prediction before in-loop filtering. The dynamic range can be partitioned into 16 equal segments, and the mapping function for each segment can be sent by signal. The mapping function can be sent by signal at the slice level or parallel block group level. The inverse mapping function for performing inverse mapping can be derived based on the mapping function. In-loop filtering, reference picture storage and motion compensation are performed in the inverse mapping area, and the prediction block generated by inter-frame prediction is converted to the mapping area via mapping using the mapping function, and then used to generate the reconstructed block. However, since intra-frame prediction is performed in the mapping area, the prediction block generated via intra-frame prediction can be used to generate the reconstructed block without mapping / inverse mapping.
[0250] When the current block is a residual block of a chroma component, the residual block can be converted to an inverse mapping area by performing scaling on the chroma component of the mapping area. The availability of scaling can be signaled at the slice level or the parallel block group level. Scaling can be applied only when mapping for the luminance component is available and the partitions of the luminance component and the chroma component follow the same tree structure. Scaling can be performed based on the average value of the sample values of the luminance prediction block corresponding to the chroma block. In this case, when the current block uses inter-frame prediction, the luminance prediction block can represent the mapped luminance prediction block. The value required for scaling can be derived by using the index reference lookup table of the fragment to which the average value of the sample values of the luminance prediction block belongs. Finally, the residual block can be converted to an inverse mapping area by scaling the residual block using the derived value. Then, chroma component block recovery, intra-frame prediction, inter-frame prediction, in-loop filtering, and reference picture storage can be performed in the inverse mapping area.
[0251] Information indicating whether mapping / inverse mapping of luma components and chroma components is available may be signaled through a sequence parameter set.
[0252] The prediction block of the current block may be generated based on a block vector indicating the displacement between the current block and the reference block in the current picture. In this way, the prediction mode for generating the prediction block with reference to the current picture is called an intra-block copy (IBC) mode. The IBC mode may be applied to M×N (M<=64, N<=64) coding units. The IBC mode may include a skip mode, a merge mode, an AMVP mode, and the like. In the case of the skip mode or the merge mode, a merge candidate list is constructed, and a merge index is signaled so that a merge candidate can be specified. The block vector of the specified merge candidate may be used as the block vector of the current block. The merge candidate list may include at least one of a spatial candidate, a history-based candidate, a candidate based on the average of two candidates, and a zero merge candidate. In the case of the AMVP mode, a difference block vector may be signaled. In addition, a prediction block vector may be derived from the left neighboring block and the upper neighboring block of the current block. The index of the neighboring block to be used may be signaled. The prediction block in the IBC mode is included in the current CTU or the left CTU and is limited to blocks in the reconstructed area. For example, the value of the block vector may be limited so that the prediction block of the current block is located in the region of three 64×64 blocks preceding the 64×64 block to which the current block belongs in the encoding / decoding order. By limiting the value of the block vector in this way, the memory consumption and device complexity of the implementation according to the IBC mode may be reduced.
[0253] In the following, reference will be made to Figures 8 to 35 An image encoding / decoding method according to an embodiment of the present invention is described.
[0254] The embodiments described below relate to a method for determining a reference block of a current block, and an image may be encoded / decoded according to a combination of at least one of the following embodiments. According to the following embodiments of the present invention, a reference block of a current block may be effectively determined in an image encoding / decoding process, thereby improving the encoding efficiency of an image encoder.
[0255] In this specification, a block may represent a unit. In addition, a candidate list represents a candidate set and may include at least one candidate.
[0256] According to an embodiment of the present invention, the determination of the reference block of the current block can be performed in at least one of the image encoding / decoding processes including inter-frame prediction, intra-frame prediction, transformation, inverse transformation, quantization, dequantization, entropy encoding / entropy decoding and / or in-loop filtering.
[0257] In this specification, an IBC motion vector may have the same meaning as an IBC block vector.
[0258] In addition, in this specification, the IBC motion vector candidate list may have the same meaning as the IBC block vector prediction candidate list.
[0259] In addition, in the present specification, an IBC block vector prediction candidate list and / or an IBC merge candidate list may have the same meaning as an IBC block vector candidate list.
[0260] Image encoding / decoding according to the present invention may be performed by a step of including a neighboring block in a candidate list and / or a step of determining a reference block of a current block from the candidate list.
[0261] The reference block of the current block may be determined from a candidate list including neighboring blocks or block information of neighboring blocks. The current block may be encoded / decoded using the determined reference block in at least one of inter-frame prediction, intra-frame prediction, transform, inverse transform, quantization, inverse quantization, entropy encoding / decoding, or an in-loop filter as an image encoding / decoding process.
[0262] The reference block may represent at least one of the block information of the reference block. That is, the determined block information of the reference block may be used for the current block to perform at least one of the image encoding / decoding processes. At this time, the block information of the reference block may be determined as the block information of the current block. Therefore, the reference block described below may represent at least one of the block information of the reference block.
[0263] At this time, at least one of the neighboring blocks included in the candidate list and / or the information of the neighboring blocks included in the candidate list may represent the candidate.
[0264] In addition, at least one of the blocks included in the candidate list and / or the block information of the blocks included in the candidate list may represent the candidate.
[0265] That is, a block may represent a candidate as a block itself, or represent at least one candidate of information about a block. Therefore, in the following embodiments, a block and information about a block may be collectively referred to as a block.
[0266] The information about the block may mean at least one of information about a neighboring block, information about a reference block, or information about a current block.
[0267] In addition, the information about the block may include at least one of encoding parameters.
[0268] In addition, the information about the block may include at least one piece of information used in inter prediction, intra prediction, transformation, inverse transformation, quantization, inverse quantization, entropy encoding / decoding, or an in-loop filter.
[0269] That is, the information about the block may represent at least one of the following items: block size, block depth, block partition information, block form (square or rectangular), whether partitioning is performed in the form of a quadtree, whether partitioning is performed in the form of a binary tree, a partition direction of the binary tree (horizontal or vertical direction), a partition form of the binary tree (symmetric or asymmetric partitioning), a prediction mode (e.g., an intra-frame prediction mode or an inter-frame prediction mode), an intra-frame luminance prediction mode / direction, an intra-frame chrominance prediction mode / direction, an intra-frame partition information, an inter-frame partition information, a coding block partition flag, a prediction block partition flag, a transform block partition flag, a reference sample filter tap, a reference sample filter coefficient, a prediction block filter tap, a prediction block filter coefficient, a prediction block boundary filter tap, a prediction block boundary filter coefficient, a motion vector (e.g., Such as, motion vector of at least one of L0, L1, L2, L3, etc.), motion vector difference (for example, motion vector difference of at least one of L0, L1, L2, L3, etc.), inter-frame prediction direction (inter-frame prediction direction of at least one of unidirectional prediction or bidirectional prediction), reference image index (for example, reference image index of at least one of L0, L1, L2, L3, etc.), inter-frame prediction indicator, prediction list utilization flag, reference image list, motion vector prediction index, motion vector prediction candidate, motion vector candidate list, whether to use merge mode, merge index, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, representation accuracy of motion vector (representation unit of motion vector,For example, integer samples, 1 / 2 samples, 1 / 4 samples, 1 / 8 samples, 1 / 16 samples, 1 / 32 samples, etc.), IBC motion vector, IBC motion vector difference, IBC motion vector index, IBC motion vector prediction candidate, IBC motion vector candidate list, IBC merge candidate list, weight of each block when generating two prediction blocks, transform type, transform size, information on whether to use primary transform, information on whether to use secondary transform, primary transform index, secondary transform index, information on whether there is a residual signal, coding block style, coding block flag, quantization parameter, residual quantization parameter, quantization matrix, Whether to apply intra-loop filter, intra-loop filter coefficients, intra-loop filter taps, intra-loop filter shape / form, whether to apply deblocking filter, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether to apply adaptive sample offset, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether to apply adaptive loop filter, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape / form, binarization / inverse binarization method, context model determination method, context model update method, whether Execute normal mode, whether to execute bypass mode, context binary bit, bypass binary bit, significant coefficient flag, last significant coefficient flag, coding flag for unit of coefficient group, position of last significant coefficient, flag on whether the value of coefficient is greater than 1, flag on whether the value of coefficient is greater than 2, flag on whether the value of coefficient is greater than 3, information on remaining coefficient values, sign information, reconstructed luminance sample, reconstructed chrominance sample, residual luminance sample, residual chrominance sample, luminance transform coefficient, chrominance transform coefficient, quantized luminance level, quantized chrominance level, transform coefficient level scanning method, motion vector search at decoder side the size of the motion vector search area, the shape of the motion vector search area at the decoder side, the number of motion vector searches at the decoder side, information about the CTU size, information about the minimum block size, information about the maximum block size, information about the maximum block depth, information about the minimum block depth, slice identification information, slice partition information, tile block identification information, tile block type, tile block partition information, tile block group identification information, tile block group type, tile block group partition information, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients or bit depth of quantization level, or a combination thereof.
[0270] According to an embodiment of the present invention, neighboring blocks may be included in a candidate list.
[0271] At least one or up to V neighboring blocks spatially / temporally adjacent to the current block may be included in the candidate list of the current block.
[0272] In addition, at least one or up to V pieces of block information of neighboring blocks spatially / temporally adjacent to the current block may be included in the candidate list of the current block.
[0273] At this time, V may be a positive integer including 0. In addition, V may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, V may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0274] When the neighboring block and the current block are included in the same image (picture), a sub-picture in the same image, a strip in the same image, a parallel block in the same image, a partition in the same image, a CTU in the same image, etc., the neighboring block at this time can be referred to as a neighboring block that is spatially adjacent to the current block.
[0275] In addition, when the neighboring block and the current block are included in a different image, a sub-picture in a different image, a slice in a different image, a parallel block in a different image, a partition in a different image, a CTU in a different image, etc., the neighboring block may be referred to as a neighboring block that is temporally adjacent to the current block.
[0276] Hereinafter, a method of adding a spatial or temporal neighboring block to a candidate list will be described in detail. The encoder / decoder may include a spatial or temporal neighboring block of a current block in a candidate list of the current block using at least one of the following methods or a combination thereof.
[0277] Figure 8 and Fig. 9 is a diagram illustrating a method of adding a neighboring block adjacent to a current block to a candidate list according to an embodiment of the present invention.
[0278] Up to V neighboring blocks adjacent to the current block may be included in the candidate list of the current block. Here, V may be a positive integer including 0. At this time, the neighboring block being adjacent to the current block may mean that at least one of the boundaries or vertices of the current block is in contact with or adjacent to at least one of the boundaries or vertices of the neighboring block.
[0279] Blocks located within the height of the current block based on an upper position of the current block may be referred to as neighboring blocks adjacent to the current block.
[0280] In addition, a block located within the width of the current block based on the left position of the current block may be referred to as a neighboring block adjacent to the current block.
[0281] The neighboring blocks may be included in the candidate list in order from a neighboring block adjacent to a boundary of the current block to a neighboring block adjacent to a vertex of the current block.
[0282] Alternatively, the neighboring blocks may be included in the candidate list in order from the neighboring blocks adjacent to the vertices of the current block to the neighboring blocks adjacent to the boundary of the current block.
[0283] The neighboring blocks may be included in the candidate list in order from a neighboring block adjacent to the left side of the current block to a neighboring block adjacent to the top of the current block.
[0284] Alternatively, the neighboring blocks may be included in the candidate list in order from a neighboring block adjacent to an upper side of the current block to a neighboring block adjacent to a left side of the current block.
[0285] Even when there is at least one block between the current block and the neighboring block, the neighboring block may be considered to be adjacent to the current block.
[0286] For example, refer to Fig. 9 , blocks E, F, H, I, K, L, N and R may also be adjacent to the current block X.
[0287] Figure 8 and 9 The gray blocks shown in may represent neighboring blocks that may be adjacent to the current block X and included in the candidate list.
[0288] For example, refer to Fig. 9 , blocks B, C, and D may represent blocks obtained by vertically partitioning one parent node into three partition trees.
[0289] In addition, blocks E, F, and G may represent blocks obtained by horizontally partitioning one parent node into three partition trees.
[0290] In addition, blocks P and Q may represent blocks obtained by partitioning one parent node into a horizontal binary tree.
[0291] In addition, blocks R and S may represent blocks obtained by partitioning one parent node into a vertical binary tree.
[0292] In addition, blocks H, I, J, and K and blocks L, M, N, and O may represent blocks obtained by partitioning one parent node into a quadtree.
[0293] The example of block partitioning is common to the other figures below.
[0294] At this time, Figure 8 In the example of , the candidate list of the current block X may be constructed to include at least one of the blocks {A, B, C, D, E} adjacent to the current block X.
[0295] In addition, Fig. 9 In the example of , the candidate list of the current block X can be constructed to include at least one of the blocks {A, B, C, D, G, J, M, O, P, Q, S} adjacent to the current block X.
[0296] Fig.10 and Fig.112 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of adjacency lengths of a current block and a neighboring block according to an embodiment of the present invention.
[0297] Depending on whether at least one of the neighboring blocks adjacent to the current block adjoins the current block, up to V neighboring blocks may be included in the candidate list of the current block.
[0298] For example, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein the V neighboring blocks have a contiguous length (width or height) of N or more with the current block.
[0299] At this time, N may represent a positive integer (such as 2, 4, 8, 16, etc.). In addition, N may be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, N may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0300] If there is no neighboring block having a contiguous length of N or more with the current block among neighboring blocks adjacent to the current block, the candidate list of the current block may be constructed using (NK) instead of N. At this time, K may represent a positive integer greater than 0.
[0301] That is, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a contiguous length of (NK) or more with the current block.
[0302] In addition, the neighboring blocks may be included in the candidate list in order from a neighboring block having a large contiguous length with the current block to a neighboring block having a small contiguous length with the current block.
[0303] Alternatively, the neighboring blocks may be included in the candidate list in order from a neighboring block having a small neighboring length with the current block to a neighboring block having a large neighboring length with the current block.
[0304] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has an adjacency length with the current block of N or more and M or less. Here, M and N may be expressed as positive integers of squares of 2 (such as 2, 4, 8, and 16).
[0305] Reference Fig.10 , Fig.10 The gray blocks shown in are adjacent to the current block X with a length of N or more, and thus may represent neighboring blocks that may be included in the candidate list.
[0306] For example, block X may represent a 32×32 block, block A may represent a 16×16 block, blocks B and D may represent a 4×16 block, block C may represent an 8×16 block, blocks E and G may represent a 16×4 block, block F may represent a 16×8 block, blocks H, I, J, K, L, M, N, and O may represent an 8×8 block, blocks P and Q may represent a 16×8 block, and blocks R and S may represent an 8×16 block. Such examples of block sizes may be common in the drawings.
[0307] At this time, for example, at least one of each neighboring block having an adjacency length of 8 or more with the current block X may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {C, G, M, O, P, Q}.
[0308] Reference Fig.11 , Fig.11 The gray blocks shown in are adjacent to the current block X with a length of N or more, and thus may represent neighboring blocks that may be included in the candidate list.
[0309] For example, each neighboring block having a contiguous length of 16 or more with the current block X may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include the block {G}.
[0310] Fig.12 and Fig.13 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of the size of the neighboring block according to an embodiment of the present invention.
[0311] According to the size of the neighboring blocks adjacent to the current block, up to V neighboring blocks may be included in the candidate list of the current block. At this time, the size of the block may represent at least one of the width, height or area of the block.
[0312] For example, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a size of M×N or more.
[0313] At this time, M may represent the width of the block, N may represent the height of the block, and M and N may be positive integers. In addition, M and N may be the same or different. In addition, at least one of M or N may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of M or N may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0314] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a size of M×N or less.
[0315] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a size of M×N or greater and P×Q or less. At this time, P may represent the width of the block, Q may represent the height of the block, and P and Q may be positive integers.
[0316] In addition, if at least one of a width or a height of a neighboring block is greater than at least one of M or N, the neighboring block may be included in the candidate list.
[0317] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has an area of M×N or more.
[0318] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has an area of M×N or less.
[0319] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has an area of M×N or more and P×Q or less.
[0320] The neighboring blocks may be included in the candidate list in order from a neighboring block having a large size to a neighboring block having a small size that is adjacent to the current block.
[0321] Alternatively, the neighboring blocks may be included in the candidate list in order from a neighboring block having a small size to a neighboring block having a large size adjacent to the current block.
[0322] In addition, if a size of a neighboring block adjacent to the current block is greater than or equal to the size of the current block, the neighboring block may be included in the candidate list.
[0323] Alternatively, if a size of a neighboring block adjacent to the current block is smaller than or equal to the size of the current block, the neighboring block may be included in the candidate list.
[0324] Reference Fig.12 , Fig.12 The gray blocks shown in have a size greater than or equal to M×N and thus may represent neighboring blocks that may be included in the candidate list.
[0325] For example, if the size of the neighboring block is 16×8 or 8×16, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {A, C, P, Q, S}.
[0326] Reference Fig.13 , Fig.13 The gray blocks shown in have a size greater than or equal to M×N and thus may represent neighboring blocks that may be included in the candidate list.
[0327] For example, if the area of the neighboring block is 16×8 (=128) or 8×16 (=128), the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {A, C, F, P, Q, R, S}.
[0328] Fig.14 and Fig.15 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of depths of the neighboring blocks according to an embodiment of the present invention.
[0329] According to the depth of the neighboring blocks adjacent to the current block, up to V neighboring blocks may be included in the candidate list of the current block.
[0330] For example, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a depth of K or more.
[0331] At this time, K may be a positive integer including 0. In addition, K may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, K may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0332] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a depth of K or less.
[0333] In addition, up to V neighboring blocks among neighboring blocks adjacent to the current block may be included in the candidate list of the current block, wherein each of the V neighboring blocks has a depth of K or greater and L or less. At this time, L may be a positive integer including 0.
[0334] The neighboring blocks may be included in the candidate list in order from a neighboring block having a large depth adjacent to the current block to a neighboring block having a small depth adjacent to the current block.
[0335] Alternatively, the neighboring blocks may be included in the candidate list in order from a neighboring block having a small depth adjacent to the current block to a neighboring block having a large depth adjacent to the current block.
[0336] In addition, if the depth of the neighboring block is greater than or equal to the depth of the current block, the neighboring block may be included in the candidate list.
[0337] In addition, if the depth of the neighboring block is less than or equal to the depth of the current block, the neighboring block may be included in the candidate list.
[0338] Reference Fig.14 , Fig.14 The gray blocks shown in have a depth greater than or equal to K and thus may represent neighboring blocks that may be included in the candidate list.
[0339] For example, current block X may have depth 1, block A may have depth 2, and blocks B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, and S may have depth 3. Examples of such block depths may be common in the following figures.
[0340] At this time, for example, if the depth of the neighboring block is greater than or equal to 3, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {B, C, D, E, F, G, J, K, M, O, P, Q, S}.
[0341] Reference Fig.15 , Fig.15 The gray blocks shown in have a depth less than or equal to K and thus may represent neighboring blocks that may be included in the candidate list.
[0342] For example, if the depth of the neighboring block is less than or equal to 2, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include the block {A}.
[0343] Fig.16 and Fig.17 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of a partition form of the neighboring block according to an embodiment of the present invention.
[0344] According to the partition form of the neighboring blocks adjacent to the current block, up to V neighboring blocks may be included in the candidate list of the current block.
[0345] Whether any of the partition forms of the neighboring blocks is included in the candidate list can be determined by at least one of the encoding parameters of the current block or the neighboring block or the encoding parameters of the candidate. In addition, this can be determined according to a method predetermined in the encoder and the decoder, or can be determined by a value sent by a signal from the encoder to the decoder.
[0346] For example, at least one of blocks partitioned into a quadtree among neighboring blocks adjacent to the current block may be included in the candidate list.
[0347] In addition, at least one of the blocks partitioned into a binary tree among neighboring blocks adjacent to the current block may be included in the candidate list.
[0348] In addition, at least one of blocks partitioned into a ternary tree among neighboring blocks adjacent to the current block may be included in the candidate list.
[0349] At this time, the binary tree partition may include not only symmetric binary trees in which binary tree nodes have the same size, but also asymmetric trees in which binary tree nodes have different sizes.
[0350] In addition, the ternary tree partition may include not only a symmetric ternary tree (in which the upper block and the lower block and the left block and the right block and the middle block therebetween as the ternary tree nodes have the same size), but also an asymmetric ternary tree (in which the upper block and the lower block and the left block and the right block and the middle block therebetween as the ternary tree nodes have different sizes).
[0351] The neighboring blocks may be included in the candidate list in the order of neighboring blocks partitioned into a quadtree, neighboring blocks partitioned into a binary tree, and neighboring blocks partitioned into a ternary tree, which are adjacent to the current block.
[0352] Alternatively, the neighboring blocks may be included in the candidate list in the order of a neighboring block partitioned into a ternary tree, a neighboring block partitioned into a binary tree, and a neighboring block partitioned into a quadtree, which are adjacent to the current block.
[0353] In addition, if the partition form of the neighboring block is equal to the partition form of the current block, the neighboring block may be included in the candidate list.
[0354] In addition, if a partition form of a neighboring block is different from that of a current block, the neighboring block may be included in the candidate list.
[0355] Reference Fig.16 , Fig.16 The gray blocks shown in are neighboring blocks partitioned into a ternary tree, and thus the neighboring blocks may be included in the candidate list.
[0356] For example, blocks X, A, H, I, J, K, L, M, N, and O may have a quadtree partition format, blocks B, C, D, E, F, and G may have a ternary tree partition format, and blocks P, Q, R, and S may have a binary tree partition format. Examples of such block partition formats may be commonly used in the following figures.
[0357] At this time, for example, if the partition form of the neighboring block is a ternary tree partition form, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {B, C, D, E, F, G}.
[0358] Reference Fig.17 , Fig.17 The gray block shown in is a neighboring block having the same partition form as the current block, and thus the neighboring block may be included in the candidate list.
[0359] For example, if the partition form of the neighboring block is a quadtree partition form, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {A, J, K, M, O}.
[0360] Fig.18 and Fig.19 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of a block form of the neighboring block according to an embodiment of the present invention.
[0361] According to block forms of neighboring blocks adjacent to the current block, up to V neighboring blocks may be included in the candidate list of the current block.
[0362] For example, among neighboring blocks adjacent to the current block, at least one of blocks having a square form may be included in the candidate list.
[0363] In addition, at least one of blocks having a non-square (rectangular) form among neighboring blocks adjacent to the current block may be included in the candidate list.
[0364] In addition, the neighboring blocks may be included in the candidate list in the order of a neighboring block having a square form and a neighboring block having a rectangular form adjacent to the current block.
[0365] Alternatively, the neighboring blocks may be included in the candidate list in the order of a neighboring block having a rectangular form and a neighboring block having a square form adjacent to the current block.
[0366] In addition, if a block form of the neighboring block is equal to a block form of the current block, the neighboring block may be included in the candidate list.
[0367] Alternatively, if a block form of the neighboring block is different from that of the current block, the neighboring block may be included in the candidate list.
[0368] Reference Fig.18 , Fig.18 The gray blocks shown in are neighboring blocks having a different block form from the current block, and thus the neighboring blocks may be included in the candidate list.
[0369] For example, if the block form of the neighboring block is a rectangular form, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {B, C, D, G, P, Q, S}.
[0370] Reference Fig.19 , Fig.19 The gray block shown in is a neighboring block having the same block form as the current block, and thus the neighboring block may be included in the candidate list.
[0371] For example, if the block form of the neighboring block is a square form, the neighboring block may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {A, J, K, M, O}.
[0372] According to an embodiment of the present invention, if at least one of the boundaries or vertices of the current block is adjacent to at least one of the boundaries or vertices of the neighboring block, the neighboring block may be included in the candidate list using a relative length of the boundaries of the neighboring block having the adjacent boundaries or vertices, a relative size of the neighboring block, or a relative depth of the neighboring block.
[0373] For example, according to the relative lengths of neighboring blocks having adjoining boundaries, the relative sizes of neighboring blocks, or the relative depths of neighboring blocks, up to V neighboring blocks may be included in the candidate list of the current block.
[0374] At this time, if there are neighboring blocks having a boundary length of M and neighboring blocks having an adjoining boundary length of N, a specific neighboring block may be included in the candidate list by comparing N with M.
[0375] For example, if there are a neighboring block having a boundary length of 8 and a neighboring block having an adjacent boundary length of 4, only the neighboring block having a larger boundary length (ie, the neighboring block having a boundary length of 8) may be included in the candidate list.
[0376] As another example, if there are neighboring blocks having a boundary length of 4 and neighboring blocks having an adjacent boundary length of 16, only the neighboring block having a smaller boundary length (ie, the neighboring block having a boundary length of 4) may be included in the candidate list.
[0377] In addition, if there are neighboring blocks with a block size of M×N and neighboring blocks with a block size of P×Q, a specific neighboring block may be included in the candidate list by comparing the sizes of the neighboring blocks. At this time, M and N and P and Q may be the same positive integer or different positive integers.
[0378] For example, if there are a neighboring block having a block size of 8×8 and a neighboring block having a block size of 16×16, the neighboring block having a larger block size (ie, the neighboring block having a block size of 16×16) may be included in the candidate list.
[0379] In addition, if there are neighboring blocks having a block depth of N and neighboring blocks having a block depth of M, a specific neighboring block may be included in the candidate list by comparing N and M.
[0380] For example, if there are a neighboring block having a block depth of 0 and a neighboring block having a block depth of 2, the neighboring block having a smaller block depth (ie, the neighboring block having a block depth of 0) may be included in the candidate list.
[0381] Fig. 202 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of an encoding / decoding order of the neighboring blocks according to an embodiment of the present invention.
[0382] According to the encoding / decoding order of neighboring blocks adjacent to the current block, up to V neighboring blocks may be included in the candidate list of the current block.
[0383] At this time, the encoding / decoding order may be at least one of horizontal priority order, vertical priority order, Z order, zigzag order, upper right diagonal order, lower left diagonal order, raster order, depth priority order, or size priority order.
[0384] Reference Fig. 20 , Fig. 20 The gray blocks shown in indicate neighboring blocks that may be included in the candidate list according to the encoding / decoding order of the neighboring blocks.
[0385] For example, if the encoding / decoding order of the neighboring blocks is A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, and S, up to Z neighboring blocks may be included in the candidate list in order. That is, Fig. 20 The example of shows the case where Z = 4. At this time, the candidate list of the current block X may be constructed to include at least one of the blocks {A, B, C, D}.
[0386] Fig.21 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of positions of neighboring blocks located at a certain distance from a position of a current block according to an embodiment of the present invention.
[0387] Up to V neighboring blocks located at a specific distance from the position of the current block may be included in the candidate list of the current block. That is, even if there are multiple blocks between the current block and the neighboring block, up to V neighboring blocks may be included in the candidate list of the current block according to specific conditions.
[0388] At this time, the value V may be determined based on at least one of the encoding parameter of the current block and the encoding parameter of the candidate. In addition, V may be predetermined in the encoder and the decoder, or may be signaled from the encoder to the decoder.
[0389] A block located at a distance of -K×M or +K×M in the horizontal direction or at a distance of -L×N or +L×N in the vertical direction from a specific position of the current block may be determined as a neighboring block, and the neighboring block may be included in the candidate list. That is, a block located at a distance obtained by adding at least one of a sampling position of -K×M or +K×M in the horizontal direction and a sampling position of -L×N or +L×N in the vertical direction to at least one specific position of the current block may be determined as a neighboring block, and the neighboring block may be included in the candidate list.
[0390] In addition, at least one of the blocks included in the specific area based on the current block in the neighboring blocks located at the above position may be included in the candidate list of the current block. At this time, the specific area may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder with a signal.
[0391] That is, M and N may represent a relative distance from a specific location of the current block. Here, the specific position in the current block may be at least one of the following positions for the block: a (0, 0) position, a (width -1, 0) position, a (width, 0) position, a (0, height -1) position, a (0, height) position, a (-1, -1) position, a (-1, 0) position, a (0, -1) position, a (width -1, -1) position, a (width, -1) position, a (-1, height -1) position, a (-1, height) position, a (width / 2 -1, 0) position, a (width / 2, 0) position, a (width / 2 +1, 0) position, a (0, height / 2 -1) position, a (0, height / 2) position, a (0, height / 2 +1) position, a (width / 2 -1, -1) position, a (width / 2, -1) position, a (width / 2 +1, -1) position, a (-1, height / 2 -1) position, a (-1, height / 2) position, or a (-1, height / 2 +1) position.
[0392] Here, M may represent a horizontal distance in units of samples, and N may represent a vertical distance in units of samples. M and N may be positive integers. In addition, M and N may be the same value or different values. In addition, at least one of M or N may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of M or N may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0393] Here, the absolute value of M and the absolute value of N may have a maximum value of MaxM and a maximum value of MaxN, respectively. In addition, the absolute value of M and the absolute value of N may be determined to be less than or equal to K or L times the size of the CTU.
[0394] Here, at least one of MaxM or MaxN may be a positive integer. In addition, at least one of MaxM or MaxN may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of MaxM or MaxN may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0395] Here, at least one of K or L may be a positive integer including 0. In addition, at least one of K or L may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of K or L may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0396] If a block located at least one of a distance of -K×M or +K×M in the horizontal direction or a distance of -L×N or +L×N in the vertical direction is located at a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column or spans at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column, the neighboring block at the corresponding position may not be included in the candidate list.
[0397] In addition, if there is no at least one of the neighboring blocks immediately adjacent to the current block, at least one of the neighboring blocks located at a certain distance from the position of the current block may be included in the candidate list.
[0398] In addition, when a neighboring block located at a specific distance from the position of the current block is included in the candidate list, a neighboring block located in a specific scanning order may be included in the candidate list. At this time, the specific scanning order may be at least one of a horizontal priority order, a vertical priority order, a Z-order order, a zigzag order, an upper right diagonal order, a lower left diagonal order, a raster order, a depth priority order, or a size priority order. In addition, at least one of the neighboring blocks may be included in the candidate list in the order of a small distance between the current block and a block located at a specific distance therefrom.
[0399] Reference Fig.21 , Fig.21 The gray blocks shown in may represent neighboring blocks that are located at a certain distance from the location of the current block and may be included in the candidate list.
[0400] in addition, Fig.21 The portion indicated by the slashes in may represent at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column.
[0401] As in Fig.21In the example of , when the current block X has a size of 16×16 and M and N are 16, at least one of the neighboring blocks that do not cross at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column may be included in the candidate list. That is, the candidate list of the current block X may be constructed to include at least one of the blocks {A0, A1, A3, A6, A7, A8, B0, B1, C0, C1, D0, D1, D3, D4, D5, D6, E0, E1, E2, F0, F1, F2, G0, G1, G2, G3, G4, G5}. Therefore, at least one of the neighboring blocks located at a relative position from the position of the current block may be included in the candidate list of the current block.
[0402] In order to reduce the size of the line buffer, if a block located at least one of a distance of -K×M or +K×M in the horizontal direction or a distance of -L×N or +L×N in the vertical direction is located at a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column or crosses at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column, then the block crossing at least one of the pictures, sub-pictures, slices, tile blocks, partitions, CTU boundaries, CTU rows, or CTU columns may not be included in the candidate list, and the block located at the boundary of at least one of the pictures, sub-pictures, slices, tile blocks, partitions, CTU boundaries, CTU rows, or CTU columns may not be included in the candidate list.
[0403] In addition, information about a block located at a specific position among neighboring blocks located at a specific distance from the position of the current block may be determined as information about a representative block of the neighboring blocks, and the corresponding block may be included in the candidate list.
[0404] For example, the specific position may be at least one of an upper left position, a lower left position, an upper right position, a lower right position, a middle position, an upper left position adjacent to the middle position, a lower left position adjacent to the middle position, an upper right position adjacent to the middle position, or a lower right position adjacent to the middle position.
[0405] That the specific block is located at the boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column may mean that the specific block belongs to a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column other than the picture, sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column to which the current block belongs, and is located at the boundary of at least one of the picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column. That is, this may mean that the specific block is located above and / or on the left side of the current block within at least one of the picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column.
[0406] A specific block that crosses the boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column may mean that the specific block belongs to a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column other than the picture, sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column to which the current block belongs, and is located at at least one of the picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column. That is, this may mean that the specific block is located above and / or on the left side of the current block within at least one of the picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column.
[0407] Fig. 22 2 is a diagram illustrating a method of adding a neighboring block to a candidate list in consideration of the position of a neighboring block located at a specific distance from at least one of a current picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column according to an embodiment of the present invention.
[0408] Up to V neighboring blocks located at a specific distance from at least one of the current picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, or CTU column may be included in the candidate list of the current block. That is, even if there are multiple blocks between the current block and the neighboring block, up to V neighboring blocks may be included in the candidate list of the current block.
[0409] A block located at least one of a distance of K×M in the horizontal direction and a distance of L×N in the vertical direction from a specific position of at least one of a current picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column may be determined as a neighboring block of the current block and may be included in the candidate list.
[0410] That is, a block located at a position obtained by adding at least one of a distance of K×M in a horizontal direction and a distance of L×N in a vertical direction to at least one of a current picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column may be determined as a neighboring block and may be included in the candidate list.
[0411] In addition, at least one of the neighboring blocks located at the above-mentioned position and included in the specific area based on the current block may be included in the candidate list. At this time, the specific area may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder with a signal.
[0412] That is, M and N may represent an absolute distance from a specific position of at least one of a current picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column. Here, the specific position of at least one of the current picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column may be defined as a (0, 0) position based on at least one of the current picture, the sub-picture, the slice, the tile, the partition, the CTU boundary, the CTU row, or the CTU column.
[0413] Here, M may represent a distance in the horizontal direction in units of samples, N may represent a distance in the vertical direction in units of samples, and M and N may be positive integers that are squares of 2 (such as 2, 4, 8, 16, and 32). For example, M and N may be the same value or different values. In addition, at least one of M or N may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of M or N may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0414] Here, at least one of K or L may be a positive integer including 0. In addition, at least one of K or L may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, at least one of K or L may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0415] In addition, if there is no at least one of the neighboring blocks immediately adjacent to the current block, a neighboring block located at a specific distance from a specific position of at least one of the current picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, or CTU column may be included in the candidate list.
[0416] In addition, when a neighboring block located at a specific distance from a specific position of at least one of the current picture, sub-picture, strip, tile, partition, CTU boundary, CTU row or CTU column is included in the candidate list, the neighboring block located in a specific scanning order may be included in the candidate list. At this time, the specific scanning order may be at least one of a horizontal priority order, a vertical priority order, a Z-order order, a zigzag order, an upper right diagonal order, a lower left diagonal order, a raster order, a depth priority order or a size priority order. In addition, at least one of the neighboring blocks may be included in the candidate list in the order of the smallest distance between the current block and the neighboring block.
[0417] Reference Fig. 22 , Fig. 22 The gray blocks shown in may represent neighboring blocks that are located at a certain distance from the location of the current picture and may be included in the candidate list.
[0418] As in Fig. 22 In an example of , when a specific position of a current picture is a (0, 0) position, a current block X has a size of 16×16, K and L are positive integers including 0, and M and N are 16, a neighboring block corresponding to a (K×M, L×N) position from the (0, 0) position of the current position may be included in the candidate list, and the candidate list of the current block X may be constructed to include at least one of blocks {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}. At this time, the value K of the x coordinate and the value L of the y coordinate in (K×M, L×N) may have the same value or different values.
[0419] Thus, at least one of the neighboring blocks located at an absolute position from the current picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, or CTU column may be included in the candidate list of the current block.
[0420] According to an embodiment of the present invention, according to a coding parameter relationship between a current block and neighboring blocks adjacent thereto, up to V neighboring blocks may be included in a candidate list of the current block.
[0421] For example, if at least one of the encoding parameters of the current block is the same as at least one of the encoding parameters of the neighboring blocks, up to V neighboring blocks may be included in the candidate list of the current block.
[0422] For example, if the prediction modes are the same, if the intra luma prediction mode / direction is the same, if the intra chroma prediction mode / direction is the same, if the motion vectors are the same, if the motion vector differences are the same, if the reference image lists are the same, if the reference image indexes are the same, if the reference images are the same, if the inter prediction directions (inter prediction indicators or prediction list utilization flags) are the same, if the use of merge modes is the same, if the use of skip modes is the same, if the motion vector prediction indexes are the same, if the merge indexes are the same, if the motion vector representation accuracy is the same, if the transform types are the same, if the transform sizes are the same, if the use of primary transforms is the same, if the use of secondary transforms is the same, if primary transform indexes are the same, if secondary transform indexes are the same, if residual signal presence / absence information is the same, if the coding block modes are the same, or if the quantization parameters are the same, the neighboring blocks may be included in the candidate list.
[0423] As another example, if at least one of the encoding parameters of the current block is similar to at least one of the encoding parameters of the neighboring blocks, up to V neighboring blocks may be included in the candidate list of the current block.
[0424] For example, if the difference between the intra-frame brightness prediction mode / direction and the intra-frame brightness prediction mode / direction of the neighboring block is equal to or less than the value T, or if the difference between the motion vector of the current block and the motion vector of the neighboring block is equal to or less than the value T, if the difference between the motion vector difference of the current block and the motion vector difference of the neighboring block is equal to or less than the value T, or if the difference between the reference image index of the current block and the reference image index of the neighboring block is equal to or less than the value T, the neighboring block may be included in the candidate list. Here, T may represent a real number.
[0425] For example, if the reference image lists are different but the reference images are the same, or if the reference image indexes are different but the reference images are the same, the neighboring blocks may be included in the candidate list.
[0426] According to an embodiment of the present invention, the encoder / decoder may entropy encode / decode encoding parameter identifiers of neighboring blocks to be included in the candidate list, and include the neighboring blocks in the candidate list based on similarity between encoding parameters.
[0427] For example, the encoder may entropy encode the coding parameter identifiers of the neighboring blocks to be included in the candidate list, and include in the candidate list neighboring blocks having the same value as the coding parameter, neighboring blocks having a value greater than the coding parameter, or neighboring blocks having a value smaller than the coding parameter.
[0428] In addition, the decoder may entropy decode the coding parameter identifiers of the neighboring blocks to be included in the candidate list, and include in the candidate list neighboring blocks having the same value as the coding parameter, neighboring blocks having a value greater than the coding parameter, or neighboring blocks having a value smaller than the coding parameter.
[0429] According to an embodiment of the present invention, a block having the same spatial position as the current block (co-located with the current block) in the reference image may be included in the candidate list of the current block as a neighboring block. At this time, the block temporally adjacent to the current block may represent a block co-located with the current block in the reference image or a block having a spatial position corresponding to the spatial position of the current block in the reference image.
[0430] For example, at least one of the neighboring blocks of the reference image belonging to the current image in the image other than the image belonging to the current block may be included in the candidate list. At least one of the neighboring blocks belonging to the reference image may be referred to as a temporally adjacent neighboring block.
[0431] At this time, the neighboring block may refer to a block in the reference image that has the same spatial position as the current block (co-located with the current block), or a block in the reference image that is adjacent to the block that has the same spatial position as the current block.
[0432] According to an embodiment of the present invention, a reference block of a current block may be determined from a candidate list.
[0433] Before a reference block to be used for encoding / decoding of a current block among neighboring blocks included in the candidate list, the candidate list may be changed using at least one of the following methods or at least one combination thereof. If at least one combination of the following methods is used, the following methods may be performed in a specific order to change the candidate list.
[0434] Hereinafter, the neighboring blocks included in the candidate list may be referred to as candidates, and the block information of the neighboring blocks included in the candidate list may be referred to as candidates. In addition, the blocks included in the candidate list may be referred to as candidates, and the block information of the blocks included in the candidate list may be referred to as candidates.
[0435] The candidates in the candidate list may be sorted in a predetermined order. At this time, the sorting in the predetermined order may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidates.
[0436] For example, the order in the predetermined order may be determined in the order of increasing at least one of the encoding parameters of the current block or the encoding parameters of the candidates. In addition, the order in the predetermined order may be determined in the order of decreasing at least one of the encoding parameters of the current block or the encoding parameters of the candidates.
[0437] The encoder may sort the candidates in the candidate list in order of high probability of the candidates in the candidate list being determined as the reference block, and assign candidate indexes having short codeword lengths to candidates having high probability of being determined as the reference block.
[0438] The encoder / decoder may limit the size of the candidate list to up to U. Here, U may be a positive integer including 0. In addition, U may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, U may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0439] For example, if there are more than U candidates in the candidate list, the candidates other than the U candidates may be excluded from the candidate list. At this time, the excluded candidates may be determined by a ranking method in the candidate list.
[0440] The encoder / decoder may remove up to U candidates in the candidate list from the candidate list. Here, U may be a positive integer including 0. In addition, U may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, U may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0441] If there are at least two candidates that are repeated with each other in the candidate list, at least one of the candidates that are repeated with each other may be removed from the candidate list. At this time, among the candidates that are repeated with each other, the candidate with a higher ranking in the candidate list may be retained in the candidate list, and the candidate with a lower ranking may be removed from the candidate list. Here, if at least one of the encoding parameters of the candidates is repeated, the candidates may be candidates that are repeated with each other.
[0442] For example, an inverse method of the method of at least one of the embodiments or at least one combination thereof using the neighboring blocks being included in the candidate list may be used to determine whether the candidate in the candidate list is removed.
[0443] The encoder / decoder may add up to U candidates to the candidate list. Here, U may be a positive integer including 0. In addition, U may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, U may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0444] Candidates can be added to the list until the maximum number of candidates in the candidate list is reached. At this point, candidates that duplicate each other can be added.
[0445] When the encoder / decoder adds the candidate to the candidate list, at least one of the embodiments in which the neighboring block is included in the candidate list or at least one combination thereof may be used.
[0446] In addition, if the candidate to be added to the candidate list overlaps with a candidate in the candidate list, the candidate to be added may not be added to the candidate list.
[0447] The encoder / decoder may determine up to W neighboring blocks (candidates) included in the candidate list as reference blocks for the current block. In addition, the encoder or decoder may determine up to W block information (candidates) of the neighboring blocks included in the candidate list as information about the reference block of the current block.
[0448] Here, W may be a positive integer including 0. In addition, W may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, W may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0449] For example, if the current block is predicted by partitioning the current block into sub-blocks, the encoder / decoder may determine W candidates in the candidate list as information about the reference block of the current block in order to encode / decode the current block. For example, W may be 2.
[0450] At this time, a prediction mode in which prediction is performed by partitioning a current block into two sub-blocks may be referred to as a geometric partition mode (GPM).
[0451] If the size of the current block is equal to or greater than M×N, the current block may be encoded / decoded according to GPM. In addition, GPM may be an example of a merge mode. That is, in the above example, the candidate list for performing encoding / decoding may represent a merge candidate list. Whether the current block is encoded / decoded according to GPM may be signaled at the coding unit level. Here, M and N may be positive integers. In addition, M and N may be the same value or different values, and for example, M and N may be 8.
[0452] If the current block is encoded / decoded according to the GPM, the current block may be partitioned into two sub-blocks. At this time, information about the partition direction for partitioning the current block into the two sub-blocks may be encoded / decoded. In order to encode / decode the two partitioned sub-blocks, a neighboring block for encoding / decoding each region may be selected from a candidate list.
[0453] In order to derive motion information of each sub-block, the index of each sub-block may be encoded / decoded. For example, if the current block is partitioned into a first region and a second region, a first index for encoding / decoding of the first region and a second index for encoding / decoding of the second region may be encoded / decoded. Here, when two pieces of information are determined to be information about a reference block of the current block, the information indicated by the first index may be information about the first reference block of the current block, and the information indicated by the second index may be information about the second reference block of the current block.
[0454] The encoder / decoder may select a first neighboring block and a second neighboring block from the candidate list of the current block using the first index and the second index. At this time, the first region and the second region may share a candidate list derived based on the current block before partitioning. The encoder or decoder may encode / decode the first region using information about the selected first neighboring block, and encode / decode the second region using information about the selected second neighboring block.
[0455] If the current block is encoded / decoded according to GPM, the first neighboring block and the second neighboring block can be determined from a single candidate list by the first index and the second index of the current block. The encoder / decoder may derive a first prediction block for the current block using information about the first neighboring block, and derive a second prediction block for the current block using information about the second neighboring block.
[0456] The encoder / decoder can generate a final prediction block of the current block by weighted summing the first prediction block and the second prediction block. At this time, the weighted summation of the prediction blocks can be performed by giving a weight to the first area of the first prediction block and giving a weight to the second area of the second prediction block.
[0457] The first neighboring block may represent the first reference block of the current block, and the second neighboring block may represent the second reference block of the current block. In addition, the information about the first neighboring block may represent the information about the first reference block of the current block, and the information about the second neighboring block may represent the information about the second reference block of the current block.
[0458] The encoder / decoder may use at least one of the determined reference blocks to perform encoding / decoding of the current block. In addition, the encoder or decoder may use at least one block information of block information of at least one reference block in the determined reference blocks to perform encoding / decoding of the current block.
[0459] In addition, at least one of the determined block information of the reference block may be determined as at least one of the block information of the current block. In addition, at least one of the determined block information of the reference block may be determined as at least one of the block information of the current block.
[0460] Hereinafter, a method of determining a specific neighboring block in a candidate list as a reference block at an encoder / decoder will be described. The encoder or decoder may determine a reference block in a candidate list using at least one of the following methods or at least one combination thereof.
[0461] For example, the encoder / decoder may determine the Yth candidate in the candidate list as the reference block. Here, Y may be a positive integer including 0. In addition, Y may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, Y may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0462] At this time, since the Yth candidate in the candidate list can be identified in the encoder / decoder, the candidate index for determining the reference block may not be entropy encoded / decoded. For the Yth candidate, an embodiment related to the sorting in the candidate list may be used to determine the order of the candidates in the candidate list.
[0463] According to an embodiment of the present invention, the encoder / decoder may reduce or reduce the candidate list so that up to Y candidates are retained in the candidate list, and the Y candidates are determined as reference blocks. Here, Y may be a positive integer including 0. In addition, Y may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, Y may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0464] For example, the encoder / decoder may determine Y candidates as reference blocks by retaining only Y candidates having the highest probability of being selected as reference blocks among the candidates in the candidate list.
[0465] At this time, since Y candidates in the candidate list can be identified in the encoder / decoder, the candidate index used to determine the reference block may not be entropy encoded / decoded.
[0466] For example, the candidate list may be reduced or decreased using an inverse method of the method of at least one of the embodiments or at least one combination thereof using neighboring blocks included in the candidate list.
[0467] As another example, the encoder or decoder may determine the reference block by entropy encoding / decoding a candidate index indicating a specific candidate in the candidate list. Here, the candidate index may be a value to which the position, order, etc. of the candidate in the candidate list is mapped. The encoder or decoder may encode / decode the current block using the determined reference block (or at least one of the block information of the reference block).
[0468] That is, the encoder may encode the current block using the determined reference block (or at least one of the block information of the reference block) among the candidates in the candidate list, and entropy encode the candidate index of the reference block. At the same time, the decoder may entropy decode the candidate index of the reference block, and use the candidate indicated by the candidate index among the candidates in the candidate list as the reference block (or at least one of the block information of the reference block) to decode the current block.
[0469] For example, if the candidate list consists of {A, B, C, D, E, F}, the index of the candidate in the candidate list may be assigned {0, 1, 2, 3, 4, 5}. If the candidate index is 2, candidate C may be determined as the reference block. In addition, if the candidate index is 1, candidate B may be determined as the block information of the reference block.
[0470] The encoder / decoder may entropy encode / decode up to Y candidate indexes. If entropy encoding / decoding is performed on a plurality of candidate indexes, a plurality of reference blocks indicated by the plurality of candidate indexes may be used to encode / decode the current block.
[0471] Here, Y may be a positive integer including 0. In addition, Y may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, Y may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0472] That is, the encoder may encode the current block using the determined Y reference blocks among the candidates in the candidate list, and entropy encode the Y candidate indexes of the Y reference blocks. At the same time, the decoder may entropy decode the Y candidate indexes of the Y reference blocks, and use the candidates indicated by the Y candidate indexes among the candidates in the candidate list as Y reference blocks to decode the current block.
[0473] The encoder / decoder may entropy encode / decode up to Y candidate indexes. If a plurality of candidate indexes are entropy encoded / decoded, a plurality of reference blocks indicated by the plurality of candidate indexes may be used to encode / decode the current block.
[0474] Here, Y may be a positive integer including 0. In addition, Y may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, Y may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0475] That is, the encoder may encode the current block using the determined Y reference blocks among the candidates in the candidate list, and entropy encode the Y candidate indexes of the Y reference blocks. At the same time, the decoder may entropy decode the Y candidate indexes of the Y reference blocks, and use the candidates indicated by the Y candidate indexes among the candidates in the candidate list as Y reference blocks to decode the current block.
[0476] The encoder / decoder may entropy encode / decode up to Y candidate indexes. If entropy encoding / decoding is performed on a plurality of candidate indexes, a plurality of reference blocks indicated by the plurality of candidate indexes may be used to encode / decode the current block.
[0477] Here, Y may be a positive integer including 0. In addition, Y may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, Y may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0478] That is, the encoder may encode the current block using the determined Y reference blocks among the candidates in the candidate list, and entropy encode the Y candidate indexes of the Y reference blocks. At the same time, the decoder may entropy decode the Y candidate indexes of the Y reference blocks, and use the candidates indicated by the Y candidate indexes among the candidates in the candidate list as Y reference blocks to decode the current block.
[0479] Fig.23 is a diagram illustrating a method of adding block information of a current block to a candidate list according to an embodiment of the present invention.
[0480] At least one of block information of the current block used in the encoding or decoding process or generated after the encoding or decoding process may be added to or included in the candidate list.
[0481] The information about the block may be at least one of encoding parameters such as an intra prediction mode, a motion vector, motion information, an IBC motion vector, a weight value, an inter prediction direction, a reference picture index, an inter prediction indicator, or a prediction list utilization flag.
[0482] For example, if the current block is not an affine mode or if a sub-block based temporal motion vector derivation mode is not used, at least one of the block information of the current block may be included in the candidate list.
[0483] As another example, if the current block is not an affine mode or a GPM mode, or if a subblock-based temporal motion vector derivation mode is not used, at least one of the block information of the current block may be included in the candidate list.
[0484] The candidate list according to the present invention may be maintained in units of pictures, sub-pictures, slices, parallel blocks, blocks, CTU boundaries, CTU rows and CTU columns during encoding / decoding, and may be used in units of pictures, sub-pictures, slices, parallel blocks, blocks, CTU boundaries, CTU rows and CTU columns. In addition, the candidate list according to the present invention may include at least one of the block information of the previously encoded / decoded blocks based on the current block in units of pictures, sub-pictures, slices, parallel blocks, blocks, CTU boundaries, CTU rows and CTU columns. In addition, according to the present invention, the candidate list may include at least one of the block information in the previously encoded / decoded unit. A candidate list including at least one of the previously encoded / decoded block information based on the current block may be referred to as a history-based candidate list. At this time, the history-based candidate list may include block vector information of blocks encoded / decoded before the encoding / decoding of the current block.
[0485] In the following description, a candidate list may mean a candidate list according to the present invention.
[0486] like Fig.23 As shown, at least one of the candidate block information in the candidate list may be determined or selected for the encoding / decoding process of the current block. Therefore, the encoding / decoding process of the current block may be performed using at least one of the determined candidate block information.
[0487] At this time, at least one of the block information used for the encoding / decoding process of the current block or at least one of the block information of the current block generated after the encoding / decoding process of the current block may be added to or included in the candidate list. In the following description, adding at least one of the block information, candidates, or blocks to the candidate list and including at least one of the block information, candidates, or blocks in the candidate list may have the same meaning.
[0488] For example, when at least one of the block information of the current block is included in the candidate list, at least one of the block information of the current block may be added to the candidate list first or last. In addition, the block information may be added to a predetermined position between the encoder and the decoder in the candidate list, or may be added to an arbitrary position signaled from the encoder to the decoder.
[0489] As another example, when at least one of the block information of the current block is included in the candidate list, the maximum number of candidates in the candidate list may be considered. If the number of candidates currently included in the candidate list is the maximum number of candidates, the block information of the current block may not be included in the candidate list.
[0490] For example, the maximum number of candidates in the candidate list may be determined as P. Here, P may be a positive integer including 0. For example, P may be 5. P may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, P may be predetermined in the encoder / decoder or may be signaled from the encoder to the decoder.
[0491] According to the present invention, the candidates in the candidate list can be added to or included in at least one of the intra-frame prediction mode candidate list, the primary MPM (most probable mode) list, the secondary MPM list, the residual intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list or the sub-block merge candidate list.
[0492] Here, the primary MPM list may be an intra-prediction mode candidate list including at least one of the intra-prediction modes of spatially neighboring blocks, the derived intra-prediction modes (derived modes) as a result of adding a specific value to the intra-prediction mode of the spatially neighboring blocks or subtracting a specific value from the intra-prediction mode of the spatially neighboring blocks, or the basic intra-prediction modes. At this time, the basic intra-prediction mode may be at least one of a DC mode, a plane mode, a vertical mode, or a horizontal mode. The specific value may be at least one of 0, a positive integer, or a negative integer. The specific value may be determined based on the encoding parameters of the current block or at least one of the candidate encoding parameters. In addition, the specific value may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0493] The secondary MPM list may be an intra prediction mode candidate list composed of intra prediction modes not included in the primary MPM list. If a candidate in the primary MPM list is not determined as an intra prediction mode in the current block, a candidate in the secondary MPM list may be determined as an intra prediction mode.
[0494] The residual intra prediction mode candidate list may be an intra prediction mode candidate list composed of intra prediction modes not included in at least one of the primary MPM list or the secondary MPM list. If a candidate included in at least one of the primary MPM list or the secondary MPM list is not determined as an intra prediction mode in the current block, a candidate in the residual intra prediction mode candidate list may be determined as an intra prediction mode.
[0495] Therefore, the intra prediction mode candidate list may represent at least one of a primary MPM list, a secondary MPM list, or a residual intra prediction mode candidate list.
[0496] For example, candidates in the candidate list may be included in the intra prediction mode candidate list at a specific position or in a specific order.
[0497] For example, the candidates in the candidate list may be first included in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included in the intra prediction mode candidate list last. As another example, the candidates in the candidate list may be included before at least one of the spatial intra prediction modes in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included after at least one of the spatial intra prediction modes in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included before at least one of the derived intra prediction modes in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included after at least one of the derived intra prediction modes in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included before at least one of the basic intra prediction modes in the intra prediction mode candidate list. As another example, the candidates in the candidate list may be included after at least one of the basic intra prediction modes in the intra prediction mode candidate list.
[0498] As another example, the candidates in the candidate list may be included in the motion vector candidate list at a specific position or in a specific order.
[0499] For example, the candidates in the candidate list may be first included in the motion vector candidate list. As another example, the candidates in the candidate list may be included last in the motion vector candidate list. As another example, the candidates in the candidate list may be included before at least one of the spatial motion vectors in the motion vector candidate list. As another example, the candidates in the candidate list may be included after at least one of the spatial motion vectors in the motion vector candidate list. As another example, the candidates in the candidate list may be included before at least one of the temporal motion vectors in the motion vector candidate list. As another example, the candidates in the candidate list may be included after at least one of the temporal motion vectors in the motion vector candidate list. As another example, the candidates in the candidate list may be included before at least one of the zero motion vectors in the motion vector candidate list. As another example, the candidates in the candidate list may be included after at least one of the zero motion vectors in the motion vector candidate list.
[0500] As another example, candidates in the candidate list may be included in the merge candidate list at a specific position or in a specific order.
[0501] For example, the candidates in the candidate list may be first included in the merge candidate list. As another example, the candidates in the candidate list may be included last in the merge candidate list. As another example, the candidates in the candidate list may be included before at least one of the spatial merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included after at least one of the spatial merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included before at least one of the temporal merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included after at least one of the temporal merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included before at least one of the combined merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included after at least one of the combined merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included before at least one of the zero merge candidates in the merge candidate list. As another example, the candidates in the candidate list may be included after at least one of the zero merge candidates in the merge candidate list.
[0502] As another example, the candidates in the candidate list may be included in the IBC block vector candidate list at a specific position or in a specific order. At this time, the candidates in the candidate list may be block vector information.
[0503] For example, a candidate in the candidate list may be first included in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included last in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included before the last zero vector included in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the IBC block vector candidates in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the IBC block vector candidates in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the combined IBC block vector candidates in the IBC block vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the combined IBC block vector candidates in the IBC block vector candidate list.
[0504] As another example, the candidates in the candidate list may be included in the sub-block motion vector candidate list at a specific position or in a specific order.
[0505] As another example, the candidates in the candidate list may be included in the sub-block merging candidate list at a specific position or in a specific order.
[0506] In the above example, the combined merge candidate may be a merge candidate generated by combining at least one of the candidates in the merge candidate list. When generating the combined merge candidate, an average value of at least one of the vector values of the candidates may be used. For example, in the above example, the combined merge candidate may represent a merge candidate generated by calculating the average value of the vector values of two merge candidates.
[0507] The candidate list according to the present invention may be initialized at the start point of a sequence, a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, and a CTU column. That is, the candidates in the candidate list may be deleted in units of a sequence, a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, and a CTU column, or may be initialized to at least one specific value.
[0508] For example, the candidate list may be initialized so that the value of the information about the block has a specific value. The specific value may be at least one of 0, a positive integer, or a negative integer. The specific value may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, the specific value may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0509] At this time, the specific value may be a value corresponding to one of the intra prediction modes or a value corresponding to a temporal motion vector.
[0510] For example, the specific value may be a value indicating the DC mode or the planar mode as the non-directional intra prediction mode.
[0511] As another example, the specific value may be a motion vector value of the corresponding position block in the corresponding position image. That is, the specific value may be a temporal motion vector.
[0512] As another example, the specific value may be a sub-block unit motion vector value of the corresponding position block in the corresponding position image. That is, the specific value may be a sub-block unit temporal motion vector value (or a sub-block unit temporal motion vector value).
[0513] As another example, the specific value may be a zero (0, 0) motion vector or an IBC motion vector value.
[0514] When the block information of the current block is added to the candidate list according to the present invention, in order to prevent the same or similar block information from being included in the candidate list, a redundancy check may be performed between at least one of the information about the block included in the candidate list and the information about the current block. As a result of the redundancy check, at least one of the block information of the current block may not be included in the candidate list. In addition, as a result of the redundancy check, at least one of the information about the block included in the candidate list may be removed, and at least one of the block information of the current block may be included in the candidate list.
[0515] The redundancy check may be performed only for the M candidates located at the beginning of the candidate list. As another example, the redundancy check may be performed only for the M candidates located at the end of the candidate list. Here, M may be a positive integer including 0. For example, M may be 1 or 2. M may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, M may be predetermined in the encoder / decoder, or may be sent by a signal from the encoder to the decoder.
[0516] For example, if at least one of the block information of the current block to be included is different from at least one of the information about the blocks included in the candidate list, at least one of the block information of the current block to be included may be included in the candidate list.
[0517] For example, at least one of the block information of the current block to be included may be first added to the candidate list. As another example, at least one of the block information of the current block to be included may be last added to the candidate list.
[0518] In addition, through one of the embodiments in which specific candidates or candidate information are included in the candidate list at a specific position or in a specific order, the block information of the current block may be included in the candidate list.
[0519] As another example, if at least one of the block information of the current block to be included is identical to at least one of the information about the blocks included in the candidate list, at least one of the block information of the current block to be included may not be included in the candidate list.
[0520] As another example, if at least one of the block information of the current block to be included and at least one of the information about the blocks included in the candidate list are similar to each other, at least one of the block information of the current block to be included may not be included in the candidate list.
[0521] For example, whether information about blocks included in the candidate list is similar may be determined via an intra prediction mode value, a motion vector value, or an absolute value of an IBC motion vector value.
[0522] For example, if the absolute value of the difference between the value of the intra-frame prediction mode to be included and the value of the intra-frame prediction mode included in the candidate list is less than or equal to T, the intra-frame prediction mode to be included may not be included in the candidate list. As another example, if the absolute value of the difference between the value of the motion vector or IBC motion vector to be included and the value of the motion vector or IBC motion vector included in the candidate list is less than or equal to T, the motion vector or IBC motion vector to be included may not be included in the candidate list. As another example, if the absolute value of the difference between the X component value of the motion vector or IBC motion vector to be included and the X component value of the motion vector or IBC motion vector included in the candidate list is less than or equal to T, the motion vector or IBC motion vector to be included may not be included in the candidate list. As another example, if the absolute value of the difference between the Y component value of the motion vector or IBC motion vector to be included and the Y component value of the motion vector or IBC motion vector included in the candidate list is less than or equal to T, the motion vector or IBC motion vector to be included may not be included in the candidate list.
[0523] As another example, if at least one of the block information of the current block to be included and at least one of the information about the blocks included in the candidate list are not similar to each other, at least one of the block information of the new current block to be included may be included in the candidate list.
[0524] For example, whether information about blocks included in the candidate list is similar may be determined by an absolute value of an intra prediction mode value, a motion vector value, or an IBC motion vector value.
[0525] For example, if the absolute value of the difference between the value of the intra-frame prediction mode to be included and the value of the intra-frame prediction mode included in the candidate list is greater than T, the intra-frame prediction mode to be included may be included in the candidate list. As another example, if the absolute value of the difference between the value of the motion vector or IBC motion vector to be included and the value of the motion vector or IBC motion vector included in the candidate list is greater than T, the motion vector or IBC motion vector to be included may be included in the candidate list. As another example, if the absolute value of the difference between the X component value of the motion vector or IBC motion vector to be included and the X component value of the motion vector or IBC motion vector included in the candidate list is greater than T, the motion vector or IBC motion vector to be included may be included in the candidate list. As another example, if the absolute value of the difference between the Y component value of the motion vector or IBC motion vector to be included and the Y component value of the motion vector or IBC motion vector included in the candidate list is greater than T, the motion vector or IBC motion vector to be included may be included in the candidate list.
[0526] At this time, T may be a positive integer including 0. T may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, T may be predetermined in the encoder / decoder, or may be signaled from the encoder to the decoder.
[0527] In addition, T in the motion vector or IBC motion vector may be a value representing at least one of M / N pixel units (such as integer pixel units, 1 / 2 pixel units, 1 / 4 pixel units, 1 / 16 pixel units, etc.). Here, M and N may be positive integers. M and N may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, M and N may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0528] The following description relates to redundancy checking between the candidates in the candidate list and the candidates in at least one of the intra-prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list when at least one of the candidates in the candidate list is added to at least one of the intra-prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0529] When at least one of the candidates in the candidate list is added to at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, a redundancy check can be performed between the candidates in the candidate list and at least one of the candidates included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0530] For example, at least one of the candidates in the candidate list may be first or last included in at least one of the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list. In addition, through one of the embodiments in which a specific candidate or candidate information is included in the candidate list at a specific position or in a specific order, the block information of the current block may be included in the candidate list.
[0531] In order to prevent the same or similar candidate from being added to at least one of the candidate list or the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, a redundancy check between at least one of the candidates in the candidate list and a candidate included in at least one of the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list may be performed. As a result of the redundancy check, at least one of the candidates in the candidate list may be included or may not be included in at least one of the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0532] A redundancy check may be performed only for the M candidates located at the beginning of the candidate list. As another example, a redundancy check may be performed only for the M candidates located at the end of the candidate list. Here, M may be a positive integer including 0. For example, M may be 1 or 2. M may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, M may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal. At this time, a redundancy check may be performed between the spatial motion vector above or to the left of the current block and one or two candidates at the beginning of the candidate list.
[0533] For example, if at least one of the information about the block to be included in the candidate list is different from at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, then at least one of the information about the block to be included in the candidate list may be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0534] For example, at least one of the information about the block in the candidate list can be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list or the sub-block merge candidate list in ascending order of index.
[0535] In addition, at least one of the information about the block in the candidate list can be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list or the sub-block merge candidate list in descending order of index.
[0536] As another example, if at least one of the information about the block to be included in the candidate list is equal to at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, then at least one of the information about the block to be included in the candidate list may not be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0537] As another example, if at least one of the information about the block to be included in the candidate list is similar to at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, then at least one of the information about the block to be included in the candidate list may not be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0538] At this time, the situation where at least one of the information about the block to be included in the candidate list is similar to at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list or the sub-block merge candidate list may represent one of the following conditions.
[0539] For example, if the absolute value of the difference between the value of the intra prediction mode to be included and the value of the intra prediction mode included in the intra prediction mode candidate list is less than or equal to S, the intra prediction mode to be included may not be included in the intra prediction mode candidate list.
[0540] For example, if the absolute value of the difference between the value of the motion vector or IBC motion vector to be included and the value of the motion vector or IBC motion vector included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list is less than or equal to S, the motion vector or IBC motion vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0541] For example, if the absolute value of the difference between the X-component value of the motion vector or IBC motion vector to be included and the X-component value of the motion vector or IBC motion vector included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list is less than or equal to S, the motion vector or IBC motion vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0542] For example, if the absolute value of the difference between the Y component value of the motion vector or IBC motion vector to be included and the Y component value of the motion vector or IBC motion vector included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list is less than or equal to S, the motion vector or IBC motion vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0543] As another example, if at least one of the information about the block to be included in the candidate list is not similar to at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list, then at least one of the information about the block to be included in the candidate list may be included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0544] At this time, the situation where at least one of the information about the block to be included in the candidate list is dissimilar to at least one of the information about the block included in at least one of the intra-frame prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list or the sub-block merge candidate list may represent one of the following conditions.
[0545] For example, if an absolute value of a difference between a value of the intra prediction mode to be included and a value of an intra prediction mode included in the intra prediction mode candidate list is greater than S, the intra prediction mode to be included may be included in the intra prediction mode candidate list.
[0546] For example, if the absolute value of the difference between the value of the motion vector or IBC motion vector to be included and the value of the motion vector or IBC motion vector included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list is greater than S, the motion vector or IBC motion vector to be included may be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0547] For example, if an absolute value of a difference between an X-component value of a motion vector or an IBC motion vector to be included and an X-component value of a motion vector or an IBC motion vector included in at least one of a motion vector candidate list, a merge candidate list, an IBC motion vector candidate list, an IBC merge candidate list, a sub-block motion vector candidate list, or a sub-block merge candidate list is greater than S, the motion vector or the IBC motion vector to be included may be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0548] For example, if the absolute value of the difference between the Y component value of the motion vector or IBC motion vector to be included and the Y component value of the motion vector or IBC motion vector included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list is greater than S, the motion vector or IBC motion vector to be included may be included in at least one of the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0549] In the above description, S may be a positive integer including 0. S may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, S may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal. In addition, in the case of a motion vector or an IBC motion vector, S may be a value representing at least one of M / N pixel units (such as an integer pixel unit, a 1 / 2 pixel unit, a 1 / 4 pixel unit, a 1 / 16 pixel unit, etc.). Here, M and N may be positive integers.
[0550] A redundancy check may be performed between at least one of the candidates in the candidate list and a candidate included in at least one of an intra prediction mode candidate list, a motion vector candidate list, a merge candidate list, an IBC motion vector candidate list, an IBC merge candidate list, a sub-block motion vector candidate list, or a sub-block merge candidate list. As a result of the redundancy check, at least one of the candidates included in at least one of the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list may be removed, and at least one of the candidates in the candidate list may be included in at least one of the intra prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0551] For example, at least one of the candidates in the candidate list may be first or last included in at least one of the intra-prediction mode candidate list, the motion vector candidate list, the merge candidate list, the IBC motion vector candidate list, the IBC merge candidate list, the sub-block motion vector candidate list, or the sub-block merge candidate list.
[0552] The candidate list according to the present invention can manage candidates by a FIFO (first in, first out) rule. For example, if a new candidate needs to be added to the candidate list and the number of candidates in the candidate list is equal to the maximum number of candidates, the first added candidate can be removed from the candidate list first and then the new candidate can be added to the candidate list.
[0553] For example, new candidates may be added to the candidate list first or last.
[0554] For example, the candidate list according to the present invention may include at least one of the information on the intra prediction mode.
[0555] As another example, the candidate list may include an intra prediction mode of a spatially neighboring block. As another example, the candidate list may include an intra prediction mode derived as a result of subtracting a specific value from the intra prediction mode of the spatially neighboring block or adding a specific value to the intra prediction mode of the spatially neighboring block. As another example, the candidate list may include a base intra prediction mode. As another example, the candidate list may include a spatial motion vector or a spatial merge candidate.
[0556] As another example, the candidate list may include an intra block copy (IBC) mode or an IBC merge candidate or motion vector using the current image as a reference image. As another example, the candidate list may include a temporal motion vector or a temporal merge candidate. As another example, the candidate list may include a sub-block unit motion vector or a sub-block unit merge candidate. As another example, the candidate list may include a motion vector of a sub-block unit IBC mode or a sub-block unit IBC merge candidate. As another example, the candidate list may include a sub-block unit temporal motion vector or a sub-block unit temporal merge candidate. At this time, the sub-block may have the same meaning as the sub-block.
[0557] As another example, the candidate list may include spatial motion vectors or spatial merge candidates in units of CTU. As another example, the candidate list may include IBC motion vectors or IBC merge candidates in units of CTU. As another example, the candidate list may include temporal motion vectors or temporal merge candidates of corresponding position CTUs in units of CTU. As another example, the candidate list may include sub-block unit motion vectors or sub-block unit merge candidates of corresponding position CTUs in units of CTU. As another example, the candidate list may include sub-block unit IBC motion vectors or sub-block unit IBC merge candidates of corresponding position CTUs in units of CTU. As another example, the candidate list may include sub-block unit temporal motion vectors or sub-block unit temporal merge candidates of corresponding position CTUs in units of CTU.
[0558] As another example, the candidate list may include a spatial motion vector or a spatial merge candidate, but may not include a temporal motion vector or a temporal merge candidate. As another example, the candidate list may include a spatial motion vector, a spatial merge candidate, an IBC motion vector, or an IBC merge candidate, but may not include a temporal motion vector or a temporal merge candidate. As another example, the candidate list may include a temporal motion vector or a temporal merge candidate, but may not include a spatial motion vector or a spatial merge candidate. As another example, the candidate list may include a spatial motion vector, a spatial merge candidate, a temporal motion vector, or a temporal merge candidate. As another example, the candidate list may include a spatial motion vector, a spatial merge candidate, a temporal motion vector, or a temporal merge candidate, but may not include a sub-block unit motion vector or a sub-block unit merge candidate. As another example, the candidate list may include a spatial motion vector, a spatial merge candidate, a temporal motion vector, or a temporal merge candidate, but may not include a sub-block unit motion vector or a sub-block unit merge candidate.
[0559] As another example, the candidate list may include only IBC motion vectors or IBC merge candidates. As another example, the candidate list may include spatial motion vectors or spatial merge candidates in units of CTU, but may not include temporal motion vectors or temporal merge candidates. As another example, the candidate list may include temporal motion vectors or temporal merge candidates in units of CTU, but may not include spatial motion vectors or spatial merge candidates. As another example, the candidate list may include spatial motion vectors, spatial merge candidates, temporal motion vectors, or temporal merge candidates in units of CTU. As another example, the candidate list may include only IBC motion vectors or IBC merge candidates in units of CTU.
[0560] If a specific block is at a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column or crosses a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column, at least one of the information about the specific block may be included in the candidate list. At this time, the candidate list may be used to replace the line buffer.
[0561] For example, if the specific block is at a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column above the current block, or if the specific block is at a boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column above the current block, or if the specific block spans an upper boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to which the current block belongs, at least one of the information about the specific block may be included in the candidate list.
[0562] As another example, if the specific block is at a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to the left of the current block, or if the specific block is at a boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to the left to which the current block does not belong, or if the specific block spans the left boundary of the picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to which the current block belongs, at least one of the information about the specific block may be included in the candidate list.
[0563] In addition, if the specific block is at a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column or crosses a boundary of at least one of a picture, a sub-picture, a slice, a tile, a partition, a CTU boundary, a CTU row, or a CTU column, at least one of the information about the specific block may not be included in the candidate list. At this time, since the information about the specific block is not included in the candidate list, the line buffer may be removed.
[0564] For example, if the specific block is at a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column above the current block, or if the specific block is at a boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column above the current block, or if the specific block spans an upper boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to which the current block belongs, at least one of the information about the specific block may not be included in the candidate list.
[0565] As another example, if the specific block is at a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to the left of the current block, or if the specific block is at a boundary of a picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to the left to which the current block does not belong, or if the specific block spans the left boundary of the picture, sub-picture, slice, tile, partition, CTU boundary, CTU row, and CTU column to which the current block belongs, at least one of the information about the specific block may not be included in the candidate list.
[0566] In addition, if a block related to block information included in the candidate list and the current block belong to different pictures, sub-pictures, slices, tiles, blocks, CTU boundaries, CTU rows, and CTU columns, at least one of the information about the current block may not be included in the candidate list.
[0567] That is, when block information of a current block is added to a candidate list for a specific block, if the specific block and the current block are located in or belong to different pictures, sub-pictures, slices, parallel blocks, blocks, CTU boundaries, CTU rows, and CTU columns, at least one of the information about the current block may not be included in the candidate list for the specific block.
[0568] When a candidate is added to the candidate list, a specific candidate having a result of adding a specific value to or subtracting a specific value from at least one of the candidate's information about the block as block information may be added to the candidate list.
[0569] For example, a specific candidate having a new intra prediction mode may be added to the candidate list using the result of adding a specific value to or subtracting a specific value from the intra prediction mode of a candidate to be included in the candidate list as a new intra prediction mode.
[0570] As another example, a specific candidate having a new motion vector may be added to the candidate list using a result of adding or subtracting a specific value to or from a motion vector of a candidate to be included in the candidate list as a new motion vector.
[0571] In addition, when a candidate is added to a candidate list, the candidate may not be added to the candidate list, but a specific candidate of block information having a result of adding a specific value to or subtracting a specific value from at least one of the candidate's information about the block may be added to the candidate list as a specific candidate of block information.
[0572] In addition, when at least one candidate is added to the candidate list, a specific candidate having a result of calculating a statistic of at least one of the information about the block for the at least one candidate as the block information may be added to the candidate list.
[0573] In addition, a result of adding a specific value to or subtracting a specific value from at least one of the information about the block of the candidates included in the candidate list may be added to the candidate list as a specific candidate of the block information.
[0574] For example, a specific candidate having a new intra prediction mode may be added to the candidate list using a result of adding or subtracting a specific value to or from the candidate intra prediction mode included in the candidate list as a new intra prediction mode.
[0575] As another example, a specific candidate having a new motion vector may be added to the candidate list using a result of adding or subtracting a specific value to or from a motion vector of a candidate included in the candidate list as a new motion vector.
[0576] In addition, a specific candidate having a result of adding a specific value to at least one of the information about the block of the candidates included in the candidate list or subtracting a specific value from at least one of the information about the block of the candidates included in the candidate list may be added as the specific candidate of the block information, and candidates already included in the candidate list may be excluded from the candidate list.
[0577] In addition, a result having a statistical value calculated for at least one of the information on the block for at least one candidate included in the candidate list may be added to the candidate list as a specific candidate of the block information.
[0578] At this time, the specific value may be at least one of 0, a positive integer, or a negative integer. The specific value may be determined based on at least one of the encoding parameters of the current block or the encoding parameters of the candidate. In addition, the specific value may be predetermined in the encoder / decoder, or may be sent from the encoder to the decoder using a signal.
[0579] When constructing at least one of an intra prediction mode candidate list, a motion vector candidate list, a merge candidate list, an IBC motion vector candidate list, an IBC merge candidate list, a sub-block motion vector candidate list, or a sub-block merge candidate list, the candidate list according to the present invention may be used.
[0580] For example, when constructing the intra prediction mode candidate list, the candidates in the candidate list may be used as the candidates. For example, the candidates of the candidate list may be included in the intra prediction mode candidate list.
[0581] As another example, when constructing a motion vector candidate list, the candidates in the candidate list may be used as candidates. For example, the candidates of the candidate list may be included in the motion vector candidate list.
[0582] As another example, when constructing a merge candidate list, a candidate in the candidate list may be used as a candidate. For example, a candidate of the candidate list may be included in the merge candidate list.
[0583] As another example, when constructing a sub-block motion vector candidate list, the candidates in the candidate list may be used as candidates. For example, the candidates of the candidate list may be included in the sub-block motion vector candidate list.
[0584] As another example, when constructing a sub-block merging candidate list, the candidates in the candidate list may be used as candidates. For example, the candidates of the candidate list may be included in the sub-block merging candidate list.
[0585] Fig.24 is a diagram illustrating a process of adding a candidate in a candidate list as a candidate of an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list according to an embodiment of the present invention.
[0586] If at least one candidate in the candidate list is used when constructing at least one of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list, the candidate first added to the candidate list may be first added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list. At this time, the maximum number of candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list is not reached, and the next candidate in the candidate list may be included in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0587] For example, Fig.24 As shown in , if candidates in a candidate list are included in the order of H0, H1, H2, H3 and H4, candidate H0 first included in the candidate list may be first used as a candidate for an intra prediction mode candidate list, a motion vector candidate list or a merge candidate list.
[0588] At this time, if the maximum number of candidates of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list has not been reached, the next candidate H1 may be used as a candidate of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0589] When at least one candidate in the candidate list is added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate by the above method, a redundancy check with the candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the M candidates in the candidate list. Here, M may be a positive integer including "0".
[0590] For example, Fig.24As shown in , if the candidate H0 first included in the candidate list is first added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate, a redundant check with the candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for candidates H0 and H1. At this time, if a redundant check is performed for the first candidate H0 and there are identical candidates, candidate H0 may not be included. If a redundant check is performed for the next candidate H1 and there are no identical candidates, candidate H1 may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate. In addition, if the maximum number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list is not reached, and candidates H2, H3, or H4 are sequentially added to the candidate list, a redundant check for the candidates in the candidate list may not be performed.
[0591] As another example, Fig.24 As shown in , if the candidate H0 first included in the candidate list is first included in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate, a redundant check with the candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for candidates H3 and H4. For example, if the number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list does not reach the maximum number of candidates, candidate H3 or H4 is added, and if a redundant check is first performed on candidate H3 and the same candidate exists, candidate H3 may not be added. If a redundant check is performed on the next candidate H4 and the same candidate does not exist, candidate H4 may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate. At this time, when candidates H0, H1, and H2 are added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundant check with the candidates in each candidate list may not be performed.
[0592] Fig.25 is a diagram illustrating an embodiment of neighboring blocks used when constructing an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list.
[0593] When at least one candidate in the candidate list is added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate by the same method as the above embodiment, a redundancy check with N neighboring blocks for constructing the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the M candidates in the candidate list. Here, M may be a positive integer including "0", and N may be a positive integer greater than 0.
[0594] For example, Fig.24As shown in , if candidate H0 first included in the candidate list is added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate, redundancy check with neighboring blocks used when constructing the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for candidates H0 and H1. Fig.25 As shown in , if the neighboring blocks are used to construct the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundancy check with the neighboring blocks A1 and B1 may be performed first for candidate H0. As a result, if the same candidate exists, candidate H0 may not be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list. If a redundancy check with the neighboring blocks A1 and B1 is performed for the next candidate H1 and there is no same candidate, candidate H1 may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate. At this time, if the maximum number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list is not reached, and candidates H2, H3, and / or H4 are added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundancy check with the neighboring blocks may not be performed for candidates H2, H3, and / or H4.
[0595] For example, Fig.24 As shown in , if candidate H0 first included in the candidate list is first added to the intra prediction mode candidate list, motion vector candidate list, or merge candidate list as a candidate, redundancy check with neighboring blocks used when constructing the intra prediction mode candidate list, motion vector candidate list, or merge candidate list may be performed only for candidates H3 and H4. Fig.25 The neighboring blocks shown are used to construct an intra-frame prediction mode candidate list, a motion vector candidate list, or a merge candidate list. The number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list does not reach the maximum number of candidates, and candidate H3 or H4 is added, then a redundancy check with neighboring blocks A1 and B1 may be sequentially performed for candidate H3. As a result, if there is a candidate identical to H3, candidate H3 may not be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list. If a redundancy check with neighboring blocks A1 and B1 is performed for the next candidate H4 and there is no identical candidate, the candidate may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate. At this time, when adding candidates H0, H1, and H2 to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundancy check with neighboring blocks may not be performed.
[0596] When at least one candidate in the candidate list is added to the intra-prediction mode candidate list, the motion vector candidate list or the merge candidate list as a candidate by the above method, redundancy check may not be performed on the candidates in the candidate list, and when the number of candidates in the intra-prediction mode candidate list, the motion vector candidate list or the merge candidate list does not meet the maximum number of candidates, the candidates in the candidate list may be included until the maximum number of candidates is met.
[0597] As another example, when at least one candidate in the candidate list is added to the intra-prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate by the above method, redundancy check may not be performed on the candidates in the candidate list, and when the number of candidates in the intra-prediction mode candidate list, the motion vector candidate list, or the merge candidate list does not meet the maximum number of candidates, the candidates in the candidate list may be included until the number of candidates meets (maximum number of candidates - 1).
[0598] Fig.26 is a diagram illustrating a process of adding a candidate in a candidate list to an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list according to an embodiment of the present invention.
[0599] If at least one candidate in the candidate list is used when constructing at least one of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list, the candidate added to the candidate list last may be first included in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list. At this time, if the maximum number of candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list has not been reached, the next candidate in the candidate list may be included in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0600] For example, Fig.26 As shown in , if the candidates in the candidate list are included in the order of H0, H1, H2, H3, and H4, the candidate H4 included last in the candidate list may be first used as a candidate for the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list. If the maximum number of candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list is not reached, the next candidate H3 may be used as a candidate for the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0601] In addition, when at least one candidate in the candidate list is added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate by the above method, a redundancy check between the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the M candidates in the candidate list. Here, M may be a positive integer including "0".
[0602] For example, Fig.26 As shown in , if the candidate H4 included in the candidate list last is first added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundancy check with the candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the candidates H4 and H3. If the redundancy check is first performed on the candidate H4 and the same candidate exists, the candidate H4 may not be added. If the redundancy check is performed on the next candidate H3 and the same candidate does not exist, the candidate H3 may be added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate.
[0603] At this time, if the maximum number of candidates in the intra prediction mode candidate list, motion vector candidate list or merge candidate list is not reached, and H2, H1 or H0 is sequentially added to each candidate list, redundancy check with the candidates in the candidate list may not be performed.
[0604] In addition, when at least one candidate in the candidate list is added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate by the above method, a redundancy check with N neighboring blocks used to construct the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the M candidates in the candidate list. Here, M may be a positive integer including "0", and N may be a positive integer greater than "0".
[0605] For example, Fig.26 As shown in , if the candidate H4 included in the candidate list last is first added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list, the redundancy check with the neighboring blocks used to construct the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the candidates H4 and H3. Fig.25The neighboring blocks shown in are used to construct an intra-frame prediction mode candidate list, a motion vector candidate list, or a merge candidate list. First, a redundancy check with neighboring blocks A1 and B1 is performed on candidate H4. If the same candidate exists, candidate H4 may not be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list. If a redundancy check with neighboring blocks A1 and B1 is performed on the next candidate H3 and the same candidate does not exist, the next candidate may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate.
[0606] At this time, if the maximum number of candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list is not reached, and H2, H1, or H0 is sequentially added to each candidate list, redundancy check with neighboring blocks may not be performed.
[0607] In addition, if Fig.26 As shown in , if the candidate H4 included in the candidate list last is first added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate, a redundancy check with neighboring blocks used to construct the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list may be performed only for the candidates H1 and H0. Fig.25 The neighboring blocks shown in are used to construct an intra-frame prediction mode candidate list, a motion vector candidate list, or a merge candidate list, and the number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list does not meet the maximum number of candidates, then a candidate H1 or H0 is added, and if a redundancy check with neighboring blocks A1 and B1 is sequentially performed for candidate H1 and the same candidate exists, then candidate H1 may not be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list. If a redundancy check with neighboring blocks A1 and B1 is performed for the next candidate H0 and the same candidate does not exist, then candidate H0 may be added to the intra-frame prediction mode candidate list, the motion vector candidate list, or the merge candidate list as a candidate.
[0608] At this time, when candidates H4, H3, and H2 are added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list, a redundancy check with neighboring blocks may not be performed.
[0609] In addition, when at least one candidate in the candidate list is added to the intra-frame prediction mode candidate list, the motion vector candidate list or the merged candidate list by the above method, redundant checking may not be performed on the candidates in the candidate list, and when the number of candidates in the intra-frame prediction mode candidate list, the motion vector candidate list or the merged candidate list does not meet the maximum number of candidates, the candidates in the candidate list may be included until the maximum number of candidates is met.
[0610] In addition, when at least one candidate in the candidate list is added to the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list by the above method, redundancy check may not be performed on the candidates in the candidate list, and when the number of candidates in the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list does not satisfy the maximum number of candidates, the candidates in the candidate list may be included until (the maximum number of candidates - N) is satisfied. Here, N may be a positive integer greater than 0.
[0611] When at least one of an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list is constructed using a candidate list, a maximum of N candidates in the candidate list may be used as candidates for the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list. Here, N may be a positive integer including 0.
[0612] For example, even if the number of candidates in the candidate list is equal to the maximum number M of candidates in the candidate list, if the maximum number of candidates in the candidate list defined in the encoder / decoder that can be used in the motion vector candidate list is (M-1), only the (M-1) candidates in the candidate list can be used to construct the motion vector candidate list. Here, M can be a positive integer greater than 0. In addition, the above example is also applicable to the intra prediction mode candidate list or the merge candidate list.
[0613] In addition, when the candidate list is used to construct at least one of the intra-frame prediction mode candidate list, motion vector candidate list or merge candidate list of the current encoding / decoding target block, all available candidates in the candidate list that can be referenced by the current encoding / decoding target block can be used to construct the intra-frame prediction mode candidate list, motion vector candidate list or merge candidate list.
[0614] At this time, if the current target block shares at least one of the intra prediction mode candidate list, motion vector candidate list or merge candidate list of the upper block, the candidate list that can be referenced by the current encoding / decoding target block can represent the candidate list of the upper block.
[0615] In addition, the candidate list may represent at least one of an intra prediction mode candidate list, a motion vector candidate list, or a merge candidate list. That is, the candidate list may be the same as at least one of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0616] In addition, the candidate list may represent a candidate list other than at least one of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list. That is, the candidate list may be different from at least one of the intra prediction mode candidate list, the motion vector candidate list, or the merge candidate list.
[0617] Fig. 27 is a diagram illustrating a process of adding a candidate in a history-based candidate list as a candidate of an IBC block vector prediction candidate list or an IBC merge candidate list according to an embodiment of the present invention.
[0618] The IBC block vector prediction candidate list and / or the IBC merge candidate list may have the same meaning as the IBC block vector candidate list.
[0619] At least one of the above methods may be used to separately construct a history-based candidate list for an intra-block copy (IBC) mode for copying a reference block in a current image region that is encoded / decoded before encoding / decoding a target block. In this case, the history-based candidate list may have the same meaning as the candidate list. In addition, the history-based candidate list may have the same meaning as the IBC candidate list.
[0620] In addition, in the present specification, candidates included in an IBC block vector prediction candidate list or an IBC merge candidate list may be referred to as an IBC block vector candidate.
[0621] When at least one candidate in the history-based candidate list is used to construct at least one of an IBC block vector prediction candidate list or an IBC merge candidate list, at least one of the methods of constructing a motion vector candidate list or a merge candidate list may be used.
[0622] If at least one candidate in the history-based candidate list is used to construct at least one of the IBC block vector prediction candidate list or the IBC merge candidate list, the candidate first added to the history-based candidate list may be first included in the IBC block vector prediction candidate list or the IBC merge candidate list. If the maximum number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list is not reached, the next candidate in the history-based candidate list may be included in the IBC block vector prediction candidate list or the IBC merge candidate list.
[0623] For example, the history-based candidate list may include block vector information of a block encoded / decoded before encoding / decoding of the current block as a candidate. At this time, the block vector information may be used for IBC prediction of the current block.
[0624] That is, at least one piece of block vector information in the history-based candidate list may be used to construct the IBC block vector candidate list.
[0625] In addition, block vector information in the history-based candidate list may be added to the IBC block vector candidate list until the number of IBC block vector candidates included in the IBC block vector candidate list reaches the maximum number of merge candidates.
[0626] At this time, the maximum number of merge candidates that can be included in the IBC block vector candidate list may be determined based on the encoding parameters. The encoding parameters may be determined at a sequence parameter level.
[0627] For example, Fig. 27 As shown in , when the candidates in the history-based candidate list are included in the order of H0, H1, H2, H3, and H4, the candidate H0 first included in the history-based candidate list may be first used as a candidate for the IBC block vector prediction candidate list or the IBC merge candidate list. If the maximum number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list is not reached, the next candidate H1 may be used as a candidate for the IBC block vector prediction candidate list or the IBC merge candidate list.
[0628] When at least one candidate in the history-based candidate list is added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate by the above method, a redundancy check with the candidates in the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for the M candidates in the history-based candidate list. Here, M may be a positive integer including 0.
[0629] For example, M may be 1. That is, when at least one of the block vector information in the history-based candidate list is added to the IBC block vector candidate list, a redundancy check with the candidates in the IBC block vector candidate list may be performed only for one candidate in the history-based candidate list. For example, a redundancy check with the IBC block vector candidates in the IBC block vector candidate list may be performed only for the last candidate in the history-based candidate list.
[0630] As another example, a redundancy check with neighboring blocks used as IBC block vector candidates may be performed for the last candidate in the history-based candidate list. That is, a redundancy check with neighboring blocks that may be used as IBC block vector candidates may be performed for the block vector information last included in the history-based candidate list.
[0631] At this time, the candidates in the history-based candidate list that have not undergone redundancy check are set to be unequal to the IBC block vector candidates in the IBC block vector candidate list, and the block vector information of the history-based candidate list can be added to the IBC block vector candidate list until the number of IBC block vector candidates included in the IBC block vector candidate list reaches the maximum number of merge candidates.
[0632] At this time, the redundancy check may be performed only when a specific condition is met. For example, the redundancy check may be performed only when the area (=width×height) of the current block exceeds K. For example, K may be 16. That is, the redundancy check may be performed only when the area of the current block exceeds 16.
[0633] In addition, a redundancy check may be performed only when the number of IBC block vector candidates included in the IBC block vector candidate list is less than the maximum number of merge candidates that can be included in the IBC block vector candidate list. At this time, block vector information in the history-based candidate list may be added to the IBC block vector candidate list based on the result of the redundancy check until the number of IBC block vector candidates included in the IBC block vector candidate list reaches the maximum number of merge candidates.
[0634] For example, Fig. 27 As shown in , if candidate H0, which is first included in the history-based candidate list, is first added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate, a redundancy check with the candidates in the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for candidates H0 and H1. At this time, if a redundancy check is first performed on candidate H0 and there are identical candidates, candidate H0 may not be added. If a redundancy check is performed on the next candidate H1 and there are no identical candidates, candidate H1 may be added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate. At this time, if the maximum number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list is not reached and H2, H3, or H4 is sequentially added to each candidate list, a redundancy check with the candidates of each candidate list may not be performed.
[0635] In addition, when at least one candidate in the history-based candidate list is added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate by the above method, a redundancy check between the M candidates in the history-based candidate list and the candidates in the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for the M candidates in the history-based candidate list. Here, M may be a positive integer including 0.
[0636] For example, Fig. 27As shown in , if candidate H0, which is first included in the history-based candidate list, is first added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate, a redundant check with the candidates in the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for candidates H3 and H4. At this time, if the number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list does not meet the maximum number of candidates, candidate H3 or H4 is added, and if a redundant check is first performed on candidate H3 and the same candidate exists, candidate H3 may not be added. If a redundant check is performed on the next candidate H4 and the same candidate does not exist, candidate H4 may be added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate. At this time, when adding candidates H0, H1, and H2 to the IBC block vector prediction candidate list or the IBC merge candidate list, a redundant check with the candidates in the candidate list may not be performed.
[0637] Fig.28 is a diagram illustrating an embodiment of neighboring blocks used when constructing an IBC block vector prediction candidate list or an IBC merge candidate list.
[0638] When at least one candidate in the history-based candidate list is added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate by the same method as the above method, a redundancy check with the N neighboring blocks used when constructing the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for the M candidates in the history-based candidate list. Here, M may be a positive integer including 0, and N may be a positive integer greater than 0. For example, M may be 1.
[0639] For example, Fig. 27 As shown in , if the candidate H0 first included in the history-based candidate list is first added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate, redundancy check with neighboring blocks used when constructing the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for the candidates H0 and H1. Fig.28If the neighboring blocks shown in are used to construct an IBC block vector prediction candidate list or an IBC merge candidate list, a redundant check with neighboring blocks A1 and B1 may be first performed on candidate H0. As a result, if the same candidate exists, candidate H0 may not be added to the IBC block vector prediction candidate list or the IBC merge candidate list. If a redundant check with neighboring blocks A1 and B1 is performed for the next candidate H1 and the same candidate does not exist, candidate H1 may be added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate. At this time, if the maximum number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list is not reached and H2, H3 or H4 is added to each history-based candidate list, a redundant check with the neighboring blocks may not be performed.
[0640] In addition, if Fig. 27 As shown in , if candidate H0 first included in the history-based candidate list is first added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate, redundancy check with neighboring blocks used when constructing the IBC block vector prediction candidate list or the IBC merge candidate list may be performed only for candidates H3 and H4. Fig.28 The neighboring blocks shown in are used to construct an IBC block vector prediction candidate list or an IBC merge candidate list, the number of candidates in the IBC block vector prediction candidate list or the IBC merge candidate list does not reach the maximum number of candidates and candidates H3 and / or H4 are added, and candidate H3 is first used to perform a redundancy check with neighboring blocks A1 and B1 and the same candidate exists, then candidate H3 may not be added to the IBC block vector prediction candidate list or the IBC merge candidate list. If a redundancy check with neighboring blocks A1 and B1 is performed for the next candidate H4 and the same candidate does not exist, candidate H4 may be added to the IBC block vector prediction candidate list or the IBC merge candidate list as a candidate. At this time, when adding candidates H0, H1 and / or H2 to the IBC block vector prediction candidate list or the IBC merge candidate list, a redundancy check with the neighboring blocks may not be performed.
[0641] Fig.29 is a diagram illustrating a process of adding a candidate in a history-based candidate list as a candidate of an IBC block vector prediction candidate list or an IBC merge candidate list according to an embodiment of the present invention.
[0642] like Fig.29As shown in , if at least one candidate in the history-based candidate list is used to construct at least one of the IBC block vector prediction candidate list or the IBC merge candidate list, the candidate included last in the candidate list may be included first in the IBC block vector prediction candidate list or the IBC merge candidate list. If the maximum number of candidates of the IBC block vector prediction candidate list or the IBC merge candidate list is not reached, the next candidate in the history-based candidate list may be included in the IBC block vector prediction candidate list or the IBC merge candidate list.
[0643] When a history-based candidate list is used to construct at least one of an IBC block vector prediction candidate list or an IBC merge candidate list for a current encoding / decoding target block, the IBC block vector prediction candidate list or the IBC merge candidate list can be constructed for all candidates available in the history-based candidate list that can be referenced by the current encoding / decoding target block.
[0644] When at least one candidate in the history-based candidate list is added as an IBC block vector candidate by the same method as the above-mentioned embodiment, a redundancy check with N neighboring blocks used as IBC block vector candidates may be performed only for M candidates in the history-based candidate list. Here, M may be a positive integer including 0, and N may be a positive integer greater than 0. For example, M may be 1. That is, when at least one candidate in the history-based candidate list is added to the IBC block vector candidate list as a candidate, a redundancy check with the IBC block vector candidate may be performed only for one candidate in the history-based candidate list.
[0645] For example, when adding the block vector information included in the history-based candidate list to the IBC block vector candidate list as a candidate, a redundancy check with the IBC block vector candidate may be performed only for the last block vector information in the history-based candidate list. At this time, since the candidates in the history-based candidate list that have not been subjected to the redundancy check are set to be unequal to the block vectors of the adjacent blocks, the block vector information in the history-based candidate list may be added to the IBC block vector candidate list until the number of IBC block vector candidates included in the IBC block vector candidate list reaches the maximum number of merge candidates.
[0646] As a detailed example, Fig.29 As shown in , if the candidate H4 that is last included in the history-based candidate list is first added to the IBC block vector candidate list as a candidate, a redundancy check with neighboring blocks that can be used as IBC block vector candidates may be performed only for the candidate H4. Fig.28If the neighboring blocks shown in are used to construct the IBC block vector candidates, a redundancy check with neighboring blocks A1 and B1 may be performed only for candidate H4, and H3, H2, H1, and H0 may be set to have different block vectors from those of the neighboring blocks.
[0647] At this time, the redundancy check may be performed only when a specific condition is met. For example, the redundancy check may be performed only when the area (=width×height) of the current block exceeds K. For example, K may be 16. That is, the redundancy check may be performed only when the area of the current block exceeds 16.
[0648] If the current encoding / decoding target block shares at least one of the IBC block vector candidate list or the IBC merge candidate list of the upper block of the current target block, the history-based candidate list that can be referenced by the current encoding / decoding target block can represent the history-based candidate list of the upper block.
[0649] Fig.30 is a diagram illustrating an image decoding method according to an embodiment of the present invention.
[0650] Reference Fig.30 , the image decoding apparatus may compare the block vector information included in the history-based candidate list with the block vector of the neighboring block used as the IBC block vector candidate for IBC prediction of the current block (S3001). Here, step S3001 may be performed only for the candidate last included in the history-based candidate list.
[0651] In addition, step S3001 may be performed only when the area of the current block is greater than 16.
[0652] Furthermore, step S3001 may be performed only when the number of IBC block vector candidates included in the IBC block vector candidate list is less than the maximum number of merge candidates that may be included in the IBC block vector candidate list.
[0653] In addition, the image decoding apparatus may add the block vector information included in the history-based candidate list to the IBC block vector candidate list based on a result of performing step S3001 ( S3002 ).
[0654] Furthermore, if the block vector information included in the history-based candidate list and the block vector of the neighboring block are different as a result of performing step S3001 , the block vector information included in the history-based candidate list may be added to the IBC block vector candidate list.
[0655] Furthermore, step S3002 may be performed until the number of IBC block vector candidates included in the IBC block vector candidate list reaches a maximum number of merge candidates that may be included in the IBC block vector candidate list.
[0656] Furthermore, a maximum number of merge candidates that may be included in the IBC block vector candidate list may be determined based on encoding parameters.
[0657] Also, the neighboring block may include at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
[0658] Furthermore, the history-based candidate list may include block vector information of blocks decoded prior to decoding of the current block.
[0659] In addition, the image decoding apparatus may add block vector information of the current block to the history-based candidate list.
[0660] At this time, if a block decoded before decoding of the current block and the current block belong to different CTU (Coding Tree Unit) rows, block vector information of the current block may not be added to the history-based candidate list.
[0661] Fig.31 is a diagram illustrating an image encoding method according to an embodiment of the present invention.
[0662] Reference Fig.31 , the image encoding apparatus may compare the block vector information included in the history-based candidate list with the block vectors of the neighboring blocks used as IBC block vector candidates for IBC prediction of the current block (S3101). Here, step S3101 may be performed only for the candidate last included in the history-based candidate list.
[0663] In addition, step S3101 may be performed only when the area of the current block is greater than 16.
[0664] Furthermore, step S3101 may be performed only when the number of IBC block vector candidates included in the IBC block vector candidate list is less than the maximum number of merge candidates that may be included in the IBC block vector candidate list.
[0665] In addition, the image encoding apparatus may add the block vector information included in the history-based candidate list to the IBC block vector candidate list based on a result of performing step S3101 ( S3102 ).
[0666] Furthermore, if the block vector information included in the history-based candidate list and the block vector of the neighboring block are different as a result of performing step S3101 , the block vector information included in the history-based candidate list may be added to the IBC block vector candidate list.
[0667] Furthermore, step S3102 may be performed until the number of IBC block vector candidates included in the IBC block vector candidate list reaches a maximum number of merge candidates.
[0668] Furthermore, a maximum number of merge candidates that may be included in the IBC block vector candidate list may be determined based on encoding parameters.
[0669] Also, the neighboring block may include at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
[0670] Furthermore, the history-based candidate list may include block vector information of blocks encoded prior to encoding of the current block.
[0671] In addition, the image decoding apparatus may add block vector information of the current block to the history-based candidate list.
[0672] At this time, if a block encoded before encoding of the current block and the current block belong to different CTU (Coding Tree Unit) rows, block vector information of the current block may not be added to the history-based candidate list.
[0673] A bit stream generated by the image encoding method of the present invention may be temporarily stored in a non-transitory computer-readable recording medium, and may be decoded by the above-mentioned image decoding method.
[0674] Specifically, a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method, wherein the image encoding method includes: comparing block vector information included in a history-based candidate list with block vectors of neighboring blocks used as intra-block copy (IBC) block vector candidates for IBC prediction of a current block, and adding the block vector information included in the history-based candidate list to the IBC block vector candidate list based on the comparison. The comparison is performed only for the candidate last included in the history-based candidate list.
[0675] Fig.32 is a diagram illustrating an embodiment of constructing an IBC block vector candidate list using a history-based candidate list according to an embodiment of the present invention.
[0676] Reference Fig.32 , when adding the block vector information of the history-based candidate list to the IBC block vector candidate list, an index indicating the candidate in the history-based candidate list may be used. At this time, the history-based candidate list used to construct the IBC block vector candidate list may be referred to as HmvpIbcCandList. In addition, the IBC block vector candidate list may be referred to as bvCandList.
[0677] For example, an index indicating a candidate in the history-based candidate list (eg, hMvpIdx) may have a value from 0 to (maximum number of candidates in the history-based candidate list - 1). At this time, the maximum number of candidates in the history-based candidate list may be referred to as NumHmvpIbcCand.
[0678] A candidate in the history-based candidate list may be selected by an index. For example, a candidate in the history-based candidate list may be selected by hMvpIdx in the form of HmvpIbcCandList[hMvpIdx].
[0679] Fig.33 is a diagram illustrating an embodiment of a method for constructing an IBC block vector candidate list using a history-based candidate list according to an embodiment of the present invention.
[0680] Reference Fig.33 , when adding the block vector information of the history-based candidate list to the IBC block vector candidate list, an index indicating the candidate in the history-based candidate list may be used. At this time, the history-based candidate list used to construct the IBC block vector candidate list may be referred to as HmvpIbcCandList. In addition, the IBC block vector candidate list may be referred to as bvCandList.
[0681] For example, an index indicating a candidate in the history-based candidate list (eg, hMvpIdx) may have a value of 1 to (maximum number of candidates in the history-based candidate list). At this time, the maximum number of candidates in the history-based candidate list may be referred to as NumHmvpIbcCand.
[0682] A candidate in the history-based candidate list may be selected by an index. For example, a candidate in the history-based candidate list may be selected by hMvpIdx in the form of HmvpIbcCandList[hMvpIdx -1].
[0683] Fig.34 is a diagram illustrating an embodiment of a method for constructing a merge candidate list using a history-based candidate list according to an embodiment of the present invention.
[0684] Reference Fig.34 , when adding the block vector information of the history-based candidate list to the merge candidate list, an index indicating the candidate in the history-based candidate list may be used. At this time, the history-based candidate list used to construct the merge candidate list may be referred to as HmvpCandList. In addition, the merge candidate list may be referred to as mergeCandList.
[0685] For example, an index indicating a candidate in the history-based candidate list (eg, hMvpIdx) may have a value from 0 to (maximum number of candidates in the history-based candidate list - 1). At this time, the maximum number of candidates in the history-based candidate list may be referred to as NumHmvpCand.
[0686] A candidate in the history-based candidate list may be selected by index. For example, a candidate in the history-based candidate list may be selected by hMvpIdx in the form of HmvpCandList[hMvpIdx].
[0687] Fig.35 is a diagram illustrating an embodiment of a method for constructing a merge candidate list using a history-based candidate list according to an embodiment of the present invention.
[0688] Reference Fig.35 , when adding the block vector information of the history-based candidate list to the merge candidate list, an index indicating the candidate in the history-based candidate list may be used. At this time, the history-based candidate list used to construct the merge candidate list may be referred to as HmvpCandList. In addition, the merge candidate list may be referred to as mergeCandList.
[0689] For example, an index indicating a candidate in the history-based candidate list (eg, hMvpIdx) may have a value of 1 to (maximum number of candidates in the history-based candidate list). At this time, the maximum number of candidates in the history-based candidate list may be referred to as NumHmvpCand.
[0690] A candidate in the history-based candidate list may be selected by an index. For example, a candidate in the history-based candidate list may be selected by hMvpIdx in the form of HmvpCandList[hMvpIdx -1].
[0691] The embodiments of the present invention are applicable only when the block size is within a certain range.
[0692] For example, the present invention is applicable only when the size of the current block is equal to or greater than 8×8. For example, the present invention is applicable only when the size of the current block is equal to or greater than 16×16. For example, the present invention is applicable only when the size of the current block is equal to or greater than 32×32. For example, the present invention is applicable only when the size of the current block is equal to or greater than 64×64. For example, the present invention is applicable only when the size of the current block is equal to or greater than 128×128. For example, the embodiment is applicable only when the size of the current block is equal to or less than 4×4. For example, the embodiment is applicable only when the size of the current block is equal to or less than 8×8. For example, the embodiment is applicable only when the size of the current block is equal to or less than 16×16. For example, the embodiment is applicable only when the size of the current block is equal to or less than 16×16. For example, the embodiment is applicable only when the size of the current block is equal to or greater than 16×16 and equal to or less than 64×64.
[0693] As in the above-described embodiments of the present invention, the reference picture set used in the reference picture list construction and reference picture list modification processes may use a reference picture list of at least one of L0, L1, L2, or L3.
[0694] According to the above-described embodiment of the present invention, when calculating the boundary strength in the deblocking filter, 1 to N motion vectors of the current block may be used. Here, N may indicate a positive integer of 1 or more, and may be 2, 3, 4, or the like.
[0695] The above-described embodiment of the present invention is applicable even when the motion vector has at least one of a 16-pixel (16-pixel) unit, an 8-pixel (8-pixel) unit, a 4-pixel (4-pixel) unit, an integer pixel (integer pixel) unit, a 1 / 2 pixel (1 / 2 pixel) unit, a 1 / 4 pixel (1 / 4 pixel) unit, a 1 / 8 pixel (1 / 8 pixel) unit, a 1 / 16 pixel (1 / 16 pixel) unit, a 1 / 32 pixel (1 / 32 pixel) unit, or a 1 / 64 pixel (1 / 64 pixel) unit. In addition, the motion vector in the encoding / decoding process of the current block may be selectively used for each pixel unit.
[0696] At least one of a flag, an index, etc. entropy-encoded by the encoder and entropy-decoded by the decoder may use at least one of the following binarization methods.
[0697] Truncated Rice Binarization Method k-order Exponential Columbus Binarization Method Restricted k-order exponential Columbus binarization method Fixed-length binarization method Unary Binarization Method Truncated Unary Binarization Method The above-described embodiments may be performed in the same manner in an encoder and a decoder.
[0698] At least one embodiment or a combination of the above embodiments may be used to encode / decode a video.
[0699] The order in which the above-described embodiments are applied may be different between an encoder and a decoder, or the order in which the above-described embodiments are applied may be the same in an encoder and a decoder.
[0700] The above-described embodiments may be performed on each luminance signal and each chrominance signal, or may be performed identically on the luminance signal and the chrominance signal.
[0701] The block form to which the above-described embodiment of the present invention is applied may have a square form or a non-square form.
[0702] The above-mentioned embodiments of the present invention may be applied according to the size of at least one of a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size or a maximum size or both a minimum size and a maximum size so that the above-mentioned embodiments are applied, or the size may be defined as a fixed size to which the above-mentioned embodiments are applied. In addition, in the above-mentioned embodiments, the first embodiment may be applied to a first size, and the second embodiment may be applied to a second size. In other words, the above-mentioned embodiments may be applied in combination according to the size. In addition, the above-mentioned embodiments may be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, the above-mentioned embodiments may be applied when the block size is included in a specific range.
[0703] For example, when the size of the current block is 8×8 or larger,...
Claims
1. A method for decoding an image, the method comprising: Determine the prediction mode of the current block; as well as In response to a prediction mode of the current block being an intra block copy (IBC) mode, adding a first block vector candidate included in the history-based candidate list to an IBC block vector candidate list, In which, in response to the first block vector candidate being the last block vector candidate sequentially added to the history-based candidate list among the block vector candidates included in the history-based candidate list, adding the first block vector candidate comprises: performing a redundancy check by comparing a final block vector candidate with a second block vector candidate included in the IBC block vector candidate list; and In response to the result of the redundancy check indicating that the last block vector candidate is different from the second block vector candidate, adding the last block vector candidate to the IBC block vector candidate list, and In which, in response to the first block vector candidate not being the last block vector candidate, adding the first block vector candidate comprises: adding a first block vector candidate included in the history-based candidate list to the IBC block vector candidate list without performing the redundancy check, The current block is obtained by partitioning the current picture based on a partitioning method.
2. The method according to claim 1, wherein: The redundancy check is performed only when the size of the current block is greater than 16.
3. The method according to claim 1, wherein: The second block vector candidate included in the IBC block vector candidate list is a block vector of a neighboring block of the current block.
4. The method according to claim 1, wherein: Adding the first block vector candidate is performed only when the number of IBC block vector candidates added from the history-based candidate list included in the IBC block vector candidate list is less than a maximum number of merge candidates that can be included in the IBC block vector candidate list.
5. The method according to claim 4, wherein: Adding the first block vector candidate is performed until the number of IBC block vector candidates reaches a maximum number of merge candidates that can be included in the IBC block vector candidate list.
6. The method according to claim 5, wherein: A maximum number of merge candidates that can be included in the IBC block vector candidate list is determined based on encoding parameters.
7. The method according to claim 3, wherein: The neighboring block includes at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
8. The method according to claim 1, wherein: A block indicated by a block vector candidate included in the history-based candidate list is decoded prior to decoding of the current block.
9. A method for encoding an image, the method comprising: Determine the prediction mode of the current block; as well as In response to a prediction mode of the current block being an intra block copy (IBC) mode, adding a first block vector candidate included in the history-based candidate list to an IBC block vector candidate list, In which, in response to the first block vector candidate being the last block vector candidate sequentially added to the history-based candidate list among the block vector candidates included in the history-based candidate list, adding the first block vector candidate comprises: performing a redundancy check by comparing a final block vector candidate with a second block vector candidate included in the IBC block vector candidate list; and In response to the result of the redundancy check indicating that the last block vector candidate is different from the second block vector candidate, adding the last block vector candidate to the IBC block vector candidate list, and In which, in response to the first block vector candidate not being the last block vector candidate, adding the first block vector candidate comprises: adding a first block vector candidate included in the history-based candidate list to the IBC block vector candidate list without performing the redundancy check, The current block is obtained by partitioning the current picture based on a partitioning method.
10. The method according to claim 9, wherein: The redundancy check is performed only when the size of the current block is greater than 16.
11. The method according to claim 9, wherein: The second block vector candidate included in the IBC block vector candidate list is a block vector of a neighboring block of the current block.
12. The method according to claim 9, wherein: Adding the first block vector candidate is performed only when the number of IBC block vector candidates added from the history-based candidate list included in the IBC block vector candidate list is less than a maximum number of merge candidates that can be included in the IBC block vector candidate list.
13. The method according to claim 12, wherein: Adding the first block vector candidate is performed until the number of IBC block vector candidates reaches a maximum number of merge candidates that can be included in the IBC block vector candidate list.
14. The method according to claim 13, wherein: A maximum number of merge candidates that can be included in the IBC block vector candidate list is determined based on encoding parameters.
15. The method according to claim 11, wherein: The neighboring block includes at least one of a block adjacent to the left side of the current block or a block adjacent to the top of the current block.
16. The method according to claim 9, in, A block indicated by a block vector candidate included in the history-based candidate list is encoded prior to encoding of the current block.
17. A method for sending a bit stream, comprising: Determine the prediction mode of the current block; In response to a prediction mode of the current block being an intra block copy (IBC) mode, adding a first block vector candidate included in the history-based candidate list to an IBC block vector candidate list; as well as Sending a bitstream generated based on the prediction mode of the current block, In which, in response to the first block vector candidate being the last block vector candidate sequentially added to the history-based candidate list among the block vector candidates included in the history-based candidate list, adding the first block vector candidate comprises: performing a redundancy check by comparing a final block vector candidate with a second block vector candidate included in the IBC block vector candidate list; and In response to the result of the redundancy check indicating that the last block vector candidate is different from the second block vector candidate, adding the last block vector candidate to the IBC block vector candidate list, and In which, in response to the first block vector candidate not being the last block vector candidate, adding the first block vector candidate comprises: adding a first block vector candidate included in the history-based candidate list to the IBC block vector candidate list without performing the redundancy check, The current block is obtained by partitioning the current picture based on a partitioning method.