Image encoding / decoding methods and compressed video data transmission methods.

VN127575APending Publication Date: 2026-08-03ELECTRONICS & TELECOMM RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
VN1202604772
Authority / Receiving Office
VN · VN
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-18
Filing Date
2019-09-18
Publication Date
2026-08-03

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality video data leads to higher data volumes, resulting in increased transmission and storage costs, necessitating more efficient image encoding and decoding technologies.

Method used

A video encoding/decoding method and device that utilizes a candidate list to derive and update motion information for improved compression efficiency, specifically by adding motion information to a candidate list for inter prediction, managing list size, and merging motion information for efficient encoding and decoding.

Benefits of technology

This approach enhances compression efficiency by effectively using motion information for inter prediction, reducing data volume and costs associated with high-resolution video transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure VN1202604772_0
    Figure VN1202604772_0
Patent Text Reader

Abstract

The invention relates to a method for encoding / decoding images and a method for transmitting compressed video data. The method for decoding images comprises the following steps: inferring the motion information of the current block using a candidate catalog, generating a predicted block of the current block using the motion information of the current block, and adding the motion information of the current block to the candidate catalog, wherein this candidate catalog is used to predict inter-images for the block decoded after the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method, device, and recording medium storing bitstream

[0001] The present invention relates to a method and device for encoding / decoding an image and a recording medium storing a bitstream, and more particularly, to a method and device for encoding / decoding an image based on a candidate list and a recording medium storing a bitstream.

[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising as image data becomes higher in resolution and quality, highly efficient image encoding / decoding technologies for higher-resolution and higher-quality images are required.

[0003] There are various technologies for image compression, such as inter-picture prediction technology that predicts pixel values ​​included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values ​​included in the current picture using pixel information in the current picture, transformation and quantization technology for compressing the energy of the residual signal, and entropy coding technology that assigns short codes to values ​​with high frequency of appearance and long codes to values ​​with low frequency of appearance. Using these image compression technologies, image data can be effectively compressed and transmitted or stored.

[0004] The purpose of the present invention is to provide a video encoding / decoding method and device with improved compression efficiency, and a recording medium storing a bitstream generated by the video encoding method / device of the present invention.

[0005] In addition, the present invention aims to provide a video encoding / decoding method and device that improve compression efficiency by using a candidate list, and a recording medium storing a bitstream.

[0006] A video decoding method according to the present invention includes a step of deriving motion information of a current block using a candidate list, a step of generating a prediction block of the current block using the motion information of the current block, and a step of adding the motion information of the current block to the candidate list, wherein the candidate list can be used for inter prediction of a block to be decoded after the current block.

[0007] The above candidate list may include motion information of a block decrypted before the current block.

[0008] If the decrypted block before the current block and the current block belong to different Coding Tree Unit (CTU) rows, the motion information of the current block may not be added to the candidate list.

[0009] Motion information of the current block can be added to the candidate list only when the affine mode or sub-block based temporal motion vector derivation mode is not applied to the current block.

[0010] The step of adding the motion information of the current block to the candidate list may include, when the number of motion information included in the candidate list is a preset value, a step of deleting the motion information included in the candidate list first among the motion information included in the candidate list, and a step of adding the motion information of the current block in the next order of the motion information included last in the candidate list.

[0011] The step of adding the motion information of the current block to the candidate list may include, if motion information identical to the motion information of the current block is already included in the candidate list, the step of deleting the identical motion information from the candidate list, and the step of adding the motion information of the current block in the next order of motion information included most recently in the candidate list.

[0012] The maximum number of motion information that can be included in the above candidate list can be preset.

[0013] The above decryption method may further include a step of deriving a merge candidate list used for inter prediction of the current block using the candidate list.

[0014] The step of deriving the above merge candidate list may include a step of comparing motion information included in the candidate list with motion information included in the merge candidate list, and a step of adding motion information included in the candidate list to the merge candidate list based on the comparison.

[0015] A comparison between the motion information included in the above candidate list and the motion information included in the above merge candidate list can be performed only for a preset number of candidates located at the end of the above candidate list.

[0016] If the motion information included in the above candidate list is different from the motion information included in the above merge candidate list, the motion information included in the above candidate list may be added to the above merge candidate list.

[0017] The motion information included in the above candidate list can be added to the merge candidate list after adding a spatial merge candidate or a temporal merge candidate to the above merge candidate list.

[0018] A video encoding method according to the present invention comprises a step of deriving a merge candidate list of a current block using a candidate list, a step of deriving motion information of the current block using the merge candidate list, and a step of adding motion information of the current block to the candidate list, wherein the candidate list can be used for inter prediction of a block to be encoded after the current block.

[0019] The above candidate list may include motion information of a block encoded prior to the current block.

[0020] If the block encoded before the current block and the current block belong to different Coding Tree Unit (CTU) rows, the motion information of the current block may not be added to the candidate list.

[0021] Motion information of the current block can be added to the candidate list only when the affine mode or sub-block based temporal motion vector derivation mode is not applied to the current block.

[0022] The step of adding the motion information of the current block to the candidate list may include, when the number of motion information included in the candidate list is a preset value, a step of deleting the motion information included in the candidate list first among the motion information included in the candidate list, and a step of adding the motion information of the current block in the next order of the motion information included last in the candidate list.

[0023] The step of adding the motion information of the current block to the candidate list may include, if motion information identical to the motion information of the current block is already included in the candidate list, the step of deleting the identical motion information from the candidate list, and the step of adding the motion information of the current block in the next order of motion information included most recently in the candidate list.

[0024] The step of deriving the above merge candidate list may include a step of comparing motion information included in the candidate list with motion information included in the merge candidate list, and a step of adding motion information included in the candidate list to the merge candidate list based on the comparison.

[0025] A comparison between the motion information included in the above candidate list and the motion information included in the above merge candidate list can be performed only for a preset number of candidates located at the end of the above candidate list.

[0026] If the motion information included in the above candidate list is different from the motion information included in the above merge candidate list, the motion information included in the above candidate list may be added to the above merge candidate list.

[0027] The motion information included in the above candidate list can be added to the merge candidate list after adding a spatial merge candidate or a temporal merge candidate to the above merge candidate list.

[0028] According to the present invention, a computer-readable recording medium storing a bitstream received in a video decoding apparatus and used to restore a current block included in a current picture, wherein the bitstream includes information related to motion information of a block decoded before the current block, the motion information of the block decoded before the current block is used to derive a candidate list, the candidate list is used to derive motion information of the current block, the motion information of the current block is used to generate a prediction block of the current block, the motion information of the current block is used to update the candidate list, and the candidate list can be used for inter prediction of a block to be decoded after the current block.

[0029] According to the present invention, a video encoding / decoding method and device with improved compression efficiency and a recording medium storing a bitstream generated by the video encoding method / device of the present invention can be provided.

[0030] In addition, according to the present invention, a video encoding / decoding method and device for improving compression efficiency using a candidate list and a recording medium storing a bitstream can be provided.

[0031] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0032] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0033] Figure 3 is a diagram schematically showing the division structure of an image when encoding and decoding an image.

[0034] Figure 4 is a diagram for explaining an embodiment of an on-screen prediction process.

[0035] Figure 5 is a diagram for explaining an embodiment of a screen-to-screen prediction process.

[0036] Figure 6 is a diagram for explaining the process of transformation and quantization.

[0037] Figure 7 is a diagram illustrating reference samples available for prediction within the screen.

[0038] Figure 8 is a flowchart for explaining an image encoding / decoding method according to one embodiment of the present invention.

[0039] FIGS. 9 and 10 are diagrams for explaining a method of adding a neighboring block adjacent to a current block to a candidate list according to one embodiment of the present invention.

[0040] FIG. 11 and FIG. 12 are diagrams for explaining a method of adding a neighboring block to a candidate list by considering the length of contact between the current block and the neighboring block, according to one embodiment of the present invention.

[0041] FIG. 13 and FIG. 14 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the size of the surrounding block, according to one embodiment of the present invention.

[0042] FIG. 15 and FIG. 16 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the depth of the surrounding block, according to one embodiment of the present invention.

[0043] FIG. 17 and FIG. 18 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the division shape of the surrounding block, according to one embodiment of the present invention.

[0044] FIG. 19 and FIG. 20 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the block shape of the surrounding block, according to one embodiment of the present invention.

[0045] FIG. 21 is a diagram for explaining a method of adding a surrounding block to a candidate list by considering the encoding / decoding order of the surrounding blocks, according to one embodiment of the present invention.

[0046] FIG. 22 is a diagram for explaining a method for adding a surrounding block to a candidate list by considering the location of a surrounding block existing at a specific distance from the location of the current block, according to one embodiment of the present invention.

[0047] FIG. 23 is a diagram for explaining a method for adding a neighboring block to a candidate list by considering the location of the neighboring block existing at a specific distance from the location of at least one of a current picture, a subpicture, a slice, a tile, and a brick according to one embodiment of the present invention.

[0048] Figure 24 is a flowchart for explaining an image encoding / decoding method according to one embodiment of the present invention.

[0049] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to include all modifications, equivalents, and substitutes included within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be exaggerated for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.

[0050] In the present invention, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.

[0051] When a component of the present invention is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that other components may also be present in between. Conversely, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that no other components are present in between.

[0052] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0053] The terminology used in the present invention is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes plural expressions unless the context clearly indicates otherwise. In the present invention, it should be understood that the terms "comprise" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. In other words, the description of a specific configuration in the present invention as "comprising" does not exclude configurations other than the specified configuration, and means that additional configurations may be included in the scope of the implementation of the present invention or the technical idea of ​​the present invention.

[0054] Some components of the present invention may not be essential components that perform essential functions of the present invention, but may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used solely for performance enhancement. A structure that includes only essential components, excluding optional components used solely for performance enhancement, is also within the scope of the present invention.

[0055] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.

[0056] Hereinafter, the term "video" may refer to a single picture constituting a video, or may refer to the video itself. For example, "encoding and / or decoding of a video" may refer to "encoding and / or decoding of a video," or may refer to "encoding and / or decoding of one of the videos constituting the video."

[0057] Hereinafter, the terms “movie” and “video” may be used interchangeably and have the same meaning.

[0058] Hereinafter, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.

[0059] Hereinafter, the terms “image”, “picture”, “frame” and “screen” may be used interchangeably and have the same meaning.

[0060] Hereinafter, the target block may be an encoding target block that is the target of encoding and / or a decoding target block that is the target of decoding. Furthermore, the target block may be a current block that is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.

[0061] Hereinafter, the terms "block" and "unit" may be used interchangeably and have the same meaning. Alternatively, "block" may refer to a specific unit.

[0062] Hereinafter, the terms “region” and “segment” may be used interchangeably.

[0063] Hereinafter, a specific signal may be a signal representing a specific block. For example, the original signal may be a signal representing a target block. The prediction signal may be a signal representing a predicted block. The residual signal may be a signal representing a residual block.

[0064] In the embodiments, each of the specified information, data, flags, indices, and elements, attributes, etc., can have a value. The value "0" of the information, data, flags, indices, and elements, attributes, etc., can represent logical false or a first predefined value. That is, the values ​​"0", false, logical false, and the first predefined value can be used interchangeably with each other. The value "1" of the information, data, flags, indices, and elements, attributes, etc., can represent logical true or a second predefined value. That is, the values ​​"1", true, logical true, and the second predefined value can be used interchangeably with each other.

[0065] When a variable such as i or j is used to represent a row, column, or index, the value of i can be an integer greater than or equal to 0, or an integer greater than or equal to 1. That is, in the embodiments, rows, columns, and indices can be counted from 0, or can be counted from 1.

[0066]

[0067] Glossary of Terms

[0068] Encoder: refers to a device that performs encoding. In other words, it can mean an encoding device.

[0069] Decoder: Refers to a device that performs decoding. In other words, it can refer to a decoding device.

[0070] Block: An MxN array of samples. Here, M and N can represent positive integer values, and a block can commonly represent a two-dimensional sample array. A block can represent a unit. The current block can represent an encoding target block that is the target of encoding during encoding, and a decoding target block that is the target of decoding during decoding. In addition, the current block can be at least one of an encoding block, a prediction block, a residual block, and a transform block.

[0071] Sample: The basic unit that constitutes a block. Bit depth (B) d ) from 0 to 2 Bd - It can be expressed as a value up to 1. In the present invention, a sample can be used with the same meaning as a pixel or a pixel. That is, a sample, a pixel, and a pixel can have the same meaning.

[0072] Unit: This may refer to a unit of image encoding and decoding. In image encoding and decoding, a unit may be a region into which one image is divided. In addition, a unit may refer to a divided unit when one image is divided into detailed units and encoded or decoded. That is, one image may be divided into multiple units. In image encoding and decoding, predefined processing may be performed for each unit. One unit may be further divided into sub-units having a smaller size than the unit. Depending on the function, a unit may refer to 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, etc. In addition, a unit may mean a luminance component block, a corresponding chroma component block, and a syntax element for each block to distinguish it from a block. The unit may have various sizes and shapes, and in particular, the shape of the unit may include a geometric shape that can be expressed in two dimensions, such as a square, a rectangle, a trapezoid, a triangle, a pentagon, etc. In addition, the unit information may include at least one or more of the type of the unit indicating an encoding unit, a prediction unit, a residual unit, a transformation unit, etc., the size of the unit, the depth of the unit, the encoding and decoding order of the unit, etc.

[0073] Coding Tree Unit: It consists of one luminance component (Y) coding tree block and two chrominance component (Cb, Cr) coding tree blocks related to it. It may also mean including the blocks and syntax elements for each block. Each coding tree unit may be split using one or more splitting methods such as a quad tree, a binary tree, a ternary tree, etc. to form lower units such as a coding unit, a prediction unit, a transformation unit, etc. It may be used as a term to refer to a sample block that becomes a processing unit in the process of decoding / encoding an image, such as splitting an input image. Here, a quad tree may mean a quarternary tree.

[0074] If the size of the coding block falls within a predetermined range, splitting may only be possible using a quadtree. 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 split using only a quadtree. Information indicating the maximum / minimum size of the coding block that allows splitting using a quadtree form may be signaled through a bitstream, and the information may be signaled in units of at least one of a sequence, a picture parameter, a tile group, or a slice (segment). Alternatively, the maximum / minimum size of the coding block may be a fixed size pre-set in the encoder / decoder. For example, if the size of the coding block is 256x256 to 64x64, splitting may only be possible using a quadtree. Alternatively, if the size of the coding block is larger than the size of the maximum transform block, splitting may only be possible using a quadtree. In this case, the block to be split may be at least one of the coding block or the transform block. In such cases, the information indicating the division of the coding block (e.g., split_flag) may be a flag indicating whether or not a quadtree is split. If the size of the coding block falls within a certain range, splitting may only be possible using a binary tree or a 3-split tree. In this case, the above description regarding the quadtree may be equally applicable to the binary tree or the 3-split tree.

[0075] Coding Tree Block: This term can be used to refer to any one of the Y coding tree block, Cb coding tree block, and Cr coding tree block.

[0076] Neighbor block: This may refer to a block adjacent to the current block. A block adjacent to the current block may refer to a block whose boundary borders the current block or a block located within a predetermined distance from the current block. A neighboring block may refer to a block adjacent to a vertex of the current block. Here, a block adjacent to a vertex of the current block may refer to a block vertically adjacent to a neighboring block horizontally adjacent to the current block, or a block horizontally adjacent to a neighboring block vertically adjacent to the current block. A neighboring block may also refer to a restored neighboring block.

[0077] Reconstructed Neighbor Block: This may refer to a neighboring block that has already been spatially / temporally encoded or decoded around the current block. In this case, the reconstructed neighboring block may refer to a reconstructed neighboring unit. The reconstructed spatial neighboring block may be a block within the current picture that has already been reconstructed through encoding and / or decoding. The reconstructed temporal neighboring block may be a reconstructed block or a neighboring block of a location corresponding to the current block of the current picture within the reference image.

[0078] Unit Depth: This can indicate the degree to which a unit has been divided. In a tree structure, the root node corresponds to the initial, undivided unit. This root node can be referred to as the root node. Furthermore, the root node can have the minimum depth. In this case, the root node can have a depth of level 0. A node with a depth of level 1 can represent a unit created by splitting the initial unit once. A node with a depth of level 2 can represent a unit created by splitting the initial unit twice. A node with a depth of level n can represent a unit created by splitting the initial unit n times. A leaf node can be the lowest node and cannot be further divided. The depth of a leaf node can be the maximum level. For example, the default value for the maximum level can be 3. The root node can be said to have the shallowest depth, and the leaf node can have the deepest depth. Additionally, when units are represented in a tree structure, the level at which a unit exists can indicate unit depth.

[0079] Bitstream: This can mean a string of bits containing encoded image information.

[0080] Parameter Set: Corresponds to header information among the structures 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 also include tile group, slice header, and tile header information. In addition, the tile group may mean a group including multiple tiles, and may have the same meaning as a slice.

[0081] An adaptation parameter set may refer to a parameter set that can be shared and referenced by different pictures, subpictures, slices, tile groups, tiles, or bricks. Furthermore, subpictures, slices, tile groups, tiles, or bricks within a picture may reference different adaptation parameter sets and use information within the adaptation parameter set.

[0082] Additionally, adaptation parameter sets can reference different adaptation parameter sets using identifiers of different adaptation parameter sets in subpictures, slices, tile groups, tiles, or bricks within a picture.

[0083] Additionally, adaptation parameter sets can reference different adaptation parameter sets within a slice, tile group, tile, or brick within a subpicture using identifiers of different adaptation parameter sets.

[0084] Additionally, different adaptation parameter sets can be referenced by using identifiers of different adaptation parameter sets within tiles or bricks within a slice.

[0085] Additionally, the adaptation parameter sets can reference different adaptation parameter sets using identifiers of different adaptation parameter sets within the bricks within the tile.

[0086] By including information about an adaptation parameter set identifier in the parameter set or header of the above subpicture, an adaptation parameter set corresponding to the adaptation parameter set identifier can be used in the subpicture.

[0087] By including information about an adaptation parameter set identifier in the parameter set or header of the above tile, an adaptation parameter set corresponding to the adaptation parameter set identifier can be used in the tile.

[0088] By including information about an adaptation parameter set identifier in the header of the above brick, an adaptation parameter set corresponding to the adaptation parameter set identifier can be used in the brick.

[0089] The above picture can be divided into one or more rows of tiles and one or more columns of tiles.

[0090] The above subpicture may be divided into one or more tile rows and one or more tile columns within the picture. The above subpicture is a rectangular / square region within the picture and may include one or more CTUs. Additionally, one subpicture may include at least one tile / brick / slice.

[0091] The above tile is a rectangular / square area within the picture and may include one or more CTUs. In addition, the tile may be divided into one or more bricks.

[0092] The above brick may represent one or more CTU rows within a tile. A tile may be divided into one or more bricks, and each brick may have at least one CTU row. A tile that is not divided into two or more tiles may also represent a brick.

[0093] The above slice may include one or more tiles within a picture, and may include one or more bricks within a tile.

[0094] Parsing: This can mean entropy decoding a bitstream to determine the values ​​of syntax elements, or it can mean entropy decoding itself.

[0095] Symbol: It can mean at least one of the syntax elements of the target unit for encoding / decoding, the coding parameter, the value of the transform coefficient, etc. In addition, the symbol can mean the target of entropy encoding or the result of entropy decoding.

[0096] Prediction Mode: This can be information indicating a mode in which encoding / decoding is performed with intra-screen prediction or a mode in which encoding / decoding is performed with inter-screen prediction.

[0097] Prediction Unit: This can refer to the basic unit used when performing predictions, such as inter-screen prediction, intra-screen prediction, inter-screen compensation, intra-screen compensation, and motion compensation. A single prediction unit can be divided into multiple partitions or multiple sub-prediction units of smaller sizes. Multiple partitions can also be the basic unit for performing prediction or compensation. Partitions created by dividing a prediction unit can also be prediction units.

[0098] Prediction Unit Partition: This can refer to the form in which the prediction unit is divided.

[0099] Reference Picture List: This may refer to a list containing one or more reference pictures used for inter-frame prediction or motion compensation. The types of reference picture lists may include LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3), etc., and one or more reference picture lists may be used for inter-frame prediction.

[0100] Inter-Prediction Indicator: This can indicate the inter-prediction direction (unidirectional prediction, bidirectional prediction, etc.) of the current block. Alternatively, it can indicate the number of reference images used to generate the prediction block for the current block. Alternatively, it can indicate the number of prediction blocks used when performing inter-prediction or motion compensation for the current block.

[0101] Prediction list utilization flag: Indicates whether a prediction block is generated using at least one reference picture within a specific reference picture list. The prediction list utilization flag can be used to derive an inter-screen prediction indicator, and conversely, the prediction list utilization flag can be derived using the inter-screen prediction indicator. For example, when the prediction list utilization flag indicates a first value of 0, it can indicate that a prediction block is not generated using a reference picture within the reference picture list, and when it indicates a second value of 1, it can indicate that a prediction block can be generated using the reference picture list.

[0102] Reference Picture Index: This may refer to an index that indicates a specific reference picture in the reference picture list.

[0103] Reference Picture: This may refer to an image referenced by a specific block for inter-frame prediction or motion compensation. Alternatively, the reference picture may be an image that includes a reference block referenced by the current block for inter-frame prediction or motion compensation. Hereinafter, the terms "reference picture" and "reference picture" may be used interchangeably and have the same meaning.

[0104] Motion Vector: This can be a two-dimensional vector used for inter-frame prediction or motion compensation. A motion vector can indicate the offset between a target block to be encoded / decoded and a reference block. For example, (mvX, mvY) can represent a motion vector. mvX can represent the horizontal component, and mvY can represent the vertical component.

[0105] Search Range: The search range can be a two-dimensional region where motion vectors are searched during inter-frame prediction. For example, the search range can have dimensions MxN, where M and N can each be positive integers.

[0106] Motion Vector Candidate: When predicting a motion vector, this can refer to a block that becomes a prediction candidate or the motion vector of that block. Additionally, the motion vector candidate can be included in a motion vector candidate list.

[0107] Motion Vector Candidate List: This may refer to a list constructed using one or more motion vector candidates.

[0108] Motion Vector Candidate Index: This may refer to an indicator pointing to a motion vector candidate within the motion vector candidate list. It may be the index of a motion vector predictor.

[0109] Motion Information: may mean information including at least one of a motion vector, a reference image index, an inter-screen prediction indicator, a prediction list utilization flag, reference image list information, a reference image, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.

[0110] Merge Candidate List: This may refer to a list constructed using one or more merge candidates.

[0111] Merge Candidate: This can refer to a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-prediction merge candidate, a zero-merge candidate, etc. Merge candidates can include motion information such as inter-frame prediction indicators, reference image indices for each list, motion vectors, prediction list utilization flags, and inter-frame prediction indicators.

[0112] Merge Index: This may refer to an indicator that points to a merge candidate within the merge candidate list. Furthermore, the merge index may indicate the block that derived the merge candidate among the restored blocks spatially and temporally adjacent to the current block. Furthermore, the merge index may indicate at least one piece of motion information associated with the merge candidate.

[0113] Transform Unit: This can refer to a basic unit when performing residual signal encoding / decoding, such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding / decoding. One transform unit can be divided into multiple lower transform units having smaller sizes. Here, the transform / inverse transform can include at least one of a primary transform / inverse transform and a secondary transform / inverse transform.

[0114] Scaling: This can refer to the process of multiplying a quantized level by a factor. The result of scaling the quantized level can be a transform coefficient. Scaling can also be called dequantization.

[0115] Quantization Parameter: This can refer to a value used when generating quantized levels using transform coefficients in quantization. Alternatively, it can refer to a value used when generating transform coefficients by scaling quantized levels in dequantization. The quantization parameter can be a value mapped to the quantization step size.

[0116] Delta Quantization Parameter: This can mean the difference value between the predicted quantization parameter and the quantization parameter of the target unit to be encoded / decoded.

[0117] Scan: This can refer to a method for arranging the order of coefficients within a unit, block, or matrix. For example, sorting a two-dimensional array into a one-dimensional array is called a scan. Alternatively, sorting a one-dimensional array into a two-dimensional array can also be called a scan or inverse scan.

[0118] Transform Coefficient: This may refer to a coefficient value generated after performing a transform in an encoder. Alternatively, it may refer to a coefficient value generated after performing at least one of entropy decoding and dequantization in a decoder. The meaning of the transform coefficient may also include a quantized level or a quantized transform coefficient level that applies quantization to a transform coefficient or residual signal.

[0119] Quantized Level: This can refer to the value generated by performing quantization on a transform coefficient or residual signal in an encoder. Alternatively, it can refer to the value that is the target of dequantization before dequantization is performed in a decoder. Similarly, the quantized transform coefficient level, which is the result of transformation and quantization, can also be included in the meaning of the quantized level.

[0120] Non-zero Transform Coefficient: This can mean a transform coefficient whose magnitude is not 0, a transform coefficient level whose magnitude is not 0, or a quantized level.

[0121] Quantization Matrix: This can refer to a matrix used in the quantization or dequantization process to improve the subjective or objective image quality. The quantization matrix can also be called a scaling list.

[0122] Quantization Matrix Coefficient: This can refer to each element within a quantization matrix. Quantization matrix coefficients can also be called matrix coefficients.

[0123] Default Matrix: This can refer to a predetermined quantization matrix that is predefined in the encoder and decoder.

[0124] Non-default Matrix: This can refer to a quantization matrix that is not predefined in the encoder and decoder and is signaled by the user.

[0125] Statistical value: The statistical value for at least one variable, encoding parameter, constant, etc. having specific operable values ​​may be at least one of the mean, weighted mean, weighted sum, minimum, maximum, mode, median, and interpolation values ​​of the specific values.

[0126] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0127] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.

[0128] Referring to FIG. 1, the encoding device (100) may include a motion prediction unit (111), a motion compensation unit (112), an intra prediction unit (120), a switch (115), a subtractor (125), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (175), a filter unit (180), and a reference picture buffer (190).

[0129] The encoding device (100) can perform encoding on an input image in intra mode and / or inter mode. In addition, the encoding device (100) can generate a bitstream including encoded information through encoding the input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed through a wired / wireless transmission medium. When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean an intra-screen prediction mode, and the inter mode can mean an inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of the input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using a residual of the input block and the prediction block. The input image may be referred to as the current image, which is the current encoding target. The input block may be referred to as the current block, which is the current encoding target, or the encoding target block.

[0130] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.

[0131] When the prediction mode is inter mode, the motion prediction unit (111) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).

[0132] The motion compensation unit (112) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.

[0133] The above motion prediction unit (111) and motion compensation unit (112) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is a skip mode, a merge mode, an advanced motion vector prediction (AMVP) mode, or a current picture reference mode based on the encoding unit, and perform inter-screen prediction or motion compensation according to each mode.

[0134] The subtractor (125) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.

[0135] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient 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 also skip the transform on the residual block.

[0136] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.

[0137] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter, and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.

[0138] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values ​​produced by the quantization unit (140) or coding parameter values ​​produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.

[0139] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.

[0140] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).

[0141] Coding parameters may include not only information (flags, indices, etc.) encoded by the encoder and signaled to the decoder, such as syntax elements, but also information derived during the encoding or decoding process, and may mean information required when encoding or decoding an image. For example, unit / block size, unit / block depth, unit / block partition information, unit / block shape, unit / block partition structure, whether to partition in quadtree shape, whether to partition in binary tree shape, partition direction in binary tree shape (horizontal direction or vertical direction), partition type in binary tree shape (symmetric partition or asymmetric partition), whether to partition in 3-partition tree shape, partition direction in 3-partition tree shape (horizontal direction or vertical direction), partition type in 3-partition tree shape (symmetric partition or asymmetric partition), whether to partition in composite tree shape, partition direction in composite tree shape (horizontal direction or vertical direction), partition type in composite tree shape (symmetric partition or asymmetric partition), partition tree in composite tree shape (binary tree or 3-partition tree), prediction mode (intra-screen prediction or inter-screen prediction), intra-screen luminance prediction mode / direction, intra-screen chrominance prediction mode / direction, intra-screen partition information, inter-screen partition information, encoding block partition flag, prediction block partition flag, transform block partition flag, reference sample filtering method, reference sample filter tab, reference sample filter coefficients, prediction block filtering method, prediction block filter Tab, prediction block filter coefficient, prediction block boundary filtering method, prediction block boundary filter tab, prediction block boundary filter coefficient, intra-screen prediction mode, inter-screen prediction mode, motion information, motion vector, motion vector difference, reference picture index, inter-screen prediction direction, inter-screen prediction indicator, prediction list utilization flag, reference picture list, reference picture, 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, motion vector representation accuracy, transform type, transform size, information on whether to use the first transform, information on whether to use the second transform, first transform index, second transform index, information on whether there is a residual signal, coded block pattern, coded block flag, quantization parameter, residual quantization parameter, quantization matrix, whether to apply an intra-screen loop filter, intra-screen loop filter coefficients, intra-screen loop filter tap, intra-screen loop filter shape / shape, whether to apply a deblocking filter, deblocking filter coefficients, deblocking filter tap, deblocking filter strength, deblocking filter shape / shape, whether to apply an 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 tap, adaptive loop filter shape / shape, binarization / inverse binarization method, context model determination method, context model update method, whether to perform a regular mode, Whether to perform bypass mode, context bin, bypass bin, significant coefficient flag, last significant coefficient flag, coefficient group unit encoding flag, last significant coefficient position, flag whether coefficient value is greater than 1, flag whether coefficient value is greater than 2, flag whether coefficient value is greater than 3, remaining coefficient value information, sign information, restored luminance sample, restored chrominance sample, residual luminance sample, residual chrominance sample, luminance transform coefficient, chrominance transform coefficient, luminance quantized level, chrominance quantized level, transform coefficient level scanning method, size of decoder lateral motion vector search region, shape of decoder lateral motion vector search region, number of decoder lateral motion vector searches, CTU size information, minimum block size information, maximum block size information, maximum block depth information, minimum block depth information, image display / output order, slice identification information, slice type,At least one value or a combined form of slice division information, tile group identification information, tile group type, tile group division information, tile identification information, tile type, tile division information, picture type, input sample bit depth, restored sample bit depth, residual sample bit depth, transform coefficient bit depth, quantized level bit depth, information about a luminance signal, and information about a chrominance signal may be included in the encoding parameter.

[0142] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.

[0143] When the encoding device (100) performs encoding through inter prediction, the encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).

[0144] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (175), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block.

[0145] The restoration block may pass through a filter unit (180). The filter unit (180) may apply at least one of a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), etc. to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter.

[0146] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.

[0147] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis for deblocked images. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions. Alternatively, the offset can be applied by considering the edge information of each sample.

[0148] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.

[0149] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.

[0150] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0151] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

[0152] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (255), a filter unit (260), and a reference picture buffer (270).

[0153] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.

[0154] If the prediction mode used for decryption is intra mode, the switch can be switched to intra. If the prediction mode used for decryption is inter mode, the switch can be switched to inter.

[0155] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.

[0156] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.

[0157] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).

[0158] The quantized level can be dequantized in the dequantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing the dequantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level.

[0159] When the intra mode is used, the intra prediction unit (240) can generate a prediction block by performing spatial prediction on the current block using sample values ​​of already decoded blocks surrounding the block to be decoded.

[0160] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode.

[0161] The adder (255) can add the restored residual block and the prediction block to generate a restored 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 restored block or restored image. The filter unit (260) can output the restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.

[0162] Figure 3 is a diagram schematically illustrating an image segmentation structure when encoding and decoding an image. Figure 3 schematically illustrates an embodiment in which one unit is divided into multiple sub-units.

[0163] In order to efficiently segment an image, a coding unit (CU) may be used in encoding and decoding. The coding unit may be used as a basic unit for image encoding / decoding. In addition, the coding unit may be used as a unit for distinguishing an intra-screen prediction mode and an inter-screen prediction mode during image encoding / decoding. The coding unit may be a basic unit used for the process of prediction, transformation, quantization, inverse transformation, inverse quantization, or encoding / decoding of transform coefficients.

[0164] Referring to FIG. 3, an image (300) is sequentially divided into Largest Coding Unit (LCU) units, and a division structure is determined for each LCU unit. Here, LCU may be used in the same sense as Coding Tree Unit (CTU). Division of a unit may mean division of a block corresponding to the unit. Block division information may include information regarding the depth of the unit. The depth information may indicate the number of times and / or the degree to which the unit is divided. One unit may be hierarchically divided into multiple sub-units with depth information based on a tree structure. In other words, a unit and a sub-unit generated by division of the unit may correspond to a node and a child node of the node, respectively. Each divided sub-unit may have depth information. The depth information may be information indicating the size of a CU and may be stored for each CU. Since the unit depth indicates the number of times and / or the degree to which the unit is divided, the division information of a sub-unit may include information regarding the size of the sub-unit.

[0165] The partition structure may refer to the distribution of coding units (CUs) within the CTU (310). This distribution may be determined depending on whether to partition one CU into a plurality of CUs (a positive integer greater than or equal to 2, including 2, 4, 8, 16, etc.). The horizontal and vertical sizes of the CU generated by the partition may be half the horizontal size and half the vertical size of the CU before the partition, respectively, or may be smaller than the horizontal size and vertical size of the CU before the partition, depending on the number of partitions. The CU may be recursively partitioned into a plurality of CUs. By recursive partitioning, at least one of the horizontal size and the vertical size of the partitioned CU may be reduced compared to at least one of the horizontal size and the vertical size of the CU before the partitioning. The partitioning of the CU may be performed recursively up to a predefined depth or a predefined size. For example, the depth of a CTU may be 0, and the depth of a Smallest Coding Unit (SCU) may be a predefined maximum depth. Here, the CTU may be a coding unit having the largest coding unit size as described above, and the SCU may be a coding unit having the smallest coding unit size. Splitting starts from the CTU (310), and each time the horizontal and / or vertical size of the CU is reduced by the splitting, the depth of the CU increases by 1. For example, for each depth, a CU that is not split may have a size of 2Nx2N. Additionally, for a CU that is split, a CU of size 2Nx2N may be split into four CUs of size NxN. The size of N may be halved each time the depth increases by 1.

[0166] Additionally, information on whether a CU is split can be expressed through the CU's split information. The split information can be 1-bit information. All CUs except SCUs can include split information. For example, if the split information value is the first value, the CU may not be split, and if the split information value is the second value, the CU may be split.

[0167] Referring to Figure 3, a CTU with depth 0 can be a 64x64 block. 0 can be the minimum depth. An SCU with depth 3 can be an 8x8 block. 3 can be the maximum depth. CUs of 32x32 blocks and 16x16 blocks can be represented as depths 1 and 2, respectively.

[0168] For example, when one coding unit is split into four coding units, the horizontal and vertical sizes of the four split coding units may be half the sizes of the horizontal and vertical sizes of the coding unit before being split. For example, when a coding unit having a size of 32x32 is split into four coding units, each of the four split coding units may have a size of 16x16. When one coding unit is split into four coding units, it can be said that the coding unit is split in the form of a quad-tree (quad-tree partition).

[0169] For example, when one coding unit is split into two coding units, the horizontal or vertical size of the two split coding units may be half the size compared to the horizontal or vertical size of the coding unit before being split. For example, when a coding unit having a size of 32x32 is split vertically into two coding units, each of the two split coding units may have a size of 16x32. For example, when a coding unit having a size of 8x32 is split horizontally into two coding units, each of the two split coding units may have a size of 8x16. When one coding unit is split into two coding units, the coding unit can be said to be split in the form of a binary tree (binary-tree partition).

[0170] For example, when one coding unit is split into three coding units, the coding unit can be split into three coding units by splitting the horizontal or vertical size of the coding unit before splitting at a ratio of 1:2:1. For example, when a coding unit having a size of 16x32 is split horizontally into three coding units, the three split coding units can have sizes of 16x8, 16x16, and 16x8 from the top, respectively. For example, when a coding unit having a size of 32x32 is split vertically into three coding units, the three split coding units can have sizes of 8x32, 16x32, and 8x32 from the left, respectively. When one coding unit is split into three coding units, the coding unit can be said to have been split in the form of a ternary-tree (ternary-tree partition).

[0171] CTU (320) of Fig. 3 is an example of a CTU to which quadtree partitioning, binary tree partitioning, and 3-split tree partitioning are all applied.

[0172] As described above, at least one of quadtree partitioning, binary tree partitioning, and 3-partition tree partitioning may be applied to partition a CTU. Each partitioning may be applied based on a predetermined priority. For example, quadtree partitioning may be preferentially applied to a CTU. A coding unit that cannot be further quadtree partitioned may correspond to a leaf node of a quadtree. A coding unit corresponding to a leaf node of a quadtree may be a root node of a binary tree and / or a 3-partition tree. That is, a coding unit corresponding to a leaf node of a quadtree may be binary-tree partitioned, 3-partition tree partitioned, or may not be partitioned any further. At this time, by preventing quadtree partitioning from being performed again on a coding unit generated by binary-tree partitioning or 3-partition tree partitioning of a coding unit corresponding to a leaf node of a quadtree, partitioning of a block and / or signaling of partition information may be effectively performed.

[0173] The splitting of a coding unit corresponding to each node of a quadtree can be signaled using quad splitting information. Quad splitting information having a first value (e.g., '1') can indicate that the corresponding coding unit is quadtree split. Quad splitting information having a second value (e.g., '0') can indicate that the corresponding coding unit is not quadtree split. The quad splitting information can be a flag having a predetermined length (e.g., 1 bit).

[0174] There may be no priority between binary tree partitioning and 3-partition tree partitioning. That is, a coding unit corresponding to a leaf node of a quadtree may be partitioned either by a binary tree or by a 3-partition tree. Furthermore, a coding unit generated by a binary tree partitioning or a 3-partition tree partitioning may be partitioned again by a binary tree or a 3-partition tree, or may not be partitioned any further.

[0175] A partition in which there is no priority between a binary tree partition and a 3-partition tree partition can be called a multi-type tree partition. That is, a coding unit corresponding to a leaf node of a quadtree can become a root node of a multi-type tree. The partitioning of a coding unit corresponding to each node of a multi-type tree can be signaled using at least one of information on whether the multi-type tree is partitioned, information on the direction of partitioning, and information on the partition tree. For the partitioning of a coding unit corresponding to each node of the multi-type tree, information on whether the multi-type tree is partitioned, information on the direction of partitioning, and information on the partition tree may be sequentially signaled.

[0176] Information on whether a composite tree with a first value (e.g., '1') is split may indicate that the corresponding encoding unit is split into a composite tree. Information on whether a composite tree with a second value (e.g., '0') may indicate that the corresponding encoding unit is not split into a composite tree.

[0177] When an encoding unit corresponding to each node of a composite tree is split into a composite tree, the encoding unit may further include split direction information. The split direction information may indicate a split direction of the composite tree split. Split direction information having a first value (e.g., '1') may indicate that the corresponding encoding unit is split in a vertical direction. Split direction information having a second value (e.g., '0') may indicate that the corresponding encoding unit is split in a horizontal direction.

[0178] When an encoding unit corresponding to each node of a composite tree is split into a composite tree, the encoding unit may further include split tree information. The split tree information may indicate a tree used for splitting the composite tree. Split tree information having a first value (e.g., '1') may indicate that the encoding unit is split into a binary tree. Split tree information having a second value (e.g., '0') may indicate that the encoding unit is split into a 3-split tree.

[0179] The information on whether to split, the information on the split tree, and the information on the split direction may each be flags having a predetermined length (e.g., 1 bit).

[0180] At least one of quad partition information, information on whether a composite tree is partitioned, partition direction information, and partition tree information can be entropy encoded / decoded. For entropy encoding / decoding of the above information, information of a peripheral encoding unit adjacent to a current encoding unit can be used. For example, the partitioning shape (whether to be partitioned, partition tree, and / or partitioning direction) of a left encoding unit and / or an upper encoding unit is likely to be similar to the partitioning shape of the current encoding unit. Therefore, based on the information of the peripheral encoding unit, context information for entropy encoding / decoding of the information of the current encoding unit can be derived. At this time, the information of the peripheral encoding unit can include at least one of quad partition information of the corresponding encoding unit, information on whether a composite tree is partitioned, partition direction information, and partition tree information.

[0181] In another embodiment, among binary tree partitioning and 3-partition tree partitioning, binary tree partitioning may be performed preferentially. That is, binary tree partitioning may be applied first, and the encoding unit corresponding to the leaf node of the binary tree may be set as the root node of the 3-partition tree. In this case, quadtree partitioning and binary tree partitioning may not be performed for the encoding unit corresponding to the node of the 3-partition tree.

[0182] A coding unit that cannot be further split by quadtree splitting, binary tree splitting, and / or 3-tree splitting can become a unit of encoding, prediction, and / or transformation. That is, a coding unit may not be further split for prediction and / or transformation. Accordingly, a split structure, split information, etc. for splitting a coding unit into prediction units and / or transformation units may not exist in the bitstream.

[0183] However, if the size of the encoding unit that is the unit of division is larger than the size of the largest transform block, the encoding unit may be recursively divided until the size becomes equal to or smaller than the size of the largest transform block. For example, if the size of the encoding unit is 64x64 and the size of the largest transform block is 32x32, the encoding unit may be divided into four 32x32 blocks for transformation. For example, if the size of the encoding unit is 32x64 and the size of the largest transform block is 32x32, the encoding unit may be divided into two 32x32 blocks for transformation. In this case, whether or not to split the encoding unit for transformation is not separately signaled, but may be determined by comparing the width or height of the encoding unit with the width or height of the largest transform block. For example, if the width of the encoding unit is larger than the width of the largest transform block, the encoding unit may be divided into two vertically. Additionally, if the height of the encoding unit is greater than the height of the maximum transform block, the encoding unit may be divided into two halves horizontally.

[0184] Information about the maximum and / or minimum size of the coding unit and information about the maximum and / or minimum size of the transform block can be signaled or determined at a higher level of the coding unit. The higher level can be, for example, a sequence level, a picture level, a tile level, a tile group level, a slice level, etc. For example, the minimum size of the coding unit can be determined as 4x4. For example, the maximum size of the transform block can be determined as 64x64. For example, the minimum size of the transform block can be determined as 4x4.

[0185] Information about the minimum size of a coding unit corresponding to a leaf node of a quadtree (quadtree minimum size) and / or information about the maximum depth from a root node to a leaf node of a composite tree (composite tree maximum depth) 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 level, etc. Information about the quadtree minimum size and / or information about the composite tree maximum depth may be signaled or determined for each of an intra-screen slice and an inter-screen slice.

[0186] The differential information about the size of a CTU and the maximum size of a transform block can be signaled or determined at a higher level of the coding unit. The higher level can be, for example, a sequence level, a picture level, a slice level, a tile group level, a tile level, etc. Information about the maximum size of a coding unit corresponding to each node of a binary tree (binary tree maximum size) can be determined based on the size of the coding tree unit and the differential information. The maximum size of a coding unit corresponding to each node of a 3-partition tree (3-partition tree maximum size) can have different values ​​depending on the type of slice. For example, in the case of an intra-screen slice, the maximum size of the 3-partition tree can be 32x32. Also, for example, in the case of an inter-screen slice, the maximum size of the 3-partition tree can be 128x128. For example, the minimum size of the encoding unit corresponding to each node of the binary tree (binary tree minimum size) and / or the minimum size of the encoding unit corresponding to each node of the 3-partition tree (3-partition tree minimum size) can be set as the minimum size of the encoding block.

[0187] As another example, the maximum size of a binary tree and / or the maximum size of a 3-partition tree may be signaled or determined at the slice level. Additionally, the minimum size of a binary tree and / or the minimum size of a 3-partition tree may be signaled or determined at the slice level.

[0188] Based on the size and depth information of the various blocks described above, quad partition information, information on whether a composite tree is partitioned, partition tree information, and / or partition direction information may or may not be present in the bitstream.

[0189] For example, if the size of the encoding unit is not greater than the quadtree minimum size, the encoding unit does not include quad partition information, and the quad partition information can be inferred as the second value.

[0190] For example, if the size (width and height) of an encoding unit corresponding to a node of a composite tree is larger than the maximum size (width and height) of a binary tree and / or the maximum size (width and height) of a 3-partition tree, the encoding unit may not be split into a binary tree and / or a 3-partition tree. Accordingly, information on whether the composite tree is split is not signaled, but can be inferred as a second value.

[0191] Alternatively, if the size (width and height) of the encoding unit corresponding to the node of the composite tree is equal to the minimum size (width and height) of the binary tree, or if the size (width and height) of the encoding unit is equal to twice the minimum size (width and height) of the 3-partition tree, the encoding unit may not be subjected to binary tree splitting and / or 3-partition tree splitting. Accordingly, information on whether the composite tree is split or not may be inferred as a second value without being signaled. This is because, if the encoding unit is subjected to binary tree splitting and / or 3-partition tree splitting, an encoding unit smaller than the minimum size of the binary tree and / or the minimum size of the 3-partition tree is generated.

[0192] Alternatively, the binary tree splitting or the 3-split tree splitting may be limited based on the size of the virtual pipeline data unit (hereinafter, the pipeline buffer size). For example, if the binary tree splitting or the 3-split tree splitting splits the encoding unit into sub-coding units that do not fit the pipeline buffer size, the binary tree splitting or the 3-split tree splitting may be limited. The pipeline buffer size may be the size of the largest transform block (e.g., 64X64). For example, when the pipeline buffer size is 64X64, the following splitting may be limited.

[0193] - 3-partition tree partitioning for NxM (N and / or M are 128) coding units

[0194] - Horizontal binary tree partitioning for 128xN (N <= 64) encoding units

[0195] - Vertical binary tree partitioning for Nx128 (N <= 64) coding units

[0196] Alternatively, if the depth of the composite tree of the encoding unit corresponding to the node of the composite tree is equal to the maximum depth of the composite tree, the encoding unit may not be split into a binary tree and / or a 3-partition tree. Accordingly, information on whether the composite tree is split is not signaled, but can be inferred as a second value.

[0197] Alternatively, information on whether the composite tree is split may be signaled only if at least one of vertical binary tree splitting, horizontal binary tree splitting, vertical 3-partition tree splitting, and horizontal 3-partition tree splitting is possible for the encoding unit corresponding to the node of the composite tree. Otherwise, the encoding unit may not be split into a binary tree and / or a 3-partition tree. Accordingly, information on whether the composite tree is split may not be signaled, but may be inferred as a second value.

[0198] Alternatively, the split direction information may be signaled only when both vertical binary tree splitting and horizontal binary tree splitting are possible for the encoding unit corresponding to the node of the composite tree, or when both vertical 3-partition tree splitting and horizontal 3-partition tree splitting are possible. Otherwise, the split direction information may not be signaled and may be inferred as a value indicating a possible splitting direction.

[0199] Alternatively, the split tree information may be signaled only if both vertical binary tree splitting and vertical 3-partition tree splitting are possible for the encoding unit corresponding to the node of the composite tree, or if both horizontal binary tree splitting and horizontal 3-partition tree splitting are possible. Otherwise, the split tree information may not be signaled and may be inferred as a value indicating a tree that can be split.

[0200] Figure 4 is a diagram for explaining an embodiment of an on-screen prediction process.

[0201] The arrows from the center to the periphery of Figure 4 may indicate the prediction directions of the prediction modes within the screen.

[0202] In-frame encoding and / or decoding may be performed using reference samples from neighboring blocks of the current block. The neighboring blocks may be reconstructed neighboring blocks. For example, in-frame encoding and / or decoding may be performed using values ​​or encoding parameters of reference samples contained in the reconstructed neighboring blocks.

[0203] A prediction block may refer to a block generated as a result of performing prediction within a screen. The prediction block may correspond to at least one of a CU, a PU, and a TU. The unit of the prediction block may be the size of at least one of a CU, a PU, and a TU. The prediction block may be a square block having a size such as 2x2, 4x4, 16x16, 32x32, or 64x64, or may be a rectangular block having a size such as 2x8, 4x8, 2x16, 4x16, or 8x16.

[0204] In-screen prediction can be performed based on the in-screen prediction mode for the current block. The number of in-screen prediction modes that the current block can have can be a predefined fixed value, or it can be determined differently based on the properties of the prediction block. For example, the properties of the prediction block can include the size and shape of the prediction block.

[0205] The number of prediction modes within a picture may be fixed to N regardless of the size of the block. Or, for example, the number of prediction modes within a picture may be 3, 5, 9, 17, 34, 35, 36, 65, or 67. Or, the number of prediction modes within a picture may vary depending on the size of the block and / or the type of the color component. For example, the number of prediction modes within a picture may vary depending on whether the color component is a luma signal or a chroma signal. For example, the number of prediction modes within a picture may increase as the size of the block increases. Or, the number of prediction modes within a luma component block may be greater than the number of prediction modes within a chroma component block.

[0206] The in-screen prediction mode may be a non-directional mode or a directional mode. The non-directional mode may be a DC mode or a planar mode, and the angular mode may be a prediction mode having a specific direction or angle. The in-screen prediction mode may be expressed by at least one of a mode number, a mode value, a mode number, a mode angle, and a mode direction. The number of in-screen prediction modes may be one or more M including the non-directional and directional modes. A step of checking whether samples included in reconstructed neighboring blocks for in-screen prediction of the current block can be used as reference samples of the current block may be performed. If there is a sample that cannot be used as a reference sample of the current block, the sample value of at least one of the samples included in the reconstructed neighboring blocks is copied and / or interpolated to replace the sample value of the sample that cannot be used as a reference sample, and then the sample value can be used as a reference sample of the current block.

[0207] Figure 7 is a diagram illustrating reference samples available for prediction within the screen.

[0208] As illustrated in FIG. 7, at least one of reference sample lines 0 to 3 may be used for intra-picture prediction of the current block. In FIG. 7, samples of segments A and F may be padded with the closest samples of segments B and E, respectively, instead of being taken from reconstructed neighboring blocks. Index information indicating a reference sample line to be used for intra-picture prediction of the current block may be signaled. If the upper boundary of the current block is a boundary of a CTU, only reference sample line 0 may be available. Therefore, in this case, the index information may not be signaled. If a reference sample line other than reference sample line 0 is used, filtering on the prediction block described below may not be performed.

[0209] When making in-screen predictions, a filter can be applied to at least one of the reference sample or the prediction sample based on at least one of the in-screen prediction mode and the size of the current block.

[0210] In planar mode, when generating a prediction block of the current block, the sample value of the prediction target sample can be generated using a weighted sum of the top and left reference samples of the current sample, the top-right and bottom-left reference samples of the current block, depending on the position of the prediction target sample within the prediction block. In addition, in DC mode, when generating a prediction block of the current block, the average value of the top and left reference samples of the current block can be used. In addition, in directional mode, the prediction block can be generated using the top, left, top-right and / or bottom-left reference samples of the current block. Real-valued interpolation can also be performed to generate the prediction sample value.

[0211] In the case of intra-picture prediction between color components, a prediction block for a current block of a second color component can be generated based on a corresponding reconstruction block of a first color component. For example, the first color component can be a luminance component, and the second color component can be a chrominance component. For intra-picture prediction between color components, parameters of a linear model between the first color component and the second color component can be derived based on a template. The template can include top and / or left peripheral samples of the current block and top and / or left peripheral samples of a reconstruction block of the first color component corresponding thereto. For example, the parameters of the linear model can be derived using a sample value of the first color component having a maximum value among the samples in the template and a sample value of the second color component corresponding thereto, and a sample value of the first color component having a minimum value among the samples in the template and a sample value of the second color component corresponding thereto. Once the parameters of the linear model are derived, a prediction block for the current block can be generated by applying a corresponding reconstruction block to the linear model. Depending on the video format, subsampling may be performed on the surrounding samples of the reconstructed block of the first color component and the corresponding reconstructed block. For example, if 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 compute one corresponding sample. In this case, parameter derivation of the linear model and intra-picture prediction between color components may be performed based on the subsampled corresponding samples. Whether intra-picture prediction between color components is performed and / or the range of the template may be signaled as an intra-picture prediction mode.

[0212] A current block can be split into two or four sub-blocks in the horizontal or vertical direction. The split sub-blocks can be sequentially reconstructed. That is, intra-picture prediction can be performed on the sub-blocks to generate sub-prediction blocks. In addition, inverse quantization and / or inverse transformation can be performed on the sub-blocks to generate sub-residual blocks. A reconstructed sub-block can be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block can be used as a reference sample for intra-picture prediction of a subsequent sub-block. A sub-block can be a block including a predetermined number of samples (e.g., 16). Therefore, for example, if the current block is an 8x4 block or a 4x8 block, the current block can be split into two sub-blocks. In addition, if the current block is a 4x4 block, the current block cannot be split into sub-blocks. If the current block has a size other than that, the current block can be split into four sub-blocks. Information regarding whether or not to perform the sub-block-based intra-screen prediction and / or the splitting direction (horizontal or vertical) may be signaled. The sub-block-based intra-screen prediction may be restricted to be performed only when using reference sample line 0. When the sub-block-based intra-screen prediction is performed, filtering on the prediction block described below may not be performed.

[0213] A final prediction block can be generated by performing filtering on a predicted prediction block within a screen. The filtering can be performed by applying predetermined weights to a filtering target sample, a left reference sample, an upper reference sample, and / or an upper left reference sample. The weights and / or reference samples (range, position, etc.) used for the filtering can be determined based on at least one of a block size, an intra-screen prediction mode, and a position of the filtering target sample within the prediction block. The filtering can be performed only for a predetermined intra-screen prediction mode (e.g., DC, planar, vertical, horizontal, diagonal, and / or adjacent diagonal mode). The adjacent diagonal mode can be a mode obtained by adding or subtracting k from the diagonal mode. For example, k can be a positive integer less than or equal to 8.

[0214] The intra-screen prediction mode of the current block can be predicted from the intra-screen prediction modes of blocks existing around the current block and entropy encoded / decoded. If the intra-screen prediction modes of the current block and the surrounding blocks are the same, information indicating that the intra-screen prediction modes of the current block and the surrounding blocks are the same can be signaled using predetermined flag information. In addition, indicator information regarding an intra-screen prediction mode that is the same as the intra-screen prediction mode of the current block among the intra-screen prediction modes of a plurality of surrounding blocks can be signaled. If the intra-screen prediction modes of the current block and the surrounding blocks are different, entropy encoding / decoding can be performed based on the intra-screen prediction modes of the surrounding blocks to entropy encode / decode intra-screen prediction mode information of the current block.

[0215] Figure 5 is a diagram for explaining an embodiment of a screen-to-screen prediction process.

[0216] The rectangles illustrated in Figure 5 can represent images. Additionally, the arrows in Figure 5 can indicate prediction directions. Each image can be classified into an I-picture (Intra Picture), a P-picture (Predictive Picture), a B-picture (Bi-predictive Picture), etc., depending on its encoding type.

[0217] An I picture can be encoded / decoded through intra-picture prediction without inter-picture prediction. A P picture can be encoded / decoded through inter-picture prediction using only reference pictures existing in a unidirectional direction (e.g., forward or backward). A B picture can be encoded / decoded through inter-picture prediction using reference pictures existing in both directions (e.g., forward and backward). In addition, in the case of a B picture, it can be encoded / decoded through inter-picture prediction using reference pictures existing in both directions or inter-picture prediction using reference pictures existing in one of the forward and backward directions. Here, the bidirectional direction can be forward and backward. Here, when inter-picture prediction is used, the encoder can perform inter-picture prediction or motion compensation, and the decoder can perform corresponding motion compensation.

[0218] Below, inter-screen prediction according to an embodiment is described in detail.

[0219] Inter-screen prediction or motion compensation can be performed using reference images and motion information.

[0220] Motion information for a current block can be derived through inter-frame prediction by each of the encoding device (100) and the decoding device (200). The motion information can be derived using motion information of a reconstructed surrounding block, motion information of a collocated block (col block), and / or a block adjacent to the collocated block. The collocated block may be a block corresponding to the spatial position of the current block within an already reconstructed collocated picture (col picture). Here, the collocated picture may be one picture from at least one reference picture included in a reference picture list.

[0221] The method for deriving motion information may vary depending on the prediction mode of the current block. For example, prediction modes applied for inter-frame prediction may include AMVP mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, triangulation mode, inter-intra joint prediction mode, and affine inter mode. Here, the merge mode may be referred to as motion merge mode.

[0222] For example, when AMVP is applied as a prediction mode, a motion vector candidate list can be generated by determining at least one of the motion vector of the reconstructed neighboring block, the motion vector of the called block, the motion vector of the block adjacent to the called block, and the (0, 0) motion vector as a motion vector candidate. A motion vector candidate can be derived using the generated motion vector candidate list. Motion information of the current block can be determined based on the derived motion vector candidate. Here, the motion vector of the called block or the motion vector of the block adjacent to the called block can be referred to as a temporal motion vector candidate, and the motion vector of the reconstructed neighboring block can be referred to as a spatial motion vector candidate.

[0223] The encoding device (100) can calculate the motion vector difference (MVD) between the motion vector of the current block and the motion vector candidate, and can entropy encode the MVD. In addition, the encoding device (100) can generate a bitstream by entropy encoding the motion vector candidate index. The motion vector candidate index can indicate an optimal motion vector candidate selected from among the motion vector candidates included in the motion vector candidate list. The decoding device (200) can entropy decode the motion vector candidate index from the bitstream, and select a motion vector candidate of a block to be decoded from among the motion vector candidates included in the motion vector candidate list using the entropy-decoded motion vector candidate index. In addition, the decoding device (200) can derive a motion vector of a block to be decoded by summing the entropy-decoded MVD and the motion vector candidate.

[0224] Meanwhile, the encoding device (100) can entropy encode the resolution information of the calculated MVD. The decoding device (200) can adjust the resolution of the entropy-decoded MVD using the MVD resolution information.

[0225] Meanwhile, the encoding device (100) can calculate the motion vector difference (MVD) between the motion vector of the current block and the motion vector candidate based on the affine model, and can entropy encode the MVD. The decoding device (200) can derive the affine control motion vector of the block to be decoded through the sum of the entropy-decoded MVD and the affine control motion vector candidate, thereby deriving the motion vector in units of sub blocks.

[0226] The bitstream may include a reference picture index indicating a reference picture, etc. The reference picture index may be entropy encoded and signaled from the encoding device (100) to the decoding device (200) via the bitstream. The decoding device (200) may generate a prediction block for the block to be decoded based on the derived motion vector and the reference picture index information.

[0227] Another example of a method for deriving motion information is merge mode. Merge mode may refer to merging motions of multiple blocks. Merge mode may refer to a mode in which motion information of a current block is derived from motion information of surrounding blocks. When merge mode is applied, a merge candidate list may be generated using motion information of reconstructed surrounding blocks and / or motion information of a call block. The motion information may include at least one of 1) a motion vector, 2) a reference image index, and 3) an inter-frame prediction indicator. The prediction indicator may be unidirectional (L0 prediction, L1 prediction) or bidirectional.

[0228] The merge candidate list may represent a list in which motion information is stored. The motion information stored in the merge candidate list may be at least one of motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a block collocated with the current block in a reference image (temporal merge candidate), new motion information generated by a combination of motion information already existing 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.

[0229] The encoding device (100) can generate a bitstream by entropy encoding at least one of a merge flag and a merge index, and then signal it to the decoding device (200). The merge flag can be information indicating whether to perform a merge mode for each block, and the merge index can be information on which block among the neighboring blocks adjacent to the current block will be merged. For example, the neighboring blocks of the current block can include at least one of the left neighboring block, the upper neighboring block, and the temporal neighboring block of the current block.

[0230] Meanwhile, the encoding device (100) can entropy encode correction information for correcting the motion vector among the motion information of the merge candidate and signal it to the decoding device (200). The decoding device (200) can correct the motion vector of the merge candidate selected by the merge index based on the correction information. Here, the correction information can include at least one of correction status information, correction direction information, and correction size information. As described above, a prediction mode that corrects the motion vector of the merge candidate based on the signaled correction information can be referred to as a merge mode with motion vector difference.

[0231] Skip mode may be a mode that applies motion information of surrounding blocks as is to the current block. When skip mode is used, the encoding device (100) may entropy encode information on which block's motion information is to be used as the motion information of the current block and signal it to the decoding device (200) through a bitstream. At this time, the encoding device (100) may not signal a syntax element regarding at least one of motion vector difference information, an encoding block flag, and a transform coefficient level (quantized level) to the decoding device (200).

[0232] Subblock merge mode may refer to a mode for deriving motion information in units of subblocks of a coding block (CU). When the subblock merge mode is applied, a subblock merge candidate list may be generated using motion information (subblock-based temporal merge candidate) of a subblock collocated with a current subblock in a reference image and / or an affine control point motion vector merge candidate.

[0233] The triangle partition mode may refer to a mode in which the current block is divided in the diagonal direction to derive motion information for each block, each prediction sample is derived using each derived motion information, and each derived prediction sample is weighted and combined to derive a prediction sample of the current block.

[0234] Inter-intra combined prediction mode may mean a mode in which a prediction sample of the current block is derived by weighting prediction samples generated through inter-screen prediction and prediction samples generated through intra-screen prediction.

[0235] The decoding device (200) can independently correct the derived motion information. The decoding device (200) can search a predefined area based on a reference block indicated by the derived motion information to derive the motion information with the minimum SAD as corrected motion information.

[0236] The decoding device (200) can compensate for the prediction sample derived through inter-screen prediction using optical flow.

[0237] Figure 6 is a diagram for explaining the process of transformation and quantization.

[0238] As illustrated in FIG. 6, a quantized level can be generated by performing a transformation and / or quantization process on the residual signal. The residual signal can be generated as a difference between an original block and a prediction block (an intra-screen prediction block or an inter-screen prediction block). Here, the prediction block can be a block generated by intra-screen prediction or inter-screen prediction. Here, the transformation can include at least one of a primary transformation and a secondary transformation. A transformation coefficient can be generated by performing a primary transformation on the residual signal, and a secondary transformation can be performed on the transformation coefficient to generate a secondary transformation coefficient.

[0239] The primary transform can be performed using at least one of a plurality of pre-defined transform methods. For example, the plurality of pre-defined transform methods can include a discrete cosine transform (DCT), a discrete sine transform (DST), or a Karhunen-Loeve transform (KLT)-based transform. A secondary transform can be performed on transform coefficients generated after the primary transform is performed. The transform method applied during the primary transform and / or the secondary transform can be determined according to at least one of the encoding parameters of the current block and / or the neighboring blocks. Alternatively, transform information indicating the transform method can be signaled. The DCT-based transform can include, for example, DCT2, DCT-8, etc. The DST-based transform can include, for example, DST-7.

[0240]

[0241] Quantization can be performed on the result or residual signal of the first transform and / or the second transform to generate a quantized level. The quantized level can be scanned according to at least one of an up-right diagonal scan, a vertical scan, and a horizontal scan based on at least one of an within-picture prediction mode or a block size / shape. For example, the coefficients of a block can be converted into a one-dimensional vector form by scanning them using an up-right diagonal scan. Depending on the size of the transform block and / or the within-picture prediction mode, a vertical scan that scans the two-dimensional block shape coefficients in the column direction, or a horizontal scan that scans the two-dimensional block shape coefficients in the row direction may be used instead of the up-right diagonal scan. The scanned quantized level can be entropy encoded and included in a bitstream.

[0242] The decoder can entropy-decode the bitstream to generate quantized levels. These quantized levels can be aligned into a two-dimensional block shape through inverse scanning. At least one of the following methods can be used for inverse scanning: upper-right diagonal scanning, vertical scanning, or horizontal scanning.

[0243] Inverse quantization can be performed on a quantized level, a second inverse transform can be performed depending on whether a second inverse transform is performed, and a first inverse transform can be performed depending on whether a first inverse transform is performed on the result of the second inverse transform, thereby generating a restored residual signal.

[0244] Inverse mapping of the dynamic range may be performed on the luminance component restored through intra-picture prediction or inter-picture prediction before in-loop filtering. The dynamic range may be divided into 16 equal pieces, and a mapping function for each piece may be signaled. The mapping function may be signaled at the slice level or the tile group level. The inverse mapping function for performing the inverse mapping may be derived based on the mapping function. In-loop filtering, storage of reference pictures, and motion compensation are performed in the inverse mapped area, and the prediction block generated through inter-picture prediction may be converted to the mapped area by mapping using the mapping function, and then used to generate a reconstructed block. However, since intra-picture prediction is performed in the mapped area, the prediction block generated through intra-picture prediction may be used to generate a reconstructed block without mapping / inverse mapping.

[0245] If the current block is a residual block of chrominance components, the residual block can be converted into an inverse mapped region by performing scaling on the chrominance components of the mapped region. The availability of the scaling can be signaled at the slice level or the tile group level. The scaling can be applied only when the mapping for the luma component is available and the partitioning of the luminance component and the partitioning of the chrominance component follow the same tree structure. The scaling can be performed based on the average of the sample values ​​of the luminance prediction block corresponding to the chrominance block. In this case, if the current block uses inter-screen prediction, the luminance prediction block can mean the mapped luminance prediction block. The value required for the scaling can be derived by referring to a lookup table using the index of the piece to which the average of the sample values ​​of the luminance prediction block belongs. Finally, by scaling the residual block using the derived value, the residual block can be converted into an inverse mapped region. Restoration of the subsequent chrominance component blocks, intra-screen prediction, inter-screen prediction, in-loop filtering, and storage of reference pictures can be performed in the reverse-mapped area.

[0246] Information indicating whether mapping / demapping of the luminance component and chrominance component is available can be signaled via a sequence parameter set.

[0247] A prediction block of a current block can be generated based on a block vector indicating a displacement between the current block and a reference block within the current picture. In this way, a prediction mode that generates a prediction block by referencing the current picture can be called an Intra Block Copy (IBC) mode. The IBC mode can be applied to an MxN (M<=64, N<=64) coding unit. The IBC mode can include a skip mode, a merge mode, an AMVP mode, etc. In the case of the skip mode or the merge mode, a merge candidate list is configured, and a merge index is signaled so that one merge candidate can be specified. The block vector of the specified merge candidate can be used as a block vector of the current block. The merge candidate list can include at least one or more of a spatial candidate, a history-based candidate, an average-of-two-candidate candidate, or a zero-merge candidate. In the case of the AMVP mode, a differential block vector can be signaled. Additionally, the predicted block vector can be derived from the left neighboring block and the upper neighboring block of the current block. An index indicating which neighboring block to use can be signaled. The predicted block in the IBC mode can be limited to blocks included in the current CTU or the left CTU and within the previously reconstructed region. For example, the block vector value of the predicted block of the current block can be limited so that it is located within the three 64x64 block regions preceding the 64x64 block to which the current block belongs in the encoding / decoding order. By limiting the block vector value in this way, the memory consumption and device complexity associated with the IBC mode implementation can be reduced.

[0248] The candidate list composed of the above predicted block vectors may mean a block vector candidate list, and the merge candidate list composed of block vectors may mean a block vector merge candidate list.

[0249]

[0250] Below, a method for determining a reference block for the current block in the above-described block structure is described.

[0251] An image may be encoded / decoded according to at least one or a combination of at least one of the embodiments below. By using the embodiments below, a reference block for a current block can be efficiently determined during the encoding / decoding process of an image, thereby improving the encoding efficiency of an image encoder and the decoding efficiency of an image decoder.

[0252] Additionally, the block described below may mean a unit, and the candidate list described below may mean a candidate set or the like, which includes at least one candidate.

[0253] According to one embodiment of the present invention, a reference block for a current block can be determined in at least one of the video encoding / decoding processes, including inter-screen prediction, intra-screen prediction, transformation, inverse transformation, quantization, inverse quantization, entropy encoding / decoding, and in-loop filtering.

[0254] Figure 8 is a flowchart for explaining an image encoding / decoding method according to one embodiment of the present invention.

[0255] Referring to FIG. 8, the encoding / decoding method according to the present invention may include a step (S810) of including neighboring blocks of the current block included in the current block in a candidate list for encoding / decoding the current block, and a step (S820) of determining a reference block used for encoding / decoding the current block among the neighboring blocks included in the candidate list. The current block in FIG. 8 may mean a sub-block to be encoded / decoded, which is one of the sub-blocks divided from the block.

[0256] A reference block for a current block can be determined from a candidate list including block information of a neighboring block or neighboring blocks. In at least one of the encoding / decoding processes of an image, such as inter-prediction, intra-prediction, transformation, inverse transformation, quantization, inverse quantization, entropy encoding / decoding, and in-loop filtering, the current block can be encoded / decoded using the determined reference block. Here, at least one of the neighboring block or block information of the neighboring block can mean a candidate.

[0257] The above reference block may refer to at least one piece of block information of the reference block. That is, at least one of the encoding / decoding processes of the image may be performed on the current block using the block information of the determined reference block. Here, the block information of the reference block may be determined as the block information of the current block. Therefore, the reference block mentioned below may refer to at least one piece of block information of the reference block.

[0258] Here, the neighboring block of the current block may be at least one of the spatial neighboring blocks adjacent to the current block, such as the block adjacent to the top, the block adjacent to the top left, the block adjacent to the top right, the block adjacent to the left, and the block adjacent to the bottom left. In addition, the neighboring block may be at least one of the spatial neighboring blocks adjacent to the boundary of the current block. In addition, the neighboring block is a block that exists outside the boundary of the CTU to which the current block belongs and may be at least one of the spatial neighboring blocks adjacent to the boundary of the current block. In addition, the neighboring block may be at least one of the spatial neighboring blocks that include a sample outside the current block adjacent to a specific sample position within the current block. In other words, the neighboring block may refer to a neighboring block that is spatially / temporally adjacent to the current block, and may refer to a reconstructed neighboring block.

[0259] In the following description, a "surrounding block" may refer to at least one piece of block information of the surrounding block. That is, the inclusion of a surrounding block in a candidate list may mean that the block information of the surrounding block is also included in the candidate list. Therefore, the term "surrounding block" mentioned below may be used to refer to at least one piece of block information of the surrounding block.

[0260] Additionally, in the description below, the surrounding blocks included in the candidate list may be referred to as candidates, and the block information of the surrounding blocks included in the candidate list may also be referred to as candidates.

[0261] That is, the above block may mean a candidate that is the block itself, or may mean a candidate that is at least one piece of information of the block. Therefore, in the embodiments below, for convenience, the information of the block and the block are expressed as a unified block.

[0262] The candidates in the above-described candidate list or the information included in the candidates may be added to the screen prediction mode candidate list, motion vector candidate list, merge candidate list, block vector candidate list, block vector merge candidate list, sub-block motion vector candidate list, sub-block merge candidate list, etc., and used for the prediction described below.

[0263] The information of the above-described block may mean at least one of information of a surrounding block, information of a reference block, and information of a current block.

[0264] For example, the information of the block may include at least one of the encoding parameters. In addition, the information of the block may include at least one of the information used in inter-screen prediction, intra-screen prediction, transformation, inverse transformation, quantization, inverse quantization, entropy encoding / decoding, and in-loop filtering. That is, the information of the block includes block size, block depth, block partition information, block shape (square or non-square), whether it is partitioned in a quadtree shape, whether it is partitioned in a binary tree shape, the partition direction of the binary tree shape (horizontal direction or vertical direction), the partition type of the binary tree shape (symmetric partition or asymmetric partition), prediction mode (intra-screen prediction or inter-screen prediction), intra-screen luminance prediction mode / direction, intra-screen chrominance prediction mode / direction, intra-screen partition information, inter-screen partition information, encoding block partition flag, prediction block partition flag, transform block partition flag, reference sample filter tap, reference sample filter coefficient, prediction block filter tap, prediction block filter coefficient, prediction block boundary filter tap, prediction block boundary filter coefficient, motion vector (motion vector for at least one of L0, L1, L2, L3, etc.), motion vector difference (motion vector difference for at least one of L0, L1, L2, L3, etc.), inter-screen prediction direction (inter-screen prediction direction for at least one of unidirectional prediction, bidirectional prediction, etc.), reference image index (for at least one of L0, L1, L2, L3, etc.) (Reference image index), inter-screen 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, motion vector representation accuracy (motion vector representation unit such as integer sample, ½ sample, ¼ sample, 1 / 8 sample, 1 / 16 sample, 1 / 32 sample, etc.), block vector, block vector difference, block vector index, block vector prediction candidate,Block vector candidate list, block vector merge candidate list, weight value for each block when generating a bi-prediction block, transformation type, transformation size, information on whether to use the first transformation, information on whether to use the second transformation, first transformation index, second transformation index, information on whether there is a residual signal, coded block pattern, coded block flag, quantization parameter, residual quantization parameter, quantization matrix, whether to apply an intra-screen loop filter, intra-screen loop filter coefficients, intra-screen loop filter taps, intra-screen loop filter shape / shape, whether to apply a deblocking filter, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / shape, whether to apply an 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 / shape, binarization / inverse binarization method, context model determination method, context model update method, whether to perform regular mode, whether to perform bypass mode, context bin, Bypass bin, significant coefficient flag, last significant coefficient flag, coefficient group unit encoding flag, last significant coefficient position, flag whether coefficient value is greater than 1, flag whether coefficient value is greater than 2, flag whether coefficient value is greater than 3, remaining coefficient value information, sign information, restored luminance sample, restored chrominance sample, residual luminance sample, residual chrominance sample, luminance transform coefficient, chrominance transform coefficient, luminance quantization level, chrominance quantization level, transform coefficient level scanning method, size of decoder lateral motion vector search region, shape of decoder lateral motion vector search region, number of decoder lateral motion vector searches, CTU size information, minimum block size information, maximum block size information, maximum block depth information, minimum block depth information, slice identification information, slice partitioning information, tile identification information, tile type, tile partitioning information, input sample bit depth, restored sample bit depth,It may mean at least one value or a combined form of the residual sample bit depth, the transform coefficient bit depth, and the quantization level bit depth.

[0265]

[0266] First, the step (S810) of including surrounding blocks in the candidate list is described in detail.

[0267] At least one or at most V of the neighboring blocks that are spatially / temporally adjacent to the current block may be included in the candidate list for the current block. That is, at least one or at most V of the block information of the neighboring blocks that are spatially / temporally adjacent to the current block may be included in the candidate list for the current block.

[0268] Here, V can be a positive integer including 0. In addition, V can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, V can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0269] If a neighboring block is included in the same image (picture) as the current block, a sub-picture within the same image, a slice within the same image, a tile within the same image, a brick within the same image, a CTU within the same image, etc., then the neighboring block can be said to be a neighboring block that is spatially adjacent to the current block. In addition, if the neighboring block is included in a different image than the current block, a sub-picture within a different image, a slice within a different image, a tile within a different image, a brick within a different image, a CTU within a different image, etc., then the neighboring block can be said to be a neighboring block that is temporally adjacent to the current block.

[0270] In the example below, the method for selecting a neighboring block to be included in the candidate list can be determined based on the encoding parameters of the current block. Furthermore, the selection method can be determined by a method preset between the encoder and decoder, or can be determined based on a value signaled from the encoder to the decoder.

[0271] Additionally, in the example below, the maximum number V of surrounding blocks included in the candidate list may be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the surrounding blocks. Furthermore, V may be a value preset between the encoder and the decoder, or may be a value signaled from the encoder to the decoder.

[0272] Hereinafter, with reference to FIGS. 9 through 23, an embodiment of adding the aforementioned spatial or temporal neighboring blocks to the candidate list will be described in detail. An encoder or decoder can add or include spatial or temporal neighboring blocks of a current block to the candidate list for the current block using at least one or a combination of the following methods.

[0273] FIGS. 9 and 10 are diagrams for explaining a method of adding a neighboring block adjacent to a current block to a candidate list according to one embodiment of the present invention.

[0274] Among the neighboring blocks adjacent to the current block, at most V can be included in the candidate list for the current block. Here, V can be a positive integer including 0. In this case, the neighboring block being adjacent to the current block can mean that at least one of the boundaries and vertices of the current block is in contact with or in contact with at least one of the boundaries and vertices of the neighboring block.

[0275] Here, blocks located within the vertical dimension of the current block relative to its top position are referred to as neighboring blocks adjacent to the current block. Furthermore, blocks located within the horizontal dimension of the current block relative to its left position are referred to as neighboring blocks adjacent to the current block.

[0276] The candidate list may include neighboring blocks in the order of neighboring blocks bordering the current block's boundary to neighboring blocks bordering the current block's vertices. Furthermore, the candidate list may include neighboring blocks in the order of neighboring blocks bordering the current block's boundary to neighboring blocks bordering the current block's vertices.

[0277] The candidate list may include neighboring blocks in the order of neighboring blocks adjacent to the left of the current block, to neighboring blocks adjacent to the top of the current block, and vice versa. Furthermore, the candidate list may include neighboring blocks in the order of neighboring blocks adjacent to the top of the current block, to neighboring blocks adjacent to the left of the current block.

[0278] A neighboring block can be said to be adjacent to the current block if there is at least one block between the current block and a neighboring block. For example, in the city of FIG. 9, blocks E, F, H, I, K, L, N, and R can also be said to be adjacent to the current block.

[0279] In FIGS. 9 and 10, blocks colored in gray may represent neighboring blocks adjacent to the current block X that may be included in the candidate list. Here, blocks B, C, and D may represent blocks that are partitioned vertically into a three-part tree from one parent node, blocks E, F, and G may represent blocks that are partitioned horizontally into a three-part tree from one parent node, blocks P and Q may represent blocks that are partitioned horizontally into a binary tree from one parent node, blocks R and S may represent blocks that are partitioned vertically into a binary tree from one parent node, and blocks H, I, J, and K and blocks L, M, N, and O may represent blocks that are partitioned quadtree from one parent node. Examples of such block partitioning may be commonly used in the drawings below.

[0280] At this time, in the example of FIG. 9, the candidate list for the current block X can be configured to include at least one block among {A, B, C, D, E} adjacent to the current block X, and in the example of FIG. 10, the candidate list for the current block X can be configured to include at least one block among {A, B, C, D, G, J, M, O, P, Q, S} adjacent to the current block X.

[0281] FIG. 11 and FIG. 12 are diagrams for explaining a method of adding a neighboring block to a candidate list by considering the length of contact between the current block and the neighboring block, according to one embodiment of the present invention.

[0282] A candidate list for the current block may include at most V neighboring blocks, depending on whether at least one of the neighboring blocks adjacent to the current block is adjacent to the current block. Furthermore, a candidate list for the current block may include at most V neighboring blocks adjacent to the current block whose length (width or height) is at least N.

[0283] If there is no neighboring block adjacent to the current block with a length greater than or equal to N, a candidate list for the current block can be constructed using (NK) instead of N. Here, K can represent a positive integer greater than 0. That is, among the neighboring blocks adjacent to the current block, at least one of which has a length greater than or equal to NK and less than N, at most V neighboring blocks can be included in the candidate list for the current block.

[0284] For example, N may represent a positive integer that is a power of 2, such as 2, 4, 8, or 16. As another example, N may be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. Additionally, N may be a value preset in the encoder / decoder, or may be a value signaled from the encoder to the decoder.

[0285] For example, neighboring blocks adjacent to the current block may be included in the candidate list in order of length, starting with the largest neighboring block and ending with the smallest neighboring block. Alternatively, neighboring blocks adjacent to the current block may be included in the candidate list in order of length, starting with the smallest neighboring block and ending with the largest neighboring block.

[0286] Among the neighboring blocks adjacent to the current block, at most V neighboring blocks with a length greater than or equal to N and less than or equal to M can be included in the candidate list for the current block. Here, M and N can each represent a positive integer that is a power of 2, such as 2, 4, 8, or 16.

[0287] In Fig. 11, blocks colored in gray may indicate neighboring blocks that are adjacent to the current block X by a length N or more and thus may be included in the candidate list. For example, block X may indicate a 32x32 block, block A may indicate a 16x16 block, blocks B and D may indicate 4x16 blocks, block C may indicate an 8x16 block, blocks E and F may indicate 16x4 blocks, block F may indicate a 16x8 block, blocks H, I, J, K, L, M, N, and O may indicate 8x8 blocks, blocks P and Q may indicate 16x8 blocks, and blocks R and S may indicate 8x16 blocks. Examples of these block sizes may be commonly used in the drawings below.

[0288] For example, in the example of FIG. 11, at least one of the surrounding blocks with a length of 8 or more that is adjacent to the current block is included in the candidate list, so that the candidate list for the current block X can be configured to include at least one block among {C, G, M, O, P, Q}.

[0289] In Fig. 12, blocks colored in gray may indicate neighboring blocks that are adjacent to the current block X by a length N or more and thus may be included in the candidate list. For example, neighboring blocks that are adjacent to the current block by a length of 16 or more may be included in the candidate list, so that the candidate list for the current block X may be configured to include {G} blocks.

[0290] FIG. 13 and FIG. 14 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the size of the surrounding block, according to one embodiment of the present invention.

[0291] Depending on the sizes of the neighboring blocks adjacent to the current block, up to V neighboring blocks can be included in the candidate list for the current block. Hereinafter, the size of a block may mean at least one of width, height, and area.

[0292] For example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks whose size is greater than or equal to M x N may be included in the candidate list for the current block. As another example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks whose size is less than or equal to M x N may be included in the candidate list for the current block.

[0293] As another example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks whose sizes are greater than or equal to M x N and less than or equal to P x Q can be included in the candidate list for the current block. Here, P can denote the horizontal size of the block, Q can denote the vertical size of the block, and P and Q can be positive integers.

[0294] As another example, if at least one of the horizontal and vertical sizes of a surrounding block is larger than at least one of M and N, the surrounding block may be included in the candidate list.

[0295] As another example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks with an area greater than or equal to M x N may be included in the candidate list for the current block. As another example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks with an area less than or equal to M x N may be included in the candidate list for the current block. As another example, among the neighboring blocks adjacent to the current block, at most V neighboring blocks with an area greater than or equal to M x N and less than or equal to P x Q may be included in the candidate list for the current block.

[0296] Here, M may represent the horizontal size of the block, N may represent the vertical size of the block, and M and N may be positive integers. In addition, M and N may be the same value or different values.

[0297] At least one of M, N, P, and Q 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, at least one of M, N, P, and Q may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0298] The candidate list may include neighboring blocks adjacent to the current block in ascending order of size, from largest to smallest. Additionally, the candidate list may include neighboring blocks adjacent to the current block in ascending order of size, from smallest to largest.

[0299] As another example, if the size of a surrounding block is greater than or equal to the size of the current block, that surrounding block may be included in the candidate list. Furthermore, if the size of a surrounding block is less than or equal to the size of the current block, that surrounding block may be included in the candidate list.

[0300] In Fig. 13, blocks colored in gray represent surrounding blocks whose size is greater than or equal to M x N and thus can be included in the candidate list. For example, if the size of the surrounding block is 16x8 or 8x16, the surrounding block is included in the candidate list, so that the candidate list for the current block X can be configured to include at least one block among {A, C, P, Q, S}.

[0301] In Fig. 14, blocks colored in gray represent surrounding blocks that can be included in the candidate list because the area of ​​the surrounding blocks is greater than or equal to M x N. For example, if the area of ​​the surrounding blocks is 16 x 8 (=128) or 8 x 16 (=128), the surrounding blocks are included in the candidate list, so that the candidate list for the current block X can be configured to include at least one block among {A, C, F, P, Q, R, S}.

[0302] FIG. 15 and FIG. 16 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the depth of the surrounding block, according to one embodiment of the present invention.

[0303] Depending on the depth of the neighboring blocks adjacent to the current block, at most V neighboring blocks can be included in the candidate list for the current block.

[0304] For example, among the neighboring blocks adjacent to the current block and having a depth greater than or equal to K, at most V neighboring blocks may be included in the candidate list for the current block. As another example, among the neighboring blocks adjacent to the current block and having a depth less than or equal to K, at most V neighboring blocks may be included in the candidate list for the current block.

[0305] As another example, at most V neighboring blocks adjacent to the current block and having depths greater than or equal to K and less than or equal to L may be included in the candidate list for the current block, where L may be a positive integer including 0.

[0306] Here, K can be a positive integer including 0. In addition, K can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, K can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0307] The candidate list may include neighboring blocks adjacent to the current block in descending order of depth, from largest to smallest. Furthermore, the candidate list may include neighboring blocks adjacent to the current block in descending order of depth, from smallest to largest.

[0308] As another example, if the depth of a surrounding block is greater than or equal to the depth of the current block, that surrounding block may be included in the candidate list. Furthermore, if the depth of a surrounding block is less than or equal to the depth of the current block, that surrounding block may be included in the candidate list.

[0309] In Fig. 15, a gray-colored block may indicate a neighboring block that can be included in the candidate list because the depth of the neighboring block is greater than or equal to K. For example, the current block X may have a depth of 1, block A may have a depth of 2, and blocks B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, and S may have a depth of 3. These block depths can be commonly used in the following drawings. For example, when the depth of a neighboring block is greater than or equal to 3, the neighboring block is included in the candidate list, so that the candidate list for the current block X may be configured to include at least one block among {B, C, D, E, F, G, J, K, M, O, P, Q, S}.

[0310] In Fig. 16, blocks colored in gray represent neighboring blocks whose depth is less than or equal to K and thus can be included in the candidate list. For example, if the depth of a neighboring block is less than or equal to 2, the neighboring block is included in the candidate list, and the candidate list for the current block X can be configured to include the {A} block.

[0311] FIG. 17 and FIG. 18 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the division shape of the surrounding block, according to one embodiment of the present invention.

[0312] Depending on the partitioning pattern of the current block and its adjacent neighboring blocks, up to V neighboring blocks can be included in the candidate list for the current block.

[0313] For example, at least one of the adjacent blocks adjacent to the current block that are partitioned into a quadtree may be included in the candidate list. As another example, at least one of the adjacent blocks adjacent to the current block that are partitioned into a binary tree may be included in the candidate list. As yet another example, at least one of the adjacent blocks adjacent to the current block that are partitioned into a 3-partition tree may be included in the candidate list.

[0314] Whether one of the partitioning forms of the surrounding blocks is included in the candidate list can be determined based on at least one of the encoding parameters of the current block or the surrounding blocks and the encoding parameters of the corresponding candidate. Furthermore, the determination can be made according to a method preset in the encoder and decoder, or by a value signaled from the encoder to the decoder.

[0315] Here, the binary tree partitioning may include not only a symmetrical binary tree in which binary tree nodes are of the same size, but also an asymmetrical binary tree in which binary tree nodes are of different sizes. In addition, the 3-partition tree partitioning may include not only a symmetrical 3-partition tree in which the upper and lower blocks or the left and right blocks of the 3-partition tree node are of the same size based on the central block, but also an asymmetrical binary tree in which the upper and lower blocks or the left and right blocks of the 3-partition tree node are of different sizes based on the central block.

[0316] The neighboring blocks adjacent to the current block may be included in the candidate list in the following order: neighboring blocks with quadtree partitioning, neighboring blocks with binary tree partitioning, neighboring blocks with 3-partition tree partitioning. In addition, the neighboring blocks adjacent to the current block may be included in the candidate list in the following order: neighboring blocks with 3-partition tree partitioning, neighboring blocks with binary tree partitioning, neighboring blocks with quadtree partitioning.

[0317] As another example, if the partition shape of a surrounding block is the same as that of the current block, that surrounding block may be included in the candidate list. Furthermore, if the partition shape of a surrounding block is different from that of the current block, that surrounding block may be included in the candidate list.

[0318] In Fig. 17, blocks shaded in gray represent a situation in which the partitioning form of the surrounding blocks is a binary tree partitioning form, and thus the surrounding blocks can be included in the candidate list. For example, blocks X, A, H, I, J, K, L, M, N, O may represent a quadtree partitioning form, blocks B, C, D, E, F, G may represent a 3-partitioning tree form, and blocks P, Q, R, S may represent a binary tree partitioning form. Examples of such block partitioning forms can be commonly used in the drawings below. For example, when the partitioning form of the surrounding blocks is a 3-partitioning tree partitioning form, the surrounding blocks are included in the candidate list, and the candidate list for the current block X may be configured to include at least one block among {B, C, D, E, F, G}.

[0319] In Fig. 18, blocks shaded in gray represent situations in which the partitioning form of the surrounding blocks is the same as that of the current block, and thus the surrounding blocks can be included in the candidate list. For example, if the partitioning form of the current block X is a quadtree partitioning form, the surrounding blocks can be included in the candidate list, and the candidate list for the current block X can be configured to include at least one block among {A, J, K, M, O}.

[0320] FIG. 19 and FIG. 20 are diagrams for explaining a method of adding a surrounding block to a candidate list by considering the block shape of the surrounding block, according to one embodiment of the present invention.

[0321] Depending on the block shapes of the neighboring blocks adjacent to the current block, up to V neighboring blocks can be included in the candidate list for the current block.

[0322] For example, at least one of the blocks adjacent to the current block and having a square shape may be included in the candidate list. As another example, at least one of the blocks adjacent to the current block and having a non-square shape may be included in the candidate list.

[0323] The candidate list may include adjacent blocks of the current block in the following order: square blocks, non-square blocks, and so on. Furthermore, the candidate list may include adjacent blocks of the current block in the following order: non-square blocks, square blocks, and so on.

[0324] As another example, if the block shape of a surrounding block is the same as that of the current block, that surrounding block may be included in the candidate list. Furthermore, if the block shape of a surrounding block is different from that of the current block, that surrounding block may be included in the candidate list.

[0325] In Fig. 19, the blocks shaded in gray represent a situation in which the surrounding blocks have a non-square block shape, and thus the surrounding blocks can be included in the candidate list. For example, if the surrounding blocks have a non-square block shape, the surrounding blocks can be included in the candidate list, and the candidate list for the current block X can be configured to include at least one block among {B, C, D, G, P, Q, S}.

[0326] In Fig. 20, blocks shaded in gray represent situations in which the block shape of a surrounding block is the same as the block shape of the current block, and thus the surrounding block can be included in the candidate list. For example, if the block shape of the current block X is a square, the surrounding block can be included in the candidate list, and the candidate list for the current block X can be configured to include at least one block among {A, J, K, M, O}.

[0327] If at least one of the boundaries and vertices of the current block is in contact with at least one of the boundaries and vertices of a neighboring block, the neighboring block can be included in the candidate list using at least one of the relative lengths of the boundaries of the neighboring blocks to which the boundaries or vertices are in contact, the relative sizes of the neighboring blocks, or the relative depths of the neighboring blocks.

[0328] For example, at most V neighboring blocks can be included in the candidate list for the current block, based on the relative length of the boundary of the neighboring blocks, the relative size of the neighboring blocks, or the relative depth of the neighboring blocks.

[0329] For example, if there is a neighboring block with a boundary length of M that is adjacent to a neighboring block with a boundary length of N, a specific neighboring block can be included in the candidate list by comparing the sizes of N and M.

[0330] For example, if there is a neighboring block whose boundary length is 4 and a neighboring block whose boundary length is 8, only the neighboring block whose boundary length is longer than 8 can be included in the candidate list. Also, if there is a neighboring block whose boundary length is 16 and a neighboring block whose boundary length is 4, the neighboring block whose boundary length is shorter than 4 can be included in the candidate list.

[0331] As another example, if there are neighboring blocks of size N x M and neighboring blocks of size P x ​​Q, the sizes of the neighboring blocks can be compared to include a specific neighboring block in the candidate list. At this time, N and M and P and Q can be the same positive integer or different positive integers.

[0332] For example, if there are surrounding blocks with a block size of 8x8 and surrounding blocks with a block size of 16x16, the surrounding block with a block size of 16x16, which is larger than the block size, can be included in the candidate list.

[0333] As another example, if there are neighboring blocks with a depth of N and neighboring blocks with a depth of M, the sizes of N and M can be compared to determine which neighboring blocks are included in the candidate list.

[0334] For example, if there are surrounding blocks with a block depth of 0 and surrounding blocks with a block depth of 2, the surrounding blocks with a block depth of 0 that is smaller than the block depth can be included in the candidate list.

[0335] FIG. 21 is a diagram for explaining a method of adding a surrounding block to a candidate list by considering the encoding / decoding order of the surrounding blocks, according to one embodiment of the present invention.

[0336] According to the encoding / decoding order of the neighboring blocks adjacent to the current block, at most V neighboring blocks can be included in the candidate list for the current block. Here, the encoding / decoding order can be at least one of a horizontal-first order, a vertical-first order, a Z-shaped order, a zigzag order, an upper-right diagonal order, a lower-left diagonal order, a raster order, a depth-first order, and a size-first order.

[0337] In Fig. 21, blocks shaded in gray represent neighboring blocks that can be included in the candidate list according to the encoding / decoding order of the neighboring blocks. 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, S, then at most Z neighboring blocks can be included in the candidate list in that order. Fig. 21 illustrates a case where Z = 4, and in this case, the candidate list for the current block X can be configured to include at least one block among {A, B, C, D}.

[0338] FIG. 22 is a diagram for explaining a method for adding a surrounding block to a candidate list by considering the location of a surrounding block existing at a specific distance from the location of the current block, according to one embodiment of the present invention.

[0339] Based on the current block's position, at most V neighboring blocks within a certain distance can be included in the candidate list for the current block. That is, even if multiple blocks exist between the current block and the neighboring blocks, at most V neighboring blocks can be included in the candidate list for the current block under certain conditions.

[0340] At this time, the V value can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the corresponding candidate. In addition, the V can be a value preset in the encoder and decoder, and can be a value signaled from the encoder to the decoder.

[0341] A block that exists at least one of a distance of -K x M or +K x M in the horizontal direction and a distance of -L x N or +L x N in the vertical direction based on a specific position for the current block can be determined as a surrounding block, and the surrounding block can be included in the candidate list. That is, a block that exists at a position that adds at least one of a horizontally -K x M or +K x M sample position and a vertically -L x N or +L x N sample position to at least one of the specific positions for the current block can be determined as a surrounding block, and the block can be included in the candidate list.

[0342] Additionally, among the surrounding blocks existing at the above-described location, at least one block included in a specific area relative to the current block may be included in the candidate list for the current block. In this case, the specific area may be a preset area in the encoder / decoder and may be signaled from the encoder to the decoder.

[0343] That is, the above M and N may mean relative distances based on a specific location for the current block. Here, the specific position within the current block is (0, 0) position, (width-1, 0) position, (width, 0) position, (0, height-1) position, (0, height) position, (-1, -1) position, (-1, 0) position, (0, -1) position, (width-1, -1) position, (width, -1) position, (-1, height-1) position, (-1, height) position, (width / 2-1, 0) position, (width / 2, 0) position, (width / 2+1, 0) position, (0, height / 2-1) position, (0, height / 2) position, (0, height / 2+1) position, (width / 2-1, -1) position, (width / 2, -1) position, (width / 2+1, -1) position, (-1, height / 2-1) It can be at least one of position, (-1, height / 2) position, (-1, height / 2+1) position.

[0344] Here, M may represent a horizontal distance in units of samples, N may represent a vertical distance in units of samples, and 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 and 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, at least one of M and N may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0345] Here, the absolute values ​​of M and N can have values ​​of at most MaxM and at most MaxN. In addition, the absolute values ​​of M and N can be determined to be less than or equal to K or L times the size of the CTU.

[0346] Here, at least one of MaxM and MaxN may be a positive integer. In addition, at least one of MaxM and MaxN 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, at least one of MaxM and MaxN may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0347] Here, at least one of K and L may be a positive integer including 0. In addition, at least one of K and L 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, at least one of K and L may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0348] If a block exists at least one of a distance of -K x M or +K x M in the horizontal direction and a distance of -L x N or +L x N in the vertical direction, and exists at the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU, a CTU row, and a CTU column, or exists beyond the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU, a CTU row, and a CTU column, the surrounding blocks of the corresponding position may not be included in the candidate list.

[0349] Additionally, if at least one of the neighboring blocks immediately adjacent to the current block does not exist, at least one of the neighboring blocks existing at a specific distance from the location of the current block may be included in the candidate list.

[0350] In addition, when including neighboring blocks existing at a specific distance based on the location of the current block in the candidate list, neighboring blocks existing in a specific scan order may be included in the candidate list. At this time, the specific scan order may be at least one of a horizontal-first order, a vertical-first order, a Z-shaped order, a zigzag order, an upper-right diagonal order, a lower-left diagonal order, a raster order, a depth-first order, and a size-first order. In addition, at least one of the neighboring blocks may be included in the candidate list in the order of proximity between the current block and the blocks existing at the specific distance.

[0351] In Figure 22, blocks shaded in gray represent surrounding blocks that exist at a specific distance from the current block and can be included in the candidate list. For example, the diagonally marked portion in Figure 22 may represent at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column.

[0352] As in the example of FIG. 22, if the current block X is a block of 16x16 size and M and N are 16, at least one of the surrounding blocks that do not exceed at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column may be included in the candidate list, so that the candidate list for the current block X may be configured to include at least one block among {A0, A1, A3, A6, A7, A8, B0, B1, C0, C1, D0, D1, D2, D3, D4, D5, D6, E0, E1, E2, F0, F1, F2, G0, G1, G2, G3, G4, G5}. Accordingly, at least one of the surrounding blocks existing at a relative position with respect to the position for the current block may be included in the candidate list for the current block.

[0353] For example, in order to reduce the size of the line buffer, if a block exists at least one of a distance of -K x M or +K x M in the horizontal direction and a distance of -L x N or +L x N in the vertical direction, and exists at the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, or crosses the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, then the blocks that exist at the boundary of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column among the surrounding blocks of the corresponding position are not included in the candidate list, and the blocks that exist at the boundary of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column can be included in the candidate list.

[0354] Additionally, information about a block existing at a specific location within a surrounding block existing at a specific distance based on the location of the current block may be determined as information about a representative block of the surrounding block, and the block may be included in the candidate list. For example, the specific location may be at least one of the upper left location, the lower left location, the upper right location, the lower right location, the center location, the upper left location adjacent to the center location, the lower left location adjacent to the center location, the upper right location adjacent to the center location, and the lower right location adjacent to the center location within the block.

[0355] That the specific block exists at the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column may mean that the specific block belongs to at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column other than at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column to which the current block belongs, and exists at the boundary of at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column. In other words, the specific block may mean that the specific block exists within at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column above and / or to the left of the current block.

[0356] The fact that the specific block crosses the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column may mean that the specific block belongs to at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column other than at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column to which the current block belongs, and exists in at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column. In other words, the specific block may mean that the specific block exists within at least one of the picture, the subpicture, the slice, the tile, the brick, the CTU boundary, the CTU row, and the CTU column above and / or to the left of the current block.

[0357] FIG. 23 is a diagram for explaining a method for adding a neighboring block to a candidate list by considering the location of a neighboring block existing at a specific distance from the location of at least one of a current picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column according to one embodiment of the present invention.

[0358] At most V neighboring blocks that exist at a specific distance from at least one of the positions of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column can be included in the candidate list for the current block. That is, even if multiple blocks exist between the current block and the neighboring blocks, at most V of the neighboring blocks can be included in the candidate list for the current block.

[0359] A block that exists at least one of a horizontal distance of K x M and a vertical distance of L x N based on a specific position for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column can be determined as a neighboring block for the current block and included in a candidate list. That is, a block that exists at a position obtained by adding at least one of a horizontal direction of K x M sample positions and a vertical direction of L x N sample positions to at least one of the specific positions for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column can be determined as a neighboring block and included in a candidate list.

[0360] Additionally, at least one of the surrounding blocks existing in the above-described location and included in a specific area relative to the current block may be included in the candidate list. In this case, the specific area may be a preset area in the encoder / decoder and may be signaled from the encoder to the decoder.

[0361] That is, M and N may mean absolute distances relative to a specific location for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column. Here, the specific location for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column may be defined as the (0, 0) location relative to at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column.

[0362] Here, M may represent a horizontal distance in sample units, N may represent a vertical distance in sample units, and M and N may be positive integers that are powers of 2, including 2, 4, 8, 16, 32, etc. For example, M and N may be the same value or different values. In addition, at least one of M and N may be determined based on at least one of an encoding parameter of a current block and an encoding parameter of a candidate. In addition, at least one of M and N may be a value preset in an encoder / decoder, and may be a value signaled from an encoder to a decoder.

[0363] Here, at least one of K and L may be a positive integer including 0. In addition, at least one of K and L 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, at least one of K and L may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0364] Additionally, if at least one of the neighboring blocks immediately adjacent to the current block does not exist, neighboring blocks existing at a specific distance from a specific location for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column may be included in the candidate list.

[0365] In addition, when including neighboring blocks existing at a specific distance based on a specific position for at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row and CTU column in the candidate list, neighboring blocks existing in a specific scan order may be included in the candidate list. In this case, the specific scan order may be at least one order among a horizontal-first order, a vertical-first order, a Z-shaped order, a zigzag order, an upper-right diagonal order, a lower-left diagonal order, a raster order, a depth-first order and a size-first order. In addition, at least one of the candidate blocks may be included in the candidate list in the order of proximity between the current block and the neighboring blocks.

[0366] In Figure 23, blocks colored in gray represent surrounding blocks that exist at a certain distance from the current picture position and can be included in the candidate list.

[0367] As in the example of FIG. 22, if a specific position for the current picture is the (0, 0) position, the current block X is a block of size 16x16, K and L are positive integers including 0, and M and N are 16, then the surrounding block at the (K x M, L x N) position based on the (0, 0) position of the current picture is included in the candidate list, so that the candidate list for the current block X can be configured to include at least one block among {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}. In (K x M, L x N), the K value for the x coordinate and the L value for the y coordinate may have the same value or different values. Accordingly, at least one of the surrounding blocks that exist at an absolute position relative to at least one of the current picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column may be included in the candidate list for the current block.

[0368] Depending on the encoding parameter relevance of the current block and the adjacent neighboring blocks, at most V neighboring blocks can be included in the candidate list for the current block.

[0369] For example, if at least one of the encoding parameters of the current block and at least one of the encoding parameters of the adjacent neighboring blocks are the same, at most V of the neighboring blocks can be included in the candidate list for the current block.

[0370] For example, if the prediction mode is the same, the luminance prediction mode / direction within the screen is the same, the chrominance prediction mode / direction within the screen is the same, the motion vector is the same, the motion vector difference is the same, the reference picture list is the same, the reference picture index is the same, the reference picture is the same, the inter-screen prediction direction (inter-screen prediction indicator, prediction list utilization flag) is the same, whether the merge mode is used is the same, whether the skip mode is used is the same, the motion vector prediction index is the same, the merge index is the same, the motion vector representation accuracy is the same, the transform type is the same, the transform size is the same, the information on whether the first transform is used is the same, the information on whether the second transform is used is the same, the first transform index is the same, the second transform index is the same, the information on whether there is a residual signal is the same, the coded block pattern is the same, or the quantization parameter is the same, then the corresponding neighboring block can be included in the candidate list.

[0371] 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 adjacent neighboring blocks, at most V of the neighboring blocks may be included in the candidate list for the current block.

[0372] For example, if the difference between the luminance prediction mode / direction within the screen of the current block and the luminance prediction mode / direction within the screen of the surrounding block is less than or equal to the T value, or the difference between the motion vector of the current block and the motion vector of the surrounding block is less than or equal to the T value, or the difference between the motion vector difference of the current block and the motion vector difference of the surrounding block is less than or equal to the T value, or the difference between the reference image index of the current block and the reference image index of the surrounding block is less than or equal to the T value, the surrounding block can be included in the candidate list. Here, T can mean a real number.

[0373] For example, if the reference image list is different but the reference images are the same, or if the reference image index is different but the reference images are the same, the surrounding blocks can be included in the candidate list.

[0374]

[0375] For example, the encoder or decoder can entropy encode / decode encoding parameter identifiers of surrounding blocks to be included in the candidate list, and include the surrounding blocks in the candidate list based on the similarity between the encoding parameters.

[0376] For example, the encoder may entropy encode the encoding parameter identifiers of the surrounding blocks to be included in the candidate list, and include in the candidate list the surrounding blocks having the same value as the encoding parameter, the surrounding blocks having a value greater than the encoding parameter, or the surrounding blocks having a value smaller than the encoding parameter.

[0377] The decoder can entropy decode the encoding parameter identifiers of the surrounding blocks to be included in the candidate list to include in the candidate list the surrounding blocks having the same value as the corresponding encoding parameter, the surrounding blocks having a value greater than the corresponding encoding parameter, or the surrounding blocks having a value smaller than the corresponding encoding parameter.

[0378] As another example, a block within a reference image having the same spatial location (collocated) as the current block may be included in the candidate list for the current block as a neighboring block. In this case, a block temporally adjacent to the current block may refer to a block within the reference image having the same spatial location as the current block, or a block within the reference image having a spatial location corresponding to the current block.

[0379] For example, at least one of the neighboring blocks belonging to a reference image for the current image among images other than the image to which the current block belongs 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.

[0380] At this time, the surrounding block may mean a block that has the same spatial (collocated) location as the current block among the blocks in the reference image, or may mean a block adjacent to a block that has the same spatial location as the current block among the blocks in the reference image.

[0381]

[0382] Below, the step (S820) of determining a reference block used for encoding / decoding the current block among the surrounding blocks included in the candidate list is described in detail.

[0383] Before determining a reference block to be used for encoding / decoding the current block among the surrounding blocks included in the candidate list, the candidate list may be modified using at least one or a combination of the following methods. If at least one of the following methods is used, the methods below may be performed in a specific order to modify the candidate list.

[0384] Hereinafter, the surrounding blocks included in the candidate list may be referred to as candidates, and the block information of the surrounding blocks included in the candidate list may also be referred to as candidates. Furthermore, the blocks included in the candidate list may also be referred to as candidates, and the block information of the blocks included in the candidate list may also be referred to as candidates.

[0385] Candidates within a candidate list can be sorted in a predetermined order. At this time, the predetermined ordering can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates.

[0386] For example, the predetermined ordering may be determined in the order in which the values ​​of at least one of the encoding parameters of the current block and the encoding parameters of the candidates increase. Additionally, the predetermined ordering may be determined in the order in which the values ​​of at least one of the encoding parameters of the current block and the encoding parameters of the candidates decrease.

[0387] The encoder can improve encoding efficiency by sorting the candidates in the candidate list in order of the probability that the candidates will be determined as reference blocks, and assigning a candidate index with a short codeword length to a candidate with a high probability that the candidates will be determined as reference blocks.

[0388] An encoder or decoder may limit the size of the candidate list to a maximum of 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 and the encoding parameters of the candidates. In addition, U may be a value preset in the encoder / decoder, or a value signaled from the encoder to the decoder.

[0389] For example, if there are more than U candidates in the candidate list, the candidates exceeding U may be excluded from the candidate list. The excluded candidates may be determined by the sorting method within the candidate list described above.

[0390] An encoder or decoder can remove at most U candidates from the candidate list. Here, U can be a positive integer including 0. In addition, U can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, U can be a value preset in the encoder / decoder, or a value signaled from the encoder to the decoder.

[0391] If there are at least two overlapping candidates in a candidate list, at least one of the overlapping candidates can be removed from the candidate list. In this case, the candidate with the highest ranking among the overlapping candidates remains in the candidate list, while the candidate with the lowest ranking can be removed. Here, if at least one of the encoding parameters of the candidates overlaps, they are considered overlapping candidates.

[0392] For example, it may be determined whether a candidate in the candidate list is to be removed by using the reverse of a method using at least one or a combination of at least one of the embodiments of step S810 described above.

[0393] An encoder or decoder can add up to U candidates to a candidate list. Here, U can be a positive integer including 0. In addition, U can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, U can be a value preset in the encoder / decoder, or a value signaled from the encoder to the decoder.

[0394] Candidates may be added to the list until the maximum number of candidates is reached. Overlapping candidates may be added.

[0395] When the encoder or decoder adds a candidate to the candidate list, at least one or a combination of at least one of the embodiments of step S810 described above may be used.

[0396] Additionally, if a candidate to be added to the candidate list overlaps with a candidate within the candidate list, the candidate to be added may not be added to the candidate list.

[0397] The encoder or decoder can determine at most W neighboring blocks (candidates) included in the candidate list as reference blocks for the current block. Furthermore, the encoder or decoder can determine at most W block information (candidates) of neighboring blocks included in the candidate list as reference block information for the current block.

[0398] Here, W can be a positive integer including 0. In addition, W can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, W can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0399] For example, if the current block is predicted by the above-described triangulation mode, the encoder or decoder may determine W candidates included in the candidate list as information of reference blocks for the current block in order to perform encoding / decoding for the current block. For example, W may be 2. If the size of the current block is M x N or more, the current block may be encoded / decoded by the triangulation mode. The triangulation mode may be an example of the merge mode. That is, the candidate list used to perform encoding / decoding in the above-described example may mean a merge candidate list. Whether the current block is encoded / decoded by the triangulation mode 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, for example, M and N may be 8.

[0400] When the current block is encoded / decoded using the triangular segmentation mode, the current block can be divided into two triangular regions. At this time, information regarding the division direction for dividing the current block into the two triangular regions can be encoded / decoded. To encode / decode each of the two regions divided into the triangular regions, neighboring blocks for encoding / decoding each region can be selected from a candidate list.

[0401] In order to derive motion information for each triangular region, an index for each triangular region can be encoded / decoded. For example, when the current block is divided into a first region and a second region, a first index for encoding / decoding the first region and a second index for encoding / decoding the second region can be encoded / decoded. Here, when two pieces of information are determined as reference block information for the current block, the information indicated by the first index can be information of the first reference block for the current block, and the information indicated by the second index can be information of the second reference block for the current block.

[0402] An encoder or decoder can select a first neighboring block and a second neighboring block from a candidate list for a current block using a first index and a second index. At this time, the first region and the second region can share a single candidate list derived based on the current block before segmentation. The encoder or decoder can 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.

[0403] The triangulation mode described above is a method in which the current block is divided diagonally and prediction is performed for each region. However, the triangulation mode can also mean the following operation.

[0404] When the current block is encoded / decoded by the triangulation mode, a first neighboring block and a second neighboring block can be determined from a single candidate list through a first index and a second index for the current block. The encoder or decoder can derive a first prediction block for the current block using information of the first neighboring block, and can derive a second prediction block for the current block using information of the second neighboring block.

[0405] An encoder or decoder may generate a final prediction block for the current block by weighting the first prediction block and the second prediction block. In this case, the weighting for the prediction blocks may be performed such that the weight is assigned to the first region for the first prediction block and the weight is assigned to the second region for the second prediction block.

[0406] The first peripheral block may refer to a first reference block for the current block, and the second peripheral block may refer to a second reference block for the current block. In addition, information about the first peripheral block may refer to information about the first reference block for the current block, and information about the second peripheral block may refer to information about the second reference block for the current block.

[0407] The encoder or decoder may perform encoding / decoding of the current block using at least one of the determined reference blocks. In addition, the encoder or decoder may perform encoding / decoding of the current block using at least one of the block information of at least one of the determined reference blocks.

[0408] Additionally, at least one of the block information of the determined reference block may be determined as at least one of the block information of the current block. Additionally, at least one of the block information of at least one of the determined reference blocks may be determined as at least one of the block information of the current block.

[0409] Below, we describe how an encoder or decoder determines a specific surrounding block from a candidate list as a reference block. The encoder or decoder can determine a reference block from the candidate list using at least one or a combination of the following methods.

[0410] For example, an encoder or decoder may determine the Yth candidate in the candidate list as a 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 and the encoding parameters of the candidate. In addition, Y may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0411] At this time, since the Yth candidate in the candidate list can be identified by the encoder / decoder, the candidate index for determining the reference block may not be entropy encoded / decoded. The order of the candidates in the candidate list for determining the Yth candidate may utilize the embodiment related to the ordering within the candidate list described above.

[0412] As another example, the encoder or decoder can reduce or narrow the candidate list so that at most Y candidates remain in the candidate list, and determine the Y candidates as reference blocks. Here, Y can be a positive integer including 0. In addition, Y can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, Y can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0413] For example, the encoder or decoder can determine the Y candidates as reference blocks by leaving only the Y candidates with the highest probability of being selected as reference blocks among the candidates in the candidate list.

[0414] At this time, since Y candidates in the candidate list can be identified by the encoder / decoder, the candidate index for determining the reference block may not be entropy encoded / decoded.

[0415] For example, the candidate list can be reduced or reduced by using the reverse of the method using at least one or a combination of at least one of the embodiments of step S810 described above.

[0416] As another example, the encoder or decoder can determine a reference block by entropy encoding / decoding a candidate index indicating a specific candidate within a candidate list. Here, the candidate index may be a value to which the position, order, etc. of the candidate within the candidate list are mapped. The encoder or decoder can encode / decode the current block using the determined reference block (or at least one of the block information of the reference block).

[0417] That is, the encoder can encode the current block using a reference block (or at least one of the block information of the reference block) determined among the candidates in the candidate list, and entropy encode the candidate index for the reference block. Meanwhile, the decoder can entropy decode the candidate index for the reference block, and decode the current block using 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).

[0418] For example, if the candidate list consists of {A, B, C, D, E, F}, the indexes of the candidates within the candidate list can be assigned as {0, 1, 2, 3, 4, 5}. If the candidate index is 2, candidate C is determined as the reference block. Also, if the candidate index is 1, candidate B is determined as the block information of the reference block.

[0419] An encoder or decoder can entropy encode / decode up to Y candidate indices. When multiple candidate indices are entropy encoded / decoded, the current block can be encoded / decoded using multiple reference blocks indicated by the multiple candidate indices.

[0420] Here, Y can be a positive integer including 0. In addition, Y can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, Y can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0421] That is, the encoder can encode the current block using Y reference blocks determined from among candidates in the candidate list, and entropy encode the Y candidate indices for the Y reference blocks. Meanwhile, the decoder can entropy decode the Y candidate indices for the Y reference blocks, and decode the current block using the candidates indicated by the Y candidate indices from among candidates in the candidate list as the Y reference blocks.

[0422]

[0423] Below, a method for adding information of a current block to a candidate list according to one embodiment of the present invention is described.

[0424] Figure 24 is a flowchart for explaining an image encoding / decoding method according to another embodiment of the present invention.

[0425] Referring to FIG. 24, the decryption method according to the present invention may include a step of deriving block information of a current block using a candidate list (S2410), a step of generating a prediction block of the current block using the block information of the current block (S2420), and a step of adding the block information of the current block to the candidate list (S2430).

[0426] At this time, the candidate list derived in step S2430 can be used for inter prediction of the next block to be decoded after the current block.

[0427] As another example, the encoding / decoding method according to the present invention may include a step of deriving block information of a current block using a candidate list, a step of generating a prediction block of the current block using the block information of the current block, and a step of adding the block information of the current block to the candidate list.

[0428] As another example, the encoding / decoding method according to the present invention may include a step of deriving a merge candidate list of a current block using a candidate list, a step of deriving motion information of the current block using the merge candidate list, and a step of adding motion information of the current block to the candidate list.

[0429] As another example, the encoding / decoding method according to the present invention may include a step of deriving a motion vector or block vector candidate list of a current block using a candidate list, a step of deriving motion information of the current block using the motion vector or block vector candidate list, and a step of adding the motion information of the current block to the candidate list.

[0430] At this time, the candidate list can be used for inter prediction of a block to be encoded after the current block.

[0431] FIG. 25 is a diagram for explaining a method of adding block information of a current block to a candidate list according to one embodiment of the present invention.

[0432] At least one of the 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.

[0433] The information of the block may be at least one of encoding parameters such as an intra-screen prediction mode, a motion vector, motion information, a block vector, a weight value, an inter-screen prediction direction, a reference image index, an inter-screen prediction indicator, and a prediction list utilization flag. Here, the weight value may mean a weight value applied to each prediction block when generating a bi-prediction block.

[0434] For example, if the current block is not in affine mode, not in triangulation mode, or not using a sub-block based temporal motion vector derivation mode, at least one of the block information of the current block may be included in the candidate list.

[0435] A candidate list according to the present invention is maintained during encoding / decoding in units of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, and can be used within units of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column. In addition, the candidate list according to the present invention may include at least one of block information of a block previously encoded / decoded based on a current block within units of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column. In addition, the candidate list according to the present invention may include at least one of block information within the unit previously encoded / decoded. In the following description, the candidate list may mean the candidate list according to the present invention described above.

[0436] As illustrated in FIG. 25, at least one of the candidate block information within the candidate list may be determined or selected for use in the encoding / decoding process of the current block. Accordingly, the encoding / decoding process of the current block may be performed using at least one of the determined candidate block information.

[0437] At this time, at least one of the block information used in 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 or included in the candidate list. In the following description, adding at least one of the block information, candidate, and block to the candidate list and including at least one of the block information, candidate, and block in the candidate list may be used interchangeably.

[0438] 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 first or last in the candidate list. Additionally, the block information may be added to a position preset between the encoder / decoder within the candidate list, or may be added to an arbitrary position signaled from the encoder to the decoder.

[0439] As another example, when at least one block of 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 included in the current candidate list is the maximum number of candidates, the block information of the current block may not be included in the candidate list.

[0440] For example, the maximum number of candidates in the candidate list can be determined as P. Here, P can be a positive integer including 0. For example, P can be 5. The P can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, the P can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0441] A candidate in a candidate list according to the present invention may be added to or included in at least one of an intra-screen prediction mode candidate list, a primary MPM (Most Probable Mode) list, a secondary MPM list, a residual intra-screen prediction mode candidate list, a motion vector candidate list, a merge candidate list, a block vector candidate list, a block vector merge candidate list, a sub-block motion vector candidate list, and a sub-block merge candidate list.

[0442] Here, the primary MPM list may be a candidate intra-picture prediction mode list including at least one of an intra-picture prediction mode of a spatial neighboring block, a derived intra-picture prediction mode that is a result of subtracting or adding a specific value to the intra-picture prediction mode of a spatial neighboring block, and a basic intra-picture prediction mode. In this case, the basic intra-picture prediction mode may be at least one of a DC mode, a planar mode, a vertical mode, a horizontal mode, etc. The specific value may be at least one of 0, a positive integer, and a negative integer. The specific value may be determined based on at least one of an encoding parameter of a current block and an encoding parameter of a candidate. In addition, the specific value may be a value preset in an encoder / decoder, and may be a value signaled from an encoder to a decoder.

[0443] The secondary MPM list may be a candidate list of intra-screen prediction modes that are not included in the primary MPM list. If a candidate in the primary MPM list is not determined as an intra-screen prediction mode in the current block, a candidate in the secondary MPM list may be determined as an intra-screen prediction mode.

[0444] The remaining intra-picture prediction mode candidate list may be a intra-picture prediction mode candidate list consisting of intra-picture prediction modes that are not included in at least one of the first MPM list and the second MPM list. If a candidate included in at least one of the first MPM list and the second MPM list is not determined as an intra-picture prediction mode in the current block, a candidate in the remaining intra-picture prediction mode candidate list may be determined as an intra-picture prediction mode.

[0445] Therefore, the on-screen prediction mode candidate list may mean at least one of the first MPM list, the second MPM list, and the remaining on-screen prediction mode candidate list.

[0446] For example, candidates within a candidate list may be included in a specific position or order within the on-screen prediction mode candidate list.

[0447] For example, a candidate in the candidate list may be included first in the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included last in the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included before at least one of the spatial intra-screen prediction modes in the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included after at least one of the spatial intra-screen prediction modes in the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included before at least one of the intra-screen prediction modes derived from the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included after at least one of the intra-screen prediction modes derived from the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included before at least one of the basic intra-screen prediction modes in the intra-screen prediction mode candidate list. As another example, a candidate in the candidate list may be included after at least one of the basic intra-screen prediction modes in the intra-screen prediction mode candidate list.

[0448] As another example, candidates within the candidate list may be included at specific positions or orders in the motion vector candidate list.

[0449] For example, a candidate in the candidate list may be included first in the motion vector candidate list. As another example, a candidate in the candidate list may be included last in the motion vector candidate list. As another example, a candidate 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, a candidate 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, a candidate 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, a candidate 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, a candidate 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, a candidate in the candidate list may be included after at least one of the zero motion vectors in the motion vector candidate list.

[0450] As another example, candidates within the above candidate list may be included in a specific position or order in the merge candidate list.

[0451] For example, a candidate in the candidate list may be included first in the merge candidate list. In another example, a candidate in the candidate list may be included last in the merge candidate list. In another example, a candidate in the candidate list may be included before at least one of the spatial merge candidates in the merge candidate list. In another example, a candidate in the candidate list may be included after at least one of the spatial merge candidates in the merge candidate list. In another example, a candidate in the candidate list may be included before at least one of the temporal merge candidates in the merge candidate list. In another example, a candidate in the candidate list may be included after at least one of the temporal merge candidates in the merge candidate list. In another example, a candidate in the candidate list may be included before at least one of the merge candidates combined in the merge candidate list. In another example, a candidate in the candidate list may be included before at least one of the zero merge candidates in the merge candidate list. As another example, a candidate in the above candidate list may be included after at least one of the zero merge candidates in the merge candidate list.

[0452] As another example, candidates within a candidate list may be included in a specific position or order in the block vector candidate list.

[0453] For example, a candidate in the candidate list may be included first in the block vector candidate list. As another example, a candidate in the candidate list may be included last in the block vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the spatial block vectors in the block vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the spatial block vectors in the block vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the zero block vectors in the block vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the zero block vectors in the block vector candidate list.

[0454] As another example, candidates within the above candidate list may be included in a specific position or order in the block vector merge candidate list.

[0455] For example, a candidate in the candidate list may be included first in the block vector merge candidate list. As another example, a candidate in the candidate list may be included last in the block vector merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the spatial block vector merge candidates in the block vector merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the spatial block vector merge candidates in the block vector merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the merge candidates combined in the block vector merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the merge candidates combined in the block vector merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the zero block vector merge candidates in the block vector merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the zero block vector merge candidates in the block vector merge candidate list.

[0456] As another example, candidates within the candidate list may be included in a specific position or order in the sub-block motion vector candidate list.

[0457] For example, a candidate in the candidate list may be included first in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included last in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the spatial sub-block motion vectors in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the spatial sub-block motion vectors in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the temporal sub-block motion vectors in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the temporal sub-block motion vectors in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included before at least one of the zero motion vectors in the sub-block motion vector candidate list. As another example, a candidate in the candidate list may be included after at least one of the zero motion vectors in the sub-block motion vector candidate list.

[0458] As another example, candidates within the above candidate list may be included in a specific position or order in the sub-block merge candidate list.

[0459] For example, a candidate in the candidate list may be included first in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included last in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the spatial sub-block merge candidates in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the spatial sub-block merge candidates in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the temporal sub-block merge candidates in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the temporal sub-block merge candidates in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the merge candidates combined in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the merge candidates combined in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included before at least one of the zero merge candidates in the sub-block merge candidate list. As another example, a candidate in the candidate list may be included after at least one of the zero merge candidates in the sub-block merge candidate list.

[0460] In the examples described above, the combined merge candidate may be a merge candidate generated by combining at least one candidate in the merge candidate list. When generating the combined merge candidate, the average of at least one of the vector values ​​of the candidates may be utilized. For example, in the examples described above, the combined merge candidate may refer to a merge candidate generated by calculating the average of the vector values ​​of two merge candidates.

[0461] The candidate list according to the present invention can be initialized at the starting point of a sequence, picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column. That is, the candidates in the candidate list can be deleted all at the sequence, picture, subpicture, slice, tile, brick, CTU boundary, CTU row, and CTU column level, or can be initialized to at least one specific value.

[0462] For example, the candidate list can be initialized with a value of information of a block having a specific value. The specific value can be at least one of 0, a positive integer, and a negative integer. The specific value can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate. In addition, the specific value can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder.

[0463] At this time, the specific value may be a value corresponding to one of the prediction modes within the screen, a value corresponding to a temporal motion vector, etc.

[0464] For example, a particular value may be a value indicating a DC mode or a PLANAR mode, which are prediction modes within a non-directional screen.

[0465] As another example, the specific value may be a motion vector value of a corresponding position block within a corresponding position image. That is, the specific value may be a temporal motion vector.

[0466] As another example, the specific value may be a sub-block unit (or sub-block unit) motion vector value of a corresponding position block within a corresponding position image. That is, the specific value may be a sub-block unit temporal motion vector value (or sub-block unit temporal motion vector value).

[0467] As another example, a particular value could be a zero (0, 0) motion vector or block vector value.

[0468] When block information of a current block is added to a candidate list according to the present invention, a redundancy check may be performed between at least one piece of information of a block already included in the candidate list and the information of the current block to prevent identical or similar block information from being included in the candidate list. As a result of the redundancy check, at least one piece of 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 piece of block information included in the candidate list may be removed, and at least one piece of block information of the current block may be included in the candidate list.

[0469] The following description may be about checking for duplication between the block information of the current block and the candidates included in the candidate list when the block information of the current block is added to the candidate list.

[0470] The redundancy check can be performed only on the M candidates located at the very beginning in the candidate list. As another example, the redundancy check can be performed only on the M candidates located at the very end in the candidate list. Here, M can be a positive integer including 0. For example, M can be 2. M can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, M can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder. In this case, the redundancy check can be performed on the spatial motion vectors located above or to the left of the current block and the two candidates located at the very beginning in the candidate list.

[0471] For example, if at least one piece of block information of the current block to be included is different from at least one piece of block information of the block included in the candidate list, at least one piece of block information of the current block to be included can be included in the candidate list.

[0472] For example, at least one piece of block information of the current block to be included may be added at the very beginning of the candidate list. As another example, at least one piece of block information of the current block to be included may be added at the very end of the candidate list.

[0473] Additionally, through one of the embodiments in which the above-described specific candidate or candidate information is included in a specific position or order in the candidate list, the block information of the current block may be included in the candidate list.

[0474] As another example, if at least one piece of block information of the current block to be included is the same as at least one piece of block information of a block included in the candidate list, at least one piece of block information of the current block to be included may not be included in the candidate list.

[0475] As another example, if at least one piece of block information of the current block to be included and at least one piece of information of a block included in the candidate list are similar to each other, at least one piece of block information of the current block to be included may not be included in the candidate list.

[0476] For example, whether the information of blocks included in the candidate list is similar can be determined through the absolute values ​​of the prediction mode value, motion vector value, block vector value, etc. within the screen.

[0477] For example, if the absolute value of the difference between the value of the prediction mode within the picture to be included and the value of the prediction mode within the picture included in the candidate list is less than or equal to T, the prediction mode within the picture 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 block vector to be included and the value of the motion vector or block vector included in the candidate list is less than or equal to T, the motion vector or block 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 block vector to be included and the X component value of the motion vector or block vector included in the candidate list is less than or equal to T, the motion vector or block 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 block vector to be included and the Y component value of the motion vector or block vector included in the candidate list is less than or equal to T, the motion vector or block vector to be included may not be included in the candidate list.

[0478] As another example, if at least one of the block information of the current block to be included and at least one of the block information 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 not be included in the candidate list.

[0479] For example, whether the information of blocks included in the candidate list is similar can be determined through the absolute values ​​of the prediction mode value, motion vector value, block vector value, etc. within the screen.

[0480] For example, if the absolute value of the difference between the value of the prediction mode within the picture to be included and the value of the prediction mode within the picture included in the candidate list is greater than T, the prediction mode within the picture 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 block vector to be included and the value of the motion vector or block vector included in the candidate list is greater than T, the motion vector or block 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 block vector to be included and the X component value of the motion vector or block vector included in the candidate list is greater than T, the motion vector or block 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 block vector to be included and the Y component value of the motion vector or block vector included in the candidate list is greater than T, the motion vector or block vector to be included may not be included in the candidate list.

[0481] At this time, T may be a positive integer including 0. The T 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, the T may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder.

[0482] In addition, T in the motion vector or block vector 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, and a 1 / 16 pixel unit. Here, M and N may be positive integers. The M and 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, the M and N may be values ​​preset in the encoder / decoder, and may be values ​​signaled from the encoder to the decoder.

[0483] The following description may be about a redundancy check between a candidate in the candidate list and a candidate in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and 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-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0484] When at least one of the candidates in the candidate list is added to at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, a redundancy check may be performed on at least one of the candidates in the candidate list and the candidates included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0485] For example, at least one of the candidates in the candidate list may be included first or last in at least one of the prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list. In addition, the block information of the current block may be included in the candidate list through one of the methods described above in which a specific candidate or candidate information is included in a specific position or order in the candidate list.

[0486] In order to prevent identical or similar candidates from being added to at least one of the candidate list or the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, 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 the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list. As a result of the redundancy check, at least one of the candidates in the candidate list may or may not be included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0487] The redundancy check can be performed only on the M candidates located at the very beginning in the candidate list. As another example, the redundancy check can be performed only on the M candidates located at the very end in the candidate list. Here, M can be a positive integer including 0. For example, M can be 2. M can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidates. In addition, M can be a value preset in the encoder / decoder, and can be a value signaled from the encoder to the decoder. In this case, the redundancy check can be performed on the spatial motion vectors on the upper or left side of the current block and the two candidates that exist at the beginning in the candidate list.

[0488] For example, if at least one of the information of a block in the candidate list to be included is different from at least one of the information of a block included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, then at least one of the information of a block in the candidate list to be included may be included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0489] For example, at least one of the information of a block in the candidate list may be included in at least one of the following in increasing order of index: an intra-screen prediction mode candidate list, a motion vector candidate list, a merge candidate list, a block vector candidate list, a block vector merge candidate list, a sub-block motion vector candidate list, and a sub-block merge candidate list.

[0490] Additionally, at least one of the information of a block in the candidate list may be included in at least one of the following: an intra-screen prediction mode candidate list, a motion vector candidate list, a merge candidate list, a block vector candidate list, a block vector merge candidate list, a sub-block motion vector candidate list, and a sub-block merge candidate list, in decreasing index order.

[0491] As another example, if at least one of the information of a block in the candidate list to be included is the same as at least one of the information of a block included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, then at least one of the information of the block in the candidate list to be included may not be included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0492] As another example, if at least one of the information of a block in the candidate list to be included is similar to at least one of the information of a block included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, at least one of the information of the block in the candidate list to be included may not be included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0493] At this time, if at least one of the information of the block in the candidate list to be included is similar to at least one of the information of the block included in at least one of the prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, it may mean one of the following conditions.

[0494] For example, if the absolute value of the difference between the value of the on-screen prediction mode to be included and the value of the on-screen prediction mode included in the on-screen prediction mode candidate list is less than or equal to S, the on-screen prediction mode to be included may not be included in the on-screen prediction mode candidate list.

[0495] For example, if the absolute value of the difference between the value of the motion vector or block vector to be included and the value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is less than or equal to S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0496] For example, if the absolute value of the difference between the X component value of the motion vector or block vector to be included and the X component value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is less than or equal to S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0497] For example, if the absolute value of the difference between the Y component value of the motion vector or block vector to be included and the Y component value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is less than or equal to S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0498] As another example, if at least one of the information of a block in the candidate list to be included is not similar to at least one of the information of a block included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list, at least one of the information of the block in the candidate list to be included may not be included in at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0499] At this time, if at least one of the information of the block in the candidate list to be included and at least one of the information of the block included in at least one of the prediction mode candidate list, motion vector candidate list, merge candidate list, block vector candidate list, block vector merge candidate list, sub-block motion vector candidate list, and sub-block merge candidate list are not similar to each other, it may mean one of the following conditions.

[0500] For example, if the absolute value of the difference between the value of the on-screen prediction mode to be included and the value of the on-screen prediction mode included in the on-screen prediction mode candidate list is greater than S, the on-screen prediction mode to be included may not be included in the on-screen prediction mode candidate list.

[0501] For example, if the absolute value of the difference between the value of the motion vector or block vector to be included and the value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is greater than S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0502] For example, if the absolute value of the difference between the X component value of the motion vector or block vector to be included and the X component value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is greater than S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0503] For example, if the absolute value of the difference between the Y component value of the motion vector or block vector to be included and the Y component value of the motion vector or block vector included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list is greater than S, the motion vector or block vector to be included may not be included in at least one of the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0504] 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 and the encoding parameters of the candidate. In addition, S may be a value preset in the encoder / decoder, and may be a value signaled from the encoder to the decoder. In addition, in the case of a motion vector or a block vector, S may be a value expressing at least one of M / N pixel units, such as an integer pixel unit, a 1 / 2 pixel unit, a 1 / 4 pixel unit, and a 1 / 16 pixel unit. Here, M and N may be positive integers.

[0505] 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 the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the 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-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and 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-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0506] For example, at least one of the candidates in the candidate list may be included first or last among the prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0507] The candidate list according to the present invention can manage candidates according to the First-In-First-Out (FIFO) 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 candidate added first is removed from the candidate list, and the new candidate is added to the candidate list.

[0508] For example, a new candidate may be included first or last in the list of candidates.

[0509] For example, the candidate list according to the present invention may include at least one piece of information about an in-screen prediction mode.

[0510] For example, the candidate list may include the intra-picture prediction modes of the spatial neighboring blocks. As another example, the candidate list may include an induced intra-picture prediction mode that is the result of subtracting or adding a specific value to the intra-picture prediction modes of the spatial neighboring blocks. As another example, the candidate list may include the base intra-picture prediction mode. As another example, the candidate list may include a non-directional intra-picture prediction mode other than the DC mode or the planar mode. As another example, the candidate list may include the intra-picture prediction mode on a CTU basis.

[0511] As another example, the candidate list according to the present invention may include at least one of information about a motion vector, a block vector, or a merge candidate.

[0512] For example, the candidate list may include a spatial motion vector, a spatial block vector, or a spatial merge candidate. 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 subblock-level motion vector or a subblock-level merge candidate. As another example, the candidate list may include a subblock-level temporal motion vector or a subblock-level temporal merge candidate. As another example, the candidate list may include a CTU-level spatial motion vector, a spatial block vector, or a spatial merge candidate. As another example, the candidate list may include a CTU-level temporal motion vector or a temporal merge candidate of a corresponding position CTU. As another example, the candidate list may include a CTU-level subblock-level motion vector or a CTU-level merge candidate of a corresponding position CTU. As another example, the candidate list may include a CTU-level subblock-level temporal motion vector or a CTU-level temporal merge candidate of a corresponding position CTU.

[0513] As another example, the candidate list may include spatial motion vectors, spatial block vectors, or spatial merge candidates, but not temporal motion vectors or temporal merge candidates. As another example, the candidate list may include temporal motion vectors or temporal merge candidates, but not spatial motion vectors, spatial block vectors, or spatial merge candidates. As another example, the candidate list may include spatial motion vectors, spatial block vectors, spatial merge candidates, temporal motion vectors, or temporal merge candidates. As another example, the candidate list may include spatial motion vectors, spatial block vectors, spatial merge candidates, temporal motion vectors, or temporal merge candidates, but not subblock-level motion vectors or subblock-level merge candidates. As another example, the candidate list may include spatial motion vectors, spatial block vectors, or spatial merge candidates on a CTU basis, but not temporal motion vectors or temporal merge candidates. As another example, the candidate list may include temporal motion vectors or temporal merge candidates on a CTU basis, but may not include spatial motion vectors, spatial block vectors, or spatial merge candidates. As another example, the candidate list may include spatial motion vectors, spatial block vectors, spatial merge candidates, temporal motion vectors, or temporal merge candidates on a CTU basis.

[0514] As another example, the candidate list may include integer- and / or sub-pel-based motion vectors, block vectors, or merge candidates.

[0515] For example, the candidate list may include integer pixel-level motion vectors, block vectors, or merge candidates. As another example, the candidate list may include motion vectors, block vectors, or merge candidates less than integer pixel-level. As another example, the candidate list may include 1 / 4 pixel-level motion vectors, block vectors, or merge candidates. As another example, the candidate list may include 1 / 16 pixel-level motion vectors, block vectors, or merge candidates.

[0516] Separate candidate lists can be constructed for each on-screen prediction mode, motion vector, block vector, and merge candidate that can be included in the candidate list.

[0517] If a specific block exists at the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, or if it crosses the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, at least one of the information of the specific block may be included in the candidate list. In this case, the candidate list may be used to replace the line buffer.

[0518] For example, if a specific block exists at the boundary of an upper picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column of the current block, or if a specific block exists at the boundary of an upper picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block does not belong, or if a specific block crosses the upper boundary of a picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block belongs, at least one of the information of the specific block may be included in the candidate list.

[0519] As another example, if a specific block exists at the boundary of a left picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column of the current block, or if a specific block exists at the boundary of a left picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block does not belong, or if a specific block crosses the left boundary of a picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block belongs, at least one of the information of the specific block may be included in the candidate list.

[0520] Additionally, if a specific block exists at the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, or if the block crosses the boundary of at least one of a picture, a subpicture, a slice, a tile, a brick, a CTU boundary, a CTU row, and a CTU column, at least one of the information of the specific block may not be included in the candidate list. In this case, by not including the information of the specific block in the candidate list, the line buffer may be removed.

[0521] For example, if a specific block exists at the boundary of an upper picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column of the current block, or if a specific block exists at the boundary of an upper picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block does not belong, or if a specific block crosses the upper boundary of a picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block belongs, at least one of the information of the specific block may not be included in the candidate list.

[0522] As another example, if a specific block exists at the boundary of a left picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column of the current block, or if a specific block exists at the boundary of a left picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block does not belong, or if a specific block crosses the left boundary of a picture, subpicture, slice, tile, brick, CTU, CTU row, and CTU column to which the current block belongs, at least one of the information of the specific block may not be included in the candidate list.

[0523] Additionally, if the block related to the block information already included in the candidate list and the current block exist or belong to different pictures, subpictures, slices, tiles, bricks, CTU boundaries, CTU rows, and CTU columns, at least one of the information of the current block may not be included in the candidate list.

[0524] That is, when block information of the current block is added to the candidate list for a specific block, if the specific block and the current block exist or belong to different pictures, subpictures, slices, tiles, bricks, CTU boundaries, CTU rows, and CTU columns, at least one of the information of the current block may not be included in the candidate list for the specific block.

[0525] When a candidate is added to the candidate list, a specific candidate having the result of adding or subtracting a specific value to at least one of the block information for the candidate as the block information may be added to the candidate list.

[0526] For example, a specific candidate having a new on-screen prediction mode can be added to the candidate list by adding or subtracting a specific value to the on-screen prediction mode of a candidate to be included in the candidate list and setting the result as a new on-screen prediction mode.

[0527] As another example, a specific candidate having a new motion vector or block vector can be added to the candidate list by adding or subtracting a specific value to the motion vector or block vector of the candidate to be included in the candidate list and making the result a new motion vector or block vector.

[0528] Additionally, when a candidate is added to the candidate list, the candidate may not be added to the candidate list, but a specific candidate having the result of adding or subtracting a specific value to at least one of the block information for the candidate as the block information may be added to the candidate list.

[0529] Additionally, when at least one of the candidates is added to the candidate list, a specific candidate having as block information the result of calculating a statistical value for at least one of the block information for at least one of the candidates may be added to the candidate list.

[0530] Additionally, a specific candidate may be added to the candidate list, having as its block information the result of adding or subtracting a specific value to at least one of the block information for the candidates included in the candidate list.

[0531] For example, a specific candidate having a new on-screen prediction mode can be added to the candidate list by adding or subtracting a specific value to the on-screen prediction mode of a candidate included in the candidate list and setting the result as a new on-screen prediction mode.

[0532] As another example, a specific candidate having a new motion vector or block vector can be added to the candidate list by adding or subtracting a specific value to the motion vector or block vector of a candidate included in the candidate list and making the result a new motion vector or block vector.

[0533] In addition, a specific candidate having information of a block as a result of adding or subtracting a specific value to at least one of the information of a block for a candidate included in the candidate list is added to the candidate list, but a candidate already included in the candidate list may be excluded from the candidate list.

[0534] Additionally, a specific candidate having as block information the result of calculating a statistical value for at least one of the block information for at least one of the candidates included in the candidate list may be added to the candidate list.

[0535] At this time, the specific value may be at least one of 0, a positive integer, and a negative integer. The specific value 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, the specific value may be a value preset in the encoder / decoder, or a value signaled from the encoder to the decoder.

[0536] The candidate list according to the present invention can be used when configuring at least one of an in-screen prediction mode candidate list, a motion vector candidate list, a merge candidate list, a block vector candidate list, a block vector merge candidate list, a sub-block motion vector candidate list, and a sub-block merge candidate list.

[0537] For example, candidates within the candidate list can be used as candidates when constructing a candidate list for an on-screen prediction mode. For example, candidates within the candidate list can be included in a candidate list for an on-screen prediction mode.

[0538] As another example, candidates within the candidate list can be used as candidates when constructing a motion vector candidate list. For example, candidates within the candidate list can be included in a motion vector candidate list.

[0539] As another example, candidates within the above candidate list may be used as candidates when constructing a merge candidate list. For example, candidates within the candidate list may be included in a merge candidate list.

[0540] As another example, candidates within a candidate list can be used as candidates when constructing a block vector candidate list. For example, candidates within a candidate list can be included in a block vector candidate list.

[0541] As another example, candidates in the above candidate list may be used as candidates when constructing a block vector merge candidate list. For example, candidates in the candidate list may be included in a block vector merge candidate list.

[0542] As another example, candidates within the candidate list can be used as candidates when constructing a sub-block motion vector candidate list. For example, candidates within the candidate list can be included in a sub-block motion vector candidate list.

[0543] As another example, candidates within the above candidate list may be used as candidates when constructing a sub-block merge candidate list. For example, candidates within the candidate list may be included in a sub-block merge candidate list.

[0544] In addition, the candidate list according to the present invention may mean at least one of an intra-screen prediction mode candidate list, a motion vector candidate list, a merge candidate list, a block vector candidate list, a block vector merge candidate list, a sub-block motion vector candidate list, and a sub-block merge candidate list. That is, at least one of the candidate list and the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list may be the same.

[0545] In addition, the candidate list according to the present invention may mean a separate candidate list other than at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list. That is, at least one of the candidate list and the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list may be separate lists. In this case, the candidate list according to the present invention may be a candidate list including at least one of the candidates included in or added to at least one of the intra-screen prediction mode candidate list, the motion vector candidate list, the merge candidate list, the block vector candidate list, the block vector merge candidate list, the sub-block motion vector candidate list, and the sub-block merge candidate list.

[0546]

[0547] The above embodiments can be performed in the same manner in the encoder and decoder.

[0548] An image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.

[0549] The order of applying the above embodiments may be different in the encoder and the decoder, and the order of applying the above embodiments may be the same in the encoder and the decoder.

[0550] The above embodiments can be performed for each of the luminance and chrominance signals, and the above embodiments can be performed equally for the luminance and chrominance signals.

[0551] The shape of the block to which the above embodiments of the present invention are applied may have a square shape or a non-square shape.

[0552] The above embodiments of the present invention can be applied according to the size of at least one of an encoding block, a prediction block, a transform block, a block, a current block, an encoding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size and / or a maximum size for the above embodiments to be applied, or may be defined as a fixed size to which the above embodiments are applied. In addition, the first embodiment of the above embodiments may be applied to a first size, and the second embodiment may be applied to a second size. That is, the above embodiments may be applied in a complex manner depending on the size. In addition, the above embodiments of the present invention may be applied only when the size is greater than or equal to the minimum size and less than or equal to the maximum size. That is, at least one of the above embodiments may be applied only when the block size is included within a certain range.

[0553] For example, the above embodiments can be applied only when the size of the current block is 8x8 or larger. For example, the above embodiments can be applied only when the size of the current block is 4x4. For example, the above embodiments can be applied only when the size of the current block is 16x16 or smaller. For example, the above embodiments can be applied only when the size of the current block is 16x16 or larger and 64x64 or smaller.

[0554] The above embodiments of the present invention can be applied according to temporal layers. A separate identifier is signaled to identify the temporal layer to which the above embodiments are applicable, and the above embodiments can be applied to the temporal layer specified by the identifier. The identifier here may be defined as the lowest layer and / or highest layer to which the above embodiments are applicable, or may be defined as indicating a specific layer to which the above embodiments are applicable. In addition, a fixed temporal layer to which the above embodiments are applicable may be defined.

[0555] For example, the above embodiments may be applied only when the temporal layer of the current image is the lowest layer. For example, the above embodiments may be applied only when the temporal layer identifier of the current image is 1 or greater. For example, the above embodiments may be applied only when the temporal layer of the current image is the highest layer.

[0556] The reference picture set used in the process of reference picture list construction and reference picture list modification can be at least one reference picture list among L0, L1, L2, and L3.

[0557] When calculating boundary strength in a deblocking filter, one or more motion vectors or block vectors of the current block can be used, up to a maximum of N. Here, N represents a positive integer greater than or equal to 1, and can be 2, 3, 4, etc.

[0558] The above embodiments of the present invention can also be applied when the motion vector or block vector has at least one of a 16-pixel (16-pel) unit, an 8-pixel (8-pel) unit, a 4-pixel (4-pel) unit, an integer-pel unit, a 1 / 2-pixel (1 / 2-pel) unit, a 1 / 4-pixel (1 / 4-pel) unit, a 1 / 8-pixel (1 / 8-pel) unit, a 1 / 16-pixel (1 / 16-pel) unit, a 1 / 32-pixel (1 / 32-pel) unit, and a 1 / 64-pixel (1 / 64-pel) unit. In addition, the motion vector or block vector can be selectively used for each pixel unit in the encoding / decoding process of the current block.

[0559] At least one of the syntax elements, such as the index or flag, which is entropy encoded in the encoder and entropy decoded in the decoder, can use at least one of the binarization, debinarization, and entropy encoding / decoding methods below. Here, the binarization / debinarization, entropy encoding / decoding methods are the signed 0-th order Exp_Golomb binarization / debinarization method (se(v)), the signed k-th order Exp_Golomb binarization / debinarization method (sek(v)), the 0-th order Exp_Golomb binarization / debinarization method for unsigned positive integers (ue(v)), the k-th order Exp_Golomb binarization / debinarization method for unsigned positive integers (uek(v)), the fixed-length binarization / debinarization method (f(n)), the truncated Rice binarization / debinarization method or the truncated unary It may include at least one of a binarization / debinarization method (tu(v)), a truncated binary binarization / debinarization method (tb(v)), a context-adaptive arithmetic encoding / decoding method (ae(v)), a byte-wise bit string (b(8)), a signed integer binarization / debinarization method (i(n)), an unsigned positive integer binarization / debinarization method (u(n)), and a unary binarization / debinarization method.

[0560] The encoding / decoding process of the current block may not be applied to only one of the above embodiments, but a specific embodiment or at least one combination of the above embodiments may be applied to the encoding / decoding process of the current block.

[0561] The slice type or tile group type to which the above embodiments of the present invention are applied is defined, and the above embodiments of the present invention can be applied according to the slice type or tile group type.

[0562] In the embodiments described above, the methods are described based on a flowchart as a series of steps or units. However, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and that other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.

[0563] The above-described embodiments include examples of various aspects. While not all possible combinations to illustrate the various aspects can be described, those skilled in the art will recognize that other combinations are possible. Accordingly, the present invention is intended to encompass all other alterations, modifications, and variations within the scope of the following claims.

[0564] The embodiments of the present invention described above may be implemented in the form of program commands that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specially designed and configured for the present invention or may be those known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specially configured to store and execute program commands, such as ROMs, RAMs, and flash memories. Examples of program commands include not only machine language codes generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

[0565] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.

[0566] Therefore, the idea of ​​the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of ​​the present invention.

[0567] The present invention can be used to encode / decode images.

Claims

1. In the video decryption method, A step of deriving movement information of the current block using a candidate list; A step of generating a prediction block of the current block using the motion information of the current block; and Including a step of adding movement information of the current block to the candidate list, A video decoding method, characterized in that the above candidate list is used for inter prediction of a block to be decoded after the current block.

2. In paragraph 1, A video decoding method, characterized in that the candidate list includes motion information of a block decoded before the current block.

3. In paragraph 2, A video decoding method, characterized in that if a block decoded before the current block and the current block belong to different CTU (Coding Tree Unit) rows, motion information of the current block is not added to the candidate list.

4. In paragraph 1, A video decoding method, characterized in that motion information of the current block is added to the candidate list only when the affine mode or sub-block based temporal motion vector derivation mode is not applied to the current block.

5. In paragraph 1, The step of adding the movement information of the current block to the candidate list is: If the number of motion information included in the candidate list is a preset value, a step of deleting the motion information included in the candidate list first among the motion information included in the candidate list; and A video decoding method, comprising the step of adding motion information of the current block to the next order of motion information included last in the candidate list.

6. In paragraph 1, The step of adding the movement information of the current block to the candidate list is: If the candidate list already includes motion information identical to the motion information of the current block, a step of deleting the identical motion information from the candidate list; and A video decoding method, comprising the step of adding motion information of the current block to the next order of motion information included last in the candidate list.

7. In paragraph 1, A video decoding method, characterized in that the maximum number of motion information that can be included in the above candidate list is preset.

8. In paragraph 1, A video decoding method further comprising a step of deriving a merge candidate list used for inter prediction of the current block using the candidate list.

9. In paragraph 8, The step of deriving the above merge candidate list is: A step of comparing the motion information included in the candidate list with the motion information included in the merge candidate list; and A video decoding method, comprising a step of adding motion information included in the candidate list to the merge candidate list based on the above comparison.

10. In paragraph 9, A video decoding method, characterized in that a comparison between motion information included in the candidate list and motion information included in the merge candidate list is performed only for a preset number of candidates located at the end of the candidate list.

11. In paragraph 9, A video decoding method, characterized in that, when the motion information included in the candidate list is different from the motion information included in the merge candidate list, the motion information included in the candidate list is added to the merge candidate list.

12. In paragraph 9, A video decoding method, characterized in that the motion information included in the candidate list is added to the merge candidate list after adding a spatial merge candidate or a temporal merge candidate to the merge candidate list.

13. In the video encoding method, A step of deriving a merge candidate list of the current block using the candidate list; A step of deriving motion information of the current block using the above merge list; and Including a step of adding movement information of the current block to the candidate list, A video encoding method, characterized in that the above candidate list is used for inter prediction of a block to be encoded following the current block.

14. In paragraph 13, A video encoding method, characterized in that the candidate list includes motion information of a block encoded before the current block.

15. In paragraph 14, A video encoding method, characterized in that if a block encoded before the current block and the current block belong to different Coding Tree Unit (CTU) rows, motion information of the current block is not added to the candidate list.

16. In paragraph 13, A video encoding method, characterized in that motion information of the current block is added to the candidate list only when the affine mode or sub-block based temporal motion vector derivation mode is not applied to the current block.

17. In paragraph 13, The step of adding the movement information of the current block to the candidate list is: If the number of motion information included in the candidate list is a preset value, a step of deleting the motion information included in the candidate list first among the motion information included in the candidate list; and A video encoding method, comprising the step of adding motion information of the current block to the next order of motion information included last in the candidate list.

18. In paragraph 13, The step of adding the movement information of the current block to the candidate list is: If the candidate list already includes motion information identical to the motion information of the current block, a step of deleting the identical motion information from the candidate list; and A video encoding method, comprising the step of adding motion information of the current block to the next order of motion information included last in the candidate list.

19. In paragraph 13, The step of deriving the above merge candidate list is: A step of comparing the motion information included in the candidate list with the motion information included in the merge candidate list; and A video encoding method, comprising a step of adding motion information included in the candidate list to the merge candidate list based on the above comparison.

20. A computer-readable recording medium storing a bitstream received by a video decoding device and used to restore a current block included in a current picture, The above bitstream includes information related to motion information of a block decoded before the current block, The motion information of the decrypted block before the current block is used to derive the candidate list, The above candidate list is used to derive motion information of the current block, The motion information of the current block is used to generate a prediction block of the current block, The movement information of the current block is used to update the candidate list, A computer-readable recording medium characterized in that the above candidate list is used for inter prediction of a block to be decrypted after the current block.